diff --git a/go.mod b/go.mod
index 4e7f10fa..86fa6405 100644
--- a/go.mod
+++ b/go.mod
@@ -1,11 +1,11 @@
module github.com/conductorone/baton-postgresql
-go 1.22.10
+go 1.23.4
-toolchain go1.23.4
+toolchain go1.24.1
require (
- github.com/conductorone/baton-sdk v0.2.65
+ github.com/conductorone/baton-sdk v0.2.84
github.com/georgysavva/scany v1.2.2
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/jackc/pgx/v4 v4.18.3
@@ -16,38 +16,47 @@ require (
require (
filippo.io/age v1.2.1 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
- github.com/aws/aws-sdk-go-v2 v1.32.4 // indirect
- github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 // indirect
- github.com/aws/aws-sdk-go-v2/config v1.28.3 // indirect
- github.com/aws/aws-sdk-go-v2/credentials v1.17.44 // indirect
- github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 // indirect
- github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.37 // indirect
- github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 // indirect
- github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 // indirect
- github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
- github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.23 // indirect
- github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
- github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.4 // indirect
- github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4 // indirect
- github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.4 // indirect
- github.com/aws/aws-sdk-go-v2/service/s3 v1.66.3 // indirect
- github.com/aws/aws-sdk-go-v2/service/sso v1.24.5 // indirect
- github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 // indirect
- github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 // indirect
- github.com/aws/smithy-go v1.22.1 // indirect
+ github.com/aws/aws-lambda-go v1.47.0 // indirect
+ github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect
+ github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect
+ github.com/aws/aws-sdk-go-v2/config v1.29.2 // indirect
+ github.com/aws/aws-sdk-go-v2/credentials v1.17.55 // indirect
+ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.25 // indirect
+ github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.55 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 // indirect
+ github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.29 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.3 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.10 // indirect
+ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.10 // indirect
+ github.com/aws/aws-sdk-go-v2/service/lambda v1.70.1 // indirect
+ github.com/aws/aws-sdk-go-v2/service/s3 v1.75.0 // indirect
+ github.com/aws/aws-sdk-go-v2/service/sso v1.24.12 // indirect
+ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.11 // indirect
+ github.com/aws/aws-sdk-go-v2/service/sts v1.33.10 // indirect
+ github.com/aws/smithy-go v1.22.2 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
+ github.com/cenkalti/backoff/v4 v4.3.0 // indirect
+ github.com/conductorone/dpop v0.2.2 // indirect
+ github.com/conductorone/dpop/integrations/dpop_grpc v0.2.2 // indirect
+ github.com/conductorone/dpop/integrations/dpop_oauth2 v0.2.2 // indirect
github.com/deckarep/golang-set/v2 v2.7.0 // indirect
github.com/dolthub/maphash v0.1.0 // indirect
github.com/doug-martin/goqu/v9 v9.19.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
- github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect
+ github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/gammazero/deque v1.0.0 // indirect
github.com/glebarez/go-sqlite v1.22.0 // indirect
- github.com/go-jose/go-jose/v3 v3.0.3 // indirect
+ github.com/go-jose/go-jose/v4 v4.0.4 // indirect
+ github.com/go-logr/logr v1.4.2 // indirect
+ github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0 // indirect
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
@@ -58,6 +67,7 @@ require (
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/pgtype v1.14.4 // indirect
github.com/jackc/puddle v1.3.0 // indirect
+ github.com/jellydator/ttlcache/v3 v3.3.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 // indirect
github.com/magiconair/properties v1.8.9 // indirect
@@ -67,42 +77,49 @@ require (
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
- github.com/pquerna/xjwt v0.2.0 // indirect
+ github.com/pquerna/xjwt v0.3.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
- github.com/sagikazarmark/locafero v0.6.0 // indirect
+ github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/shirou/gopsutil/v3 v3.24.5 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
- github.com/spf13/afero v1.11.0 // indirect
+ github.com/spf13/afero v1.12.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/cobra v1.8.1 // indirect
- github.com/spf13/pflag v1.0.5 // indirect
+ github.com/spf13/pflag v1.0.6 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tklauser/go-sysconf v0.3.14 // indirect
github.com/tklauser/numcpus v0.9.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
- go.opentelemetry.io/otel v1.33.0 // indirect
- go.opentelemetry.io/otel/metric v1.33.0 // indirect
+ go.opentelemetry.io/auto/sdk v1.1.0 // indirect
+ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
+ go.opentelemetry.io/otel v1.34.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
+ go.opentelemetry.io/otel/metric v1.34.0 // indirect
+ go.opentelemetry.io/otel/sdk v1.34.0 // indirect
+ go.opentelemetry.io/otel/trace v1.34.0 // indirect
+ go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/ratelimit v0.3.1 // indirect
- golang.org/x/crypto v0.32.0 // indirect
- golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
- golang.org/x/net v0.34.0 // indirect
- golang.org/x/oauth2 v0.25.0 // indirect
- golang.org/x/sync v0.10.0 // indirect
- golang.org/x/sys v0.29.0 // indirect
- golang.org/x/text v0.21.0 // indirect
- google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
- google.golang.org/grpc v1.68.0 // indirect
- google.golang.org/protobuf v1.36.3 // indirect
+ golang.org/x/crypto v0.34.0 // indirect
+ golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect
+ golang.org/x/net v0.35.0 // indirect
+ golang.org/x/oauth2 v0.26.0 // indirect
+ golang.org/x/sync v0.11.0 // indirect
+ golang.org/x/sys v0.30.0 // indirect
+ golang.org/x/text v0.22.0 // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287 // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 // indirect
+ google.golang.org/grpc v1.70.0 // indirect
+ google.golang.org/protobuf v1.36.5 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
- gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
- modernc.org/libc v1.61.8 // indirect
+ modernc.org/libc v1.61.10 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.8.2 // indirect
- modernc.org/sqlite v1.34.4 // indirect
+ modernc.org/sqlite v1.34.5 // indirect
)
diff --git a/go.sum b/go.sum
index 0ffe4f54..4be0ba78 100644
--- a/go.sum
+++ b/go.sum
@@ -9,47 +9,53 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-github.com/aws/aws-sdk-go-v2 v1.32.4 h1:S13INUiTxgrPueTmrm5DZ+MiAo99zYzHEFh1UNkOxNE=
-github.com/aws/aws-sdk-go-v2 v1.32.4/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo=
-github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 h1:lL7IfaFzngfx0ZwUGOZdsFFnQ5uLvR0hWqqhyE7Q9M8=
-github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7/go.mod h1:QraP0UcVlQJsmHfioCrveWOC1nbiWUl3ej08h4mXWoc=
-github.com/aws/aws-sdk-go-v2/config v1.28.3 h1:kL5uAptPcPKaJ4q0sDUjUIdueO18Q7JDzl64GpVwdOM=
-github.com/aws/aws-sdk-go-v2/config v1.28.3/go.mod h1:SPEn1KA8YbgQnwiJ/OISU4fz7+F6Fe309Jf0QTsRCl4=
-github.com/aws/aws-sdk-go-v2/credentials v1.17.44 h1:qqfs5kulLUHUEXlHEZXLJkgGoF3kkUeFUTVA585cFpU=
-github.com/aws/aws-sdk-go-v2/credentials v1.17.44/go.mod h1:0Lm2YJ8etJdEdw23s+q/9wTpOeo2HhNE97XcRa7T8MA=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 h1:woXadbf0c7enQ2UGCi8gW/WuKmE0xIzxBF/eD94jMKQ=
-github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19/go.mod h1:zminj5ucw7w0r65bP6nhyOd3xL6veAUMc3ElGMoLVb4=
-github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.37 h1:jHKR76E81sZvz1+x1vYYrHMxphG5LFBJPhSqEr4CLlE=
-github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.37/go.mod h1:iMkyPkmoJWQKzSOtaX+8oEJxAuqr7s8laxcqGDSHeII=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 h1:A2w6m6Tmr+BNXjDsr7M90zkWjsu4JXHwrzPg235STs4=
-github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23/go.mod h1:35EVp9wyeANdujZruvHiQUAo9E3vbhnIO1mTCAxMlY0=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 h1:pgYW9FCabt2M25MoHYCfMrVY2ghiiBKYWUVXfwZs+sU=
-github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23/go.mod h1:c48kLgzO19wAu3CPkDWC28JbaJ+hfQlsdl7I2+oqIbk=
-github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ=
-github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc=
-github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.23 h1:1SZBDiRzzs3sNhOMVApyWPduWYGAX0imGy06XiBnCAM=
-github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.23/go.mod h1:i9TkxgbZmHVh2S0La6CAXtnyFhlCX/pJ0JsOvBAS6Mk=
-github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y=
-github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE=
-github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.4 h1:aaPpoG15S2qHkWm4KlEyF01zovK1nW4BBbyXuHNSE90=
-github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.4/go.mod h1:eD9gS2EARTKgGr/W5xwgY/ik9z/zqpW+m/xOQbVxrMk=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4 h1:tHxQi/XHPK0ctd/wdOw0t7Xrc2OxcRCnVzv8lwWPu0c=
-github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4/go.mod h1:4GQbF1vJzG60poZqWatZlhP31y8PGCCVTvIGPdaaYJ0=
-github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.4 h1:E5ZAVOmI2apR8ADb72Q63KqwwwdW1XcMeXIlrZ1Psjg=
-github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.4/go.mod h1:wezzqVUOVVdk+2Z/JzQT4NxAU0NbhRe5W8pIE72jsWI=
-github.com/aws/aws-sdk-go-v2/service/s3 v1.66.3 h1:neNOYJl72bHrz9ikAEED4VqWyND/Po0DnEx64RW6YM4=
-github.com/aws/aws-sdk-go-v2/service/s3 v1.66.3/go.mod h1:TMhLIyRIyoGVlaEMAt+ITMbwskSTpcGsCPDq91/ihY0=
-github.com/aws/aws-sdk-go-v2/service/sso v1.24.5 h1:HJwZwRt2Z2Tdec+m+fPjvdmkq2s9Ra+VR0hjF7V2o40=
-github.com/aws/aws-sdk-go-v2/service/sso v1.24.5/go.mod h1:wrMCEwjFPms+V86TCQQeOxQF/If4vT44FGIOFiMC2ck=
-github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 h1:zcx9LiGWZ6i6pjdcoE9oXAB6mUdeyC36Ia/QEiIvYdg=
-github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4/go.mod h1:Tp/ly1cTjRLGBBmNccFumbZ8oqpZlpdhFf80SrRh4is=
-github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 h1:yDxvkz3/uOKfxnv8YhzOi9m+2OGIxF+on3KOISbK5IU=
-github.com/aws/aws-sdk-go-v2/service/sts v1.32.4/go.mod h1:9XEUty5v5UAsMiFOBJrNibZgwCeOma73jgGwwhgffa8=
-github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro=
-github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg=
+github.com/aws/aws-lambda-go v1.47.0 h1:0H8s0vumYx/YKs4sE7YM0ktwL2eWse+kfopsRI1sXVI=
+github.com/aws/aws-lambda-go v1.47.0/go.mod h1:dpMpZgvWx5vuQJfBt0zqBha60q7Dd7RfgJv23DymV8A=
+github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM=
+github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg=
+github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 h1:zAybnyUQXIZ5mok5Jqwlf58/TFE7uvd3IAsa1aF9cXs=
+github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10/go.mod h1:qqvMj6gHLR/EXWZw4ZbqlPbQUyenf4h82UQUlKc+l14=
+github.com/aws/aws-sdk-go-v2/config v1.29.2 h1:JuIxOEPcSKpMB0J+khMjznG9LIhIBdmqNiEcPclnwqc=
+github.com/aws/aws-sdk-go-v2/config v1.29.2/go.mod h1:HktTHregOZwNSM/e7WTfVSu9RCX+3eOv+6ij27PtaYs=
+github.com/aws/aws-sdk-go-v2/credentials v1.17.55 h1:CDhKnDEaGkLA5ZszV/qw5uwN5M8rbv9Cl0JRN+PRsaM=
+github.com/aws/aws-sdk-go-v2/credentials v1.17.55/go.mod h1:kPD/vj+RB5MREDUky376+zdnjZpR+WgdBBvwrmnlmKE=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.25 h1:kU7tmXNaJ07LsyN3BUgGqAmVmQtq0w6duVIHAKfp0/w=
+github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.25/go.mod h1:OiC8+OiqrURb1wrwmr/UbOVLFSWEGxjinj5C299VQdo=
+github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.55 h1:yfz56qEKO2MqTV0m81KtZS7swlP335FMrmoC1GBgU5k=
+github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.55/go.mod h1:O/fEJxrOLSCbhA8jL1xHwo8gzbN/iNcT+y7aq7c6KHE=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q=
+github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0=
+github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q=
+github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 h1:Pg9URiobXy85kgFev3og2CuOZ8JZUBENF+dcgWBaYNk=
+github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc=
+github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.29 h1:g9OUETuxA8i/Www5Cby0R3WSTe7ppFTZXHVLNskNS4w=
+github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.29/go.mod h1:CQk+koLR1QeY1+vm7lqNfFii07DEderKq6T3F1L2pyc=
+github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 h1:D4oz8/CzT9bAEYtVhSBmFj2dNOtaHOtMKc2vHBwYizA=
+github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2/go.mod h1:Za3IHqTQ+yNcRHxu1OFucBh0ACZT4j4VQFF0BqpZcLY=
+github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.3 h1:EP1ITDgYVPM2dL1bBBntJ7AW5yTjuWGz9XO+CZwpALU=
+github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.3/go.mod h1:5lWNWeAgWenJ/BZ/CP9k9DjLbC0pjnM045WjXRPPi14=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.10 h1:hN4yJBGswmFTOVYqmbz1GBs9ZMtQe8SrYxPwrkrlRv8=
+github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.10/go.mod h1:TsxON4fEZXyrKY+D+3d2gSTyJkGORexIYab9PTf56DA=
+github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.10 h1:fXoWC2gi7tdJYNTPnnlSGzEVwewUchOi8xVq/dkg8Qs=
+github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.10/go.mod h1:cvzBApD5dVazHU8C2rbBQzzzsKc8m5+wNJ9mCRZLKPc=
+github.com/aws/aws-sdk-go-v2/service/lambda v1.70.1 h1:EabaKQAptxXAeSL0sXKqfupPe/CpH965wqoloUK0aMM=
+github.com/aws/aws-sdk-go-v2/service/lambda v1.70.1/go.mod h1:c27kk10S36lBYgbG1jR3opn4OAS5Y/4wjJa1GiHK/X4=
+github.com/aws/aws-sdk-go-v2/service/s3 v1.75.0 h1:UPQJDyqUXICUt60X4PwbiEf+2QQ4VfXUhDk8OEiGtik=
+github.com/aws/aws-sdk-go-v2/service/s3 v1.75.0/go.mod h1:hHnELVnIHltd8EOF3YzahVX6F6y2C6dNqpRj1IMkS5I=
+github.com/aws/aws-sdk-go-v2/service/sso v1.24.12 h1:kznaW4f81mNMlREkU9w3jUuJvU5g/KsqDV43ab7Rp6s=
+github.com/aws/aws-sdk-go-v2/service/sso v1.24.12/go.mod h1:bZy9r8e0/s0P7BSDHgMLXK2KvdyRRBIQ2blKlvLt0IU=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.11 h1:mUwIpAvILeKFnRx4h1dEgGEFGuV8KJ3pEScZWVFYuZA=
+github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.11/go.mod h1:JDJtD+b8HNVv71axz8+S5492KM8wTzHRFpMKQbPlYxw=
+github.com/aws/aws-sdk-go-v2/service/sts v1.33.10 h1:g9d+TOsu3ac7SgmY2dUf1qMgu/uJVTlQ4VCbH6hRxSw=
+github.com/aws/aws-sdk-go-v2/service/sts v1.33.10/go.mod h1:WZfNmntu92HO44MVZAubQaz3qCuIdeOdog2sADfU6hU=
+github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ=
+github.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o=
github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
+github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
+github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
@@ -57,8 +63,14 @@ github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/cockroachdb/cockroach-go/v2 v2.2.0 h1:/5znzg5n373N/3ESjHF5SMLxiW4RKB05Ql//KWfeTFs=
github.com/cockroachdb/cockroach-go/v2 v2.2.0/go.mod h1:u3MiKYGupPPjkn3ozknpMUpxPaNLTFWAya419/zv6eI=
-github.com/conductorone/baton-sdk v0.2.65 h1:lD/MQ15GBCZQ0uCJ+QhBfrxnL36gxFKgdqYmPDBJrGY=
-github.com/conductorone/baton-sdk v0.2.65/go.mod h1:++OGHvXelWE8B/n4539ZgsXkwyV376AF/AAP+HhXJ1M=
+github.com/conductorone/baton-sdk v0.2.84 h1:EnpFmcbBBjqINYX3wLPKoyuCp4bB1Wiu/S+CKofxvdA=
+github.com/conductorone/baton-sdk v0.2.84/go.mod h1:jiIZlLAKcSe+3xgFYfYbLjxjni1JO749Yvqiqa8jFzA=
+github.com/conductorone/dpop v0.2.2 h1:jxfT5DXNHiDEO3sxvzzNWR05mMP7oHelr8Un6wqSDZc=
+github.com/conductorone/dpop v0.2.2/go.mod h1:gyo8TtzB9SCFCsjsICH4IaLZ7y64CcrDXMOPBwfq/3s=
+github.com/conductorone/dpop/integrations/dpop_grpc v0.2.2 h1:bJaj7ytpAfzRL53pErxW6T6wusVBVFZaRht3fPOZ2co=
+github.com/conductorone/dpop/integrations/dpop_grpc v0.2.2/go.mod h1:LYNoUc1lkvozk9HBio+xI2w8YyfYy0v2cAJtIgrkj8o=
+github.com/conductorone/dpop/integrations/dpop_oauth2 v0.2.2 h1:lZJ3AErhvbLL5YE5ZqY6N7u8uptyoy6TzKZF60fBPGE=
+github.com/conductorone/dpop/integrations/dpop_oauth2 v0.2.2/go.mod h1:2eI0qv+XaEhoCw0GKFF1yH4X8Mp4KLVEVnQKRFEy4zs=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
@@ -80,8 +92,8 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM=
-github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4=
+github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8=
+github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
@@ -92,10 +104,11 @@ github.com/georgysavva/scany v1.2.2 h1:ckhXrq3HuM+myrLaYg9fEbA/gUFysUz8NSWq12Djo
github.com/georgysavva/scany v1.2.2/go.mod h1:vGBpL5XRLOocMFFa55pj0P04DrL3I7qKVRL49K6Eu5o=
github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec+ruQ=
github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc=
-github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k=
-github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
+github.com/go-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q6/E=
+github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
+github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
@@ -122,7 +135,6 @@ github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaW
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
-github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo=
@@ -132,6 +144,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.0 h1:VD1gqscl4nYs1YxVuSdemTrSgTKrwOWDK0FVFMqm+Cg=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.0/go.mod h1:4EgsQoS4TOhJizV+JTFg40qx1Ofh3XmXEQNBpgvNT40=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
@@ -203,6 +217,8 @@ github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jackc/puddle v1.3.0 h1:eHK/5clGOatcjX3oWGBO/MpxpbHzSwud5EWTSCI+MX0=
github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
+github.com/jellydator/ttlcache/v3 v3.3.0 h1:BdoC9cE81qXfrxeb9eoJi9dWrdhSuwXMAnHTbnBm4Wc=
+github.com/jellydator/ttlcache/v3 v3.3.0/go.mod h1:bj2/e0l4jRnQdrnSTaGTsh4GSXvMjQcy41i7th0GVGw=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jmoiron/sqlx v1.3.1/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ=
@@ -263,20 +279,20 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
-github.com/pquerna/xjwt v0.2.0 h1:+RrTRRRqgG2RhYfmcs1WR8/4OrxShvqcVET7Rcb8A7o=
-github.com/pquerna/xjwt v0.2.0/go.mod h1:xkrUYjBzqP3vBET2QdLkjLTcpPFa0bhPa3H445NgZEM=
+github.com/pquerna/xjwt v0.3.0 h1:Ij21n2sUdDA1+ybybB1CAxLhSNmhsKhBnZ+UXUV+ytM=
+github.com/pquerna/xjwt v0.3.0/go.mod h1:Gb5PNug9MopYlFiYubUuIYPGobzVsDUKtdkJcCxEzIw=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
-github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
+github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
+github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3N51bwOk=
-github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0=
+github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo=
+github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k=
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
@@ -296,14 +312,15 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
-github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
-github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=
+github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs=
+github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4=
github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
-github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
+github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -336,18 +353,26 @@ github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
-go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw=
-go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 h1:rgMkmiGfix9vFJDcDi1PK8WEQP4FLQwLDfhp5ZLpFeE=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0/go.mod h1:ijPqXp5P6IRRByFVVg9DY8P5HkxkHE5ARIa+86aXPf4=
+go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
+go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20=
-go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ=
-go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M=
-go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
-go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
-go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc=
-go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8=
-go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s=
-go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck=
+go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
+go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
+go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
+go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
+go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU=
+go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ=
+go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
+go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
+go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4=
+go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
@@ -390,11 +415,11 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=
-golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
-golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
+golang.org/x/crypto v0.34.0 h1:+/C6tk6rf/+t5DhUketUbD1aNGqiSX3j15Z6xuIDlBA=
+golang.org/x/crypto v0.34.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 h1:yqrTHse8TCMW1M1ZCP+VAR/l0kKxwaAIqN/il7x4voA=
-golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU=
+golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c h1:KL/ZBHXgKGVmuZBZ01Lt57yE5ws8ZPSkkihmEyq7FXc=
+golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
@@ -421,11 +446,11 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
-golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
-golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
+golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
+golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70=
-golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
+golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE=
+golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
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-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -433,8 +458,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
-golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
+golang.org/x/sync v0.11.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-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -461,16 +486,16 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
-golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
+golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
-golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
-golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
+golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
+golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
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=
@@ -481,8 +506,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
-golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
-golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
+golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
+golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
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=
@@ -513,27 +538,27 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
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/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50=
+google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287 h1:A2ni10G3UlplFrWdCDJTl7D7mJ7GSRm37S+PDimaKRw=
+google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287/go.mod h1:iYONQfRdizDB8JJBybql13nArx91jcUk7zCXEsOofM4=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 h1:DMTIbak9GhdaSxEjvVzAeNZvyc03I61duqNbnm3SU0M=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I=
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=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
-google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0=
-google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA=
-google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU=
-google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
+google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ=
+google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw=
+google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
+google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
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=
-gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
-gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
-gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI=
-gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
@@ -550,14 +575,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
modernc.org/cc/v4 v4.24.4 h1:TFkx1s6dCkQpd6dKurBNmpo+G8Zl4Sq/ztJ+2+DEsh0=
modernc.org/cc/v4 v4.24.4/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0=
-modernc.org/ccgo/v4 v4.23.12 h1:UF08a38c4B+K3VoGipBrVWLFUCHd8+X20QZtFAIlQNk=
-modernc.org/ccgo/v4 v4.23.12/go.mod h1:vdN4h2WR5aEoNondUx26K7G8X+nuBscYnAEWSRmN2/0=
+modernc.org/ccgo/v4 v4.23.15 h1:wFDan71KnYqeHz4eF63vmGE6Q6Pc0PUGDpP0PRMYjDc=
+modernc.org/ccgo/v4 v4.23.15/go.mod h1:nJX30dks/IWuBOnVa7VRii9Me4/9TZ1SC9GNtmARTy0=
modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE=
modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ=
-modernc.org/gc/v2 v2.6.1 h1:+Qf6xdG8l7B27TQ8D8lw/iFMUj1RXRBOuMUWziJOsk8=
-modernc.org/gc/v2 v2.6.1/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
-modernc.org/libc v1.61.8 h1:50KrjlFFoKq9ABh+bNVUf5SfVfQ4NY7CEyFBh65qc60=
-modernc.org/libc v1.61.8/go.mod h1:XloulGc0yIRM+91kbwrp7jNi/mfYPAvDOD2qwzWEij0=
+modernc.org/gc/v2 v2.6.2 h1:YBXi5Kqp6aCK3fIxwKQ3/fErvawVKwjOLItxj1brGds=
+modernc.org/gc/v2 v2.6.2/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
+modernc.org/libc v1.61.10 h1:zPPaT7/dnMkTzG8b9HjIsvxWr4Ixk3Ce/WPuxakHj7Q=
+modernc.org/libc v1.61.10/go.mod h1:HHX+srFdn839oaJRd0W8hBM3eg+mieyZCAjWwB08/nM=
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
modernc.org/memory v1.8.2 h1:cL9L4bcoAObu4NkxOlKWBWtNHIsnnACGF/TbqQ6sbcI=
@@ -566,8 +591,8 @@ modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8=
modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
-modernc.org/sqlite v1.34.4 h1:sjdARozcL5KJBvYQvLlZEmctRgW9xqIZc2ncN7PU0P8=
-modernc.org/sqlite v1.34.4/go.mod h1:3QQFCG2SEMtc2nv+Wq4cQCH7Hjcg+p/RMlS1XK+zwbk=
+modernc.org/sqlite v1.34.5 h1:Bb6SR13/fjp15jt70CL4f18JIN7p7dnMExd+UFnF15g=
+modernc.org/sqlite v1.34.5/go.mod h1:YLuNmX9NKs8wRNK2ko1LW1NGYcc9FkBO69JOt1AR9JE=
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
diff --git a/pkg/connector/role.go b/pkg/connector/role.go
index bbd878d7..e03fda6b 100644
--- a/pkg/connector/role.go
+++ b/pkg/connector/role.go
@@ -199,10 +199,6 @@ func (r *roleSyncer) Grants(ctx context.Context, resource *v2.Resource, pToken *
return ret, nextPageToken, nil, nil
}
-func (r *roleSyncer) Create(ctx context.Context, resource *v2.Resource) (*v2.Resource, annotations.Annotations, error) {
- return nil, nil, fmt.Errorf("baton-postgres: role creation not supported")
-}
-
func (r *roleSyncer) Delete(ctx context.Context, resourceId *v2.ResourceId) (annotations.Annotations, error) {
if resourceId.ResourceType != roleResourceType.Id {
return nil, fmt.Errorf("baton-postgres: non-role/user resource passed to role delete")
diff --git a/pkg/postgres/databases.go b/pkg/postgres/databases.go
index a93cf769..983b7e16 100644
--- a/pkg/postgres/databases.go
+++ b/pkg/postgres/databases.go
@@ -10,7 +10,7 @@ import (
"github.com/georgysavva/scany/pgxscan"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
- "github.com/jackc/pgx/v4"
+ pgx "github.com/jackc/pgx/v4"
"go.uber.org/zap"
)
diff --git a/pkg/postgres/logger.go b/pkg/postgres/logger.go
index 3947d0a4..867d8d4e 100644
--- a/pkg/postgres/logger.go
+++ b/pkg/postgres/logger.go
@@ -4,7 +4,7 @@ import (
"context"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
- "github.com/jackc/pgx/v4"
+ pgx "github.com/jackc/pgx/v4"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
diff --git a/pkg/postgres/roles.go b/pkg/postgres/roles.go
index 9b5fe727..45f25a79 100644
--- a/pkg/postgres/roles.go
+++ b/pkg/postgres/roles.go
@@ -10,7 +10,7 @@ import (
"github.com/georgysavva/scany/pgxscan"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
- "github.com/jackc/pgx/v4"
+ pgx "github.com/jackc/pgx/v4"
"go.uber.org/zap"
)
diff --git a/vendor/github.com/aws/aws-lambda-go/LICENSE b/vendor/github.com/aws/aws-lambda-go/LICENSE
new file mode 100644
index 00000000..6b0b1270
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/LICENSE
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/vendor/github.com/aws/aws-lambda-go/LICENSE-LAMBDACODE b/vendor/github.com/aws/aws-lambda-go/LICENSE-LAMBDACODE
new file mode 100644
index 00000000..11f98088
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/LICENSE-LAMBDACODE
@@ -0,0 +1,15 @@
+MIT No Attribution
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this
+software and associated documentation files (the "Software"), to deal in the Software
+without restriction, including without limitation the rights to use, copy, modify,
+merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/vendor/github.com/aws/aws-lambda-go/LICENSE-SUMMARY b/vendor/github.com/aws/aws-lambda-go/LICENSE-SUMMARY
new file mode 100644
index 00000000..cd56e29e
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/LICENSE-SUMMARY
@@ -0,0 +1,7 @@
+Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+Lambda functions are made available under a modified MIT license.
+See LICENSE-LAMBDACODE for details.
+
+The remainder of the project is made available under the terms of the
+Apache License, version 2.0. See LICENSE for details.
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/README.md b/vendor/github.com/aws/aws-lambda-go/lambda/README.md
new file mode 100644
index 00000000..dcaca6d1
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/README.md
@@ -0,0 +1,3 @@
+# Overview
+
+[](https://pkg.go.dev/github.com/aws/aws-lambda-go/lambda)
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/entry.go b/vendor/github.com/aws/aws-lambda-go/lambda/entry.go
new file mode 100644
index 00000000..da82fab4
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/entry.go
@@ -0,0 +1,113 @@
+// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+package lambda
+
+import (
+ "context"
+ "log"
+ "os"
+)
+
+// Start takes a handler and talks to an internal Lambda endpoint to pass requests to the handler. If the
+// handler does not match one of the supported types an appropriate error message will be returned to the caller.
+// Start blocks, and does not return after being called.
+//
+// Rules:
+//
+// - handler must be a function
+// - handler may take between 0 and two arguments.
+// - if there are two arguments, the first argument must satisfy the "context.Context" interface.
+// - handler may return between 0 and two values.
+// - if there are two return values, the second return value must be an error.
+// - if there is one return value it must be an error.
+//
+// Valid function signatures:
+//
+// func ()
+// func (TIn)
+// func () error
+// func (TIn) error
+// func () (TOut, error)
+// func (TIn) (TOut, error)
+// func (context.Context)
+// func (context.Context) error
+// func (context.Context) (TOut, error)
+// func (context.Context, TIn)
+// func (context.Context, TIn) error
+// func (context.Context, TIn) (TOut, error)
+//
+// Where "TIn" and "TOut" are types compatible with the "encoding/json" standard library.
+// See https://golang.org/pkg/encoding/json/#Unmarshal for how deserialization behaves
+//
+// "TOut" may also implement the io.Reader interface.
+// If "TOut" is both json serializable and implements io.Reader, then the json serialization is used.
+func Start(handler interface{}) {
+ StartWithOptions(handler)
+}
+
+// StartWithContext is the same as Start except sets the base context for the function.
+//
+// Deprecated: use lambda.StartWithOptions(handler, lambda.WithContext(ctx)) instead
+func StartWithContext(ctx context.Context, handler interface{}) {
+ StartWithOptions(handler, WithContext(ctx))
+}
+
+// StartHandler takes in a Handler wrapper interface which can be implemented either by a
+// custom function or a struct.
+//
+// Handler implementation requires a single "Invoke()" function:
+//
+// func Invoke(context.Context, []byte) ([]byte, error)
+//
+// Deprecated: use lambda.Start(handler) instead
+func StartHandler(handler Handler) {
+ StartWithOptions(handler)
+}
+
+// StartWithOptions is the same as Start after the application of any handler options specified
+func StartWithOptions(handler interface{}, options ...Option) {
+ start(newHandler(handler, options...))
+}
+
+type startFunction struct {
+ env string
+ f func(envValue string, handler Handler) error
+}
+
+var (
+ runtimeAPIStartFunction = &startFunction{
+ env: "AWS_LAMBDA_RUNTIME_API",
+ f: startRuntimeAPILoop,
+ }
+ startFunctions = []*startFunction{runtimeAPIStartFunction}
+
+ // This allows end to end testing of the Start functions, by tests overwriting this function to keep the program alive
+ logFatalf = log.Fatalf
+)
+
+// StartHandlerWithContext is the same as StartHandler except sets the base context for the function.
+//
+// Handler implementation requires a single "Invoke()" function:
+//
+// func Invoke(context.Context, []byte) ([]byte, error)
+//
+// Deprecated: use lambda.StartWithOptions(handler, lambda.WithContext(ctx)) instead
+func StartHandlerWithContext(ctx context.Context, handler Handler) {
+ StartWithOptions(handler, WithContext(ctx))
+}
+
+func start(handler *handlerOptions) {
+ var keys []string
+ for _, start := range startFunctions {
+ config := os.Getenv(start.env)
+ if config != "" {
+ // in normal operation, the start function never returns
+ // if it does, exit!, this triggers a restart of the lambda function
+ err := start.f(config, handler)
+ logFatalf("%v", err)
+ }
+ keys = append(keys, start.env)
+ }
+ logFatalf("expected AWS Lambda environment variables %s are not defined", keys)
+
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/entry_generic.go b/vendor/github.com/aws/aws-lambda-go/lambda/entry_generic.go
new file mode 100644
index 00000000..29708385
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/entry_generic.go
@@ -0,0 +1,21 @@
+//go:build go1.18
+// +build go1.18
+
+// Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved
+
+package lambda
+
+import (
+ "context"
+)
+
+// HandlerFunc represents a valid input with two arguments and two returns as described by Start
+type HandlerFunc[TIn, TOut any] interface {
+ func(context.Context, TIn) (TOut, error)
+}
+
+// StartHandlerFunc is the same as StartWithOptions except that it takes a generic input
+// so that the function signature can be validated at compile time.
+func StartHandlerFunc[TIn any, TOut any, H HandlerFunc[TIn, TOut]](handler H, options ...Option) {
+ start(newHandler(handler, options...))
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/errors.go b/vendor/github.com/aws/aws-lambda-go/lambda/errors.go
new file mode 100644
index 00000000..5d482d04
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/errors.go
@@ -0,0 +1,46 @@
+// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved
+
+package lambda
+
+import (
+ "reflect"
+
+ "github.com/aws/aws-lambda-go/lambda/messages"
+)
+
+func getErrorType(err interface{}) string {
+ errorType := reflect.TypeOf(err)
+ if errorType.Kind() == reflect.Ptr {
+ return errorType.Elem().Name()
+ }
+ return errorType.Name()
+}
+
+func lambdaErrorResponse(invokeError error) *messages.InvokeResponse_Error {
+ if ive, ok := invokeError.(messages.InvokeResponse_Error); ok {
+ return &ive
+ }
+ var errorName string
+ if errorType := reflect.TypeOf(invokeError); errorType.Kind() == reflect.Ptr {
+ errorName = errorType.Elem().Name()
+ } else {
+ errorName = errorType.Name()
+ }
+ return &messages.InvokeResponse_Error{
+ Message: invokeError.Error(),
+ Type: errorName,
+ }
+}
+
+func lambdaPanicResponse(err interface{}) *messages.InvokeResponse_Error {
+ if ive, ok := err.(messages.InvokeResponse_Error); ok {
+ return &ive
+ }
+ panicInfo := getPanicInfo(err)
+ return &messages.InvokeResponse_Error{
+ Message: panicInfo.Message,
+ Type: getErrorType(err),
+ StackTrace: panicInfo.StackTrace,
+ ShouldExit: true,
+ }
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/extensions_api_client.go b/vendor/github.com/aws/aws-lambda-go/lambda/extensions_api_client.go
new file mode 100644
index 00000000..c9703891
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/extensions_api_client.go
@@ -0,0 +1,90 @@
+package lambda
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "io"
+ "io/ioutil" //nolint: staticcheck
+ "net/http"
+)
+
+const (
+ headerExtensionName = "Lambda-Extension-Name"
+ headerExtensionIdentifier = "Lambda-Extension-Identifier"
+ extensionAPIVersion = "2020-01-01"
+)
+
+type extensionAPIEventType string
+
+const (
+ extensionInvokeEvent extensionAPIEventType = "INVOKE" //nolint:deadcode,unused,varcheck
+ extensionShutdownEvent extensionAPIEventType = "SHUTDOWN" //nolint:deadcode,unused,varcheck
+)
+
+type extensionAPIClient struct {
+ baseURL string
+ httpClient *http.Client
+}
+
+func newExtensionAPIClient(address string) *extensionAPIClient {
+ client := &http.Client{
+ Timeout: 0, // connections to the extensions API are never expected to time out
+ }
+ endpoint := "http://" + address + "/" + extensionAPIVersion + "/extension/"
+ return &extensionAPIClient{
+ baseURL: endpoint,
+ httpClient: client,
+ }
+}
+
+func (c *extensionAPIClient) register(name string, events ...extensionAPIEventType) (string, error) {
+ url := c.baseURL + "register"
+ body, _ := json.Marshal(struct {
+ Events []extensionAPIEventType `json:"events"`
+ }{
+ Events: events,
+ })
+
+ req, _ := http.NewRequest(http.MethodPost, url, bytes.NewReader(body))
+ req.Header.Add(headerExtensionName, name)
+ res, err := c.httpClient.Do(req)
+ if err != nil {
+ return "", fmt.Errorf("failed to register extension: %v", err)
+ }
+ defer res.Body.Close()
+ _, _ = io.Copy(ioutil.Discard, res.Body)
+
+ if res.StatusCode != http.StatusOK {
+ return "", fmt.Errorf("failed to register extension, got response status: %d %s", res.StatusCode, http.StatusText(res.StatusCode))
+ }
+
+ return res.Header.Get(headerExtensionIdentifier), nil
+}
+
+type extensionEventResponse struct {
+ EventType extensionAPIEventType
+ // ... the rest not implemented
+}
+
+func (c *extensionAPIClient) next(id string) (response extensionEventResponse, err error) {
+ url := c.baseURL + "event/next"
+
+ req, _ := http.NewRequest(http.MethodGet, url, nil)
+ req.Header.Add(headerExtensionIdentifier, id)
+ res, err := c.httpClient.Do(req)
+ if err != nil {
+ err = fmt.Errorf("failed to get extension event: %v", err)
+ return
+ }
+ defer res.Body.Close()
+ _, _ = io.Copy(ioutil.Discard, res.Body)
+
+ if res.StatusCode != http.StatusOK {
+ err = fmt.Errorf("failed to register extension, got response status: %d %s", res.StatusCode, http.StatusText(res.StatusCode))
+ return
+ }
+
+ err = json.NewDecoder(res.Body).Decode(&response)
+ return
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/handler.go b/vendor/github.com/aws/aws-lambda-go/lambda/handler.go
new file mode 100644
index 00000000..c455656d
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/handler.go
@@ -0,0 +1,395 @@
+// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+package lambda
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "io/ioutil" // nolint:staticcheck
+ "reflect"
+ "strings"
+
+ "github.com/aws/aws-lambda-go/lambda/handlertrace"
+)
+
+type Handler interface {
+ Invoke(ctx context.Context, payload []byte) ([]byte, error)
+}
+
+type handlerOptions struct {
+ handlerFunc
+ baseContext context.Context
+ contextValues map[interface{}]interface{}
+ jsonRequestUseNumber bool
+ jsonRequestDisallowUnknownFields bool
+ jsonResponseEscapeHTML bool
+ jsonResponseIndentPrefix string
+ jsonResponseIndentValue string
+ enableSIGTERM bool
+ sigtermCallbacks []func()
+}
+
+type Option func(*handlerOptions)
+
+// WithContext is a HandlerOption that sets the base context for all invocations of the handler.
+//
+// Usage:
+//
+// lambda.StartWithOptions(
+// func (ctx context.Context) (string, error) {
+// return ctx.Value("foo"), nil
+// },
+// lambda.WithContext(context.WithValue(context.Background(), "foo", "bar"))
+// )
+func WithContext(ctx context.Context) Option {
+ return Option(func(h *handlerOptions) {
+ h.baseContext = ctx
+ })
+}
+
+// WithContextValue adds a value to the handler context.
+// If a base context was set using WithContext, that base is used as the parent.
+//
+// Usage:
+//
+// lambda.StartWithOptions(
+// func (ctx context.Context) (string, error) {
+// return ctx.Value("foo"), nil
+// },
+// lambda.WithContextValue("foo", "bar")
+// )
+func WithContextValue(key interface{}, value interface{}) Option {
+ return Option(func(h *handlerOptions) {
+ h.contextValues[key] = value
+ })
+}
+
+// WithSetEscapeHTML sets the SetEscapeHTML argument on the underlying json encoder
+//
+// Usage:
+//
+// lambda.StartWithOptions(
+// func () (string, error) {
+// return "
hello!>", nil
+// },
+// lambda.WithSetEscapeHTML(true),
+// )
+func WithSetEscapeHTML(escapeHTML bool) Option {
+ return Option(func(h *handlerOptions) {
+ h.jsonResponseEscapeHTML = escapeHTML
+ })
+}
+
+// WithSetIndent sets the SetIndent argument on the underling json encoder
+//
+// Usage:
+//
+// lambda.StartWithOptions(
+// func (event any) (any, error) {
+// return event, nil
+// },
+// lambda.WithSetIndent(">"," "),
+// )
+func WithSetIndent(prefix, indent string) Option {
+ return Option(func(h *handlerOptions) {
+ h.jsonResponseIndentPrefix = prefix
+ h.jsonResponseIndentValue = indent
+ })
+}
+
+// WithUseNumber sets the UseNumber option on the underlying json decoder
+//
+// Usage:
+//
+// lambda.StartWithOptions(
+// func (event any) (any, error) {
+// return event, nil
+// },
+// lambda.WithUseNumber(true)
+// )
+func WithUseNumber(useNumber bool) Option {
+ return Option(func(h *handlerOptions) {
+ h.jsonRequestUseNumber = useNumber
+ })
+}
+
+// WithUseNumber sets the DisallowUnknownFields option on the underlying json decoder
+//
+// Usage:
+//
+// lambda.StartWithOptions(
+// func (event any) (any, error) {
+// return event, nil
+// },
+// lambda.WithDisallowUnknownFields(true)
+// )
+func WithDisallowUnknownFields(disallowUnknownFields bool) Option {
+ return Option(func(h *handlerOptions) {
+ h.jsonRequestDisallowUnknownFields = disallowUnknownFields
+ })
+}
+
+// WithEnableSIGTERM enables SIGTERM behavior within the Lambda platform on container spindown.
+// SIGKILL will occur ~500ms after SIGTERM.
+// Optionally, an array of callback functions to run on SIGTERM may be provided.
+//
+// Usage:
+//
+// lambda.StartWithOptions(
+// func (event any) (any, error) {
+// return event, nil
+// },
+// lambda.WithEnableSIGTERM(func() {
+// log.Print("function container shutting down...")
+// })
+// )
+func WithEnableSIGTERM(callbacks ...func()) Option {
+ return Option(func(h *handlerOptions) {
+ h.sigtermCallbacks = append(h.sigtermCallbacks, callbacks...)
+ h.enableSIGTERM = true
+ })
+}
+
+// handlerTakesContext returns whether the handler takes a context.Context as its first argument.
+func handlerTakesContext(handler reflect.Type) (bool, error) {
+ switch handler.NumIn() {
+ case 0:
+ return false, nil
+ case 1:
+ contextType := reflect.TypeOf((*context.Context)(nil)).Elem()
+ argumentType := handler.In(0)
+ if argumentType.Kind() != reflect.Interface {
+ return false, nil
+ }
+
+ // handlers like func(event any) are valid.
+ if argumentType.NumMethod() == 0 {
+ return false, nil
+ }
+
+ if !contextType.Implements(argumentType) || !argumentType.Implements(contextType) {
+ return false, fmt.Errorf("handler takes an interface, but it is not context.Context: %q", argumentType.Name())
+ }
+ return true, nil
+ case 2:
+ contextType := reflect.TypeOf((*context.Context)(nil)).Elem()
+ argumentType := handler.In(0)
+ if argumentType.Kind() != reflect.Interface || !contextType.Implements(argumentType) || !argumentType.Implements(contextType) {
+ return false, fmt.Errorf("handler takes two arguments, but the first is not Context. got %s", argumentType.Kind())
+ }
+ return true, nil
+ }
+ return false, fmt.Errorf("handlers may not take more than two arguments, but handler takes %d", handler.NumIn())
+}
+
+func validateReturns(handler reflect.Type) error {
+ errorType := reflect.TypeOf((*error)(nil)).Elem()
+
+ switch n := handler.NumOut(); {
+ case n > 2:
+ return fmt.Errorf("handler may not return more than two values")
+ case n > 1:
+ if !handler.Out(1).Implements(errorType) {
+ return fmt.Errorf("handler returns two values, but the second does not implement error")
+ }
+ case n == 1:
+ if !handler.Out(0).Implements(errorType) {
+ return fmt.Errorf("handler returns a single value, but it does not implement error")
+ }
+ }
+
+ return nil
+}
+
+// NewHandler creates a base lambda handler from the given handler function. The
+// returned Handler performs JSON serialization and deserialization, and
+// delegates to the input handler function. The handler function parameter must
+// satisfy the rules documented by Start. If handlerFunc is not a valid
+// handler, the returned Handler simply reports the validation error.
+func NewHandler(handlerFunc interface{}) Handler {
+ return NewHandlerWithOptions(handlerFunc)
+}
+
+// NewHandlerWithOptions creates a base lambda handler from the given handler function. The
+// returned Handler performs JSON serialization and deserialization, and
+// delegates to the input handler function. The handler function parameter must
+// satisfy the rules documented by Start. If handlerFunc is not a valid
+// handler, the returned Handler simply reports the validation error.
+func NewHandlerWithOptions(handlerFunc interface{}, options ...Option) Handler {
+ return newHandler(handlerFunc, options...)
+}
+
+func newHandler(handlerFunc interface{}, options ...Option) *handlerOptions {
+ if h, ok := handlerFunc.(*handlerOptions); ok {
+ return h
+ }
+ h := &handlerOptions{
+ baseContext: context.Background(),
+ contextValues: map[interface{}]interface{}{},
+ jsonResponseEscapeHTML: false,
+ jsonResponseIndentPrefix: "",
+ jsonResponseIndentValue: "",
+ }
+ for _, option := range options {
+ option(h)
+ }
+ for k, v := range h.contextValues {
+ h.baseContext = context.WithValue(h.baseContext, k, v)
+ }
+ if h.enableSIGTERM {
+ enableSIGTERM(h.sigtermCallbacks)
+ }
+ h.handlerFunc = reflectHandler(handlerFunc, h)
+ return h
+}
+
+type handlerFunc func(context.Context, []byte) (io.Reader, error)
+
+// back-compat for the rpc mode
+func (h handlerFunc) Invoke(ctx context.Context, payload []byte) ([]byte, error) {
+ response, err := h(ctx, payload)
+ if err != nil {
+ return nil, err
+ }
+ // if the response needs to be closed (ex: net.Conn, os.File), ensure it's closed before the next invoke to prevent a resource leak
+ if response, ok := response.(io.Closer); ok {
+ defer response.Close()
+ }
+ // optimization: if the response is a *bytes.Buffer, a copy can be eliminated
+ switch response := response.(type) {
+ case *jsonOutBuffer:
+ return response.Bytes(), nil
+ case *bytes.Buffer:
+ return response.Bytes(), nil
+ }
+ b, err := ioutil.ReadAll(response)
+ if err != nil {
+ return nil, err
+ }
+ return b, nil
+}
+
+func errorHandler(err error) handlerFunc {
+ return func(_ context.Context, _ []byte) (io.Reader, error) {
+ return nil, err
+ }
+}
+
+type jsonOutBuffer struct {
+ *bytes.Buffer
+}
+
+func (j *jsonOutBuffer) ContentType() string {
+ return contentTypeJSON
+}
+
+func reflectHandler(f interface{}, h *handlerOptions) handlerFunc {
+ if f == nil {
+ return errorHandler(errors.New("handler is nil"))
+ }
+
+ // back-compat: types with reciever `Invoke(context.Context, []byte) ([]byte, error)` need the return bytes wrapped
+ if handler, ok := f.(Handler); ok {
+ return func(ctx context.Context, payload []byte) (io.Reader, error) {
+ b, err := handler.Invoke(ctx, payload)
+ if err != nil {
+ return nil, err
+ }
+ return bytes.NewBuffer(b), nil
+ }
+ }
+
+ handler := reflect.ValueOf(f)
+ handlerType := reflect.TypeOf(f)
+ if handlerType.Kind() != reflect.Func {
+ return errorHandler(fmt.Errorf("handler kind %s is not %s", handlerType.Kind(), reflect.Func))
+ }
+
+ takesContext, err := handlerTakesContext(handlerType)
+ if err != nil {
+ return errorHandler(err)
+ }
+
+ if err := validateReturns(handlerType); err != nil {
+ return errorHandler(err)
+ }
+
+ out := &jsonOutBuffer{bytes.NewBuffer(nil)}
+ return func(ctx context.Context, payload []byte) (io.Reader, error) {
+ out.Reset()
+ in := bytes.NewBuffer(payload)
+ decoder := json.NewDecoder(in)
+ if h.jsonRequestUseNumber {
+ decoder.UseNumber()
+ }
+ if h.jsonRequestDisallowUnknownFields {
+ decoder.DisallowUnknownFields()
+ }
+ encoder := json.NewEncoder(out)
+ encoder.SetEscapeHTML(h.jsonResponseEscapeHTML)
+ encoder.SetIndent(h.jsonResponseIndentPrefix, h.jsonResponseIndentValue)
+
+ trace := handlertrace.FromContext(ctx)
+
+ // construct arguments
+ var args []reflect.Value
+ if takesContext {
+ args = append(args, reflect.ValueOf(ctx))
+ }
+ if (handlerType.NumIn() == 1 && !takesContext) || handlerType.NumIn() == 2 {
+ eventType := handlerType.In(handlerType.NumIn() - 1)
+ event := reflect.New(eventType)
+ if err := decoder.Decode(event.Interface()); err != nil {
+ return nil, err
+ }
+ if nil != trace.RequestEvent {
+ trace.RequestEvent(ctx, event.Elem().Interface())
+ }
+ args = append(args, event.Elem())
+ }
+
+ response := handler.Call(args)
+
+ // return the error, if any
+ if len(response) > 0 {
+ if errVal, ok := response[len(response)-1].Interface().(error); ok && errVal != nil {
+ return nil, errVal
+ }
+ }
+ // set the response value, if any
+ var val interface{}
+ if len(response) > 1 {
+ val = response[0].Interface()
+ if nil != trace.ResponseEvent {
+ trace.ResponseEvent(ctx, val)
+ }
+ }
+
+ // encode to JSON
+ if err := encoder.Encode(val); err != nil {
+ // if response is not JSON serializable, but the response type is a reader, return it as-is
+ if reader, ok := val.(io.Reader); ok {
+ return reader, nil
+ }
+ return nil, err
+ }
+
+ // if response value is an io.Reader, return it as-is
+ if reader, ok := val.(io.Reader); ok {
+ // back-compat, don't return the reader if the value serialized to a non-empty json
+ if strings.HasPrefix(out.String(), "{}") {
+ return reader, nil
+ }
+ }
+
+ // back-compat, strip the encoder's trailing newline unless WithSetIndent was used
+ if h.jsonResponseIndentValue == "" && h.jsonResponseIndentPrefix == "" {
+ out.Truncate(out.Len() - 1)
+ }
+ return out, nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/handlertrace/trace.go b/vendor/github.com/aws/aws-lambda-go/lambda/handlertrace/trace.go
new file mode 100644
index 00000000..cdd452ff
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/handlertrace/trace.go
@@ -0,0 +1,44 @@
+// Package handlertrace allows middleware authors using lambda.NewHandler to
+// instrument request and response events.
+package handlertrace
+
+import (
+ "context"
+)
+
+// HandlerTrace allows handlers which wrap the return value of lambda.NewHandler
+// to access to the request and response events.
+type HandlerTrace struct {
+ RequestEvent func(context.Context, interface{})
+ ResponseEvent func(context.Context, interface{})
+}
+
+func callbackCompose(f1, f2 func(context.Context, interface{})) func(context.Context, interface{}) {
+ return func(ctx context.Context, event interface{}) {
+ if nil != f1 {
+ f1(ctx, event)
+ }
+ if nil != f2 {
+ f2(ctx, event)
+ }
+ }
+}
+
+type handlerTraceKey struct{}
+
+// NewContext adds callbacks to the provided context which allows handlers which
+// wrap the return value of lambda.NewHandler to access to the request and
+// response events.
+func NewContext(ctx context.Context, trace HandlerTrace) context.Context {
+ existing := FromContext(ctx)
+ return context.WithValue(ctx, handlerTraceKey{}, HandlerTrace{
+ RequestEvent: callbackCompose(existing.RequestEvent, trace.RequestEvent),
+ ResponseEvent: callbackCompose(existing.ResponseEvent, trace.ResponseEvent),
+ })
+}
+
+// FromContext returns the HandlerTrace associated with the provided context.
+func FromContext(ctx context.Context) HandlerTrace {
+ trace, _ := ctx.Value(handlerTraceKey{}).(HandlerTrace)
+ return trace
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/invoke_loop.go b/vendor/github.com/aws/aws-lambda-go/lambda/invoke_loop.go
new file mode 100644
index 00000000..338237ea
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/invoke_loop.go
@@ -0,0 +1,212 @@
+// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved
+
+package lambda
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "log"
+ "os"
+ "strconv"
+ "time"
+
+ "github.com/aws/aws-lambda-go/lambda/messages"
+ "github.com/aws/aws-lambda-go/lambdacontext"
+)
+
+const (
+ msPerS = int64(time.Second / time.Millisecond)
+ nsPerMS = int64(time.Millisecond / time.Nanosecond)
+)
+
+// TODO: replace with time.UnixMillis after dropping version <1.17 from CI workflows
+func unixMS(ms int64) time.Time {
+ return time.Unix(ms/msPerS, (ms%msPerS)*nsPerMS)
+}
+
+// startRuntimeAPILoop will return an error if handling a particular invoke resulted in a non-recoverable error
+func startRuntimeAPILoop(api string, handler Handler) error {
+ client := newRuntimeAPIClient(api)
+ h := newHandler(handler)
+ for {
+ invoke, err := client.next()
+ if err != nil {
+ return err
+ }
+ if err = handleInvoke(invoke, h); err != nil {
+ return err
+ }
+ }
+}
+
+// handleInvoke returns an error if the function panics, or some other non-recoverable error occurred
+func handleInvoke(invoke *invoke, handler *handlerOptions) error {
+ // set the deadline
+ deadline, err := parseDeadline(invoke)
+ if err != nil {
+ return reportFailure(invoke, lambdaErrorResponse(err))
+ }
+ ctx, cancel := context.WithDeadline(handler.baseContext, deadline)
+ defer cancel()
+
+ // set the invoke metadata values
+ lc := lambdacontext.LambdaContext{
+ AwsRequestID: invoke.id,
+ InvokedFunctionArn: invoke.headers.Get(headerInvokedFunctionARN),
+ }
+ if err := parseClientContext(invoke, &lc.ClientContext); err != nil {
+ return reportFailure(invoke, lambdaErrorResponse(err))
+ }
+ if err := parseCognitoIdentity(invoke, &lc.Identity); err != nil {
+ return reportFailure(invoke, lambdaErrorResponse(err))
+ }
+ ctx = lambdacontext.NewContext(ctx, &lc)
+
+ // set the trace id
+ traceID := invoke.headers.Get(headerTraceID)
+ os.Setenv("_X_AMZN_TRACE_ID", traceID)
+ // nolint:staticcheck
+ ctx = context.WithValue(ctx, "x-amzn-trace-id", traceID)
+
+ // call the handler, marshal any returned error
+ response, invokeErr := callBytesHandlerFunc(ctx, invoke.payload, handler.handlerFunc)
+ if invokeErr != nil {
+ if err := reportFailure(invoke, invokeErr); err != nil {
+ return err
+ }
+ if invokeErr.ShouldExit {
+ return fmt.Errorf("calling the handler function resulted in a panic, the process should exit")
+ }
+ return nil
+ }
+ // if the response needs to be closed (ex: net.Conn, os.File), ensure it's closed before the next invoke to prevent a resource leak
+ if response, ok := response.(io.Closer); ok {
+ defer response.Close()
+ }
+
+ // if the response defines a content-type, plumb it through
+ contentType := contentTypeBytes
+ type ContentType interface{ ContentType() string }
+ if response, ok := response.(ContentType); ok {
+ contentType = response.ContentType()
+ }
+
+ if err := invoke.success(response, contentType); err != nil {
+ return fmt.Errorf("unexpected error occurred when sending the function functionResponse to the API: %v", err)
+ }
+
+ return nil
+}
+
+func reportFailure(invoke *invoke, invokeErr *messages.InvokeResponse_Error) error {
+ errorPayload := safeMarshal(invokeErr)
+ log.Printf("%s", errorPayload)
+
+ causeForXRay, err := json.Marshal(makeXRayError(invokeErr))
+ if err != nil {
+ return fmt.Errorf("unexpected error occured when serializing the function error cause for X-Ray: %v", err)
+ }
+
+ if err := invoke.failure(bytes.NewReader(errorPayload), contentTypeJSON, causeForXRay); err != nil {
+ return fmt.Errorf("unexpected error occurred when sending the function error to the API: %v", err)
+ }
+ return nil
+}
+
+func callBytesHandlerFunc(ctx context.Context, payload []byte, handler handlerFunc) (response io.Reader, invokeErr *messages.InvokeResponse_Error) {
+ defer func() {
+ if err := recover(); err != nil {
+ invokeErr = lambdaPanicResponse(err)
+ }
+ }()
+ response, err := handler(ctx, payload)
+ if err != nil {
+ return nil, lambdaErrorResponse(err)
+ }
+ return response, nil
+}
+
+func parseDeadline(invoke *invoke) (time.Time, error) {
+ deadlineEpochMS, err := strconv.ParseInt(invoke.headers.Get(headerDeadlineMS), 10, 64)
+ if err != nil {
+ return time.Time{}, fmt.Errorf("failed to parse deadline: %v", err)
+ }
+ return unixMS(deadlineEpochMS), nil
+}
+
+func parseCognitoIdentity(invoke *invoke, out *lambdacontext.CognitoIdentity) error {
+ cognitoIdentityJSON := invoke.headers.Get(headerCognitoIdentity)
+ if cognitoIdentityJSON != "" {
+ if err := json.Unmarshal([]byte(cognitoIdentityJSON), out); err != nil {
+ return fmt.Errorf("failed to unmarshal cognito identity json: %v", err)
+ }
+ }
+ return nil
+}
+
+func parseClientContext(invoke *invoke, out *lambdacontext.ClientContext) error {
+ clientContextJSON := invoke.headers.Get(headerClientContext)
+ if clientContextJSON != "" {
+ if err := json.Unmarshal([]byte(clientContextJSON), out); err != nil {
+ return fmt.Errorf("failed to unmarshal client context json: %v", err)
+ }
+ }
+ return nil
+}
+
+func safeMarshal(v interface{}) []byte {
+ payload, err := json.Marshal(v)
+ if err != nil {
+ v := &messages.InvokeResponse_Error{
+ Type: "Runtime.SerializationError",
+ Message: err.Error(),
+ }
+ payload, err := json.Marshal(v)
+ if err != nil {
+ panic(err) // never reach
+ }
+ return payload
+ }
+ return payload
+}
+
+type xrayException struct {
+ Type string `json:"type"`
+ Message string `json:"message"`
+ Stack []*messages.InvokeResponse_Error_StackFrame `json:"stack"`
+}
+
+type xrayError struct {
+ WorkingDirectory string `json:"working_directory"`
+ Exceptions []xrayException `json:"exceptions"`
+ Paths []string `json:"paths"`
+}
+
+func makeXRayError(invokeResponseError *messages.InvokeResponse_Error) *xrayError {
+ paths := make([]string, 0, len(invokeResponseError.StackTrace))
+ visitedPaths := make(map[string]struct{}, len(invokeResponseError.StackTrace))
+ for _, frame := range invokeResponseError.StackTrace {
+ if _, exists := visitedPaths[frame.Path]; !exists {
+ visitedPaths[frame.Path] = struct{}{}
+ paths = append(paths, frame.Path)
+ }
+ }
+
+ cwd, _ := os.Getwd()
+ exceptions := []xrayException{{
+ Type: invokeResponseError.Type,
+ Message: invokeResponseError.Message,
+ Stack: invokeResponseError.StackTrace,
+ }}
+ if exceptions[0].Stack == nil {
+ exceptions[0].Stack = []*messages.InvokeResponse_Error_StackFrame{}
+ }
+ return &xrayError{
+ WorkingDirectory: cwd,
+ Paths: paths,
+ Exceptions: exceptions,
+ }
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/messages/README.md b/vendor/github.com/aws/aws-lambda-go/lambda/messages/README.md
new file mode 100644
index 00000000..04eddfad
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/messages/README.md
@@ -0,0 +1,3 @@
+# Overview
+
+[](https://pkg.go.dev/github.com/aws/aws-lambda-go/lambda/messages)
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/messages/messages.go b/vendor/github.com/aws/aws-lambda-go/lambda/messages/messages.go
new file mode 100644
index 00000000..ea63001e
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/messages/messages.go
@@ -0,0 +1,53 @@
+// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+package messages
+
+import "fmt"
+
+type PingRequest struct {
+}
+
+type PingResponse struct {
+}
+
+//nolint:stylecheck
+type InvokeRequest_Timestamp struct {
+ Seconds int64
+ Nanos int64
+}
+
+//nolint:stylecheck
+type InvokeRequest struct {
+ Payload []byte
+ RequestId string //nolint:stylecheck
+ XAmznTraceId string
+ Deadline InvokeRequest_Timestamp
+ InvokedFunctionArn string
+ CognitoIdentityId string //nolint:stylecheck
+ CognitoIdentityPoolId string //nolint:stylecheck
+ ClientContext []byte
+}
+
+type InvokeResponse struct {
+ Payload []byte
+ Error *InvokeResponse_Error
+}
+
+//nolint:stylecheck
+type InvokeResponse_Error struct {
+ Message string `json:"errorMessage"`
+ Type string `json:"errorType"`
+ StackTrace []*InvokeResponse_Error_StackFrame `json:"stackTrace,omitempty"`
+ ShouldExit bool `json:"-"`
+}
+
+func (e InvokeResponse_Error) Error() string {
+ return fmt.Sprintf("%#v", e)
+}
+
+//nolint:stylecheck
+type InvokeResponse_Error_StackFrame struct {
+ Path string `json:"path"`
+ Line int32 `json:"line"`
+ Label string `json:"label"`
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/panic.go b/vendor/github.com/aws/aws-lambda-go/lambda/panic.go
new file mode 100644
index 00000000..013d3abd
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/panic.go
@@ -0,0 +1,99 @@
+// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+package lambda
+
+import (
+ "fmt"
+ "runtime"
+ "strings"
+
+ "github.com/aws/aws-lambda-go/lambda/messages"
+)
+
+type panicInfo struct {
+ Message string // Value passed to panic call, converted to string
+ StackTrace []*messages.InvokeResponse_Error_StackFrame // Stack trace of the panic
+}
+
+func getPanicInfo(value interface{}) panicInfo {
+ message := getPanicMessage(value)
+ stack := getPanicStack()
+
+ return panicInfo{Message: message, StackTrace: stack}
+}
+
+func getPanicMessage(value interface{}) string {
+ return fmt.Sprintf("%v", value)
+}
+
+var defaultErrorFrameCount = 32
+
+func getPanicStack() []*messages.InvokeResponse_Error_StackFrame {
+ s := make([]uintptr, defaultErrorFrameCount)
+ const framesToHide = 3 // this (getPanicStack) -> getPanicInfo -> handler defer func
+ n := runtime.Callers(framesToHide, s)
+ if n == 0 {
+ return make([]*messages.InvokeResponse_Error_StackFrame, 0)
+ }
+
+ s = s[:n]
+
+ return convertStack(s)
+}
+
+func convertStack(s []uintptr) []*messages.InvokeResponse_Error_StackFrame {
+ var converted []*messages.InvokeResponse_Error_StackFrame
+ frames := runtime.CallersFrames(s)
+
+ for {
+ frame, more := frames.Next()
+
+ formattedFrame := formatFrame(frame)
+ converted = append(converted, formattedFrame)
+
+ if !more {
+ break
+ }
+ }
+ return converted
+}
+
+func formatFrame(inputFrame runtime.Frame) *messages.InvokeResponse_Error_StackFrame {
+ path := inputFrame.File
+ line := int32(inputFrame.Line)
+ label := inputFrame.Function
+
+ // Strip GOPATH from path by counting the number of seperators in label & path
+ //
+ // For example given this:
+ // GOPATH = /home/user
+ // path = /home/user/src/pkg/sub/file.go
+ // label = pkg/sub.Type.Method
+ //
+ // We want to set:
+ // path = pkg/sub/file.go
+ // label = Type.Method
+
+ i := len(path)
+ for n, g := 0, strings.Count(label, "/")+2; n < g; n++ {
+ i = strings.LastIndex(path[:i], "/")
+ if i == -1 {
+ // Something went wrong and path has less seperators than we expected
+ // Abort and leave i as -1 to counteract the +1 below
+ break
+ }
+ }
+
+ path = path[i+1:] // Trim the initial /
+
+ // Strip the path from the function name as it's already in the path
+ label = label[strings.LastIndex(label, "/")+1:]
+ // Likewise strip the package name
+ label = label[strings.Index(label, ".")+1:]
+
+ return &messages.InvokeResponse_Error_StackFrame{
+ Path: path,
+ Line: line,
+ Label: label,
+ }
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/rpc_function.go b/vendor/github.com/aws/aws-lambda-go/lambda/rpc_function.go
new file mode 100644
index 00000000..0c8e798e
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/rpc_function.go
@@ -0,0 +1,114 @@
+// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+//go:build !lambda.norpc
+// +build !lambda.norpc
+
+package lambda
+
+import (
+ "context"
+ "encoding/json"
+ "errors"
+ "log"
+ "net"
+ "net/rpc"
+ "os"
+ "time"
+
+ "github.com/aws/aws-lambda-go/lambda/messages"
+ "github.com/aws/aws-lambda-go/lambdacontext"
+)
+
+func init() {
+ // Register `startFunctionRPC` to be run if the _LAMBDA_SERVER_PORT environment variable is set.
+ // This happens when the runtime for the function is configured as `go1.x`.
+ // The value of the environment variable will be passed as the first argument to `startFunctionRPC`.
+ // This allows users to save a little bit of coldstart time in the download, by the dependencies brought in for RPC support.
+ // The tradeoff is dropping compatibility with the RPC mode of the go1.x runtime.
+ // To drop the rpc dependencies, compile with `-tags lambda.norpc`
+ startFunctions = append([]*startFunction{{
+ env: "_LAMBDA_SERVER_PORT",
+ f: startFunctionRPC,
+ }}, startFunctions...)
+}
+
+func startFunctionRPC(port string, handler Handler) error {
+ lis, err := net.Listen("tcp", "localhost:"+port)
+ if err != nil {
+ log.Fatal(err)
+ }
+ err = rpc.Register(NewFunction(handler))
+ if err != nil {
+ log.Fatal("failed to register handler function")
+ }
+ rpc.Accept(lis)
+ return errors.New("accept should not have returned")
+}
+
+// Function struct which wrap the Handler
+//
+// Deprecated: The Function type is public for the go1.x runtime internal use of the net/rpc package
+type Function struct {
+ handler *handlerOptions
+}
+
+// NewFunction which creates a Function with a given Handler
+//
+// Deprecated: The Function type is public for the go1.x runtime internal use of the net/rpc package
+func NewFunction(handler Handler) *Function {
+ return &Function{newHandler(handler)}
+}
+
+// Ping method which given a PingRequest and a PingResponse parses the PingResponse
+func (fn *Function) Ping(req *messages.PingRequest, response *messages.PingResponse) error {
+ *response = messages.PingResponse{}
+ return nil
+}
+
+// Invoke method try to perform a command given an InvokeRequest and an InvokeResponse
+func (fn *Function) Invoke(req *messages.InvokeRequest, response *messages.InvokeResponse) error {
+ defer func() {
+ if err := recover(); err != nil {
+ response.Error = lambdaPanicResponse(err)
+ }
+ }()
+
+ deadline := time.Unix(req.Deadline.Seconds, req.Deadline.Nanos).UTC()
+ invokeContext, cancel := context.WithDeadline(fn.baseContext(), deadline)
+ defer cancel()
+
+ lc := &lambdacontext.LambdaContext{
+ AwsRequestID: req.RequestId,
+ InvokedFunctionArn: req.InvokedFunctionArn,
+ Identity: lambdacontext.CognitoIdentity{
+ CognitoIdentityID: req.CognitoIdentityId,
+ CognitoIdentityPoolID: req.CognitoIdentityPoolId,
+ },
+ }
+ if len(req.ClientContext) > 0 {
+ if err := json.Unmarshal(req.ClientContext, &lc.ClientContext); err != nil {
+ response.Error = lambdaErrorResponse(err)
+ return nil
+ }
+ }
+ invokeContext = lambdacontext.NewContext(invokeContext, lc)
+
+ // nolint:staticcheck
+ invokeContext = context.WithValue(invokeContext, "x-amzn-trace-id", req.XAmznTraceId)
+ os.Setenv("_X_AMZN_TRACE_ID", req.XAmznTraceId)
+
+ payload, err := fn.handler.Invoke(invokeContext, req.Payload)
+ if err != nil {
+ response.Error = lambdaErrorResponse(err)
+ return nil
+ }
+ response.Payload = payload
+ return nil
+}
+
+func (fn *Function) baseContext() context.Context {
+ if fn.handler.baseContext != nil {
+ return fn.handler.baseContext
+ }
+ return context.Background()
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/runtime_api_client.go b/vendor/github.com/aws/aws-lambda-go/lambda/runtime_api_client.go
new file mode 100644
index 00000000..158bd6b4
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/runtime_api_client.go
@@ -0,0 +1,173 @@
+// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved
+//
+// Runtime API documentation: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html
+
+package lambda
+
+import (
+ "bytes"
+ "encoding/base64"
+ "fmt"
+ "io"
+ "io/ioutil" //nolint: staticcheck
+ "log"
+ "net/http"
+ "runtime"
+)
+
+const (
+ headerAWSRequestID = "Lambda-Runtime-Aws-Request-Id"
+ headerDeadlineMS = "Lambda-Runtime-Deadline-Ms"
+ headerTraceID = "Lambda-Runtime-Trace-Id"
+ headerCognitoIdentity = "Lambda-Runtime-Cognito-Identity"
+ headerClientContext = "Lambda-Runtime-Client-Context"
+ headerInvokedFunctionARN = "Lambda-Runtime-Invoked-Function-Arn"
+ headerXRayErrorCause = "Lambda-Runtime-Function-Xray-Error-Cause"
+ trailerLambdaErrorType = "Lambda-Runtime-Function-Error-Type"
+ trailerLambdaErrorBody = "Lambda-Runtime-Function-Error-Body"
+ contentTypeJSON = "application/json"
+ contentTypeBytes = "application/octet-stream"
+ apiVersion = "2018-06-01"
+ xrayErrorCauseMaxSize = 1024 * 1024
+)
+
+type runtimeAPIClient struct {
+ baseURL string
+ userAgent string
+ httpClient *http.Client
+ buffer *bytes.Buffer
+}
+
+func newRuntimeAPIClient(address string) *runtimeAPIClient {
+ client := &http.Client{
+ Timeout: 0, // connections to the runtime API are never expected to time out
+ }
+ endpoint := "http://" + address + "/" + apiVersion + "/runtime/invocation/"
+ userAgent := "aws-lambda-go/" + runtime.Version()
+ return &runtimeAPIClient{endpoint, userAgent, client, bytes.NewBuffer(nil)}
+}
+
+type invoke struct {
+ id string
+ payload []byte
+ headers http.Header
+ client *runtimeAPIClient
+}
+
+// success sends the response payload for an in-progress invocation.
+// Notes:
+// - An invoke is not complete until next() is called again!
+func (i *invoke) success(body io.Reader, contentType string) error {
+ url := i.client.baseURL + i.id + "/response"
+ return i.client.post(url, body, contentType, nil)
+}
+
+// failure sends the payload to the Runtime API. This marks the function's invoke as a failure.
+// Notes:
+// - The execution of the function process continues, and is billed, until next() is called again!
+// - A Lambda Function continues to be re-used for future invokes even after a failure.
+// If the error is fatal (panic, unrecoverable state), exit the process immediately after calling failure()
+func (i *invoke) failure(body io.Reader, contentType string, causeForXRay []byte) error {
+ url := i.client.baseURL + i.id + "/error"
+ return i.client.post(url, body, contentType, causeForXRay)
+}
+
+// next connects to the Runtime API and waits for a new invoke Request to be available.
+// Note: After a call to Done() or Error() has been made, a call to next() will complete the in-flight invoke.
+func (c *runtimeAPIClient) next() (*invoke, error) {
+ url := c.baseURL + "next"
+ req, err := http.NewRequest(http.MethodGet, url, nil)
+ if err != nil {
+ return nil, fmt.Errorf("failed to construct GET request to %s: %v", url, err)
+ }
+ req.Header.Set("User-Agent", c.userAgent)
+
+ resp, err := c.httpClient.Do(req)
+ if err != nil {
+ return nil, fmt.Errorf("failed to get the next invoke: %v", err)
+ }
+ defer func() {
+ if err := resp.Body.Close(); err != nil {
+ log.Printf("runtime API client failed to close %s response body: %v", url, err)
+ }
+ }()
+
+ if resp.StatusCode != http.StatusOK {
+ return nil, fmt.Errorf("failed to GET %s: got unexpected status code: %d", url, resp.StatusCode)
+ }
+
+ c.buffer.Reset()
+ _, err = c.buffer.ReadFrom(resp.Body)
+ if err != nil {
+ return nil, fmt.Errorf("failed to read the invoke payload: %v", err)
+ }
+
+ return &invoke{
+ id: resp.Header.Get(headerAWSRequestID),
+ payload: c.buffer.Bytes(),
+ headers: resp.Header,
+ client: c,
+ }, nil
+}
+
+func (c *runtimeAPIClient) post(url string, body io.Reader, contentType string, xrayErrorCause []byte) error {
+ b := newErrorCapturingReader(body)
+ req, err := http.NewRequest(http.MethodPost, url, b)
+ if err != nil {
+ return fmt.Errorf("failed to construct POST request to %s: %v", url, err)
+ }
+ req.Trailer = b.Trailer
+ req.Header.Set("User-Agent", c.userAgent)
+ req.Header.Set("Content-Type", contentType)
+
+ if xrayErrorCause != nil && len(xrayErrorCause) < xrayErrorCauseMaxSize {
+ req.Header.Set(headerXRayErrorCause, string(xrayErrorCause))
+ }
+
+ resp, err := c.httpClient.Do(req)
+ if err != nil {
+ return fmt.Errorf("failed to POST to %s: %v", url, err)
+ }
+ defer func() {
+ if err := resp.Body.Close(); err != nil {
+ log.Printf("runtime API client failed to close %s response body: %v", url, err)
+ }
+ }()
+ if resp.StatusCode != http.StatusAccepted {
+ return fmt.Errorf("failed to POST to %s: got unexpected status code: %d", url, resp.StatusCode)
+ }
+
+ _, err = io.Copy(ioutil.Discard, resp.Body)
+ if err != nil {
+ return fmt.Errorf("something went wrong reading the POST response from %s: %v", url, err)
+ }
+
+ return nil
+}
+
+func newErrorCapturingReader(r io.Reader) *errorCapturingReader {
+ trailer := http.Header{
+ trailerLambdaErrorType: nil,
+ trailerLambdaErrorBody: nil,
+ }
+ return &errorCapturingReader{r, trailer}
+}
+
+type errorCapturingReader struct {
+ reader io.Reader
+ Trailer http.Header
+}
+
+func (r *errorCapturingReader) Read(p []byte) (int, error) {
+ if r.reader == nil {
+ return 0, io.EOF
+ }
+ n, err := r.reader.Read(p)
+ if err != nil && err != io.EOF {
+ lambdaErr := lambdaErrorResponse(err)
+ r.Trailer.Set(trailerLambdaErrorType, lambdaErr.Type)
+ r.Trailer.Set(trailerLambdaErrorBody, base64.StdEncoding.EncodeToString(safeMarshal(lambdaErr)))
+ return 0, io.EOF
+ }
+ return n, err
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/sigterm.go b/vendor/github.com/aws/aws-lambda-go/lambda/sigterm.go
new file mode 100644
index 00000000..b742e911
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambda/sigterm.go
@@ -0,0 +1,53 @@
+// Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+package lambda
+
+import (
+ "log"
+ "os"
+ "os/signal"
+ "syscall"
+)
+
+// enableSIGTERM configures an optional list of sigtermHandlers to run on process shutdown.
+// This non-default behavior is enabled within Lambda using the extensions API.
+func enableSIGTERM(sigtermHandlers []func()) {
+ // for fun, we'll also optionally register SIGTERM handlers
+ if len(sigtermHandlers) > 0 {
+ signaled := make(chan os.Signal, 1)
+ signal.Notify(signaled, syscall.SIGTERM)
+ go func() {
+ <-signaled
+ for _, f := range sigtermHandlers {
+ f()
+ }
+ }()
+ }
+
+ // detect if we're actually running within Lambda
+ endpoint := os.Getenv("AWS_LAMBDA_RUNTIME_API")
+ if endpoint == "" {
+ log.Print("WARNING! AWS_LAMBDA_RUNTIME_API environment variable not found. Skipping attempt to register internal extension...")
+ return
+ }
+
+ // Now to do the AWS Lambda specific stuff.
+ // The default Lambda behavior is for functions to get SIGKILL at the end of lifetime, or after a timeout.
+ // Any use of the Lambda extension register API enables SIGTERM to be sent to the function process before the SIGKILL.
+ // We'll register an extension that does not listen for any lifecycle events named "GoLangEnableSIGTERM".
+ // The API will respond with an ID we need to pass in future requests.
+ client := newExtensionAPIClient(endpoint)
+ id, err := client.register("GoLangEnableSIGTERM")
+ if err != nil {
+ log.Printf("WARNING! Failed to register internal extension! SIGTERM events may not be enabled! err: %v", err)
+ return
+ }
+
+ // We didn't actually register for any events, but we need to call /next anyways to let the API know we're done initalizing.
+ // Because we didn't register for any events, /next will never return, so we'll do this in a go routine that is doomed to stay blocked.
+ go func() {
+ _, err := client.next(id)
+ log.Printf("WARNING! Reached expected unreachable code! Extension /next call expected to block forever! err: %v", err)
+ }()
+
+}
diff --git a/vendor/github.com/aws/aws-lambda-go/lambdacontext/README.md b/vendor/github.com/aws/aws-lambda-go/lambdacontext/README.md
new file mode 100644
index 00000000..e8c22996
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambdacontext/README.md
@@ -0,0 +1,3 @@
+# Overview
+
+[](https://pkg.go.dev/github.com/aws/aws-lambda-go/lambdacontext)
diff --git a/vendor/github.com/aws/aws-lambda-go/lambdacontext/context.go b/vendor/github.com/aws/aws-lambda-go/lambdacontext/context.go
new file mode 100644
index 00000000..bd2e1664
--- /dev/null
+++ b/vendor/github.com/aws/aws-lambda-go/lambdacontext/context.go
@@ -0,0 +1,89 @@
+// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+//
+// Helpers for accessing context information from an Invoke request. Context information
+// is stored in a https://golang.org/pkg/context/#Context. The functions FromContext and NewContext
+// are used to retrieving and inserting an instance of LambdaContext.
+
+package lambdacontext
+
+import (
+ "context"
+ "os"
+ "strconv"
+)
+
+// LogGroupName is the name of the log group that contains the log streams of the current Lambda Function
+var LogGroupName string
+
+// LogStreamName name of the log stream that the current Lambda Function's logs will be sent to
+var LogStreamName string
+
+// FunctionName the name of the current Lambda Function
+var FunctionName string
+
+// MemoryLimitInMB is the configured memory limit for the current instance of the Lambda Function
+var MemoryLimitInMB int
+
+// FunctionVersion is the published version of the current instance of the Lambda Function
+var FunctionVersion string
+
+func init() {
+ LogGroupName = os.Getenv("AWS_LAMBDA_LOG_GROUP_NAME")
+ LogStreamName = os.Getenv("AWS_LAMBDA_LOG_STREAM_NAME")
+ FunctionName = os.Getenv("AWS_LAMBDA_FUNCTION_NAME")
+ if limit, err := strconv.Atoi(os.Getenv("AWS_LAMBDA_FUNCTION_MEMORY_SIZE")); err != nil {
+ MemoryLimitInMB = 0
+ } else {
+ MemoryLimitInMB = limit
+ }
+ FunctionVersion = os.Getenv("AWS_LAMBDA_FUNCTION_VERSION")
+}
+
+// ClientApplication is metadata about the calling application.
+type ClientApplication struct {
+ InstallationID string `json:"installation_id"`
+ AppTitle string `json:"app_title"`
+ AppVersionCode string `json:"app_version_code"`
+ AppPackageName string `json:"app_package_name"`
+}
+
+// ClientContext is information about the client application passed by the calling application.
+type ClientContext struct {
+ Client ClientApplication
+ Env map[string]string `json:"env"`
+ Custom map[string]string `json:"custom"`
+}
+
+// CognitoIdentity is the cognito identity used by the calling application.
+type CognitoIdentity struct {
+ CognitoIdentityID string
+ CognitoIdentityPoolID string
+}
+
+// LambdaContext is the set of metadata that is passed for every Invoke.
+type LambdaContext struct {
+ AwsRequestID string //nolint: stylecheck
+ InvokedFunctionArn string //nolint: stylecheck
+ Identity CognitoIdentity
+ ClientContext ClientContext
+}
+
+// An unexported type to be used as the key for types in this package.
+// This prevents collisions with keys defined in other packages.
+type key struct{}
+
+// The key for a LambdaContext in Contexts.
+// Users of this package must use lambdacontext.NewContext and lambdacontext.FromContext
+// instead of using this key directly.
+var contextKey = &key{}
+
+// NewContext returns a new Context that carries value lc.
+func NewContext(parent context.Context, lc *LambdaContext) context.Context {
+ return context.WithValue(parent, contextKey, lc)
+}
+
+// FromContext returns the LambdaContext value stored in ctx, if any.
+func FromContext(ctx context.Context) (*LambdaContext, bool) {
+ lc, ok := ctx.Value(contextKey).(*LambdaContext)
+ return lc, ok
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/checksum.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/checksum.go
new file mode 100644
index 00000000..4152caad
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/checksum.go
@@ -0,0 +1,33 @@
+package aws
+
+// RequestChecksumCalculation controls request checksum calculation workflow
+type RequestChecksumCalculation int
+
+const (
+ // RequestChecksumCalculationUnset is the unset value for RequestChecksumCalculation
+ RequestChecksumCalculationUnset RequestChecksumCalculation = iota
+
+ // RequestChecksumCalculationWhenSupported indicates request checksum will be calculated
+ // if the operation supports input checksums
+ RequestChecksumCalculationWhenSupported
+
+ // RequestChecksumCalculationWhenRequired indicates request checksum will be calculated
+ // if required by the operation or if user elects to set a checksum algorithm in request
+ RequestChecksumCalculationWhenRequired
+)
+
+// ResponseChecksumValidation controls response checksum validation workflow
+type ResponseChecksumValidation int
+
+const (
+ // ResponseChecksumValidationUnset is the unset value for ResponseChecksumValidation
+ ResponseChecksumValidationUnset ResponseChecksumValidation = iota
+
+ // ResponseChecksumValidationWhenSupported indicates response checksum will be validated
+ // if the operation supports output checksums
+ ResponseChecksumValidationWhenSupported
+
+ // ResponseChecksumValidationWhenRequired indicates response checksum will only
+ // be validated if the operation requires output checksum validation
+ ResponseChecksumValidationWhenRequired
+)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
index 16000d79..a015cc5b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
@@ -165,6 +165,33 @@ type Config struct {
// Controls how a resolved AWS account ID is handled for endpoint routing.
AccountIDEndpointMode AccountIDEndpointMode
+
+ // RequestChecksumCalculation determines when request checksum calculation is performed.
+ //
+ // There are two possible values for this setting:
+ //
+ // 1. RequestChecksumCalculationWhenSupported (default): The checksum is always calculated
+ // if the operation supports it, regardless of whether the user sets an algorithm in the request.
+ //
+ // 2. RequestChecksumCalculationWhenRequired: The checksum is only calculated if the user
+ // explicitly sets a checksum algorithm in the request.
+ //
+ // This setting is sourced from the environment variable AWS_REQUEST_CHECKSUM_CALCULATION
+ // or the shared config profile attribute "request_checksum_calculation".
+ RequestChecksumCalculation RequestChecksumCalculation
+
+ // ResponseChecksumValidation determines when response checksum validation is performed
+ //
+ // There are two possible values for this setting:
+ //
+ // 1. ResponseChecksumValidationWhenSupported (default): The checksum is always validated
+ // if the operation supports it, regardless of whether the user sets the validation mode to ENABLED in request.
+ //
+ // 2. ResponseChecksumValidationWhenRequired: The checksum is only validated if the user
+ // explicitly sets the validation mode to ENABLED in the request
+ // This variable is sourced from environment variable AWS_RESPONSE_CHECKSUM_VALIDATION or
+ // the shared config profile attribute "response_checksum_validation".
+ ResponseChecksumValidation ResponseChecksumValidation
}
// NewConfig returns a new Config pointer that can be chained with builder
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
index 781ac0ae..623890e8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
@@ -172,6 +172,17 @@ func (p *CredentialsCache) getCreds() (Credentials, bool) {
return *c, true
}
+// ProviderSources returns a list of where the underlying credential provider
+// has been sourced, if available. Returns empty if the provider doesn't implement
+// the interface
+func (p *CredentialsCache) ProviderSources() []CredentialSource {
+ asSource, ok := p.provider.(CredentialProviderSource)
+ if !ok {
+ return []CredentialSource{}
+ }
+ return asSource.ProviderSources()
+}
+
// Invalidate will invalidate the cached credentials. The next call to Retrieve
// will cause the provider's Retrieve method to be called.
func (p *CredentialsCache) Invalidate() {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
index 98ba7705..4ad2ee44 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
@@ -70,6 +70,56 @@ func (AnonymousCredentials) Retrieve(context.Context) (Credentials, error) {
fmt.Errorf("the AnonymousCredentials is not a valid credential provider, and cannot be used to sign AWS requests with")
}
+// CredentialSource is the source of the credential provider.
+// A provider can have multiple credential sources: For example, a provider that reads a profile, calls ECS to
+// get credentials and then assumes a role using STS will have all these as part of its provider chain.
+type CredentialSource int
+
+const (
+ // CredentialSourceUndefined is the sentinel zero value
+ CredentialSourceUndefined CredentialSource = iota
+ // CredentialSourceCode credentials resolved from code, cli parameters, session object, or client instance
+ CredentialSourceCode
+ // CredentialSourceEnvVars credentials resolved from environment variables
+ CredentialSourceEnvVars
+ // CredentialSourceEnvVarsSTSWebIDToken credentials resolved from environment variables for assuming a role with STS using a web identity token
+ CredentialSourceEnvVarsSTSWebIDToken
+ // CredentialSourceSTSAssumeRole credentials resolved from STS using AssumeRole
+ CredentialSourceSTSAssumeRole
+ // CredentialSourceSTSAssumeRoleSaml credentials resolved from STS using assume role with SAML
+ CredentialSourceSTSAssumeRoleSaml
+ // CredentialSourceSTSAssumeRoleWebID credentials resolved from STS using assume role with web identity
+ CredentialSourceSTSAssumeRoleWebID
+ // CredentialSourceSTSFederationToken credentials resolved from STS using a federation token
+ CredentialSourceSTSFederationToken
+ // CredentialSourceSTSSessionToken credentials resolved from STS using a session token S
+ CredentialSourceSTSSessionToken
+ // CredentialSourceProfile credentials resolved from a config file(s) profile with static credentials
+ CredentialSourceProfile
+ // CredentialSourceProfileSourceProfile credentials resolved from a source profile in a config file(s) profile
+ CredentialSourceProfileSourceProfile
+ // CredentialSourceProfileNamedProvider credentials resolved from a named provider in a config file(s) profile (like EcsContainer)
+ CredentialSourceProfileNamedProvider
+ // CredentialSourceProfileSTSWebIDToken credentials resolved from configuration for assuming a role with STS using web identity token in a config file(s) profile
+ CredentialSourceProfileSTSWebIDToken
+ // CredentialSourceProfileSSO credentials resolved from an SSO session in a config file(s) profile
+ CredentialSourceProfileSSO
+ // CredentialSourceSSO credentials resolved from an SSO session
+ CredentialSourceSSO
+ // CredentialSourceProfileSSOLegacy credentials resolved from an SSO session in a config file(s) profile using legacy format
+ CredentialSourceProfileSSOLegacy
+ // CredentialSourceSSOLegacy credentials resolved from an SSO session using legacy format
+ CredentialSourceSSOLegacy
+ // CredentialSourceProfileProcess credentials resolved from a process in a config file(s) profile
+ CredentialSourceProfileProcess
+ // CredentialSourceProcess credentials resolved from a process
+ CredentialSourceProcess
+ // CredentialSourceHTTP credentials resolved from an HTTP endpoint
+ CredentialSourceHTTP
+ // CredentialSourceIMDS credentials resolved from the instance metadata service (IMDS)
+ CredentialSourceIMDS
+)
+
// A Credentials is the AWS credentials value for individual credential fields.
type Credentials struct {
// AWS Access key ID
@@ -125,6 +175,13 @@ type CredentialsProvider interface {
Retrieve(ctx context.Context) (Credentials, error)
}
+// CredentialProviderSource allows any credential provider to track
+// all providers where a credential provider were sourced. For example, if the credentials came from a
+// call to a role specified in the profile, this method will give the whole breadcrumb trail
+type CredentialProviderSource interface {
+ ProviderSources() []CredentialSource
+}
+
// CredentialsProviderFunc provides a helper wrapping a function value to
// satisfy the CredentialsProvider interface.
type CredentialsProviderFunc func(context.Context) (Credentials, error)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
index 1d54fc7a..8e930fc6 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
@@ -3,4 +3,4 @@
package aws
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.32.4"
+const goModuleVersion = "1.36.3"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
index 67aaa022..6ee3391b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
@@ -34,6 +34,9 @@ const (
FeatureMetadata2
)
+// Hardcoded value to specify which version of the user agent we're using
+const uaMetadata = "ua/2.1"
+
func (k SDKAgentKeyType) string() string {
switch k {
case APIMetadata:
@@ -73,21 +76,90 @@ type UserAgentFeature string
// Enumerates UserAgentFeature.
const (
- UserAgentFeatureResourceModel UserAgentFeature = "A" // n/a (we don't generate separate resource types)
- UserAgentFeatureWaiter = "B"
- UserAgentFeaturePaginator = "C"
- UserAgentFeatureRetryModeLegacy = "D" // n/a (equivalent to standard)
- UserAgentFeatureRetryModeStandard = "E"
- UserAgentFeatureRetryModeAdaptive = "F"
- UserAgentFeatureS3Transfer = "G"
- UserAgentFeatureS3CryptoV1N = "H" // n/a (crypto client is external)
- UserAgentFeatureS3CryptoV2 = "I" // n/a
- UserAgentFeatureS3ExpressBucket = "J"
- UserAgentFeatureS3AccessGrants = "K" // not yet implemented
- UserAgentFeatureGZIPRequestCompression = "L"
- UserAgentFeatureProtocolRPCV2CBOR = "M"
+ UserAgentFeatureResourceModel UserAgentFeature = "A" // n/a (we don't generate separate resource types)
+
+ UserAgentFeatureWaiter = "B"
+ UserAgentFeaturePaginator = "C"
+
+ UserAgentFeatureRetryModeLegacy = "D" // n/a (equivalent to standard)
+ UserAgentFeatureRetryModeStandard = "E"
+ UserAgentFeatureRetryModeAdaptive = "F"
+
+ UserAgentFeatureS3Transfer = "G"
+ UserAgentFeatureS3CryptoV1N = "H" // n/a (crypto client is external)
+ UserAgentFeatureS3CryptoV2 = "I" // n/a
+ UserAgentFeatureS3ExpressBucket = "J"
+ UserAgentFeatureS3AccessGrants = "K" // not yet implemented
+
+ UserAgentFeatureGZIPRequestCompression = "L"
+
+ UserAgentFeatureProtocolRPCV2CBOR = "M"
+
+ UserAgentFeatureAccountIDEndpoint = "O" // DO NOT IMPLEMENT: rules output is not currently defined. SDKs should not parse endpoints for feature information.
+ UserAgentFeatureAccountIDModePreferred = "P"
+ UserAgentFeatureAccountIDModeDisabled = "Q"
+ UserAgentFeatureAccountIDModeRequired = "R"
+
+ UserAgentFeatureRequestChecksumCRC32 = "U"
+ UserAgentFeatureRequestChecksumCRC32C = "V"
+ UserAgentFeatureRequestChecksumCRC64 = "W"
+ UserAgentFeatureRequestChecksumSHA1 = "X"
+ UserAgentFeatureRequestChecksumSHA256 = "Y"
+ UserAgentFeatureRequestChecksumWhenSupported = "Z"
+ UserAgentFeatureRequestChecksumWhenRequired = "a"
+ UserAgentFeatureResponseChecksumWhenSupported = "b"
+ UserAgentFeatureResponseChecksumWhenRequired = "c"
+
+ UserAgentFeatureDynamoDBUserAgent = "d" // not yet implemented
+
+ UserAgentFeatureCredentialsCode = "e"
+ UserAgentFeatureCredentialsJvmSystemProperties = "f" // n/a (this is not a JVM sdk)
+ UserAgentFeatureCredentialsEnvVars = "g"
+ UserAgentFeatureCredentialsEnvVarsStsWebIDToken = "h"
+ UserAgentFeatureCredentialsStsAssumeRole = "i"
+ UserAgentFeatureCredentialsStsAssumeRoleSaml = "j" // not yet implemented
+ UserAgentFeatureCredentialsStsAssumeRoleWebID = "k"
+ UserAgentFeatureCredentialsStsFederationToken = "l" // not yet implemented
+ UserAgentFeatureCredentialsStsSessionToken = "m" // not yet implemented
+ UserAgentFeatureCredentialsProfile = "n"
+ UserAgentFeatureCredentialsProfileSourceProfile = "o"
+ UserAgentFeatureCredentialsProfileNamedProvider = "p"
+ UserAgentFeatureCredentialsProfileStsWebIDToken = "q"
+ UserAgentFeatureCredentialsProfileSso = "r"
+ UserAgentFeatureCredentialsSso = "s"
+ UserAgentFeatureCredentialsProfileSsoLegacy = "t"
+ UserAgentFeatureCredentialsSsoLegacy = "u"
+ UserAgentFeatureCredentialsProfileProcess = "v"
+ UserAgentFeatureCredentialsProcess = "w"
+ UserAgentFeatureCredentialsBoto2ConfigFile = "x" // n/a (this is not boto/Python)
+ UserAgentFeatureCredentialsAwsSdkStore = "y" // n/a (this is used by .NET based sdk)
+ UserAgentFeatureCredentialsHTTP = "z"
+ UserAgentFeatureCredentialsIMDS = "0"
)
+var credentialSourceToFeature = map[aws.CredentialSource]UserAgentFeature{
+ aws.CredentialSourceCode: UserAgentFeatureCredentialsCode,
+ aws.CredentialSourceEnvVars: UserAgentFeatureCredentialsEnvVars,
+ aws.CredentialSourceEnvVarsSTSWebIDToken: UserAgentFeatureCredentialsEnvVarsStsWebIDToken,
+ aws.CredentialSourceSTSAssumeRole: UserAgentFeatureCredentialsStsAssumeRole,
+ aws.CredentialSourceSTSAssumeRoleSaml: UserAgentFeatureCredentialsStsAssumeRoleSaml,
+ aws.CredentialSourceSTSAssumeRoleWebID: UserAgentFeatureCredentialsStsAssumeRoleWebID,
+ aws.CredentialSourceSTSFederationToken: UserAgentFeatureCredentialsStsFederationToken,
+ aws.CredentialSourceSTSSessionToken: UserAgentFeatureCredentialsStsSessionToken,
+ aws.CredentialSourceProfile: UserAgentFeatureCredentialsProfile,
+ aws.CredentialSourceProfileSourceProfile: UserAgentFeatureCredentialsProfileSourceProfile,
+ aws.CredentialSourceProfileNamedProvider: UserAgentFeatureCredentialsProfileNamedProvider,
+ aws.CredentialSourceProfileSTSWebIDToken: UserAgentFeatureCredentialsProfileStsWebIDToken,
+ aws.CredentialSourceProfileSSO: UserAgentFeatureCredentialsProfileSso,
+ aws.CredentialSourceSSO: UserAgentFeatureCredentialsSso,
+ aws.CredentialSourceProfileSSOLegacy: UserAgentFeatureCredentialsProfileSsoLegacy,
+ aws.CredentialSourceSSOLegacy: UserAgentFeatureCredentialsSsoLegacy,
+ aws.CredentialSourceProfileProcess: UserAgentFeatureCredentialsProfileProcess,
+ aws.CredentialSourceProcess: UserAgentFeatureCredentialsProcess,
+ aws.CredentialSourceHTTP: UserAgentFeatureCredentialsHTTP,
+ aws.CredentialSourceIMDS: UserAgentFeatureCredentialsIMDS,
+}
+
// RequestUserAgent is a build middleware that set the User-Agent for the request.
type RequestUserAgent struct {
sdkAgent, userAgent *smithyhttp.UserAgentBuilder
@@ -107,6 +179,7 @@ type RequestUserAgent struct {
func NewRequestUserAgent() *RequestUserAgent {
userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder()
addProductName(userAgent)
+ addUserAgentMetadata(userAgent)
addProductName(sdkAgent)
r := &RequestUserAgent{
@@ -134,6 +207,10 @@ func addProductName(builder *smithyhttp.UserAgentBuilder) {
builder.AddKeyValue(aws.SDKName, aws.SDKVersion)
}
+func addUserAgentMetadata(builder *smithyhttp.UserAgentBuilder) {
+ builder.AddKey(uaMetadata)
+}
+
// AddUserAgentKey retrieves a requestUserAgent from the provided stack, or initializes one.
func AddUserAgentKey(key string) func(*middleware.Stack) error {
return func(stack *middleware.Stack) error {
@@ -235,6 +312,14 @@ func (u *RequestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, val
u.userAgent.AddKeyValue(keyType.string(), strings.Map(rules, key)+"#"+strings.Map(rules, value))
}
+// AddCredentialsSource adds the credential source as a feature on the User-Agent string
+func (u *RequestUserAgent) AddCredentialsSource(source aws.CredentialSource) {
+ x, ok := credentialSourceToFeature[source]
+ if ok {
+ u.AddUserAgentFeature(x)
+ }
+}
+
// ID the name of the middleware.
func (u *RequestUserAgent) ID() string {
return "UserAgent"
@@ -258,10 +343,10 @@ func (u *RequestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildI
func (u *RequestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) {
const userAgent = "User-Agent"
- updateHTTPHeader(request, userAgent, u.userAgent.Build())
if len(u.features) > 0 {
updateHTTPHeader(request, userAgent, buildFeatureMetrics(u.features))
}
+ updateHTTPHeader(request, userAgent, u.userAgent.Build())
}
func (u *RequestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md
index a4872987..ddb162b3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md
@@ -1,3 +1,15 @@
+# v1.6.10 (2025-02-18)
+
+* **Bug Fix**: Bump go version to 1.22
+
+# v1.6.9 (2025-02-14)
+
+* **Bug Fix**: Remove max limit on event stream messages
+
+# v1.6.8 (2025-01-24)
+
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
# v1.6.7 (2024-11-18)
* **Dependency Update**: Update to smithy-go v1.22.1.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go
index 78af41cb..01981f46 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go
@@ -3,4 +3,4 @@
package eventstream
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.6.7"
+const goModuleVersion = "1.6.10"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/message.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/message.go
index f7427da0..1a77654f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/message.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/message.go
@@ -10,9 +10,6 @@ const preludeLen = 8
const preludeCRCLen = 4
const msgCRCLen = 4
const minMsgLen = preludeLen + preludeCRCLen + msgCRCLen
-const maxPayloadLen = 1024 * 1024 * 16 // 16MB
-const maxHeadersLen = 1024 * 128 // 128KB
-const maxMsgLen = minMsgLen + maxHeadersLen + maxPayloadLen
var crc32IEEETable = crc32.MakeTable(crc32.IEEE)
@@ -82,28 +79,13 @@ func (p messagePrelude) PayloadLen() uint32 {
}
func (p messagePrelude) ValidateLens() error {
- if p.Length == 0 || p.Length > maxMsgLen {
+ if p.Length == 0 {
return LengthError{
Part: "message prelude",
- Want: maxMsgLen,
+ Want: minMsgLen,
Have: int(p.Length),
}
}
- if p.HeadersLen > maxHeadersLen {
- return LengthError{
- Part: "message headers",
- Want: maxHeadersLen,
- Have: int(p.HeadersLen),
- }
- }
- if payloadLen := p.PayloadLen(); payloadLen > maxPayloadLen {
- return LengthError{
- Part: "message payload",
- Want: maxPayloadLen,
- Have: int(payloadLen),
- }
- }
-
return nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
index 47ebc0f5..6669a3dd 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
@@ -1,8 +1,8 @@
package query
import (
- "fmt"
"net/url"
+ "strconv"
)
// Array represents the encoding of Query lists and sets. A Query array is a
@@ -21,19 +21,8 @@ type Array struct {
// keys for each element in the list. For example, an entry might have the
// key "ParentStructure.ListName.member.MemberName.1".
//
- // While this is currently represented as a string that gets added to, it
- // could also be represented as a stack that only gets condensed into a
- // string when a finalized key is created. This could potentially reduce
- // allocations.
+ // When the array is not flat the prefix will contain the memberName otherwise the memberName is ignored
prefix string
- // Whether the list is flat or not. A list that is not flat will produce the
- // following entry to the url.Values for a given entry:
- // ListName.MemberName.1=value
- // A list that is flat will produce the following:
- // ListName.1=value
- flat bool
- // The location name of the member. In most cases this should be "member".
- memberName string
// Elements are stored in values, so we keep track of the list size here.
size int32
// Empty lists are encoded as "=", if we add a value later we will
@@ -45,11 +34,14 @@ func newArray(values url.Values, prefix string, flat bool, memberName string) *A
emptyValue := newValue(values, prefix, flat)
emptyValue.String("")
+ if !flat {
+ // This uses string concatenation in place of fmt.Sprintf as fmt.Sprintf has a much higher resource overhead
+ prefix = prefix + keySeparator + memberName
+ }
+
return &Array{
values: values,
prefix: prefix,
- flat: flat,
- memberName: memberName,
emptyValue: emptyValue,
}
}
@@ -63,10 +55,7 @@ func (a *Array) Value() Value {
// Query lists start a 1, so adjust the size first
a.size++
- prefix := a.prefix
- if !a.flat {
- prefix = fmt.Sprintf("%s.%s", prefix, a.memberName)
- }
// Lists can't have flat members
- return newValue(a.values, fmt.Sprintf("%s.%d", prefix, a.size), false)
+ // This uses string concatenation in place of fmt.Sprintf as fmt.Sprintf has a much higher resource overhead
+ return newValue(a.values, a.prefix+keySeparator+strconv.FormatInt(int64(a.size), 10), false)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
index 455b9251..305a8ace 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
@@ -1,9 +1,6 @@
package query
-import (
- "fmt"
- "net/url"
-)
+import "net/url"
// Object represents the encoding of Query structures and unions. A Query
// object is a representation of a mapping of string keys to arbitrary
@@ -56,14 +53,16 @@ func (o *Object) FlatKey(name string) Value {
func (o *Object) key(name string, flatValue bool) Value {
if o.prefix != "" {
- return newValue(o.values, fmt.Sprintf("%s.%s", o.prefix, name), flatValue)
+ // This uses string concatenation in place of fmt.Sprintf as fmt.Sprintf has a much higher resource overhead
+ return newValue(o.values, o.prefix+keySeparator+name, flatValue)
}
return newValue(o.values, name, flatValue)
}
func (o *Object) keyWithValues(name string, flatValue bool) Value {
if o.prefix != "" {
- return newAppendValue(o.values, fmt.Sprintf("%s.%s", o.prefix, name), flatValue)
+ // This uses string concatenation in place of fmt.Sprintf as fmt.Sprintf has a much higher resource overhead
+ return newAppendValue(o.values, o.prefix+keySeparator+name, flatValue)
}
return newAppendValue(o.values, name, flatValue)
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go
index a9251521..8063c592 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go
@@ -7,6 +7,8 @@ import (
"github.com/aws/smithy-go/encoding/httpbinding"
)
+const keySeparator = "."
+
// Value represents a Query Value type.
type Value struct {
// The query values to add the value to.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
index acd8d1cc..1b485f99 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go
@@ -116,7 +116,13 @@ func (r RetryableConnectionError) IsErrorRetryable(err error) aws.Ternary {
case errors.As(err, &conErr) && conErr.ConnectionError():
retryable = true
+ case strings.Contains(err.Error(), "use of closed network connection"):
+ fallthrough
case strings.Contains(err.Error(), "connection reset"):
+ // The errors "connection reset" and "use of closed network connection"
+ // are effectively the same. It appears to be the difference between
+ // sync and async read of TCP RST in the stdlib's net.Conn read loop.
+ // see #2737
retryable = true
case errors.As(err, &urlErr):
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
index 734e548b..d99b32ce 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go
@@ -4,10 +4,11 @@ package v4
var IgnoredHeaders = Rules{
ExcludeList{
MapRule{
- "Authorization": struct{}{},
- "User-Agent": struct{}{},
- "X-Amzn-Trace-Id": struct{}{},
- "Expect": struct{}{},
+ "Authorization": struct{}{},
+ "User-Agent": struct{}{},
+ "X-Amzn-Trace-Id": struct{}{},
+ "Expect": struct{}{},
+ "Transfer-Encoding": struct{}{},
},
},
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
index a4db973e..3cb7d14e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
@@ -1,3 +1,52 @@
+# v1.29.2 (2025-01-24)
+
+* **Bug Fix**: Fix env config naming and usage of deprecated ioutil
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.29.1 (2025-01-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.0 (2025-01-15)
+
+* **Feature**: S3 client behavior is updated to always calculate a checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). The checksum algorithm used by default now becomes CRC32. Checksum behavior can be configured using `when_supported` and `when_required` options - in code using RequestChecksumCalculation, in shared config using request_checksum_calculation, or as env variable using AWS_REQUEST_CHECKSUM_CALCULATION. The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if the SDK has not implemented the specified checksum algorithm then this validation is skipped. Checksum validation behavior can be configured using `when_supported` and `when_required` options - in code using ResponseChecksumValidation, in shared config using response_checksum_validation, or as env variable using AWS_RESPONSE_CHECKSUM_VALIDATION.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.11 (2025-01-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.10 (2025-01-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.9 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.8 (2025-01-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.7 (2024-12-19)
+
+* **Bug Fix**: Fix improper use of printf-style functions.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.6 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.5 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.4 (2024-11-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.28.3 (2024-11-07)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go
index d5226cb0..09d9b631 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/config.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go
@@ -83,6 +83,12 @@ var defaultAWSConfigResolvers = []awsConfigResolver{
// Sets the AccountIDEndpointMode if present in env var or shared config profile
resolveAccountIDEndpointMode,
+
+ // Sets the RequestChecksumCalculation if present in env var or shared config profile
+ resolveRequestChecksumCalculation,
+
+ // Sets the ResponseChecksumValidation if present in env var or shared config profile
+ resolveResponseChecksumValidation,
}
// A Config represents a generic configuration value or set of values. This type
@@ -212,7 +218,7 @@ func resolveConfigLoaders(options *LoadOptions) []loader {
loaders[0] = loadEnvConfig
// specification of a profile should cause a load failure if it doesn't exist
- if os.Getenv(awsProfileEnvVar) != "" || options.SharedConfigProfile != "" {
+ if os.Getenv(awsProfileEnv) != "" || options.SharedConfigProfile != "" {
loaders[1] = loadSharedConfig
} else {
loaders[1] = loadSharedConfigIgnoreNotExist
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go
index 3a06f141..9db507e3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go
@@ -5,7 +5,6 @@ import (
"context"
"fmt"
"io"
- "io/ioutil"
"os"
"strconv"
"strings"
@@ -21,86 +20,89 @@ const CredentialsSourceName = "EnvConfigCredentials"
// Environment variables that will be read for configuration values.
const (
- awsAccessKeyIDEnvVar = "AWS_ACCESS_KEY_ID"
- awsAccessKeyEnvVar = "AWS_ACCESS_KEY"
+ awsAccessKeyIDEnv = "AWS_ACCESS_KEY_ID"
+ awsAccessKeyEnv = "AWS_ACCESS_KEY"
- awsSecretAccessKeyEnvVar = "AWS_SECRET_ACCESS_KEY"
- awsSecretKeyEnvVar = "AWS_SECRET_KEY"
+ awsSecretAccessKeyEnv = "AWS_SECRET_ACCESS_KEY"
+ awsSecretKeyEnv = "AWS_SECRET_KEY"
- awsSessionTokenEnvVar = "AWS_SESSION_TOKEN"
+ awsSessionTokenEnv = "AWS_SESSION_TOKEN"
- awsContainerCredentialsEndpointEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI"
- awsContainerCredentialsRelativePathEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
- awsContainerPProviderAuthorizationEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN"
+ awsContainerCredentialsFullURIEnv = "AWS_CONTAINER_CREDENTIALS_FULL_URI"
+ awsContainerCredentialsRelativeURIEnv = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
+ awsContainerAuthorizationTokenEnv = "AWS_CONTAINER_AUTHORIZATION_TOKEN"
- awsRegionEnvVar = "AWS_REGION"
- awsDefaultRegionEnvVar = "AWS_DEFAULT_REGION"
+ awsRegionEnv = "AWS_REGION"
+ awsDefaultRegionEnv = "AWS_DEFAULT_REGION"
- awsProfileEnvVar = "AWS_PROFILE"
- awsDefaultProfileEnvVar = "AWS_DEFAULT_PROFILE"
+ awsProfileEnv = "AWS_PROFILE"
+ awsDefaultProfileEnv = "AWS_DEFAULT_PROFILE"
- awsSharedCredentialsFileEnvVar = "AWS_SHARED_CREDENTIALS_FILE"
+ awsSharedCredentialsFileEnv = "AWS_SHARED_CREDENTIALS_FILE"
- awsConfigFileEnvVar = "AWS_CONFIG_FILE"
+ awsConfigFileEnv = "AWS_CONFIG_FILE"
- awsCustomCABundleEnvVar = "AWS_CA_BUNDLE"
+ awsCABundleEnv = "AWS_CA_BUNDLE"
- awsWebIdentityTokenFilePathEnvVar = "AWS_WEB_IDENTITY_TOKEN_FILE"
+ awsWebIdentityTokenFileEnv = "AWS_WEB_IDENTITY_TOKEN_FILE"
- awsRoleARNEnvVar = "AWS_ROLE_ARN"
- awsRoleSessionNameEnvVar = "AWS_ROLE_SESSION_NAME"
+ awsRoleARNEnv = "AWS_ROLE_ARN"
+ awsRoleSessionNameEnv = "AWS_ROLE_SESSION_NAME"
- awsEnableEndpointDiscoveryEnvVar = "AWS_ENABLE_ENDPOINT_DISCOVERY"
+ awsEnableEndpointDiscoveryEnv = "AWS_ENABLE_ENDPOINT_DISCOVERY"
- awsS3UseARNRegionEnvVar = "AWS_S3_USE_ARN_REGION"
+ awsS3UseARNRegionEnv = "AWS_S3_USE_ARN_REGION"
- awsEc2MetadataServiceEndpointModeEnvVar = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"
+ awsEc2MetadataServiceEndpointModeEnv = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"
- awsEc2MetadataServiceEndpointEnvVar = "AWS_EC2_METADATA_SERVICE_ENDPOINT"
+ awsEc2MetadataServiceEndpointEnv = "AWS_EC2_METADATA_SERVICE_ENDPOINT"
- awsEc2MetadataDisabled = "AWS_EC2_METADATA_DISABLED"
- awsEc2MetadataV1DisabledEnvVar = "AWS_EC2_METADATA_V1_DISABLED"
+ awsEc2MetadataDisabledEnv = "AWS_EC2_METADATA_DISABLED"
+ awsEc2MetadataV1DisabledEnv = "AWS_EC2_METADATA_V1_DISABLED"
- awsS3DisableMultiRegionAccessPointEnvVar = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS"
+ awsS3DisableMultiRegionAccessPointsEnv = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS"
- awsUseDualStackEndpoint = "AWS_USE_DUALSTACK_ENDPOINT"
+ awsUseDualStackEndpointEnv = "AWS_USE_DUALSTACK_ENDPOINT"
- awsUseFIPSEndpoint = "AWS_USE_FIPS_ENDPOINT"
+ awsUseFIPSEndpointEnv = "AWS_USE_FIPS_ENDPOINT"
- awsDefaultMode = "AWS_DEFAULTS_MODE"
+ awsDefaultsModeEnv = "AWS_DEFAULTS_MODE"
- awsRetryMaxAttempts = "AWS_MAX_ATTEMPTS"
- awsRetryMode = "AWS_RETRY_MODE"
- awsSdkAppID = "AWS_SDK_UA_APP_ID"
+ awsMaxAttemptsEnv = "AWS_MAX_ATTEMPTS"
+ awsRetryModeEnv = "AWS_RETRY_MODE"
+ awsSdkUaAppIDEnv = "AWS_SDK_UA_APP_ID"
- awsIgnoreConfiguredEndpoints = "AWS_IGNORE_CONFIGURED_ENDPOINT_URLS"
- awsEndpointURL = "AWS_ENDPOINT_URL"
+ awsIgnoreConfiguredEndpointURLEnv = "AWS_IGNORE_CONFIGURED_ENDPOINT_URLS"
+ awsEndpointURLEnv = "AWS_ENDPOINT_URL"
- awsDisableRequestCompression = "AWS_DISABLE_REQUEST_COMPRESSION"
- awsRequestMinCompressionSizeBytes = "AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES"
+ awsDisableRequestCompressionEnv = "AWS_DISABLE_REQUEST_COMPRESSION"
+ awsRequestMinCompressionSizeBytesEnv = "AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES"
awsS3DisableExpressSessionAuthEnv = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH"
awsAccountIDEnv = "AWS_ACCOUNT_ID"
awsAccountIDEndpointModeEnv = "AWS_ACCOUNT_ID_ENDPOINT_MODE"
+
+ awsRequestChecksumCalculation = "AWS_REQUEST_CHECKSUM_CALCULATION"
+ awsResponseChecksumValidation = "AWS_RESPONSE_CHECKSUM_VALIDATION"
)
var (
credAccessEnvKeys = []string{
- awsAccessKeyIDEnvVar,
- awsAccessKeyEnvVar,
+ awsAccessKeyIDEnv,
+ awsAccessKeyEnv,
}
credSecretEnvKeys = []string{
- awsSecretAccessKeyEnvVar,
- awsSecretKeyEnvVar,
+ awsSecretAccessKeyEnv,
+ awsSecretKeyEnv,
}
regionEnvKeys = []string{
- awsRegionEnvVar,
- awsDefaultRegionEnvVar,
+ awsRegionEnv,
+ awsDefaultRegionEnv,
}
profileEnvKeys = []string{
- awsProfileEnvVar,
- awsDefaultProfileEnvVar,
+ awsProfileEnv,
+ awsDefaultProfileEnv,
}
)
@@ -296,6 +298,12 @@ type EnvConfig struct {
// Indicates whether account ID will be required/ignored in endpoint2.0 routing
AccountIDEndpointMode aws.AccountIDEndpointMode
+
+ // Indicates whether request checksum should be calculated
+ RequestChecksumCalculation aws.RequestChecksumCalculation
+
+ // Indicates whether response checksum should be validated
+ ResponseChecksumValidation aws.ResponseChecksumValidation
}
// loadEnvConfig reads configuration values from the OS's environment variables.
@@ -316,79 +324,79 @@ func NewEnvConfig() (EnvConfig, error) {
setStringFromEnvVal(&creds.SecretAccessKey, credSecretEnvKeys)
if creds.HasKeys() {
creds.AccountID = os.Getenv(awsAccountIDEnv)
- creds.SessionToken = os.Getenv(awsSessionTokenEnvVar)
+ creds.SessionToken = os.Getenv(awsSessionTokenEnv)
cfg.Credentials = creds
}
- cfg.ContainerCredentialsEndpoint = os.Getenv(awsContainerCredentialsEndpointEnvVar)
- cfg.ContainerCredentialsRelativePath = os.Getenv(awsContainerCredentialsRelativePathEnvVar)
- cfg.ContainerAuthorizationToken = os.Getenv(awsContainerPProviderAuthorizationEnvVar)
+ cfg.ContainerCredentialsEndpoint = os.Getenv(awsContainerCredentialsFullURIEnv)
+ cfg.ContainerCredentialsRelativePath = os.Getenv(awsContainerCredentialsRelativeURIEnv)
+ cfg.ContainerAuthorizationToken = os.Getenv(awsContainerAuthorizationTokenEnv)
setStringFromEnvVal(&cfg.Region, regionEnvKeys)
setStringFromEnvVal(&cfg.SharedConfigProfile, profileEnvKeys)
- cfg.SharedCredentialsFile = os.Getenv(awsSharedCredentialsFileEnvVar)
- cfg.SharedConfigFile = os.Getenv(awsConfigFileEnvVar)
+ cfg.SharedCredentialsFile = os.Getenv(awsSharedCredentialsFileEnv)
+ cfg.SharedConfigFile = os.Getenv(awsConfigFileEnv)
- cfg.CustomCABundle = os.Getenv(awsCustomCABundleEnvVar)
+ cfg.CustomCABundle = os.Getenv(awsCABundleEnv)
- cfg.WebIdentityTokenFilePath = os.Getenv(awsWebIdentityTokenFilePathEnvVar)
+ cfg.WebIdentityTokenFilePath = os.Getenv(awsWebIdentityTokenFileEnv)
- cfg.RoleARN = os.Getenv(awsRoleARNEnvVar)
- cfg.RoleSessionName = os.Getenv(awsRoleSessionNameEnvVar)
+ cfg.RoleARN = os.Getenv(awsRoleARNEnv)
+ cfg.RoleSessionName = os.Getenv(awsRoleSessionNameEnv)
- cfg.AppID = os.Getenv(awsSdkAppID)
+ cfg.AppID = os.Getenv(awsSdkUaAppIDEnv)
- if err := setBoolPtrFromEnvVal(&cfg.DisableRequestCompression, []string{awsDisableRequestCompression}); err != nil {
+ if err := setBoolPtrFromEnvVal(&cfg.DisableRequestCompression, []string{awsDisableRequestCompressionEnv}); err != nil {
return cfg, err
}
- if err := setInt64PtrFromEnvVal(&cfg.RequestMinCompressSizeBytes, []string{awsRequestMinCompressionSizeBytes}, smithyrequestcompression.MaxRequestMinCompressSizeBytes); err != nil {
+ if err := setInt64PtrFromEnvVal(&cfg.RequestMinCompressSizeBytes, []string{awsRequestMinCompressionSizeBytesEnv}, smithyrequestcompression.MaxRequestMinCompressSizeBytes); err != nil {
return cfg, err
}
- if err := setEndpointDiscoveryTypeFromEnvVal(&cfg.EnableEndpointDiscovery, []string{awsEnableEndpointDiscoveryEnvVar}); err != nil {
+ if err := setEndpointDiscoveryTypeFromEnvVal(&cfg.EnableEndpointDiscovery, []string{awsEnableEndpointDiscoveryEnv}); err != nil {
return cfg, err
}
- if err := setBoolPtrFromEnvVal(&cfg.S3UseARNRegion, []string{awsS3UseARNRegionEnvVar}); err != nil {
+ if err := setBoolPtrFromEnvVal(&cfg.S3UseARNRegion, []string{awsS3UseARNRegionEnv}); err != nil {
return cfg, err
}
- setEC2IMDSClientEnableState(&cfg.EC2IMDSClientEnableState, []string{awsEc2MetadataDisabled})
- if err := setEC2IMDSEndpointMode(&cfg.EC2IMDSEndpointMode, []string{awsEc2MetadataServiceEndpointModeEnvVar}); err != nil {
+ setEC2IMDSClientEnableState(&cfg.EC2IMDSClientEnableState, []string{awsEc2MetadataDisabledEnv})
+ if err := setEC2IMDSEndpointMode(&cfg.EC2IMDSEndpointMode, []string{awsEc2MetadataServiceEndpointModeEnv}); err != nil {
return cfg, err
}
- cfg.EC2IMDSEndpoint = os.Getenv(awsEc2MetadataServiceEndpointEnvVar)
- if err := setBoolPtrFromEnvVal(&cfg.EC2IMDSv1Disabled, []string{awsEc2MetadataV1DisabledEnvVar}); err != nil {
+ cfg.EC2IMDSEndpoint = os.Getenv(awsEc2MetadataServiceEndpointEnv)
+ if err := setBoolPtrFromEnvVal(&cfg.EC2IMDSv1Disabled, []string{awsEc2MetadataV1DisabledEnv}); err != nil {
return cfg, err
}
- if err := setBoolPtrFromEnvVal(&cfg.S3DisableMultiRegionAccessPoints, []string{awsS3DisableMultiRegionAccessPointEnvVar}); err != nil {
+ if err := setBoolPtrFromEnvVal(&cfg.S3DisableMultiRegionAccessPoints, []string{awsS3DisableMultiRegionAccessPointsEnv}); err != nil {
return cfg, err
}
- if err := setUseDualStackEndpointFromEnvVal(&cfg.UseDualStackEndpoint, []string{awsUseDualStackEndpoint}); err != nil {
+ if err := setUseDualStackEndpointFromEnvVal(&cfg.UseDualStackEndpoint, []string{awsUseDualStackEndpointEnv}); err != nil {
return cfg, err
}
- if err := setUseFIPSEndpointFromEnvVal(&cfg.UseFIPSEndpoint, []string{awsUseFIPSEndpoint}); err != nil {
+ if err := setUseFIPSEndpointFromEnvVal(&cfg.UseFIPSEndpoint, []string{awsUseFIPSEndpointEnv}); err != nil {
return cfg, err
}
- if err := setDefaultsModeFromEnvVal(&cfg.DefaultsMode, []string{awsDefaultMode}); err != nil {
+ if err := setDefaultsModeFromEnvVal(&cfg.DefaultsMode, []string{awsDefaultsModeEnv}); err != nil {
return cfg, err
}
- if err := setIntFromEnvVal(&cfg.RetryMaxAttempts, []string{awsRetryMaxAttempts}); err != nil {
+ if err := setIntFromEnvVal(&cfg.RetryMaxAttempts, []string{awsMaxAttemptsEnv}); err != nil {
return cfg, err
}
- if err := setRetryModeFromEnvVal(&cfg.RetryMode, []string{awsRetryMode}); err != nil {
+ if err := setRetryModeFromEnvVal(&cfg.RetryMode, []string{awsRetryModeEnv}); err != nil {
return cfg, err
}
- setStringFromEnvVal(&cfg.BaseEndpoint, []string{awsEndpointURL})
+ setStringFromEnvVal(&cfg.BaseEndpoint, []string{awsEndpointURLEnv})
- if err := setBoolPtrFromEnvVal(&cfg.IgnoreConfiguredEndpoints, []string{awsIgnoreConfiguredEndpoints}); err != nil {
+ if err := setBoolPtrFromEnvVal(&cfg.IgnoreConfiguredEndpoints, []string{awsIgnoreConfiguredEndpointURLEnv}); err != nil {
return cfg, err
}
@@ -400,6 +408,13 @@ func NewEnvConfig() (EnvConfig, error) {
return cfg, err
}
+ if err := setRequestChecksumCalculationFromEnvVal(&cfg.RequestChecksumCalculation, []string{awsRequestChecksumCalculation}); err != nil {
+ return cfg, err
+ }
+ if err := setResponseChecksumValidationFromEnvVal(&cfg.ResponseChecksumValidation, []string{awsResponseChecksumValidation}); err != nil {
+ return cfg, err
+ }
+
return cfg, nil
}
@@ -432,6 +447,14 @@ func (c EnvConfig) getAccountIDEndpointMode(context.Context) (aws.AccountIDEndpo
return c.AccountIDEndpointMode, len(c.AccountIDEndpointMode) > 0, nil
}
+func (c EnvConfig) getRequestChecksumCalculation(context.Context) (aws.RequestChecksumCalculation, bool, error) {
+ return c.RequestChecksumCalculation, c.RequestChecksumCalculation > 0, nil
+}
+
+func (c EnvConfig) getResponseChecksumValidation(context.Context) (aws.ResponseChecksumValidation, bool, error) {
+ return c.ResponseChecksumValidation, c.ResponseChecksumValidation > 0, nil
+}
+
// GetRetryMaxAttempts returns the value of AWS_MAX_ATTEMPTS if was specified,
// and not 0.
func (c EnvConfig) GetRetryMaxAttempts(ctx context.Context) (int, bool, error) {
@@ -528,6 +551,45 @@ func setAIDEndPointModeFromEnvVal(m *aws.AccountIDEndpointMode, keys []string) e
return nil
}
+func setRequestChecksumCalculationFromEnvVal(m *aws.RequestChecksumCalculation, keys []string) error {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue
+ }
+
+ switch strings.ToLower(value) {
+ case checksumWhenSupported:
+ *m = aws.RequestChecksumCalculationWhenSupported
+ case checksumWhenRequired:
+ *m = aws.RequestChecksumCalculationWhenRequired
+ default:
+ return fmt.Errorf("invalid value for environment variable, %s=%s, must be when_supported/when_required", k, value)
+ }
+ }
+ return nil
+}
+
+func setResponseChecksumValidationFromEnvVal(m *aws.ResponseChecksumValidation, keys []string) error {
+ for _, k := range keys {
+ value := os.Getenv(k)
+ if len(value) == 0 {
+ continue
+ }
+
+ switch strings.ToLower(value) {
+ case checksumWhenSupported:
+ *m = aws.ResponseChecksumValidationWhenSupported
+ case checksumWhenRequired:
+ *m = aws.ResponseChecksumValidationWhenRequired
+ default:
+ return fmt.Errorf("invalid value for environment variable, %s=%s, must be when_supported/when_required", k, value)
+ }
+
+ }
+ return nil
+}
+
// GetRegion returns the AWS Region if set in the environment. Returns an empty
// string if not set.
func (c EnvConfig) getRegion(ctx context.Context) (string, bool, error) {
@@ -584,7 +646,7 @@ func (c EnvConfig) getCustomCABundle(context.Context) (io.Reader, bool, error) {
return nil, false, nil
}
- b, err := ioutil.ReadFile(c.CustomCABundle)
+ b, err := os.ReadFile(c.CustomCABundle)
if err != nil {
return nil, false, err
}
@@ -608,7 +670,7 @@ func (c EnvConfig) getBaseEndpoint(context.Context) (string, bool, error) {
// GetServiceBaseEndpoint is used to retrieve a normalized SDK ID for use
// with configured endpoints.
func (c EnvConfig) GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) {
- if endpt := os.Getenv(fmt.Sprintf("%s_%s", awsEndpointURL, normalizeEnv(sdkID))); endpt != "" {
+ if endpt := os.Getenv(fmt.Sprintf("%s_%s", awsEndpointURLEnv, normalizeEnv(sdkID))); endpt != "" {
return endpt, true, nil
}
return "", false, nil
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
index 932235f9..1859fe93 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
@@ -3,4 +3,4 @@
package config
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.28.3"
+const goModuleVersion = "1.29.2"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
index dc6c7d29..0810ecf1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
@@ -216,8 +216,15 @@ type LoadOptions struct {
// Whether S3 Express auth is disabled.
S3DisableExpressAuth *bool
+ // Whether account id should be built into endpoint resolution
AccountIDEndpointMode aws.AccountIDEndpointMode
+ // Specify if request checksum should be calculated
+ RequestChecksumCalculation aws.RequestChecksumCalculation
+
+ // Specifies if response checksum should be validated
+ ResponseChecksumValidation aws.ResponseChecksumValidation
+
// Service endpoint override. This value is not necessarily final and is
// passed to the service's EndpointResolverV2 for further delegation.
BaseEndpoint string
@@ -288,6 +295,14 @@ func (o LoadOptions) getAccountIDEndpointMode(ctx context.Context) (aws.AccountI
return o.AccountIDEndpointMode, len(o.AccountIDEndpointMode) > 0, nil
}
+func (o LoadOptions) getRequestChecksumCalculation(ctx context.Context) (aws.RequestChecksumCalculation, bool, error) {
+ return o.RequestChecksumCalculation, o.RequestChecksumCalculation > 0, nil
+}
+
+func (o LoadOptions) getResponseChecksumValidation(ctx context.Context) (aws.ResponseChecksumValidation, bool, error) {
+ return o.ResponseChecksumValidation, o.ResponseChecksumValidation > 0, nil
+}
+
func (o LoadOptions) getBaseEndpoint(context.Context) (string, bool, error) {
return o.BaseEndpoint, o.BaseEndpoint != "", nil
}
@@ -357,6 +372,26 @@ func WithAccountIDEndpointMode(m aws.AccountIDEndpointMode) LoadOptionsFunc {
}
}
+// WithRequestChecksumCalculation is a helper function to construct functional options
+// that sets RequestChecksumCalculation on config's LoadOptions
+func WithRequestChecksumCalculation(c aws.RequestChecksumCalculation) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ if c > 0 {
+ o.RequestChecksumCalculation = c
+ }
+ return nil
+ }
+}
+
+// WithResponseChecksumValidation is a helper function to construct functional options
+// that sets ResponseChecksumValidation on config's LoadOptions
+func WithResponseChecksumValidation(v aws.ResponseChecksumValidation) LoadOptionsFunc {
+ return func(o *LoadOptions) error {
+ o.ResponseChecksumValidation = v
+ return nil
+ }
+}
+
// getDefaultRegion returns DefaultRegion from config's LoadOptions
func (o LoadOptions) getDefaultRegion(ctx context.Context) (string, bool, error) {
if len(o.DefaultRegion) == 0 {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
index 043781f1..a8ff40d8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
@@ -242,6 +242,40 @@ func getAccountIDEndpointMode(ctx context.Context, configs configs) (value aws.A
return
}
+// requestChecksumCalculationProvider provides access to the RequestChecksumCalculation
+type requestChecksumCalculationProvider interface {
+ getRequestChecksumCalculation(context.Context) (aws.RequestChecksumCalculation, bool, error)
+}
+
+func getRequestChecksumCalculation(ctx context.Context, configs configs) (value aws.RequestChecksumCalculation, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(requestChecksumCalculationProvider); ok {
+ value, found, err = p.getRequestChecksumCalculation(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
+// responseChecksumValidationProvider provides access to the ResponseChecksumValidation
+type responseChecksumValidationProvider interface {
+ getResponseChecksumValidation(context.Context) (aws.ResponseChecksumValidation, bool, error)
+}
+
+func getResponseChecksumValidation(ctx context.Context, configs configs) (value aws.ResponseChecksumValidation, found bool, err error) {
+ for _, cfg := range configs {
+ if p, ok := cfg.(responseChecksumValidationProvider); ok {
+ value, found, err = p.getResponseChecksumValidation(ctx)
+ if err != nil || found {
+ break
+ }
+ }
+ }
+ return
+}
+
// ec2IMDSRegionProvider provides access to the ec2 imds region
// configuration value
type ec2IMDSRegionProvider interface {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go
index 41009c7d..a68bd099 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go
@@ -182,6 +182,36 @@ func resolveAccountIDEndpointMode(ctx context.Context, cfg *aws.Config, configs
return nil
}
+// resolveRequestChecksumCalculation extracts the RequestChecksumCalculation from the configs slice's
+// SharedConfig or EnvConfig
+func resolveRequestChecksumCalculation(ctx context.Context, cfg *aws.Config, configs configs) error {
+ c, found, err := getRequestChecksumCalculation(ctx, configs)
+ if err != nil {
+ return err
+ }
+
+ if !found {
+ c = aws.RequestChecksumCalculationWhenSupported
+ }
+ cfg.RequestChecksumCalculation = c
+ return nil
+}
+
+// resolveResponseValidation extracts the ResponseChecksumValidation from the configs slice's
+// SharedConfig or EnvConfig
+func resolveResponseChecksumValidation(ctx context.Context, cfg *aws.Config, configs configs) error {
+ c, found, err := getResponseChecksumValidation(ctx, configs)
+ if err != nil {
+ return err
+ }
+
+ if !found {
+ c = aws.ResponseChecksumValidationWhenSupported
+ }
+ cfg.ResponseChecksumValidation = c
+ return nil
+}
+
// resolveDefaultRegion extracts the first instance of a default region and sets `aws.Config.Region` to the default
// region if region had not been resolved from other sources.
func resolveDefaultRegion(ctx context.Context, cfg *aws.Config, configs configs) error {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
index d7a2b530..00b071fe 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
@@ -118,6 +118,11 @@ const (
accountIDKey = "aws_account_id"
accountIDEndpointMode = "account_id_endpoint_mode"
+
+ requestChecksumCalculationKey = "request_checksum_calculation"
+ responseChecksumValidationKey = "response_checksum_validation"
+ checksumWhenSupported = "when_supported"
+ checksumWhenRequired = "when_required"
)
// defaultSharedConfigProfile allows for swapping the default profile for testing
@@ -346,6 +351,12 @@ type SharedConfig struct {
S3DisableExpressAuth *bool
AccountIDEndpointMode aws.AccountIDEndpointMode
+
+ // RequestChecksumCalculation indicates if the request checksum should be calculated
+ RequestChecksumCalculation aws.RequestChecksumCalculation
+
+ // ResponseChecksumValidation indicates if the response checksum should be validated
+ ResponseChecksumValidation aws.ResponseChecksumValidation
}
func (c SharedConfig) getDefaultsMode(ctx context.Context) (value aws.DefaultsMode, ok bool, err error) {
@@ -1133,6 +1144,13 @@ func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) er
return fmt.Errorf("failed to load %s from shared config, %w", accountIDEndpointMode, err)
}
+ if err := updateRequestChecksumCalculation(&c.RequestChecksumCalculation, section, requestChecksumCalculationKey); err != nil {
+ return fmt.Errorf("failed to load %s from shared config, %w", requestChecksumCalculationKey, err)
+ }
+ if err := updateResponseChecksumValidation(&c.ResponseChecksumValidation, section, responseChecksumValidationKey); err != nil {
+ return fmt.Errorf("failed to load %s from shared config, %w", responseChecksumValidationKey, err)
+ }
+
// Shared Credentials
creds := aws.Credentials{
AccessKeyID: section.String(accessKeyIDKey),
@@ -1207,6 +1225,42 @@ func updateAIDEndpointMode(m *aws.AccountIDEndpointMode, sec ini.Section, key st
return nil
}
+func updateRequestChecksumCalculation(m *aws.RequestChecksumCalculation, sec ini.Section, key string) error {
+ if !sec.Has(key) {
+ return nil
+ }
+
+ v := sec.String(key)
+ switch strings.ToLower(v) {
+ case checksumWhenSupported:
+ *m = aws.RequestChecksumCalculationWhenSupported
+ case checksumWhenRequired:
+ *m = aws.RequestChecksumCalculationWhenRequired
+ default:
+ return fmt.Errorf("invalid value for shared config profile field, %s=%s, must be when_supported/when_required", key, v)
+ }
+
+ return nil
+}
+
+func updateResponseChecksumValidation(m *aws.ResponseChecksumValidation, sec ini.Section, key string) error {
+ if !sec.Has(key) {
+ return nil
+ }
+
+ v := sec.String(key)
+ switch strings.ToLower(v) {
+ case checksumWhenSupported:
+ *m = aws.ResponseChecksumValidationWhenSupported
+ case checksumWhenRequired:
+ *m = aws.ResponseChecksumValidationWhenRequired
+ default:
+ return fmt.Errorf("invalid value for shared config profile field, %s=%s, must be when_supported/when_required", key, v)
+ }
+
+ return nil
+}
+
func (c SharedConfig) getRequestMinCompressSizeBytes(ctx context.Context) (int64, bool, error) {
if c.RequestMinCompressSizeBytes == nil {
return 0, false, nil
@@ -1225,6 +1279,14 @@ func (c SharedConfig) getAccountIDEndpointMode(ctx context.Context) (aws.Account
return c.AccountIDEndpointMode, len(c.AccountIDEndpointMode) > 0, nil
}
+func (c SharedConfig) getRequestChecksumCalculation(ctx context.Context) (aws.RequestChecksumCalculation, bool, error) {
+ return c.RequestChecksumCalculation, c.RequestChecksumCalculation > 0, nil
+}
+
+func (c SharedConfig) getResponseChecksumValidation(ctx context.Context) (aws.ResponseChecksumValidation, bool, error) {
+ return c.ResponseChecksumValidation, c.ResponseChecksumValidation > 0, nil
+}
+
func updateDefaultsMode(mode *aws.DefaultsMode, section ini.Section, key string) error {
if !section.Has(key) {
return nil
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
index 2f0c60fb..8a3ed35b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
@@ -1,3 +1,50 @@
+# v1.17.55 (2025-01-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.17.54 (2025-01-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.53 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.52 (2025-01-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.51 (2025-01-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.50 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.49 (2025-01-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.48 (2024-12-19)
+
+* **Bug Fix**: Fix improper use of printf-style functions.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.47 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.46 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.45 (2024-11-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.17.44 (2024-11-07)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
index 5c028a10..fd852ab0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
@@ -3,4 +3,4 @@
package credentials
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.17.44"
+const goModuleVersion = "1.17.55"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
index 66beafc7..3154dfa3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
@@ -1,3 +1,29 @@
+# v1.16.25 (2025-01-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.16.24 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.23 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.22 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.21 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.20 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.16.19 (2024-11-06)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
index 79b1d7c9..cb091ba3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
@@ -3,4 +3,4 @@
package imds
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.16.19"
+const goModuleVersion = "1.16.25"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md
index 4fe95be3..6362a172 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md
@@ -1,3 +1,80 @@
+# v1.17.55 (2025-01-29)
+
+* **Bug Fix**: Fix incorrect reference to old s3manager in comments.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.54 (2025-01-24)
+
+* **Bug Fix**: Fix incorrect reference to old s3manager in comments.
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.17.53 (2025-01-22)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.52 (2025-01-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.51 (2025-01-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.50 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.49 (2025-01-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.48 (2025-01-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.47 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.46 (2025-01-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.45 (2025-01-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.44 (2024-12-19)
+
+* **Bug Fix**: Fix improper use of printf-style functions.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.43 (2024-12-03.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.42 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.41 (2024-11-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.40 (2024-11-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.39 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.38 (2024-11-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.17.37 (2024-11-07)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/download.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/download.go
index 5a9fe2dd..39943644 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/download.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/download.go
@@ -158,7 +158,7 @@ func NewDownloader(c DownloadAPIClient, options ...func(*Downloader)) *Downloade
// // pre-allocate in memory buffer, where headObject type is *s3.HeadObjectOutput
// buf := make([]byte, int(headObject.ContentLength))
// // wrap with aws.WriteAtBuffer
-// w := s3manager.NewWriteAtBuffer(buf)
+// w := manager.NewWriteAtBuffer(buf)
// // download file into the memory
// numBytesDownloaded, err := downloader.Download(ctx, w, &s3.GetObjectInput{
// Bucket: aws.String(bucket),
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go
index d055aadb..d55a9d5f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go
@@ -3,4 +3,4 @@
package manager
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.17.37"
+const goModuleVersion = "1.17.55"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/types.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/types.go
index 968f9073..399d81aa 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/types.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/types.go
@@ -15,7 +15,7 @@ import (
// requires payload signing.
//
// Note: If using with S3 PutObject to stream an object upload. The SDK's S3
-// Upload Manager(s3manager.Uploader) provides support for streaming
+// Upload Manager(manager.Uploader) provides support for streaming
// with the ability to retry network errors.
func ReadSeekCloser(r io.Reader) *ReaderSeekerCloser {
return &ReaderSeekerCloser{r}
@@ -137,7 +137,7 @@ func (r *ReaderSeekerCloser) Close() error {
}
// A WriteAtBuffer provides a in memory buffer supporting the io.WriterAt interface
-// Can be used with the s3manager.Downloader to download content to a buffer
+// Can be used with the manager.Downloader to download content to a buffer
// in memory. Safe to use concurrently.
type WriteAtBuffer struct {
buf []byte
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/upload.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/upload.go
index d73a6d3b..c6d04f1e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/upload.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/upload.go
@@ -3,6 +3,7 @@ package manager
import (
"bytes"
"context"
+ "errors"
"fmt"
"io"
"net/http"
@@ -10,7 +11,6 @@ import (
"sync"
"github.com/aws/aws-sdk-go-v2/aws"
-
"github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
@@ -584,6 +584,8 @@ func (a completedParts) Less(i, j int) bool {
// upload will perform a multipart upload using the firstBuf buffer containing
// the first chunk of data.
func (u *multiuploader) upload(firstBuf io.ReadSeeker, cleanup func()) (*UploadOutput, error) {
+ u.initChecksumAlgorithm()
+
var params s3.CreateMultipartUploadInput
awsutil.Copy(¶ms, u.in)
@@ -686,7 +688,7 @@ func (u *multiuploader) shouldContinue(part int32, nextChunkLen int, err error)
msg = fmt.Sprintf("exceeded total allowed S3 limit MaxUploadParts (%d). Adjust PartSize to fit in this limit",
MaxUploadParts)
}
- return false, fmt.Errorf(msg)
+ return false, errors.New(msg)
}
return true, err
@@ -752,6 +754,25 @@ func (u *multiuploader) send(c chunk) error {
return nil
}
+func (u *multiuploader) initChecksumAlgorithm() {
+ if u.in.ChecksumAlgorithm != "" {
+ return
+ }
+
+ switch {
+ case u.in.ChecksumCRC32 != nil:
+ u.in.ChecksumAlgorithm = types.ChecksumAlgorithmCrc32
+ case u.in.ChecksumCRC32C != nil:
+ u.in.ChecksumAlgorithm = types.ChecksumAlgorithmCrc32c
+ case u.in.ChecksumSHA1 != nil:
+ u.in.ChecksumAlgorithm = types.ChecksumAlgorithmSha1
+ case u.in.ChecksumSHA256 != nil:
+ u.in.ChecksumAlgorithm = types.ChecksumAlgorithmSha256
+ default:
+ u.in.ChecksumAlgorithm = types.ChecksumAlgorithmCrc32
+ }
+}
+
// geterr is a thread-safe getter for the error object
func (u *multiuploader) geterr() error {
u.m.Lock()
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
index 669d69af..eae3e16a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
@@ -1,3 +1,50 @@
+# v1.3.34 (2025-02-27)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.33 (2025-02-18)
+
+* **Bug Fix**: Bump go version to 1.22
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.32 (2025-02-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.31 (2025-01-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.30 (2025-01-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.29 (2025-01-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.3.28 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.27 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.26 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.25 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.24 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.3.23 (2024-11-06)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
index 6a89827e..eddabe63 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
@@ -3,4 +3,4 @@
package configsources
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.3.23"
+const goModuleVersion = "1.3.34"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
index a2f06808..e19224f1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json
@@ -47,6 +47,9 @@
"ap-southeast-5" : {
"description" : "Asia Pacific (Malaysia)"
},
+ "ap-southeast-7" : {
+ "description" : "Asia Pacific (Thailand)"
+ },
"aws-global" : {
"description" : "AWS Standard global region"
},
@@ -89,6 +92,9 @@
"me-south-1" : {
"description" : "Middle East (Bahrain)"
},
+ "mx-central-1" : {
+ "description" : "Mexico (Central)"
+ },
"sa-east-1" : {
"description" : "South America (Sao Paulo)"
},
@@ -217,7 +223,17 @@
"supportsFIPS" : true
},
"regionRegex" : "^us\\-isof\\-\\w+\\-\\d+$",
- "regions" : { }
+ "regions" : {
+ "aws-iso-f-global" : {
+ "description" : "AWS ISOF global region"
+ },
+ "us-isof-east-1" : {
+ "description" : "US ISOF EAST"
+ },
+ "us-isof-south-1" : {
+ "description" : "US ISOF SOUTH"
+ }
+ }
} ],
"version" : "1.1"
}
\ No newline at end of file
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
index ac71e1c7..83e5bd28 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
@@ -1,3 +1,51 @@
+# v2.6.34 (2025-02-27)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.33 (2025-02-18)
+
+* **Bug Fix**: Bump go version to 1.22
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.32 (2025-02-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.31 (2025-01-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.30 (2025-01-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.29 (2025-01-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v2.6.28 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.27 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.26 (2024-12-19)
+
+* **Bug Fix**: Fix improper use of printf-style functions.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.25 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v2.6.24 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v2.6.23 (2024-11-06)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
index 460fef72..735dba7a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
@@ -3,4 +3,4 @@
package endpoints
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "2.6.23"
+const goModuleVersion = "2.6.34"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
index be61098b..1d23b9be 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
@@ -1,3 +1,7 @@
+# v1.8.2 (2025-01-24)
+
+* **Bug Fix**: Refactor filepath.Walk to filepath.WalkDir
+
# v1.8.1 (2024-08-15)
* **Dependency Update**: Bump minimum Go version to 1.21.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
index ef6a3811..355ed39e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
@@ -3,4 +3,4 @@
package ini
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.8.1"
+const goModuleVersion = "1.8.2"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md
index a4202758..dc3aadcf 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md
@@ -1,3 +1,29 @@
+# v1.3.29 (2025-01-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.3.28 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.27 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.26 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.25 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.24 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.3.23 (2024-11-06)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go
index 950a0134..eb85d57b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go
@@ -3,4 +3,4 @@
package v4a
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.3.23"
+const goModuleVersion = "1.3.29"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
index 8ab28d3a..ef78753a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
@@ -1,3 +1,7 @@
+# v1.12.2 (2025-01-24)
+
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
# v1.12.1 (2024-11-18)
* **Dependency Update**: Update to smithy-go v1.22.1.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
index 1514acbe..cbf79b40 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go
@@ -3,4 +3,4 @@
package acceptencoding
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.12.1"
+const goModuleVersion = "1.12.2"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md
index c07acfcc..0a2fedd5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md
@@ -1,3 +1,39 @@
+# v1.5.3 (2025-01-24)
+
+* **Bug Fix**: Enable request checksum validation mode by default
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.5.2 (2025-01-17)
+
+* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop.
+
+# v1.5.1 (2025-01-16)
+
+* **Bug Fix**: Fix nil dereference panic for operations that require checksums, but do not have an input setting for which algorithm to use.
+
+# v1.5.0 (2025-01-15)
+
+* **Feature**: S3 client behavior is updated to always calculate a checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). The checksum algorithm used by default now becomes CRC32. Checksum behavior can be configured using `when_supported` and `when_required` options - in code using RequestChecksumCalculation, in shared config using request_checksum_calculation, or as env variable using AWS_REQUEST_CHECKSUM_CALCULATION. The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if the SDK has not implemented the specified checksum algorithm then this validation is skipped. Checksum validation behavior can be configured using `when_supported` and `when_required` options - in code using ResponseChecksumValidation, in shared config using response_checksum_validation, or as env variable using AWS_RESPONSE_CHECKSUM_VALIDATION.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.8 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.7 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.6 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.5 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.4.4 (2024-11-06)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/algorithms.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/algorithms.go
index a17041c3..d241bf59 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/algorithms.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/algorithms.go
@@ -30,6 +30,9 @@ const (
// AlgorithmSHA256 represents SHA256 hash algorithm
AlgorithmSHA256 Algorithm = "SHA256"
+
+ // AlgorithmCRC64NVME represents CRC64NVME hash algorithm
+ AlgorithmCRC64NVME Algorithm = "CRC64NVME"
)
var supportedAlgorithms = []Algorithm{
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go
index 25c41ea1..929b7242 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go
@@ -3,4 +3,4 @@
package checksum
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.4.4"
+const goModuleVersion = "1.5.3"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go
index 1b727acb..274d649f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_add.go
@@ -1,6 +1,7 @@
package checksum
import (
+ "github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/smithy-go/middleware"
)
@@ -14,11 +15,16 @@ type InputMiddlewareOptions struct {
// and true, or false if no algorithm is specified.
GetAlgorithm func(interface{}) (string, bool)
- // Forces the middleware to compute the input payload's checksum. The
- // request will fail if the algorithm is not specified or unable to compute
- // the checksum.
+ // RequireChecksum indicates whether operation model forces middleware to compute the input payload's checksum.
+ // If RequireChecksum is set to true, checksum will be calculated and RequestChecksumCalculation will be ignored,
+ // otherwise RequestChecksumCalculation will be used to indicate if checksum will be calculated
RequireChecksum bool
+ // RequestChecksumCalculation is the user config to opt-in/out request checksum calculation. If RequireChecksum is
+ // set to true, checksum will be calculated and this field will be ignored, otherwise
+ // RequestChecksumCalculation will be used to indicate if checksum will be calculated
+ RequestChecksumCalculation aws.RequestChecksumCalculation
+
// Enables support for wrapping the serialized input payload with a
// content-encoding: aws-check wrapper, and including a trailer for the
// algorithm's checksum value.
@@ -46,33 +52,16 @@ type InputMiddlewareOptions struct {
// AddInputMiddleware adds the middleware for performing checksum computing
// of request payloads, and checksum validation of response payloads.
+//
+// Deprecated: This internal-only runtime API is frozen. Do not call or modify
+// it in new code. Checksum-enabled service operations now generate this
+// middleware setup code inline per #2507.
func AddInputMiddleware(stack *middleware.Stack, options InputMiddlewareOptions) (err error) {
- // TODO ensure this works correctly with presigned URLs
-
- // Middleware stack:
- // * (OK)(Initialize) --none--
- // * (OK)(Serialize) EndpointResolver
- // * (OK)(Build) ComputeContentLength
- // * (AD)(Build) Header ComputeInputPayloadChecksum
- // * SIGNED Payload - If HTTP && not support trailing checksum
- // * UNSIGNED Payload - If HTTPS && not support trailing checksum
- // * (RM)(Build) ContentChecksum - OK to remove
- // * (OK)(Build) ComputePayloadHash
- // * v4.dynamicPayloadSigningMiddleware
- // * v4.computePayloadSHA256
- // * v4.unsignedPayload
- // (OK)(Build) Set computedPayloadHash header
- // * (OK)(Finalize) Retry
- // * (AD)(Finalize) Trailer ComputeInputPayloadChecksum,
- // * Requires HTTPS && support trailing checksum
- // * UNSIGNED Payload
- // * Finalize run if HTTPS && support trailing checksum
- // * (OK)(Finalize) Signing
- // * (OK)(Deserialize) --none--
-
// Initial checksum configuration look up middleware
- err = stack.Initialize.Add(&setupInputContext{
- GetAlgorithm: options.GetAlgorithm,
+ err = stack.Initialize.Add(&SetupInputContext{
+ GetAlgorithm: options.GetAlgorithm,
+ RequireChecksum: options.RequireChecksum,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
}, middleware.Before)
if err != nil {
return err
@@ -80,8 +69,7 @@ func AddInputMiddleware(stack *middleware.Stack, options InputMiddlewareOptions)
stack.Build.Remove("ContentChecksum")
- inputChecksum := &computeInputPayloadChecksum{
- RequireChecksum: options.RequireChecksum,
+ inputChecksum := &ComputeInputPayloadChecksum{
EnableTrailingChecksum: options.EnableTrailingChecksum,
EnableComputePayloadHash: options.EnableComputeSHA256PayloadHash,
EnableDecodedContentLengthHeader: options.EnableDecodedContentLengthHeader,
@@ -92,9 +80,8 @@ func AddInputMiddleware(stack *middleware.Stack, options InputMiddlewareOptions)
// If trailing checksum is not supported no need for finalize handler to be added.
if options.EnableTrailingChecksum {
- trailerMiddleware := &addInputChecksumTrailer{
+ trailerMiddleware := &AddInputChecksumTrailer{
EnableTrailingChecksum: inputChecksum.EnableTrailingChecksum,
- RequireChecksum: inputChecksum.RequireChecksum,
EnableComputePayloadHash: inputChecksum.EnableComputePayloadHash,
EnableDecodedContentLengthHeader: inputChecksum.EnableDecodedContentLengthHeader,
}
@@ -109,10 +96,10 @@ func AddInputMiddleware(stack *middleware.Stack, options InputMiddlewareOptions)
// RemoveInputMiddleware Removes the compute input payload checksum middleware
// handlers from the stack.
func RemoveInputMiddleware(stack *middleware.Stack) {
- id := (*setupInputContext)(nil).ID()
+ id := (*SetupInputContext)(nil).ID()
stack.Initialize.Remove(id)
- id = (*computeInputPayloadChecksum)(nil).ID()
+ id = (*ComputeInputPayloadChecksum)(nil).ID()
stack.Finalize.Remove(id)
}
@@ -126,6 +113,12 @@ type OutputMiddlewareOptions struct {
// mode and true, or false if no mode is specified.
GetValidationMode func(interface{}) (string, bool)
+ // SetValidationMode is a function to set the checksum validation mode of input parameters
+ SetValidationMode func(interface{}, string)
+
+ // ResponseChecksumValidation is the user config to opt-in/out response checksum validation
+ ResponseChecksumValidation aws.ResponseChecksumValidation
+
// The set of checksum algorithms that should be used for response payload
// checksum validation. The algorithm(s) used will be a union of the
// output's returned algorithms and this set.
@@ -134,7 +127,7 @@ type OutputMiddlewareOptions struct {
ValidationAlgorithms []string
// If set the middleware will ignore output multipart checksums. Otherwise
- // an checksum format error will be returned by the middleware.
+ // a checksum format error will be returned by the middleware.
IgnoreMultipartValidation bool
// When set the middleware will log when output does not have checksum or
@@ -150,7 +143,9 @@ type OutputMiddlewareOptions struct {
// checksum.
func AddOutputMiddleware(stack *middleware.Stack, options OutputMiddlewareOptions) error {
err := stack.Initialize.Add(&setupOutputContext{
- GetValidationMode: options.GetValidationMode,
+ GetValidationMode: options.GetValidationMode,
+ SetValidationMode: options.SetValidationMode,
+ ResponseChecksumValidation: options.ResponseChecksumValidation,
}, middleware.Before)
if err != nil {
return err
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_checksum_metrics_tracking.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_checksum_metrics_tracking.go
new file mode 100644
index 00000000..861a4429
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_checksum_metrics_tracking.go
@@ -0,0 +1,90 @@
+package checksum
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+var supportedChecksumFeatures = map[Algorithm]awsmiddleware.UserAgentFeature{
+ AlgorithmCRC32: awsmiddleware.UserAgentFeatureRequestChecksumCRC32,
+ AlgorithmCRC32C: awsmiddleware.UserAgentFeatureRequestChecksumCRC32C,
+ AlgorithmSHA1: awsmiddleware.UserAgentFeatureRequestChecksumSHA1,
+ AlgorithmSHA256: awsmiddleware.UserAgentFeatureRequestChecksumSHA256,
+ AlgorithmCRC64NVME: awsmiddleware.UserAgentFeatureRequestChecksumCRC64,
+}
+
+// RequestChecksumMetricsTracking is the middleware to track operation request's checksum usage
+type RequestChecksumMetricsTracking struct {
+ RequestChecksumCalculation aws.RequestChecksumCalculation
+ UserAgent *awsmiddleware.RequestUserAgent
+}
+
+// ID provides the middleware identifier
+func (m *RequestChecksumMetricsTracking) ID() string {
+ return "AWSChecksum:RequestMetricsTracking"
+}
+
+// HandleBuild checks request checksum config and checksum value sent
+// and sends corresponding feature id to user agent
+func (m *RequestChecksumMetricsTracking) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ switch m.RequestChecksumCalculation {
+ case aws.RequestChecksumCalculationWhenSupported:
+ m.UserAgent.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRequestChecksumWhenSupported)
+ case aws.RequestChecksumCalculationWhenRequired:
+ m.UserAgent.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRequestChecksumWhenRequired)
+ }
+
+ for algo, feat := range supportedChecksumFeatures {
+ checksumHeader := AlgorithmHTTPHeader(algo)
+ if checksum := req.Header.Get(checksumHeader); checksum != "" {
+ m.UserAgent.AddUserAgentFeature(feat)
+ }
+ }
+
+ return next.HandleBuild(ctx, in)
+}
+
+// ResponseChecksumMetricsTracking is the middleware to track operation response's checksum usage
+type ResponseChecksumMetricsTracking struct {
+ ResponseChecksumValidation aws.ResponseChecksumValidation
+ UserAgent *awsmiddleware.RequestUserAgent
+}
+
+// ID provides the middleware identifier
+func (m *ResponseChecksumMetricsTracking) ID() string {
+ return "AWSChecksum:ResponseMetricsTracking"
+}
+
+// HandleBuild checks the response checksum config and sends corresponding feature id to user agent
+func (m *ResponseChecksumMetricsTracking) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown request type %T", req)
+ }
+
+ switch m.ResponseChecksumValidation {
+ case aws.ResponseChecksumValidationWhenSupported:
+ m.UserAgent.AddUserAgentFeature(awsmiddleware.UserAgentFeatureResponseChecksumWhenSupported)
+ case aws.ResponseChecksumValidationWhenRequired:
+ m.UserAgent.AddUserAgentFeature(awsmiddleware.UserAgentFeatureResponseChecksumWhenRequired)
+ }
+
+ return next.HandleBuild(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go
index 7ffca33f..ee8ff545 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_compute_input_checksum.go
@@ -7,6 +7,7 @@ import (
"hash"
"io"
"strconv"
+ "strings"
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
@@ -16,7 +17,6 @@ import (
)
const (
- contentMD5Header = "Content-Md5"
streamingUnsignedPayloadTrailerPayloadHash = "STREAMING-UNSIGNED-PAYLOAD-TRAILER"
)
@@ -39,8 +39,8 @@ func SetComputedInputChecksums(m *middleware.Metadata, vs map[string]string) {
m.Set(computedInputChecksumsKey{}, vs)
}
-// computeInputPayloadChecksum middleware computes payload checksum
-type computeInputPayloadChecksum struct {
+// ComputeInputPayloadChecksum middleware computes payload checksum
+type ComputeInputPayloadChecksum struct {
// Enables support for wrapping the serialized input payload with a
// content-encoding: aws-check wrapper, and including a trailer for the
// algorithm's checksum value.
@@ -49,13 +49,6 @@ type computeInputPayloadChecksum struct {
// the Algorithm's header is already set on the request.
EnableTrailingChecksum bool
- // States that a checksum is required to be included for the operation. If
- // Input does not specify a checksum, fallback to built in MD5 checksum is
- // used.
- //
- // Replaces smithy-go's ContentChecksum middleware.
- RequireChecksum bool
-
// Enables support for computing the SHA256 checksum of input payloads
// along with the algorithm specified checksum. Prevents downstream
// middleware handlers (computePayloadSHA256) re-reading the payload.
@@ -78,7 +71,7 @@ type computeInputPayloadChecksum struct {
type useTrailer struct{}
// ID provides the middleware's identifier.
-func (m *computeInputPayloadChecksum) ID() string {
+func (m *ComputeInputPayloadChecksum) ID() string {
return "AWSChecksum:ComputeInputPayloadChecksum"
}
@@ -98,18 +91,27 @@ func (e computeInputHeaderChecksumError) Error() string {
}
func (e computeInputHeaderChecksumError) Unwrap() error { return e.Err }
-// HandleBuild handles computing the payload's checksum, in the following cases:
+// HandleFinalize handles computing the payload's checksum, in the following cases:
// - Is HTTP, not HTTPS
// - RequireChecksum is true, and no checksums were specified via the Input
// - Trailing checksums are not supported
//
// The build handler must be inserted in the stack before ContentPayloadHash
// and after ComputeContentLength.
-func (m *computeInputPayloadChecksum) HandleFinalize(
+func (m *ComputeInputPayloadChecksum) HandleFinalize(
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
+ var checksum string
+ algorithm, ok, err := getInputAlgorithm(ctx)
+ if err != nil {
+ return out, metadata, err
+ }
+ if !ok {
+ return next.HandleFinalize(ctx, in)
+ }
+
req, ok := in.Request.(*smithyhttp.Request)
if !ok {
return out, metadata, computeInputHeaderChecksumError{
@@ -117,8 +119,6 @@ func (m *computeInputPayloadChecksum) HandleFinalize(
}
}
- var algorithm Algorithm
- var checksum string
defer func() {
if algorithm == "" || checksum == "" || err != nil {
return
@@ -130,29 +130,14 @@ func (m *computeInputPayloadChecksum) HandleFinalize(
})
}()
- // If no algorithm was specified, and the operation requires a checksum,
- // fallback to the legacy content MD5 checksum.
- algorithm, ok, err = getInputAlgorithm(ctx)
- if err != nil {
- return out, metadata, err
- } else if !ok {
- if m.RequireChecksum {
- checksum, err = setMD5Checksum(ctx, req)
- if err != nil {
- return out, metadata, computeInputHeaderChecksumError{
- Msg: "failed to compute stream's MD5 checksum",
- Err: err,
- }
- }
- algorithm = Algorithm("MD5")
+ // If any checksum header is already set nothing to do.
+ for header := range req.Header {
+ h := strings.ToUpper(header)
+ if strings.HasPrefix(h, "X-AMZ-CHECKSUM-") {
+ algorithm = Algorithm(strings.TrimPrefix(h, "X-AMZ-CHECKSUM-"))
+ checksum = req.Header.Get(header)
+ return next.HandleFinalize(ctx, in)
}
- return next.HandleFinalize(ctx, in)
- }
-
- // If the checksum header is already set nothing to do.
- checksumHeader := AlgorithmHTTPHeader(algorithm)
- if checksum = req.Header.Get(checksumHeader); checksum != "" {
- return next.HandleFinalize(ctx, in)
}
computePayloadHash := m.EnableComputePayloadHash
@@ -217,6 +202,7 @@ func (m *computeInputPayloadChecksum) HandleFinalize(
}
}
+ checksumHeader := AlgorithmHTTPHeader(algorithm)
req.Header.Set(checksumHeader, checksum)
if computePayloadHash {
@@ -242,28 +228,37 @@ func (e computeInputTrailingChecksumError) Error() string {
}
func (e computeInputTrailingChecksumError) Unwrap() error { return e.Err }
-// addInputChecksumTrailer
+// AddInputChecksumTrailer adds HTTP checksum when
// - Is HTTPS, not HTTP
// - A checksum was specified via the Input
// - Trailing checksums are supported.
-type addInputChecksumTrailer struct {
+type AddInputChecksumTrailer struct {
EnableTrailingChecksum bool
- RequireChecksum bool
EnableComputePayloadHash bool
EnableDecodedContentLengthHeader bool
}
// ID identifies this middleware.
-func (*addInputChecksumTrailer) ID() string {
+func (*AddInputChecksumTrailer) ID() string {
return "addInputChecksumTrailer"
}
// HandleFinalize wraps the request body to write the trailing checksum.
-func (m *addInputChecksumTrailer) HandleFinalize(
+func (m *AddInputChecksumTrailer) HandleFinalize(
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
) {
+ algorithm, ok, err := getInputAlgorithm(ctx)
+ if err != nil {
+ return out, metadata, computeInputTrailingChecksumError{
+ Msg: "failed to get algorithm",
+ Err: err,
+ }
+ } else if !ok {
+ return next.HandleFinalize(ctx, in)
+ }
+
if enabled, _ := middleware.GetStackValue(ctx, useTrailer{}).(bool); !enabled {
return next.HandleFinalize(ctx, in)
}
@@ -281,26 +276,13 @@ func (m *addInputChecksumTrailer) HandleFinalize(
}
}
- // If no algorithm was specified, there is nothing to do.
- algorithm, ok, err := getInputAlgorithm(ctx)
- if err != nil {
- return out, metadata, computeInputTrailingChecksumError{
- Msg: "failed to get algorithm",
- Err: err,
- }
- } else if !ok {
- return out, metadata, computeInputTrailingChecksumError{
- Msg: "no algorithm specified",
+ // If any checksum header is already set nothing to do.
+ for header := range req.Header {
+ if strings.HasPrefix(strings.ToLower(header), "x-amz-checksum-") {
+ return next.HandleFinalize(ctx, in)
}
}
- // If the checksum header is already set before finalize could run, there
- // is nothing to do.
- checksumHeader := AlgorithmHTTPHeader(algorithm)
- if req.Header.Get(checksumHeader) != "" {
- return next.HandleFinalize(ctx, in)
- }
-
stream := req.GetStream()
streamLength, err := getRequestStreamLength(req)
if err != nil {
@@ -444,39 +426,3 @@ func getRequestStreamLength(req *smithyhttp.Request) (int64, error) {
return -1, nil
}
-
-// setMD5Checksum computes the MD5 of the request payload and sets it to the
-// Content-MD5 header. Returning the MD5 base64 encoded string or error.
-//
-// If the MD5 is already set as the Content-MD5 header, that value will be
-// returned, and nothing else will be done.
-//
-// If the payload is empty, no MD5 will be computed. No error will be returned.
-// Empty payloads do not have an MD5 value.
-//
-// Replaces the smithy-go middleware for httpChecksum trait.
-func setMD5Checksum(ctx context.Context, req *smithyhttp.Request) (string, error) {
- if v := req.Header.Get(contentMD5Header); len(v) != 0 {
- return v, nil
- }
- stream := req.GetStream()
- if stream == nil {
- return "", nil
- }
-
- if !req.IsStreamSeekable() {
- return "", fmt.Errorf(
- "unseekable stream is not supported for computing md5 checksum")
- }
-
- v, err := computeMD5Checksum(stream)
- if err != nil {
- return "", err
- }
- if err := req.RewindStream(); err != nil {
- return "", fmt.Errorf("failed to rewind stream after computing MD5 checksum, %w", err)
- }
- // set the 'Content-MD5' header
- req.Header.Set(contentMD5Header, string(v))
- return string(v), nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go
index 3db73afe..3347e88c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_setup_context.go
@@ -3,43 +3,62 @@ package checksum
import (
"context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+
internalcontext "github.com/aws/aws-sdk-go-v2/internal/context"
"github.com/aws/smithy-go/middleware"
)
-// setupChecksumContext is the initial middleware that looks up the input
+const (
+ checksumValidationModeEnabled = "ENABLED"
+)
+
+// SetupInputContext is the initial middleware that looks up the input
// used to configure checksum behavior. This middleware must be executed before
// input validation step or any other checksum middleware.
-type setupInputContext struct {
+type SetupInputContext struct {
// GetAlgorithm is a function to get the checksum algorithm of the
// input payload from the input parameters.
//
// Given the input parameter value, the function must return the algorithm
// and true, or false if no algorithm is specified.
GetAlgorithm func(interface{}) (string, bool)
+
+ // RequireChecksum indicates whether operation model forces middleware to compute the input payload's checksum.
+ // If RequireChecksum is set to true, checksum will be calculated and RequestChecksumCalculation will be ignored,
+ // otherwise RequestChecksumCalculation will be used to indicate if checksum will be calculated
+ RequireChecksum bool
+
+ // RequestChecksumCalculation is the user config to opt-in/out request checksum calculation. If RequireChecksum is
+ // set to true, checksum will be calculated and this field will be ignored, otherwise
+ // RequestChecksumCalculation will be used to indicate if checksum will be calculated
+ RequestChecksumCalculation aws.RequestChecksumCalculation
}
// ID for the middleware
-func (m *setupInputContext) ID() string {
+func (m *SetupInputContext) ID() string {
return "AWSChecksum:SetupInputContext"
}
// HandleInitialize initialization middleware that setups up the checksum
// context based on the input parameters provided in the stack.
-func (m *setupInputContext) HandleInitialize(
+func (m *SetupInputContext) HandleInitialize(
ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler,
) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
- // Check if validation algorithm is specified.
+ // nil check here is for operations that require checksum but do not have input algorithm setting
if m.GetAlgorithm != nil {
- // check is input resource has a checksum algorithm
- algorithm, ok := m.GetAlgorithm(in.Parameters)
- if ok && len(algorithm) != 0 {
+ if algorithm, ok := m.GetAlgorithm(in.Parameters); ok {
ctx = internalcontext.SetChecksumInputAlgorithm(ctx, algorithm)
+ return next.HandleInitialize(ctx, in)
}
}
+ if m.RequireChecksum || m.RequestChecksumCalculation == aws.RequestChecksumCalculationWhenSupported {
+ ctx = internalcontext.SetChecksumInputAlgorithm(ctx, string(AlgorithmCRC32))
+ }
+
return next.HandleInitialize(ctx, in)
}
@@ -50,6 +69,12 @@ type setupOutputContext struct {
// Given the input parameter value, the function must return the validation
// mode and true, or false if no mode is specified.
GetValidationMode func(interface{}) (string, bool)
+
+ // SetValidationMode is a function to set the checksum validation mode of input parameters
+ SetValidationMode func(interface{}, string)
+
+ // ResponseChecksumValidation states user config to opt-in/out checksum validation
+ ResponseChecksumValidation aws.ResponseChecksumValidation
}
// ID for the middleware
@@ -64,13 +89,12 @@ func (m *setupOutputContext) HandleInitialize(
) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
- // Check if validation mode is specified.
- if m.GetValidationMode != nil {
- // check is input resource has a checksum algorithm
- mode, ok := m.GetValidationMode(in.Parameters)
- if ok && len(mode) != 0 {
- ctx = setContextOutputValidationMode(ctx, mode)
- }
+
+ mode, _ := m.GetValidationMode(in.Parameters)
+
+ if m.ResponseChecksumValidation == aws.ResponseChecksumValidationWhenSupported || mode == checksumValidationModeEnabled {
+ m.SetValidationMode(in.Parameters, checksumValidationModeEnabled)
+ ctx = setContextOutputValidationMode(ctx, checksumValidationModeEnabled)
}
return next.HandleInitialize(ctx, in)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_validate_output.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_validate_output.go
index 9fde12d8..14096a1c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_validate_output.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/middleware_validate_output.go
@@ -55,7 +55,7 @@ func (m *validateOutputPayloadChecksum) ID() string {
}
// HandleDeserialize is a Deserialize middleware that wraps the HTTP response
-// body with an io.ReadCloser that will validate the its checksum.
+// body with an io.ReadCloser that will validate its checksum.
func (m *validateOutputPayloadChecksum) HandleDeserialize(
ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler,
) (
@@ -66,8 +66,7 @@ func (m *validateOutputPayloadChecksum) HandleDeserialize(
return out, metadata, err
}
- // If there is no validation mode specified nothing is supported.
- if mode := getContextOutputValidationMode(ctx); mode != "ENABLED" {
+ if mode := getContextOutputValidationMode(ctx); mode != checksumValidationModeEnabled {
return out, metadata, err
}
@@ -90,8 +89,6 @@ func (m *validateOutputPayloadChecksum) HandleDeserialize(
algorithmToUse = algorithm
}
- // TODO this must validate the validation mode is set to enabled.
-
logger := middleware.GetLogger(ctx)
// Skip validation if no checksum algorithm or checksum is available.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
index f239d1a7..715587f5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
@@ -1,3 +1,29 @@
+# v1.12.10 (2025-01-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.12.9 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.8 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.7 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.6 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.5 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.12.4 (2024-11-06)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
index c5d9e1e9..8d8a4c9f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go
@@ -3,4 +3,4 @@
package presignedurl
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.12.4"
+const goModuleVersion = "1.12.10"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md
index f085559c..82038e23 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md
@@ -1,3 +1,29 @@
+# v1.18.10 (2025-01-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.18.9 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.8 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.7 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.6 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.5 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.18.4 (2024-11-06)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go
index 0144f160..95d5bb41 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go
@@ -3,4 +3,4 @@
package s3shared
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.18.4"
+const goModuleVersion = "1.18.10"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/CHANGELOG.md
new file mode 100644
index 00000000..09d5612e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/CHANGELOG.md
@@ -0,0 +1,742 @@
+# v1.70.1 (2025-03-04.2)
+
+* **Bug Fix**: Add assurance test for operation order.
+
+# v1.70.0 (2025-02-27)
+
+* **Feature**: Track credential providers via User-Agent Feature ids
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.69.14 (2025-02-18)
+
+* **Bug Fix**: Bump go version to 1.22
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.69.13 (2025-02-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.69.12 (2025-02-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.69.11 (2025-02-04)
+
+* No change notes available for this release.
+
+# v1.69.10 (2025-01-31)
+
+* **Dependency Update**: Switch to code-generated waiter matchers, removing the dependency on go-jmespath.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.69.9 (2025-01-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.69.8 (2025-01-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.69.7 (2025-01-17)
+
+* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop.
+
+# v1.69.6 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.69.5 (2025-01-14)
+
+* **Bug Fix**: Fix issue where waiters were not failing on unmatched errors as they should. This may have breaking behavioral changes for users in fringe cases. See [this announcement](https://github.com/aws/aws-sdk-go-v2/discussions/2954) for more information.
+
+# v1.69.4 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.69.3 (2025-01-08)
+
+* No change notes available for this release.
+
+# v1.69.2 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.69.1 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.69.0 (2024-11-22)
+
+* **Feature**: Add ProvisionedPollerConfig to Lambda event-source-mapping API.
+
+# v1.68.0 (2024-11-21)
+
+* **Feature**: Adds support for metrics for event source mappings for AWS Lambda
+
+# v1.67.0 (2024-11-20)
+
+* **Feature**: Add Node 22.x (node22.x) support to AWS Lambda
+
+# v1.66.1 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.66.0 (2024-11-11)
+
+* **Feature**: Add Python 3.13 (python3.13) support to AWS Lambda
+
+# v1.65.0 (2024-11-08)
+
+* **Feature**: This release adds support for using AWS KMS customer managed keys to encrypt AWS Lambda .zip deployment packages.
+
+# v1.64.3 (2024-11-07)
+
+* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses
+
+# v1.64.2 (2024-11-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.64.1 (2024-10-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.64.0 (2024-10-25)
+
+* **Feature**: Add TagsError field in Lambda GetFunctionResponse. The TagsError field contains details related to errors retrieving tags.
+
+# v1.63.2 (2024-10-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.63.1 (2024-10-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.63.0 (2024-10-04)
+
+* **Feature**: Add support for HTTP client metrics.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.62.2 (2024-10-03)
+
+* No change notes available for this release.
+
+# v1.62.1 (2024-09-27)
+
+* No change notes available for this release.
+
+# v1.62.0 (2024-09-26)
+
+* **Feature**: Reverting Lambda resource-based policy and block public access APIs.
+
+# v1.61.2 (2024-09-25)
+
+* No change notes available for this release.
+
+# v1.61.1 (2024-09-23)
+
+* No change notes available for this release.
+
+# v1.61.0 (2024-09-20)
+
+* **Feature**: Add tracing and metrics support to service clients.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.60.0 (2024-09-19)
+
+* **Feature**: Tagging support for Lambda event source mapping, and code signing configuration resources.
+
+# v1.59.0 (2024-09-17)
+
+* **Feature**: Support for JSON resource-based policies and block public access
+* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution.
+
+# v1.58.3 (2024-09-04)
+
+* No change notes available for this release.
+
+# v1.58.2 (2024-09-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.58.1 (2024-08-22)
+
+* No change notes available for this release.
+
+# v1.58.0 (2024-08-21)
+
+* **Feature**: Release FilterCriteria encryption for Lambda EventSourceMapping, enabling customers to encrypt their filter criteria using a customer-owned KMS key.
+
+# v1.57.0 (2024-08-19)
+
+* **Feature**: Release Lambda FunctionRecursiveConfig, enabling customers to turn recursive loop detection on or off on individual functions. This release adds two new APIs, GetFunctionRecursionConfig and PutFunctionRecursionConfig.
+
+# v1.56.4 (2024-08-15)
+
+* **Dependency Update**: Bump minimum Go version to 1.21.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.56.3 (2024-07-10.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.56.2 (2024-07-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.56.1 (2024-06-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.56.0 (2024-06-26)
+
+* **Feature**: Support list-of-string endpoint parameter.
+
+# v1.55.1 (2024-06-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.55.0 (2024-06-18)
+
+* **Feature**: Track usage of various AWS SDK features in user-agent string.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.54.7 (2024-06-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.54.6 (2024-06-07)
+
+* **Bug Fix**: Add clock skew correction on all service clients
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.54.5 (2024-06-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.54.4 (2024-05-23)
+
+* No change notes available for this release.
+
+# v1.54.3 (2024-05-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.54.2 (2024-05-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.54.1 (2024-05-08)
+
+* **Bug Fix**: GoDoc improvement
+
+# v1.54.0 (2024-04-03)
+
+* **Feature**: Add Ruby 3.3 (ruby3.3) support to AWS Lambda
+
+# v1.53.4 (2024-03-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.53.3 (2024-03-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.53.2 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Documentation**: Documentation updates for AWS Lambda
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.53.1 (2024-02-23)
+
+* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.53.0 (2024-02-22)
+
+* **Feature**: Add middleware stack snapshot tests.
+
+# v1.52.1 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.52.0 (2024-02-20)
+
+* **Feature**: Add .NET 8 (dotnet8) Runtime support to AWS Lambda.
+* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure.
+
+# v1.51.0 (2024-02-16)
+
+* **Feature**: Add new ClientOptions field to waiter config which allows you to extend the config for operation calls made by waiters.
+* **Documentation**: Documentation-only updates for Lambda to clarify a number of existing actions and properties.
+
+# v1.50.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.49.7 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.49.6 (2023-12-20)
+
+* No change notes available for this release.
+
+# v1.49.5 (2023-12-08)
+
+* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.
+
+# v1.49.4 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.49.3 (2023-12-06)
+
+* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously.
+
+# v1.49.2 (2023-12-01)
+
+* **Bug Fix**: Correct wrapping of errors in authentication workflow.
+* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.49.1 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.49.0 (2023-11-29)
+
+* **Feature**: Expose Options() accessor on service clients.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.48.3 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.48.2 (2023-11-28)
+
+* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
+
+# v1.48.1 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.48.0 (2023-11-16)
+
+* **Feature**: Adds support for logging configuration in Lambda Functions. Customers will have more control how their function logs are captured and to which cloud watch log group they are delivered also.
+
+# v1.47.0 (2023-11-15)
+
+* **Feature**: Add Java 21 (java21) support to AWS Lambda
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.46.0 (2023-11-14)
+
+* **Feature**: Add Python 3.12 (python3.12) support to AWS Lambda
+
+# v1.45.0 (2023-11-09.2)
+
+* **Feature**: Add Custom runtime on Amazon Linux 2023 (provided.al2023) support to AWS Lambda.
+
+# v1.44.1 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.44.0 (2023-11-08)
+
+* **Feature**: Add Node 20 (nodejs20.x) support to AWS Lambda.
+
+# v1.43.0 (2023-11-01)
+
+* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.42.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.41.0 (2023-10-24)
+
+* **Feature**: **BREAKFIX**: Correct nullability and default value representation of various input fields across a large number of services. Calling code that references one or more of the affected fields will need to update usage accordingly. See [2162](https://github.com/aws/aws-sdk-go-v2/issues/2162).
+
+# v1.40.0 (2023-10-12)
+
+* **Feature**: Adds support for Lambda functions to access Dual-Stack subnets over IPv6, via an opt-in flag in CreateFunction and UpdateFunctionConfiguration APIs
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.39.6 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.39.5 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.39.4 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.39.3 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.39.2 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.39.1 (2023-08-01)
+
+* No change notes available for this release.
+
+# v1.39.0 (2023-07-31)
+
+* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.1 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.38.0 (2023-07-25)
+
+* **Feature**: Add Python 3.11 (python3.11) support to AWS Lambda
+
+# v1.37.1 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.37.0 (2023-06-28)
+
+* **Feature**: Surface ResourceConflictException in DeleteEventSourceMapping
+
+# v1.36.0 (2023-06-20)
+
+* **Feature**: This release adds RecursiveInvocationException to the Invoke API and InvokeWithResponseStream API.
+
+# v1.35.2 (2023-06-15)
+
+* No change notes available for this release.
+
+# v1.35.1 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.35.0 (2023-06-05)
+
+* **Feature**: Add Ruby 3.2 (ruby3.2) Runtime support to AWS Lambda.
+
+# v1.34.1 (2023-05-04)
+
+* No change notes available for this release.
+
+# v1.34.0 (2023-04-27)
+
+* **Feature**: Add Java 17 (java17) support to AWS Lambda
+
+# v1.33.1 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.0 (2023-04-17)
+
+* **Feature**: Add Python 3.10 (python3.10) support to AWS Lambda
+
+# v1.32.0 (2023-04-14)
+
+* **Feature**: This release adds SnapStart related exceptions to InvokeWithResponseStream API. IAM access related documentation is also added for this API.
+
+# v1.31.1 (2023-04-10)
+
+* No change notes available for this release.
+
+# v1.31.0 (2023-04-07)
+
+* **Feature**: This release adds a new Lambda InvokeWithResponseStream API to support streaming Lambda function responses. The release also adds a new InvokeMode parameter to Function Url APIs to control whether the response will be streamed or buffered.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.30.2 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.30.1 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.30.0 (2023-02-27)
+
+* **Feature**: This release adds the ability to create ESMs with Document DB change streams as event source. For more information see https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html.
+
+# v1.29.4 (2023-02-22)
+
+* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
+
+# v1.29.3 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.2 (2023-02-15)
+
+* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910.
+* **Bug Fix**: Correct error type parsing for restJson services.
+
+# v1.29.1 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.0 (2023-01-23)
+
+* **Feature**: Release Lambda RuntimeManagementConfig, enabling customers to better manage runtime updates to their Lambda functions. This release adds two new APIs, GetRuntimeManagementConfig and PutRuntimeManagementConfig, as well as support on existing Create/Get/Update function APIs.
+
+# v1.28.0 (2023-01-12)
+
+* **Feature**: Add support for MaximumConcurrency parameter for SQS event source. Customers can now limit the maximum concurrent invocations for their SQS Event Source Mapping.
+
+# v1.27.0 (2023-01-05)
+
+* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
+
+# v1.26.2 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.1 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.0 (2022-11-29)
+
+* **Feature**: Adds support for Lambda SnapStart, which helps improve the startup performance of functions. Customers can now manage SnapStart based functions via CreateFunction and UpdateFunctionConfiguration APIs
+
+# v1.25.1 (2022-11-22)
+
+* No change notes available for this release.
+
+# v1.25.0 (2022-11-17)
+
+* **Feature**: Add Node 18 (nodejs18.x) support to AWS Lambda.
+
+# v1.24.11 (2022-11-16)
+
+* No change notes available for this release.
+
+# v1.24.10 (2022-11-10)
+
+* No change notes available for this release.
+
+# v1.24.9 (2022-11-02)
+
+* No change notes available for this release.
+
+# v1.24.8 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.7 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.6 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.5 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.4 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.3 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.2 (2022-08-30)
+
+* No change notes available for this release.
+
+# v1.24.1 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.0 (2022-08-17)
+
+* **Feature**: Added support for customization of Consumer Group ID for MSK and Kafka Event Source Mappings.
+
+# v1.23.8 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.7 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.6 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.5 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.4 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.3 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.2 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.1 (2022-05-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.0 (2022-05-12)
+
+* **Feature**: Lambda releases NodeJs 16 managed runtime to be available in all commercial regions.
+
+# v1.22.1 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.22.0 (2022-04-06)
+
+* **Feature**: This release adds new APIs for creating and managing Lambda Function URLs and adds a new FunctionUrlAuthType parameter to the AddPermission API. Customers can use Function URLs to create built-in HTTPS endpoints on their functions.
+
+# v1.21.1 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.21.0 (2022-03-24)
+
+* **Feature**: Adds support for increased ephemeral storage (/tmp) up to 10GB for Lambda functions. Customers can now provision up to 10 GB of ephemeral storage per function instance, a 20x increase over the previous limit of 512 MB.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.1 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.0 (2022-03-11)
+
+* **Feature**: Adds PrincipalOrgID support to AddPermission API. Customers can use it to manage permissions to lambda functions at AWS Organizations level.
+
+# v1.19.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.0 (2022-02-24)
+
+* **Feature**: API client updated
+* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.1 (2022-01-28)
+
+* **Bug Fix**: Updates SDK API client deserialization to pre-allocate byte slice and string response payloads, [#1565](https://github.com/aws/aws-sdk-go-v2/pull/1565). Thanks to [Tyson Mote](https://github.com/tysonmote) for submitting this PR.
+
+# v1.17.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2022-01-07)
+
+* **Feature**: API client updated
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.0 (2021-12-21)
+
+* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens.
+* **Feature**: Updated to latest service endpoints
+
+# v1.14.1 (2021-12-02)
+
+* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2021-11-30)
+
+* **Feature**: API client updated
+
+# v1.13.0 (2021-11-19)
+
+* **Feature**: API client updated
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2021-11-12)
+
+* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature.
+
+# v1.11.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2021-10-21)
+
+* **Feature**: API client updated
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.1 (2021-10-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.9.0 (2021-09-30)
+
+* **Feature**: API client updated
+
+# v1.8.1 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-08-19)
+
+* **Feature**: API client updated
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-08-04)
+
+* **Feature**: Updated to latest API model.
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.5.0 (2021-07-15)
+
+* **Feature**: Updated service model to latest version.
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-06-25)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/go-jose/go-jose/v3/LICENSE b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/LICENSE.txt
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/LICENSE
rename to vendor/github.com/aws/aws-sdk-go-v2/service/lambda/LICENSE.txt
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_client.go
new file mode 100644
index 00000000..ecd62031
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_client.go
@@ -0,0 +1,945 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/defaults"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware"
+ smithy "github.com/aws/smithy-go"
+ smithyauth "github.com/aws/smithy-go/auth"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/metrics"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net"
+ "net/http"
+ "sync/atomic"
+ "time"
+)
+
+const ServiceID = "Lambda"
+const ServiceAPIVersion = "2015-03-31"
+
+type operationMetrics struct {
+ Duration metrics.Float64Histogram
+ SerializeDuration metrics.Float64Histogram
+ ResolveIdentityDuration metrics.Float64Histogram
+ ResolveEndpointDuration metrics.Float64Histogram
+ SignRequestDuration metrics.Float64Histogram
+ DeserializeDuration metrics.Float64Histogram
+}
+
+func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram {
+ switch name {
+ case "client.call.duration":
+ return m.Duration
+ case "client.call.serialization_duration":
+ return m.SerializeDuration
+ case "client.call.resolve_identity_duration":
+ return m.ResolveIdentityDuration
+ case "client.call.resolve_endpoint_duration":
+ return m.ResolveEndpointDuration
+ case "client.call.signing_duration":
+ return m.SignRequestDuration
+ case "client.call.deserialization_duration":
+ return m.DeserializeDuration
+ default:
+ panic("unrecognized operation metric")
+ }
+}
+
+func timeOperationMetric[T any](
+ ctx context.Context, metric string, fn func() (T, error),
+ opts ...metrics.RecordMetricOption,
+) (T, error) {
+ instr := getOperationMetrics(ctx).histogramFor(metric)
+ opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...)
+
+ start := time.Now()
+ v, err := fn()
+ end := time.Now()
+
+ elapsed := end.Sub(start)
+ instr.Record(ctx, float64(elapsed)/1e9, opts...)
+ return v, err
+}
+
+func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() {
+ instr := getOperationMetrics(ctx).histogramFor(metric)
+ opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...)
+
+ var ended bool
+ start := time.Now()
+ return func() {
+ if ended {
+ return
+ }
+ ended = true
+
+ end := time.Now()
+
+ elapsed := end.Sub(start)
+ instr.Record(ctx, float64(elapsed)/1e9, opts...)
+ }
+}
+
+func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption {
+ return func(o *metrics.RecordMetricOptions) {
+ o.Properties.Set("rpc.service", middleware.GetServiceID(ctx))
+ o.Properties.Set("rpc.method", middleware.GetOperationName(ctx))
+ }
+}
+
+type operationMetricsKey struct{}
+
+func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) {
+ meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/lambda")
+ om := &operationMetrics{}
+
+ var err error
+
+ om.Duration, err = operationMetricTimer(meter, "client.call.duration",
+ "Overall call duration (including retries and time to send or receive request and response body)")
+ if err != nil {
+ return nil, err
+ }
+ om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration",
+ "The time it takes to serialize a message body")
+ if err != nil {
+ return nil, err
+ }
+ om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration",
+ "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider")
+ if err != nil {
+ return nil, err
+ }
+ om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration",
+ "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request")
+ if err != nil {
+ return nil, err
+ }
+ om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration",
+ "The time it takes to sign a request")
+ if err != nil {
+ return nil, err
+ }
+ om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration",
+ "The time it takes to deserialize a message body")
+ if err != nil {
+ return nil, err
+ }
+
+ return context.WithValue(parent, operationMetricsKey{}, om), nil
+}
+
+func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) {
+ return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) {
+ o.UnitLabel = "s"
+ o.Description = desc
+ })
+}
+
+func getOperationMetrics(ctx context.Context) *operationMetrics {
+ return ctx.Value(operationMetricsKey{}).(*operationMetrics)
+}
+
+func operationTracer(p tracing.TracerProvider) tracing.Tracer {
+ return p.Tracer("github.com/aws/aws-sdk-go-v2/service/lambda")
+}
+
+// Client provides the API client to make operations call for AWS Lambda.
+type Client struct {
+ options Options
+
+ // Difference between the time reported by the server and the client
+ timeOffset *atomic.Int64
+}
+
+// New returns an initialized Client based on the functional options. Provide
+// additional functional options to further configure the behavior of the client,
+// such as changing the client's endpoint or adding custom middleware behavior.
+func New(options Options, optFns ...func(*Options)) *Client {
+ options = options.Copy()
+
+ resolveDefaultLogger(&options)
+
+ setResolvedDefaultsMode(&options)
+
+ resolveRetryer(&options)
+
+ resolveHTTPClient(&options)
+
+ resolveHTTPSignerV4(&options)
+
+ resolveEndpointResolverV2(&options)
+
+ resolveTracerProvider(&options)
+
+ resolveMeterProvider(&options)
+
+ resolveAuthSchemeResolver(&options)
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ finalizeRetryMaxAttempts(&options)
+
+ ignoreAnonymousAuth(&options)
+
+ wrapWithAnonymousAuth(&options)
+
+ resolveAuthSchemes(&options)
+
+ client := &Client{
+ options: options,
+ }
+
+ initializeTimeOffsetResolver(client)
+
+ return client
+}
+
+// Options returns a copy of the client configuration.
+//
+// Callers SHOULD NOT perform mutations on any inner structures within client
+// config. Config overrides should instead be made on a per-operation basis through
+// functional options.
+func (c *Client) Options() Options {
+ return c.options.Copy()
+}
+
+func (c *Client) invokeOperation(
+ ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error,
+) (
+ result interface{}, metadata middleware.Metadata, err error,
+) {
+ ctx = middleware.ClearStackValues(ctx)
+ ctx = middleware.WithServiceID(ctx, ServiceID)
+ ctx = middleware.WithOperationName(ctx, opID)
+
+ stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ setSafeEventStreamClientLogMode(&options, opID)
+
+ finalizeOperationRetryMaxAttempts(&options, *c)
+
+ finalizeClientEndpointResolverOptions(&options)
+
+ for _, fn := range stackFns {
+ if err := fn(stack, options); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ for _, fn := range options.APIOptions {
+ if err := fn(stack); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ ctx, err = withOperationMetrics(ctx, options.MeterProvider)
+ if err != nil {
+ return nil, metadata, err
+ }
+
+ tracer := operationTracer(options.TracerProvider)
+ spanName := fmt.Sprintf("%s.%s", ServiceID, opID)
+
+ ctx = tracing.WithOperationTracer(ctx, tracer)
+
+ ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) {
+ o.Kind = tracing.SpanKindClient
+ o.Properties.Set("rpc.system", "aws-api")
+ o.Properties.Set("rpc.method", opID)
+ o.Properties.Set("rpc.service", ServiceID)
+ })
+ endTimer := startMetricTimer(ctx, "client.call.duration")
+ defer endTimer()
+ defer span.End()
+
+ handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) {
+ o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/lambda")
+ })
+ decorated := middleware.DecorateHandler(handler, stack)
+ result, metadata, err = decorated.Handle(ctx, params)
+ if err != nil {
+ span.SetProperty("exception.type", fmt.Sprintf("%T", err))
+ span.SetProperty("exception.message", err.Error())
+
+ var aerr smithy.APIError
+ if errors.As(err, &aerr) {
+ span.SetProperty("api.error_code", aerr.ErrorCode())
+ span.SetProperty("api.error_message", aerr.ErrorMessage())
+ span.SetProperty("api.error_fault", aerr.ErrorFault().String())
+ }
+
+ err = &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: err,
+ }
+ }
+
+ span.SetProperty("error", err != nil)
+ if err == nil {
+ span.SetStatus(tracing.SpanStatusOK)
+ } else {
+ span.SetStatus(tracing.SpanStatusError)
+ }
+
+ return result, metadata, err
+}
+
+type operationInputKey struct{}
+
+func setOperationInput(ctx context.Context, input interface{}) context.Context {
+ return middleware.WithStackValue(ctx, operationInputKey{}, input)
+}
+
+func getOperationInput(ctx context.Context) interface{} {
+ return middleware.GetStackValue(ctx, operationInputKey{})
+}
+
+type setOperationInputMiddleware struct {
+}
+
+func (*setOperationInputMiddleware) ID() string {
+ return "setOperationInput"
+}
+
+func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ ctx = setOperationInput(ctx, in.Parameters)
+ return next.HandleSerialize(ctx, in)
+}
+
+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: %v", err)
+ }
+ if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
+ return fmt.Errorf("add ResolveEndpointV2: %v", err)
+ }
+ if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil {
+ return fmt.Errorf("add Signing: %w", err)
+ }
+ return nil
+}
+func resolveAuthSchemeResolver(options *Options) {
+ if options.AuthSchemeResolver == nil {
+ options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
+ }
+}
+
+func resolveAuthSchemes(options *Options) {
+ if options.AuthSchemes == nil {
+ options.AuthSchemes = []smithyhttp.AuthScheme{
+ internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{
+ Signer: options.HTTPSignerV4,
+ Logger: options.Logger,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ }),
+ }
+ }
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
+
+type legacyEndpointContextSetter struct {
+ LegacyResolver EndpointResolver
+}
+
+func (*legacyEndpointContextSetter) ID() string {
+ return "legacyEndpointContextSetter"
+}
+
+func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.LegacyResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
+ }
+
+ return next.HandleInitialize(ctx, in)
+
+}
+func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
+ return stack.Initialize.Add(&legacyEndpointContextSetter{
+ LegacyResolver: o.EndpointResolver,
+ }, middleware.Before)
+}
+
+func resolveDefaultLogger(o *Options) {
+ if o.Logger != nil {
+ return
+ }
+ o.Logger = logging.Nop{}
+}
+
+func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
+ return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+}
+
+func setResolvedDefaultsMode(o *Options) {
+ if len(o.resolvedDefaultsMode) > 0 {
+ return
+ }
+
+ var mode aws.DefaultsMode
+ mode.SetFromString(string(o.DefaultsMode))
+
+ if mode == aws.DefaultsModeAuto {
+ mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
+ }
+
+ o.resolvedDefaultsMode = mode
+}
+
+// NewFromConfig returns a new client from the provided config.
+func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ Region: cfg.Region,
+ DefaultsMode: cfg.DefaultsMode,
+ RuntimeEnvironment: cfg.RuntimeEnvironment,
+ HTTPClient: cfg.HTTPClient,
+ Credentials: cfg.Credentials,
+ APIOptions: cfg.APIOptions,
+ Logger: cfg.Logger,
+ ClientLogMode: cfg.ClientLogMode,
+ AppID: cfg.AppID,
+ }
+ resolveAWSRetryerProvider(cfg, &opts)
+ resolveAWSRetryMaxAttempts(cfg, &opts)
+ resolveAWSRetryMode(cfg, &opts)
+ resolveAWSEndpointResolver(cfg, &opts)
+ resolveUseDualStackEndpoint(cfg, &opts)
+ resolveUseFIPSEndpoint(cfg, &opts)
+ resolveBaseEndpoint(cfg, &opts)
+ return New(opts, optFns...)
+}
+
+func resolveHTTPClient(o *Options) {
+ var buildable *awshttp.BuildableClient
+
+ if o.HTTPClient != nil {
+ var ok bool
+ buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
+ if !ok {
+ return
+ }
+ } else {
+ buildable = awshttp.NewBuildableClient()
+ }
+
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
+ if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
+ dialer.Timeout = dialerTimeout
+ }
+ })
+
+ buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
+ if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
+ transport.TLSHandshakeTimeout = tlsHandshakeTimeout
+ }
+ })
+ }
+
+ o.HTTPClient = buildable
+}
+
+func resolveRetryer(o *Options) {
+ if o.Retryer != nil {
+ return
+ }
+
+ if len(o.RetryMode) == 0 {
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ o.RetryMode = modeConfig.RetryMode
+ }
+ }
+ if len(o.RetryMode) == 0 {
+ o.RetryMode = aws.RetryModeStandard
+ }
+
+ var standardOptions []func(*retry.StandardOptions)
+ if v := o.RetryMaxAttempts; v != 0 {
+ standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
+ so.MaxAttempts = v
+ })
+ }
+
+ switch o.RetryMode {
+ case aws.RetryModeAdaptive:
+ var adaptiveOptions []func(*retry.AdaptiveModeOptions)
+ if len(standardOptions) != 0 {
+ adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
+ ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
+ })
+ }
+ o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
+
+ default:
+ o.Retryer = retry.NewStandard(standardOptions...)
+ }
+}
+
+func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
+ if cfg.Retryer == nil {
+ return
+ }
+ o.Retryer = cfg.Retryer()
+}
+
+func resolveAWSRetryMode(cfg aws.Config, o *Options) {
+ if len(cfg.RetryMode) == 0 {
+ return
+ }
+ o.RetryMode = cfg.RetryMode
+}
+func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
+ if cfg.RetryMaxAttempts == 0 {
+ return
+ }
+ o.RetryMaxAttempts = cfg.RetryMaxAttempts
+}
+
+func finalizeRetryMaxAttempts(o *Options) {
+ if o.RetryMaxAttempts == 0 {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func finalizeOperationRetryMaxAttempts(o *Options, client Client) {
+ if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
+ if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
+ return
+ }
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
+}
+
+func addClientUserAgent(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "lambda", goModuleVersion)
+ if len(options.AppID) > 0 {
+ ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)
+ }
+
+ return nil
+}
+
+func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) {
+ id := (*awsmiddleware.RequestUserAgent)(nil).ID()
+ mw, ok := stack.Build.Get(id)
+ if !ok {
+ mw = awsmiddleware.NewRequestUserAgent()
+ if err := stack.Build.Add(mw, middleware.After); err != nil {
+ return nil, err
+ }
+ }
+
+ ua, ok := mw.(*awsmiddleware.RequestUserAgent)
+ if !ok {
+ return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id)
+ }
+
+ return ua, nil
+}
+
+type HTTPSignerV4 interface {
+ SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
+}
+
+func resolveHTTPSignerV4(o *Options) {
+ if o.HTTPSignerV4 != nil {
+ return
+ }
+ o.HTTPSignerV4 = newDefaultV4Signer(*o)
+}
+
+func newDefaultV4Signer(o Options) *v4.Signer {
+ return v4.NewSigner(func(so *v4.SignerOptions) {
+ so.Logger = o.Logger
+ so.LogSigning = o.ClientLogMode.IsSigning()
+ })
+}
+
+func addClientRequestID(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After)
+}
+
+func addComputeContentLength(stack *middleware.Stack) error {
+ return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
+}
+
+func addRawResponseToMetadata(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
+}
+
+func addRecordResponseTiming(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
+}
+
+func addSpanRetryLoop(stack *middleware.Stack, options Options) error {
+ return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before)
+}
+
+type spanRetryLoop struct {
+ options Options
+}
+
+func (*spanRetryLoop) ID() string {
+ return "spanRetryLoop"
+}
+
+func (m *spanRetryLoop) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ middleware.FinalizeOutput, middleware.Metadata, error,
+) {
+ tracer := operationTracer(m.options.TracerProvider)
+ ctx, span := tracer.StartSpan(ctx, "RetryLoop")
+ defer span.End()
+
+ return next.HandleFinalize(ctx, in)
+}
+func addStreamingEventsPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before)
+}
+
+func addUnsignedPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addComputePayloadSHA256(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addContentSHA256Header(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After)
+}
+
+func addIsWaiterUserAgent(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter)
+ return nil
+ })
+}
+
+func addIsPaginatorUserAgent(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator)
+ return nil
+ })
+}
+
+func addRetry(stack *middleware.Stack, o Options) error {
+ attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
+ m.LogAttempts = o.ClientLogMode.IsRetries()
+ m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/lambda")
+ })
+ if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil {
+ return err
+ }
+ if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
+ return err
+ }
+ return nil
+}
+
+// resolves dual-stack endpoint configuration
+func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseDualStackEndpoint = value
+ }
+ return nil
+}
+
+// resolves FIPS endpoint configuration
+func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseFIPSEndpoint = value
+ }
+ return nil
+}
+
+func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string {
+ if mode == aws.AccountIDEndpointModeDisabled {
+ return nil
+ }
+
+ if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" {
+ return aws.String(ca.Credentials.AccountID)
+ }
+
+ return nil
+}
+
+func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error {
+ mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset}
+ if err := stack.Build.Add(&mw, middleware.After); err != nil {
+ return err
+ }
+ return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before)
+}
+func initializeTimeOffsetResolver(c *Client) {
+ c.timeOffset = new(atomic.Int64)
+}
+
+func addUserAgentRetryMode(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ switch options.Retryer.(type) {
+ case *retry.Standard:
+ ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard)
+ case *retry.AdaptiveMode:
+ ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive)
+ }
+ return nil
+}
+
+type setCredentialSourceMiddleware struct {
+ ua *awsmiddleware.RequestUserAgent
+ options Options
+}
+
+func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" }
+
+func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
+ out middleware.BuildOutput, metadata middleware.Metadata, err error,
+) {
+ asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource)
+ if !ok {
+ return next.HandleBuild(ctx, in)
+ }
+ providerSources := asProviderSource.ProviderSources()
+ for _, source := range providerSources {
+ m.ua.AddCredentialsSource(source)
+ }
+ return next.HandleBuild(ctx, in)
+}
+
+func addCredentialSource(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ mw := setCredentialSourceMiddleware{ua: ua, options: options}
+ return stack.Build.Insert(&mw, "UserAgent", middleware.Before)
+}
+
+func resolveTracerProvider(options *Options) {
+ if options.TracerProvider == nil {
+ options.TracerProvider = &tracing.NopTracerProvider{}
+ }
+}
+
+func resolveMeterProvider(options *Options) {
+ if options.MeterProvider == nil {
+ options.MeterProvider = metrics.NopMeterProvider{}
+ }
+}
+
+func addRecursionDetection(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
+}
+
+func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
+ return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
+
+}
+
+func addResponseErrorMiddleware(stack *middleware.Stack) error {
+ return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
+
+}
+
+func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
+ return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
+ LogRequest: o.ClientLogMode.IsRequest(),
+ LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
+ LogResponse: o.ClientLogMode.IsResponse(),
+ LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
+ }, middleware.After)
+}
+
+type disableHTTPSMiddleware struct {
+ DisableHTTPS bool
+}
+
+func (*disableHTTPSMiddleware) ID() string {
+ return "disableHTTPS"
+}
+
+func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) {
+ req.URL.Scheme = "http"
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Finalize.Insert(&disableHTTPSMiddleware{
+ DisableHTTPS: o.EndpointOptions.DisableHTTPS,
+ }, "ResolveEndpointV2", middleware.After)
+}
+
+type spanInitializeStart struct {
+}
+
+func (*spanInitializeStart) ID() string {
+ return "spanInitializeStart"
+}
+
+func (m *spanInitializeStart) HandleInitialize(
+ ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler,
+) (
+ middleware.InitializeOutput, middleware.Metadata, error,
+) {
+ ctx, _ = tracing.StartSpan(ctx, "Initialize")
+
+ return next.HandleInitialize(ctx, in)
+}
+
+type spanInitializeEnd struct {
+}
+
+func (*spanInitializeEnd) ID() string {
+ return "spanInitializeEnd"
+}
+
+func (m *spanInitializeEnd) HandleInitialize(
+ ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler,
+) (
+ middleware.InitializeOutput, middleware.Metadata, error,
+) {
+ ctx, span := tracing.PopSpan(ctx)
+ span.End()
+
+ return next.HandleInitialize(ctx, in)
+}
+
+type spanBuildRequestStart struct {
+}
+
+func (*spanBuildRequestStart) ID() string {
+ return "spanBuildRequestStart"
+}
+
+func (m *spanBuildRequestStart) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ middleware.SerializeOutput, middleware.Metadata, error,
+) {
+ ctx, _ = tracing.StartSpan(ctx, "BuildRequest")
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type spanBuildRequestEnd struct {
+}
+
+func (*spanBuildRequestEnd) ID() string {
+ return "spanBuildRequestEnd"
+}
+
+func (m *spanBuildRequestEnd) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ middleware.BuildOutput, middleware.Metadata, error,
+) {
+ ctx, span := tracing.PopSpan(ctx)
+ span.End()
+
+ return next.HandleBuild(ctx, in)
+}
+
+func addSpanInitializeStart(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before)
+}
+
+func addSpanInitializeEnd(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After)
+}
+
+func addSpanBuildRequestStart(stack *middleware.Stack) error {
+ return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before)
+}
+
+func addSpanBuildRequestEnd(stack *middleware.Stack) error {
+ return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddLayerVersionPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddLayerVersionPermission.go
new file mode 100644
index 00000000..7be06262
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddLayerVersionPermission.go
@@ -0,0 +1,203 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Adds permissions to the resource-based policy of a version of an [Lambda layer]. Use this
+// action to grant layer usage permission to other accounts. You can grant
+// permission to a single account, all accounts in an organization, or all Amazon
+// Web Services accounts.
+//
+// To revoke permission, call RemoveLayerVersionPermission with the statement ID that you specified when you
+// added it.
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+func (c *Client) AddLayerVersionPermission(ctx context.Context, params *AddLayerVersionPermissionInput, optFns ...func(*Options)) (*AddLayerVersionPermissionOutput, error) {
+ if params == nil {
+ params = &AddLayerVersionPermissionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AddLayerVersionPermission", params, optFns, c.addOperationAddLayerVersionPermissionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AddLayerVersionPermissionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AddLayerVersionPermissionInput struct {
+
+ // The API action that grants access to the layer. For example,
+ // lambda:GetLayerVersion .
+ //
+ // This member is required.
+ Action *string
+
+ // The name or Amazon Resource Name (ARN) of the layer.
+ //
+ // This member is required.
+ LayerName *string
+
+ // An account ID, or * to grant layer usage permission to all accounts in an
+ // organization, or all Amazon Web Services accounts (if organizationId is not
+ // specified). For the last case, make sure that you really do want all Amazon Web
+ // Services accounts to have usage permission to this layer.
+ //
+ // This member is required.
+ Principal *string
+
+ // An identifier that distinguishes the policy from others on the same layer
+ // version.
+ //
+ // This member is required.
+ StatementId *string
+
+ // The version number.
+ //
+ // This member is required.
+ VersionNumber *int64
+
+ // With the principal set to * , grant permission to all accounts in the specified
+ // organization.
+ OrganizationId *string
+
+ // Only update the policy if the revision ID matches the ID specified. Use this
+ // option to avoid modifying a policy that has changed since you last read it.
+ RevisionId *string
+
+ noSmithyDocumentSerde
+}
+
+type AddLayerVersionPermissionOutput struct {
+
+ // A unique identifier for the current revision of the policy.
+ RevisionId *string
+
+ // The permission statement.
+ Statement *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAddLayerVersionPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpAddLayerVersionPermission{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAddLayerVersionPermission{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "AddLayerVersionPermission"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpAddLayerVersionPermissionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddLayerVersionPermission(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opAddLayerVersionPermission(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "AddLayerVersionPermission",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddPermission.go
new file mode 100644
index 00000000..71a5db72
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddPermission.go
@@ -0,0 +1,246 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Grants a [principal] permission to use a function. You can apply the policy at the
+// function level, or specify a qualifier to restrict access to a single version or
+// alias. If you use a qualifier, the invoker must use the full Amazon Resource
+// Name (ARN) of that version or alias to invoke the function. Note: Lambda does
+// not support adding policies to version $LATEST.
+//
+// To grant permission to another account, specify the account ID as the Principal
+// . To grant permission to an organization defined in Organizations, specify the
+// organization ID as the PrincipalOrgID . For Amazon Web Services services, the
+// principal is a domain-style identifier that the service defines, such as
+// s3.amazonaws.com or sns.amazonaws.com . For Amazon Web Services services, you
+// can also specify the ARN of the associated resource as the SourceArn . If you
+// grant permission to a service principal without specifying the source, other
+// accounts could potentially configure resources in their account to invoke your
+// Lambda function.
+//
+// This operation adds a statement to a resource-based permissions policy for the
+// function. For more information about function policies, see [Using resource-based policies for Lambda].
+//
+// [principal]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying
+// [Using resource-based policies for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html
+func (c *Client) AddPermission(ctx context.Context, params *AddPermissionInput, optFns ...func(*Options)) (*AddPermissionOutput, error) {
+ if params == nil {
+ params = &AddPermissionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AddPermission", params, optFns, c.addOperationAddPermissionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AddPermissionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AddPermissionInput struct {
+
+ // The action that the principal can use on the function. For example,
+ // lambda:InvokeFunction or lambda:GetFunction .
+ //
+ // This member is required.
+ Action *string
+
+ // The name or ARN of the Lambda function, version, or alias.
+ //
+ // Name formats
+ //
+ // - Function name – my-function (name-only), my-function:v1 (with alias).
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // You can append a version number or alias to any of the formats. The length
+ // constraint applies only to the full ARN. If you specify only the function name,
+ // it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The Amazon Web Services service, Amazon Web Services account, IAM user, or IAM
+ // role that invokes the function. If you specify a service, use SourceArn or
+ // SourceAccount to limit who can invoke the function through that service.
+ //
+ // This member is required.
+ Principal *string
+
+ // A statement identifier that differentiates the statement from others in the
+ // same policy.
+ //
+ // This member is required.
+ StatementId *string
+
+ // For Alexa Smart Home functions, a token that the invoker must supply.
+ EventSourceToken *string
+
+ // The type of authentication that your function URL uses. Set to AWS_IAM if you
+ // want to restrict access to authenticated users only. Set to NONE if you want to
+ // bypass IAM authentication to create a public endpoint. For more information, see
+ // [Security and auth model for Lambda function URLs].
+ //
+ // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html
+ FunctionUrlAuthType types.FunctionUrlAuthType
+
+ // The identifier for your organization in Organizations. Use this to grant
+ // permissions to all the Amazon Web Services accounts under this organization.
+ PrincipalOrgID *string
+
+ // Specify a version or alias to add permissions to a published version of the
+ // function.
+ Qualifier *string
+
+ // Update the policy only if the revision ID matches the ID that's specified. Use
+ // this option to avoid modifying a policy that has changed since you last read it.
+ RevisionId *string
+
+ // For Amazon Web Services service, the ID of the Amazon Web Services account that
+ // owns the resource. Use this together with SourceArn to ensure that the
+ // specified account owns the resource. It is possible for an Amazon S3 bucket to
+ // be deleted by its owner and recreated by another account.
+ SourceAccount *string
+
+ // For Amazon Web Services services, the ARN of the Amazon Web Services resource
+ // that invokes the function. For example, an Amazon S3 bucket or Amazon SNS topic.
+ //
+ // Note that Lambda configures the comparison using the StringLike operator.
+ SourceArn *string
+
+ noSmithyDocumentSerde
+}
+
+type AddPermissionOutput struct {
+
+ // The permission statement that's added to the function policy.
+ Statement *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAddPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpAddPermission{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAddPermission{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "AddPermission"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpAddPermissionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddPermission(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opAddPermission(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "AddPermission",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateAlias.go
new file mode 100644
index 00000000..54c26b58
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateAlias.go
@@ -0,0 +1,216 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates an [alias] for a Lambda function version. Use aliases to provide clients with
+// a function identifier that you can update to invoke a different version.
+//
+// You can also map an alias to split invocation requests between two versions.
+// Use the RoutingConfig parameter to specify a second version and the percentage
+// of invocation requests that it receives.
+//
+// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
+func (c *Client) CreateAlias(ctx context.Context, params *CreateAliasInput, optFns ...func(*Options)) (*CreateAliasOutput, error) {
+ if params == nil {
+ params = &CreateAliasInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateAlias", params, optFns, c.addOperationCreateAliasMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateAliasOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateAliasInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The function version that the alias invokes.
+ //
+ // This member is required.
+ FunctionVersion *string
+
+ // The name of the alias.
+ //
+ // This member is required.
+ Name *string
+
+ // A description of the alias.
+ Description *string
+
+ // The [routing configuration] of the alias.
+ //
+ // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html#configuring-alias-routing
+ RoutingConfig *types.AliasRoutingConfiguration
+
+ noSmithyDocumentSerde
+}
+
+// Provides configuration information about a Lambda function [alias].
+//
+// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
+type CreateAliasOutput struct {
+
+ // The Amazon Resource Name (ARN) of the alias.
+ AliasArn *string
+
+ // A description of the alias.
+ Description *string
+
+ // The function version that the alias invokes.
+ FunctionVersion *string
+
+ // The name of the alias.
+ Name *string
+
+ // A unique identifier that changes when you update the alias.
+ RevisionId *string
+
+ // The [routing configuration] of the alias.
+ //
+ // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html
+ RoutingConfig *types.AliasRoutingConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateAliasMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAlias"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateAliasValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAlias(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateAlias(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateAlias",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateCodeSigningConfig.go
new file mode 100644
index 00000000..4fe78a3b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateCodeSigningConfig.go
@@ -0,0 +1,176 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a code signing configuration. A [code signing configuration] defines a list of allowed signing
+// profiles and defines the code-signing validation policy (action to be taken if
+// deployment validation checks fail).
+//
+// [code signing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html
+func (c *Client) CreateCodeSigningConfig(ctx context.Context, params *CreateCodeSigningConfigInput, optFns ...func(*Options)) (*CreateCodeSigningConfigOutput, error) {
+ if params == nil {
+ params = &CreateCodeSigningConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateCodeSigningConfig", params, optFns, c.addOperationCreateCodeSigningConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateCodeSigningConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateCodeSigningConfigInput struct {
+
+ // Signing profiles for this code signing configuration.
+ //
+ // This member is required.
+ AllowedPublishers *types.AllowedPublishers
+
+ // The code signing policies define the actions to take if the validation checks
+ // fail.
+ CodeSigningPolicies *types.CodeSigningPolicies
+
+ // Descriptive name for this code signing configuration.
+ Description *string
+
+ // A list of tags to add to the code signing configuration.
+ Tags map[string]string
+
+ noSmithyDocumentSerde
+}
+
+type CreateCodeSigningConfigOutput struct {
+
+ // The code signing configuration.
+ //
+ // This member is required.
+ CodeSigningConfig *types.CodeSigningConfig
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCodeSigningConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateCodeSigningConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCodeSigningConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateCodeSigningConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateEventSourceMapping.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateEventSourceMapping.go
new file mode 100644
index 00000000..2566d0b9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateEventSourceMapping.go
@@ -0,0 +1,563 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Creates a mapping between an event source and an Lambda function. Lambda reads
+// items from the event source and invokes the function.
+//
+// For details about how to configure different event sources, see the following
+// topics.
+//
+// [Amazon DynamoDB Streams]
+//
+// [Amazon Kinesis]
+//
+// [Amazon SQS]
+//
+// [Amazon MQ and RabbitMQ]
+//
+// [Amazon MSK]
+//
+// [Apache Kafka]
+//
+// [Amazon DocumentDB]
+//
+// The following error handling options are available only for DynamoDB and
+// Kinesis event sources:
+//
+// - BisectBatchOnFunctionError – If the function returns an error, split the
+// batch in two and retry.
+//
+// - MaximumRecordAgeInSeconds – Discard records older than the specified age.
+// The default value is infinite (-1). When set to infinite (-1), failed records
+// are retried until the record expires
+//
+// - MaximumRetryAttempts – Discard records after the specified number of
+// retries. The default value is infinite (-1). When set to infinite (-1), failed
+// records are retried until the record expires.
+//
+// - ParallelizationFactor – Process multiple batches from each shard
+// concurrently.
+//
+// For stream sources (DynamoDB, Kinesis, Amazon MSK, and self-managed Apache
+// Kafka), the following option is also available:
+//
+// - DestinationConfig – Send discarded records to an Amazon SQS queue, Amazon
+// SNS topic, or Amazon S3 bucket.
+//
+// For information about which configuration parameters apply to each event
+// source, see the following topics.
+//
+// [Amazon DynamoDB Streams]
+//
+// [Amazon Kinesis]
+//
+// [Amazon SQS]
+//
+// [Amazon MQ and RabbitMQ]
+//
+// [Amazon MSK]
+//
+// [Apache Kafka]
+//
+// [Amazon DocumentDB]
+//
+// [Amazon DynamoDB Streams]: https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-params
+// [Amazon SQS]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-params
+// [Amazon MSK]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-parms
+// [Amazon Kinesis]: https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-params
+// [Amazon MQ and RabbitMQ]: https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-params
+// [Apache Kafka]: https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms
+// [Amazon DocumentDB]: https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html#docdb-configuration
+func (c *Client) CreateEventSourceMapping(ctx context.Context, params *CreateEventSourceMappingInput, optFns ...func(*Options)) (*CreateEventSourceMappingOutput, error) {
+ if params == nil {
+ params = &CreateEventSourceMappingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateEventSourceMapping", params, optFns, c.addOperationCreateEventSourceMappingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateEventSourceMappingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateEventSourceMappingInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – MyFunction .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Version or Alias ARN –
+ // arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD .
+ //
+ // - Partial ARN – 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it's limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specific configuration settings for an Amazon Managed Streaming for Apache
+ // Kafka (Amazon MSK) event source.
+ AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig
+
+ // The maximum number of records in each batch that Lambda pulls from your stream
+ // or queue and sends to your function. Lambda passes all of the records in the
+ // batch to the function in a single call, up to the payload limit for synchronous
+ // invocation (6 MB).
+ //
+ // - Amazon Kinesis – Default 100. Max 10,000.
+ //
+ // - Amazon DynamoDB Streams – Default 100. Max 10,000.
+ //
+ // - Amazon Simple Queue Service – Default 10. For standard queues the max is
+ // 10,000. For FIFO queues the max is 10.
+ //
+ // - Amazon Managed Streaming for Apache Kafka – Default 100. Max 10,000.
+ //
+ // - Self-managed Apache Kafka – Default 100. Max 10,000.
+ //
+ // - Amazon MQ (ActiveMQ and RabbitMQ) – Default 100. Max 10,000.
+ //
+ // - DocumentDB – Default 100. Max 10,000.
+ BatchSize *int32
+
+ // (Kinesis and DynamoDB Streams only) If the function returns an error, split the
+ // batch in two and retry.
+ BisectBatchOnFunctionError *bool
+
+ // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only) A
+ // configuration object that specifies the destination of an event after Lambda
+ // processes it.
+ DestinationConfig *types.DestinationConfig
+
+ // Specific configuration settings for a DocumentDB event source.
+ DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig
+
+ // When true, the event source mapping is active. When false, Lambda pauses
+ // polling and invocation.
+ //
+ // Default: True
+ Enabled *bool
+
+ // The Amazon Resource Name (ARN) of the event source.
+ //
+ // - Amazon Kinesis – The ARN of the data stream or a stream consumer.
+ //
+ // - Amazon DynamoDB Streams – The ARN of the stream.
+ //
+ // - Amazon Simple Queue Service – The ARN of the queue.
+ //
+ // - Amazon Managed Streaming for Apache Kafka – The ARN of the cluster or the
+ // ARN of the VPC connection (for [cross-account event source mappings]).
+ //
+ // - Amazon MQ – The ARN of the broker.
+ //
+ // - Amazon DocumentDB – The ARN of the DocumentDB change stream.
+ //
+ // [cross-account event source mappings]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc
+ EventSourceArn *string
+
+ // An object that defines the filter criteria that determine whether Lambda should
+ // process an event. For more information, see [Lambda event filtering].
+ //
+ // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html
+ FilterCriteria *types.FilterCriteria
+
+ // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type
+ // enums applied to the event source mapping.
+ FunctionResponseTypes []types.FunctionResponseType
+
+ // The ARN of the Key Management Service (KMS) customer managed key that Lambda
+ // uses to encrypt your function's [filter criteria]. By default, Lambda does not encrypt your
+ // filter criteria object. Specify this property to encrypt data using your own
+ // customer managed key.
+ //
+ // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics
+ KMSKeyArn *string
+
+ // The maximum amount of time, in seconds, that Lambda spends gathering records
+ // before invoking the function. You can configure MaximumBatchingWindowInSeconds
+ // to any value from 0 seconds to 300 seconds in increments of seconds.
+ //
+ // For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching
+ // window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and
+ // DocumentDB event sources, the default batching window is 500 ms. Note that
+ // because you can only change MaximumBatchingWindowInSeconds in increments of
+ // seconds, you cannot revert back to the 500 ms default batching window after you
+ // have changed it. To restore the default batching window, you must create a new
+ // event source mapping.
+ //
+ // Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you
+ // set BatchSize to a value greater than 10, you must set
+ // MaximumBatchingWindowInSeconds to at least 1.
+ MaximumBatchingWindowInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records older than the specified
+ // age. The default value is infinite (-1).
+ MaximumRecordAgeInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records after the specified number
+ // of retries. The default value is infinite (-1). When set to infinite (-1),
+ // failed records are retried until the record expires.
+ MaximumRetryAttempts *int32
+
+ // The metrics configuration for your event source. For more information, see [Event source mapping metrics].
+ //
+ // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics
+ MetricsConfig *types.EventSourceMappingMetricsConfig
+
+ // (Kinesis and DynamoDB Streams only) The number of batches to process from each
+ // shard concurrently.
+ ParallelizationFactor *int32
+
+ // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode
+ // configuration for the event source. For more information, see [Provisioned Mode].
+ //
+ // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode
+ ProvisionedPollerConfig *types.ProvisionedPollerConfig
+
+ // (MQ) The name of the Amazon MQ broker destination queue to consume.
+ Queues []string
+
+ // (Amazon SQS only) The scaling configuration for the event source. For more
+ // information, see [Configuring maximum concurrency for Amazon SQS event sources].
+ //
+ // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency
+ ScalingConfig *types.ScalingConfig
+
+ // The self-managed Apache Kafka cluster to receive records from.
+ SelfManagedEventSource *types.SelfManagedEventSource
+
+ // Specific configuration settings for a self-managed Apache Kafka event source.
+ SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig
+
+ // An array of authentication protocols or VPC components required to secure your
+ // event source.
+ SourceAccessConfigurations []types.SourceAccessConfiguration
+
+ // The position in a stream from which to start reading. Required for Amazon
+ // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported
+ // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed
+ // Apache Kafka.
+ StartingPosition types.EventSourcePosition
+
+ // With StartingPosition set to AT_TIMESTAMP , the time from which to start
+ // reading. StartingPositionTimestamp cannot be in the future.
+ StartingPositionTimestamp *time.Time
+
+ // A list of tags to apply to the event source mapping.
+ Tags map[string]string
+
+ // The name of the Kafka topic.
+ Topics []string
+
+ // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing
+ // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds
+ // indicates no tumbling window.
+ TumblingWindowInSeconds *int32
+
+ noSmithyDocumentSerde
+}
+
+// A mapping between an Amazon Web Services resource and a Lambda function. For
+// details, see CreateEventSourceMapping.
+type CreateEventSourceMappingOutput struct {
+
+ // Specific configuration settings for an Amazon Managed Streaming for Apache
+ // Kafka (Amazon MSK) event source.
+ AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig
+
+ // The maximum number of records in each batch that Lambda pulls from your stream
+ // or queue and sends to your function. Lambda passes all of the records in the
+ // batch to the function in a single call, up to the payload limit for synchronous
+ // invocation (6 MB).
+ //
+ // Default value: Varies by service. For Amazon SQS, the default is 10. For all
+ // other services, the default is 100.
+ //
+ // Related setting: When you set BatchSize to a value greater than 10, you must
+ // set MaximumBatchingWindowInSeconds to at least 1.
+ BatchSize *int32
+
+ // (Kinesis and DynamoDB Streams only) If the function returns an error, split the
+ // batch in two and retry. The default value is false.
+ BisectBatchOnFunctionError *bool
+
+ // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event
+ // sources only) A configuration object that specifies the destination of an event
+ // after Lambda processes it.
+ DestinationConfig *types.DestinationConfig
+
+ // Specific configuration settings for a DocumentDB event source.
+ DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig
+
+ // The Amazon Resource Name (ARN) of the event source.
+ EventSourceArn *string
+
+ // The Amazon Resource Name (ARN) of the event source mapping.
+ EventSourceMappingArn *string
+
+ // An object that defines the filter criteria that determine whether Lambda should
+ // process an event. For more information, see [Lambda event filtering].
+ //
+ // If filter criteria is encrypted, this field shows up as null in the response of
+ // ListEventSourceMapping API calls. You can view this field in plaintext in the
+ // response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have
+ // kms:Decrypt permissions for the correct KMS key.
+ //
+ // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html
+ FilterCriteria *types.FilterCriteria
+
+ // An object that contains details about an error related to filter criteria
+ // encryption.
+ FilterCriteriaError *types.FilterCriteriaError
+
+ // The ARN of the Lambda function.
+ FunctionArn *string
+
+ // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type
+ // enums applied to the event source mapping.
+ FunctionResponseTypes []types.FunctionResponseType
+
+ // The ARN of the Key Management Service (KMS) customer managed key that Lambda
+ // uses to encrypt your function's [filter criteria].
+ //
+ // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics
+ KMSKeyArn *string
+
+ // The date that the event source mapping was last updated or that its state
+ // changed.
+ LastModified *time.Time
+
+ // The result of the last Lambda invocation of your function.
+ LastProcessingResult *string
+
+ // The maximum amount of time, in seconds, that Lambda spends gathering records
+ // before invoking the function. You can configure MaximumBatchingWindowInSeconds
+ // to any value from 0 seconds to 300 seconds in increments of seconds.
+ //
+ // For streams and Amazon SQS event sources, the default batching window is 0
+ // seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB
+ // event sources, the default batching window is 500 ms. Note that because you can
+ // only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot
+ // revert back to the 500 ms default batching window after you have changed it. To
+ // restore the default batching window, you must create a new event source mapping.
+ //
+ // Related setting: For streams and Amazon SQS event sources, when you set
+ // BatchSize to a value greater than 10, you must set
+ // MaximumBatchingWindowInSeconds to at least 1.
+ MaximumBatchingWindowInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records older than the specified
+ // age. The default value is -1, which sets the maximum age to infinite. When the
+ // value is set to infinite, Lambda never discards old records.
+ //
+ // The minimum valid value for maximum record age is 60s. Although values less
+ // than 60 and greater than -1 fall within the parameter's absolute range, they are
+ // not allowed
+ MaximumRecordAgeInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records after the specified number
+ // of retries. The default value is -1, which sets the maximum number of retries to
+ // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records
+ // until the record expires in the event source.
+ MaximumRetryAttempts *int32
+
+ // The metrics configuration for your event source. For more information, see [Event source mapping metrics].
+ //
+ // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics
+ MetricsConfig *types.EventSourceMappingMetricsConfig
+
+ // (Kinesis and DynamoDB Streams only) The number of batches to process
+ // concurrently from each shard. The default value is 1.
+ ParallelizationFactor *int32
+
+ // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode
+ // configuration for the event source. For more information, see [Provisioned Mode].
+ //
+ // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode
+ ProvisionedPollerConfig *types.ProvisionedPollerConfig
+
+ // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
+ Queues []string
+
+ // (Amazon SQS only) The scaling configuration for the event source. For more
+ // information, see [Configuring maximum concurrency for Amazon SQS event sources].
+ //
+ // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency
+ ScalingConfig *types.ScalingConfig
+
+ // The self-managed Apache Kafka cluster for your event source.
+ SelfManagedEventSource *types.SelfManagedEventSource
+
+ // Specific configuration settings for a self-managed Apache Kafka event source.
+ SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig
+
+ // An array of the authentication protocol, VPC components, or virtual host to
+ // secure and define your event source.
+ SourceAccessConfigurations []types.SourceAccessConfiguration
+
+ // The position in a stream from which to start reading. Required for Amazon
+ // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported
+ // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed
+ // Apache Kafka.
+ StartingPosition types.EventSourcePosition
+
+ // With StartingPosition set to AT_TIMESTAMP , the time from which to start
+ // reading. StartingPositionTimestamp cannot be in the future.
+ StartingPositionTimestamp *time.Time
+
+ // The state of the event source mapping. It can be one of the following: Creating
+ // , Enabling , Enabled , Disabling , Disabled , Updating , or Deleting .
+ State *string
+
+ // Indicates whether a user or Lambda made the last change to the event source
+ // mapping.
+ StateTransitionReason *string
+
+ // The name of the Kafka topic.
+ Topics []string
+
+ // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing
+ // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds
+ // indicates no tumbling window.
+ TumblingWindowInSeconds *int32
+
+ // The identifier of the event source mapping.
+ UUID *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateEventSourceMappingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateEventSourceMapping{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateEventSourceMapping{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateEventSourceMapping"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateEventSourceMappingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEventSourceMapping(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateEventSourceMapping(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateEventSourceMapping",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunction.go
new file mode 100644
index 00000000..26b26018
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunction.go
@@ -0,0 +1,540 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a Lambda function. To create a function, you need a [deployment package] and an [execution role]. The
+// deployment package is a .zip file archive or container image that contains your
+// function code. The execution role grants the function permission to use Amazon
+// Web Services services, such as Amazon CloudWatch Logs for log streaming and
+// X-Ray for request tracing.
+//
+// If the deployment package is a [container image], then you set the package type to Image . For a
+// container image, the code property must include the URI of a container image in
+// the Amazon ECR registry. You do not need to specify the handler and runtime
+// properties.
+//
+// If the deployment package is a [.zip file archive], then you set the package type to Zip . For a
+// .zip file archive, the code property specifies the location of the .zip file.
+// You must also specify the handler and runtime properties. The code in the
+// deployment package must be compatible with the target instruction set
+// architecture of the function ( x86-64 or arm64 ). If you do not specify the
+// architecture, then the default value is x86-64 .
+//
+// When you create a function, Lambda provisions an instance of the function and
+// its supporting resources. If your function connects to a VPC, this process can
+// take a minute or so. During this time, you can't invoke or modify the function.
+// The State , StateReason , and StateReasonCode fields in the response from GetFunctionConfiguration
+// indicate when the function is ready to invoke. For more information, see [Lambda function states].
+//
+// A function has an unpublished version, and can have published versions and
+// aliases. The unpublished version changes when you update your function's code
+// and configuration. A published version is a snapshot of your function code and
+// configuration that can't be changed. An alias is a named resource that maps to a
+// version, and can be changed to map to a different version. Use the Publish
+// parameter to create version 1 of your function from its initial configuration.
+//
+// The other parameters let you configure version-specific and function-level
+// settings. You can modify version-specific settings later with UpdateFunctionConfiguration. Function-level
+// settings apply to both the unpublished and published versions of the function,
+// and include tags (TagResource ) and per-function concurrency limits (PutFunctionConcurrency ).
+//
+// You can use code signing if your deployment package is a .zip file archive. To
+// enable code signing for this function, specify the ARN of a code-signing
+// configuration. When a user attempts to deploy a code package with UpdateFunctionCode, Lambda
+// checks that the code package has a valid signature from a trusted publisher. The
+// code-signing configuration includes set of signing profiles, which define the
+// trusted publishers for this function.
+//
+// If another Amazon Web Services account or an Amazon Web Services service
+// invokes your function, use AddPermissionto grant permission by creating a resource-based
+// Identity and Access Management (IAM) policy. You can grant permissions at the
+// function level, on a version, or on an alias.
+//
+// To invoke your function directly, use Invoke. To invoke your function in response to
+// events in other Amazon Web Services services, create an event source mapping (CreateEventSourceMapping
+// ), or configure a function trigger in the other service. For more information,
+// see [Invoking Lambda functions].
+//
+// [Invoking Lambda functions]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html
+// [Lambda function states]: https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html
+// [.zip file archive]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip
+// [execution role]: https://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role
+// [container image]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html
+// [deployment package]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html
+func (c *Client) CreateFunction(ctx context.Context, params *CreateFunctionInput, optFns ...func(*Options)) (*CreateFunctionOutput, error) {
+ if params == nil {
+ params = &CreateFunctionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateFunction", params, optFns, c.addOperationCreateFunctionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateFunctionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateFunctionInput struct {
+
+ // The code for the function.
+ //
+ // This member is required.
+ Code *types.FunctionCode
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The Amazon Resource Name (ARN) of the function's execution role.
+ //
+ // This member is required.
+ Role *string
+
+ // The instruction set architecture that the function supports. Enter a string
+ // array with one of the valid values (arm64 or x86_64). The default value is
+ // x86_64 .
+ Architectures []types.Architecture
+
+ // To enable code signing for this function, specify the ARN of a code-signing
+ // configuration. A code-signing configuration includes a set of signing profiles,
+ // which define the trusted publishers for this function.
+ CodeSigningConfigArn *string
+
+ // A dead-letter queue configuration that specifies the queue or topic where
+ // Lambda sends asynchronous events when they fail processing. For more
+ // information, see [Dead-letter queues].
+ //
+ // [Dead-letter queues]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq
+ DeadLetterConfig *types.DeadLetterConfig
+
+ // A description of the function.
+ Description *string
+
+ // Environment variables that are accessible from function code during execution.
+ Environment *types.Environment
+
+ // The size of the function's /tmp directory in MB. The default value is 512, but
+ // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)].
+ //
+ // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
+ EphemeralStorage *types.EphemeralStorage
+
+ // Connection settings for an Amazon EFS file system.
+ FileSystemConfigs []types.FileSystemConfig
+
+ // The name of the method within your code that Lambda calls to run your function.
+ // Handler is required if the deployment package is a .zip file archive. The format
+ // includes the file name. It can also include namespaces and other qualifiers,
+ // depending on the runtime. For more information, see [Lambda programming model].
+ //
+ // [Lambda programming model]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html
+ Handler *string
+
+ // Container image [configuration values] that override the values in the container image Dockerfile.
+ //
+ // [configuration values]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms
+ ImageConfig *types.ImageConfig
+
+ // The ARN of the Key Management Service (KMS) customer managed key that's used to
+ // encrypt the following resources:
+ //
+ // - The function's [environment variables].
+ //
+ // - The function's [Lambda SnapStart]snapshots.
+ //
+ // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment
+ // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda].
+ //
+ // - The optimized version of the container image that's used for function
+ // invocations. Note that this is not the same key that's used to protect your
+ // container image in the Amazon Elastic Container Registry (Amazon ECR). For more
+ // information, see [Function lifecycle].
+ //
+ // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key].
+ //
+ // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+ // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption
+ // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption
+ // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle
+ // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+ KMSKeyArn *string
+
+ // A list of [function layers] to add to the function's execution environment. Specify each layer
+ // by its ARN, including the version.
+ //
+ // [function layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+ Layers []string
+
+ // The function's Amazon CloudWatch Logs configuration settings.
+ LoggingConfig *types.LoggingConfig
+
+ // The amount of [memory available to the function] at runtime. Increasing the function memory also increases its
+ // CPU allocation. The default value is 128 MB. The value can be any multiple of 1
+ // MB.
+ //
+ // [memory available to the function]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console
+ MemorySize *int32
+
+ // The type of deployment package. Set to Image for container image and set to Zip
+ // for .zip file archive.
+ PackageType types.PackageType
+
+ // Set to true to publish the first version of the function during creation.
+ Publish bool
+
+ // The identifier of the function's [runtime]. Runtime is required if the deployment
+ // package is a .zip file archive. Specifying a runtime results in an error if
+ // you're deploying a function using a container image.
+ //
+ // The following list includes deprecated runtimes. Lambda blocks creating new
+ // functions and updating existing functions shortly after each runtime is
+ // deprecated. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ Runtime types.Runtime
+
+ // The function's [SnapStart] setting.
+ //
+ // [SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
+ SnapStart *types.SnapStart
+
+ // A list of [tags] to apply to the function.
+ //
+ // [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html
+ Tags map[string]string
+
+ // The amount of time (in seconds) that Lambda allows a function to run before
+ // stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
+ // For more information, see [Lambda execution environment].
+ //
+ // [Lambda execution environment]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html
+ Timeout *int32
+
+ // Set Mode to Active to sample and trace a subset of incoming requests with [X-Ray].
+ //
+ // [X-Ray]: https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html
+ TracingConfig *types.TracingConfig
+
+ // For network connectivity to Amazon Web Services resources in a VPC, specify a
+ // list of security groups and subnets in the VPC. When you connect a function to a
+ // VPC, it can access resources and the internet only through that VPC. For more
+ // information, see [Configuring a Lambda function to access resources in a VPC].
+ //
+ // [Configuring a Lambda function to access resources in a VPC]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
+ VpcConfig *types.VpcConfig
+
+ noSmithyDocumentSerde
+}
+
+// Details about a function's configuration.
+type CreateFunctionOutput struct {
+
+ // The instruction set architecture that the function supports. Architecture is a
+ // string array with one of the valid values. The default architecture value is
+ // x86_64 .
+ Architectures []types.Architecture
+
+ // The SHA256 hash of the function's deployment package.
+ CodeSha256 *string
+
+ // The size of the function's deployment package, in bytes.
+ CodeSize int64
+
+ // The function's dead letter queue.
+ DeadLetterConfig *types.DeadLetterConfig
+
+ // The function's description.
+ Description *string
+
+ // The function's [environment variables]. Omitted from CloudTrail logs.
+ //
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
+ Environment *types.EnvironmentResponse
+
+ // The size of the function's /tmp directory in MB. The default value is 512, but
+ // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)].
+ //
+ // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
+ EphemeralStorage *types.EphemeralStorage
+
+ // Connection settings for an [Amazon EFS file system].
+ //
+ // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html
+ FileSystemConfigs []types.FileSystemConfig
+
+ // The function's Amazon Resource Name (ARN).
+ FunctionArn *string
+
+ // The name of the function.
+ FunctionName *string
+
+ // The function that Lambda calls to begin running your function.
+ Handler *string
+
+ // The function's image configuration values.
+ ImageConfigResponse *types.ImageConfigResponse
+
+ // The ARN of the Key Management Service (KMS) customer managed key that's used to
+ // encrypt the following resources:
+ //
+ // - The function's [environment variables].
+ //
+ // - The function's [Lambda SnapStart]snapshots.
+ //
+ // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment
+ // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda].
+ //
+ // - The optimized version of the container image that's used for function
+ // invocations. Note that this is not the same key that's used to protect your
+ // container image in the Amazon Elastic Container Registry (Amazon ECR). For more
+ // information, see [Function lifecycle].
+ //
+ // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key].
+ //
+ // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+ // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption
+ // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption
+ // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle
+ // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+ KMSKeyArn *string
+
+ // The date and time that the function was last updated, in [ISO-8601 format]
+ // (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ LastModified *string
+
+ // The status of the last update that was performed on the function. This is first
+ // set to Successful after function creation completes.
+ LastUpdateStatus types.LastUpdateStatus
+
+ // The reason for the last update that was performed on the function.
+ LastUpdateStatusReason *string
+
+ // The reason code for the last update that was performed on the function.
+ LastUpdateStatusReasonCode types.LastUpdateStatusReasonCode
+
+ // The function's [layers].
+ //
+ // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+ Layers []types.Layer
+
+ // The function's Amazon CloudWatch Logs configuration settings.
+ LoggingConfig *types.LoggingConfig
+
+ // For Lambda@Edge functions, the ARN of the main function.
+ MasterArn *string
+
+ // The amount of memory available to the function at runtime.
+ MemorySize *int32
+
+ // The type of deployment package. Set to Image for container image and set Zip
+ // for .zip file archive.
+ PackageType types.PackageType
+
+ // The latest updated revision of the function or alias.
+ RevisionId *string
+
+ // The function's execution role.
+ Role *string
+
+ // The identifier of the function's [runtime]. Runtime is required if the deployment
+ // package is a .zip file archive. Specifying a runtime results in an error if
+ // you're deploying a function using a container image.
+ //
+ // The following list includes deprecated runtimes. Lambda blocks creating new
+ // functions and updating existing functions shortly after each runtime is
+ // deprecated. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ Runtime types.Runtime
+
+ // The ARN of the runtime and any errors that occured.
+ RuntimeVersionConfig *types.RuntimeVersionConfig
+
+ // The ARN of the signing job.
+ SigningJobArn *string
+
+ // The ARN of the signing profile version.
+ SigningProfileVersionArn *string
+
+ // Set ApplyOn to PublishedVersions to create a snapshot of the initialized
+ // execution environment when you publish a function version. For more information,
+ // see [Improving startup performance with Lambda SnapStart].
+ //
+ // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
+ SnapStart *types.SnapStartResponse
+
+ // The current state of the function. When the state is Inactive , you can
+ // reactivate the function by invoking it.
+ State types.State
+
+ // The reason for the function's current state.
+ StateReason *string
+
+ // The reason code for the function's current state. When the code is Creating ,
+ // you can't invoke or modify the function.
+ StateReasonCode types.StateReasonCode
+
+ // The amount of time in seconds that Lambda allows a function to run before
+ // stopping it.
+ Timeout *int32
+
+ // The function's X-Ray tracing configuration.
+ TracingConfig *types.TracingConfigResponse
+
+ // The version of the Lambda function.
+ Version *string
+
+ // The function's networking configuration.
+ VpcConfig *types.VpcConfigResponse
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateFunction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateFunction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFunction"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateFunctionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFunction(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateFunction(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateFunction",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunctionUrlConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunctionUrlConfig.go
new file mode 100644
index 00000000..b9617ac8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunctionUrlConfig.go
@@ -0,0 +1,246 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a Lambda function URL with the specified configuration parameters. A
+// function URL is a dedicated HTTP(S) endpoint that you can use to invoke your
+// function.
+func (c *Client) CreateFunctionUrlConfig(ctx context.Context, params *CreateFunctionUrlConfigInput, optFns ...func(*Options)) (*CreateFunctionUrlConfigOutput, error) {
+ if params == nil {
+ params = &CreateFunctionUrlConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateFunctionUrlConfig", params, optFns, c.addOperationCreateFunctionUrlConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateFunctionUrlConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateFunctionUrlConfigInput struct {
+
+ // The type of authentication that your function URL uses. Set to AWS_IAM if you
+ // want to restrict access to authenticated users only. Set to NONE if you want to
+ // bypass IAM authentication to create a public endpoint. For more information, see
+ // [Security and auth model for Lambda function URLs].
+ //
+ // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html
+ //
+ // This member is required.
+ AuthType types.FunctionUrlAuthType
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The [cross-origin resource sharing (CORS)] settings for your function URL.
+ //
+ // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
+ Cors *types.Cors
+
+ // Use one of the following options:
+ //
+ // - BUFFERED – This is the default option. Lambda invokes your function using
+ // the Invoke API operation. Invocation results are available when the payload is
+ // complete. The maximum payload size is 6 MB.
+ //
+ // - RESPONSE_STREAM – Your function streams payload results as they become
+ // available. Lambda invokes your function using the InvokeWithResponseStream API
+ // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase].
+ //
+ // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html
+ InvokeMode types.InvokeMode
+
+ // The alias name.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateFunctionUrlConfigOutput struct {
+
+ // The type of authentication that your function URL uses. Set to AWS_IAM if you
+ // want to restrict access to authenticated users only. Set to NONE if you want to
+ // bypass IAM authentication to create a public endpoint. For more information, see
+ // [Security and auth model for Lambda function URLs].
+ //
+ // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html
+ //
+ // This member is required.
+ AuthType types.FunctionUrlAuthType
+
+ // When the function URL was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ //
+ // This member is required.
+ CreationTime *string
+
+ // The Amazon Resource Name (ARN) of your function.
+ //
+ // This member is required.
+ FunctionArn *string
+
+ // The HTTP URL endpoint for your function.
+ //
+ // This member is required.
+ FunctionUrl *string
+
+ // The [cross-origin resource sharing (CORS)] settings for your function URL.
+ //
+ // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
+ Cors *types.Cors
+
+ // Use one of the following options:
+ //
+ // - BUFFERED – This is the default option. Lambda invokes your function using
+ // the Invoke API operation. Invocation results are available when the payload is
+ // complete. The maximum payload size is 6 MB.
+ //
+ // - RESPONSE_STREAM – Your function streams payload results as they become
+ // available. Lambda invokes your function using the InvokeWithResponseStream API
+ // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase].
+ //
+ // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html
+ InvokeMode types.InvokeMode
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateFunctionUrlConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateFunctionUrlConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFunctionUrlConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateFunctionUrlConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFunctionUrlConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateFunctionUrlConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteAlias.go
new file mode 100644
index 00000000..34cb07ad
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteAlias.go
@@ -0,0 +1,173 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a Lambda function [alias].
+//
+// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
+func (c *Client) DeleteAlias(ctx context.Context, params *DeleteAliasInput, optFns ...func(*Options)) (*DeleteAliasOutput, error) {
+ if params == nil {
+ params = &DeleteAliasInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteAlias", params, optFns, c.addOperationDeleteAliasMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteAliasOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteAliasInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The name of the alias.
+ //
+ // This member is required.
+ Name *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteAliasOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteAliasMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAlias"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteAliasValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAlias(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteAlias(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteAlias",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteCodeSigningConfig.go
new file mode 100644
index 00000000..6b45f85c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteCodeSigningConfig.go
@@ -0,0 +1,156 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the code signing configuration. You can delete the code signing
+// configuration only if no function is using it.
+func (c *Client) DeleteCodeSigningConfig(ctx context.Context, params *DeleteCodeSigningConfigInput, optFns ...func(*Options)) (*DeleteCodeSigningConfigOutput, error) {
+ if params == nil {
+ params = &DeleteCodeSigningConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteCodeSigningConfig", params, optFns, c.addOperationDeleteCodeSigningConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteCodeSigningConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteCodeSigningConfigInput struct {
+
+ // The The Amazon Resource Name (ARN) of the code signing configuration.
+ //
+ // This member is required.
+ CodeSigningConfigArn *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteCodeSigningConfigOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCodeSigningConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteCodeSigningConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCodeSigningConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteCodeSigningConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteEventSourceMapping.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteEventSourceMapping.go
new file mode 100644
index 00000000..66ca2ac7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteEventSourceMapping.go
@@ -0,0 +1,328 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Deletes an [event source mapping]. You can get the identifier of a mapping from the output of ListEventSourceMappings.
+//
+// When you delete an event source mapping, it enters a Deleting state and might
+// not be completely deleted for several seconds.
+//
+// [event source mapping]: https://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html
+func (c *Client) DeleteEventSourceMapping(ctx context.Context, params *DeleteEventSourceMappingInput, optFns ...func(*Options)) (*DeleteEventSourceMappingOutput, error) {
+ if params == nil {
+ params = &DeleteEventSourceMappingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteEventSourceMapping", params, optFns, c.addOperationDeleteEventSourceMappingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteEventSourceMappingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteEventSourceMappingInput struct {
+
+ // The identifier of the event source mapping.
+ //
+ // This member is required.
+ UUID *string
+
+ noSmithyDocumentSerde
+}
+
+// A mapping between an Amazon Web Services resource and a Lambda function. For
+// details, see CreateEventSourceMapping.
+type DeleteEventSourceMappingOutput struct {
+
+ // Specific configuration settings for an Amazon Managed Streaming for Apache
+ // Kafka (Amazon MSK) event source.
+ AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig
+
+ // The maximum number of records in each batch that Lambda pulls from your stream
+ // or queue and sends to your function. Lambda passes all of the records in the
+ // batch to the function in a single call, up to the payload limit for synchronous
+ // invocation (6 MB).
+ //
+ // Default value: Varies by service. For Amazon SQS, the default is 10. For all
+ // other services, the default is 100.
+ //
+ // Related setting: When you set BatchSize to a value greater than 10, you must
+ // set MaximumBatchingWindowInSeconds to at least 1.
+ BatchSize *int32
+
+ // (Kinesis and DynamoDB Streams only) If the function returns an error, split the
+ // batch in two and retry. The default value is false.
+ BisectBatchOnFunctionError *bool
+
+ // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event
+ // sources only) A configuration object that specifies the destination of an event
+ // after Lambda processes it.
+ DestinationConfig *types.DestinationConfig
+
+ // Specific configuration settings for a DocumentDB event source.
+ DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig
+
+ // The Amazon Resource Name (ARN) of the event source.
+ EventSourceArn *string
+
+ // The Amazon Resource Name (ARN) of the event source mapping.
+ EventSourceMappingArn *string
+
+ // An object that defines the filter criteria that determine whether Lambda should
+ // process an event. For more information, see [Lambda event filtering].
+ //
+ // If filter criteria is encrypted, this field shows up as null in the response of
+ // ListEventSourceMapping API calls. You can view this field in plaintext in the
+ // response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have
+ // kms:Decrypt permissions for the correct KMS key.
+ //
+ // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html
+ FilterCriteria *types.FilterCriteria
+
+ // An object that contains details about an error related to filter criteria
+ // encryption.
+ FilterCriteriaError *types.FilterCriteriaError
+
+ // The ARN of the Lambda function.
+ FunctionArn *string
+
+ // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type
+ // enums applied to the event source mapping.
+ FunctionResponseTypes []types.FunctionResponseType
+
+ // The ARN of the Key Management Service (KMS) customer managed key that Lambda
+ // uses to encrypt your function's [filter criteria].
+ //
+ // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics
+ KMSKeyArn *string
+
+ // The date that the event source mapping was last updated or that its state
+ // changed.
+ LastModified *time.Time
+
+ // The result of the last Lambda invocation of your function.
+ LastProcessingResult *string
+
+ // The maximum amount of time, in seconds, that Lambda spends gathering records
+ // before invoking the function. You can configure MaximumBatchingWindowInSeconds
+ // to any value from 0 seconds to 300 seconds in increments of seconds.
+ //
+ // For streams and Amazon SQS event sources, the default batching window is 0
+ // seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB
+ // event sources, the default batching window is 500 ms. Note that because you can
+ // only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot
+ // revert back to the 500 ms default batching window after you have changed it. To
+ // restore the default batching window, you must create a new event source mapping.
+ //
+ // Related setting: For streams and Amazon SQS event sources, when you set
+ // BatchSize to a value greater than 10, you must set
+ // MaximumBatchingWindowInSeconds to at least 1.
+ MaximumBatchingWindowInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records older than the specified
+ // age. The default value is -1, which sets the maximum age to infinite. When the
+ // value is set to infinite, Lambda never discards old records.
+ //
+ // The minimum valid value for maximum record age is 60s. Although values less
+ // than 60 and greater than -1 fall within the parameter's absolute range, they are
+ // not allowed
+ MaximumRecordAgeInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records after the specified number
+ // of retries. The default value is -1, which sets the maximum number of retries to
+ // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records
+ // until the record expires in the event source.
+ MaximumRetryAttempts *int32
+
+ // The metrics configuration for your event source. For more information, see [Event source mapping metrics].
+ //
+ // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics
+ MetricsConfig *types.EventSourceMappingMetricsConfig
+
+ // (Kinesis and DynamoDB Streams only) The number of batches to process
+ // concurrently from each shard. The default value is 1.
+ ParallelizationFactor *int32
+
+ // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode
+ // configuration for the event source. For more information, see [Provisioned Mode].
+ //
+ // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode
+ ProvisionedPollerConfig *types.ProvisionedPollerConfig
+
+ // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
+ Queues []string
+
+ // (Amazon SQS only) The scaling configuration for the event source. For more
+ // information, see [Configuring maximum concurrency for Amazon SQS event sources].
+ //
+ // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency
+ ScalingConfig *types.ScalingConfig
+
+ // The self-managed Apache Kafka cluster for your event source.
+ SelfManagedEventSource *types.SelfManagedEventSource
+
+ // Specific configuration settings for a self-managed Apache Kafka event source.
+ SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig
+
+ // An array of the authentication protocol, VPC components, or virtual host to
+ // secure and define your event source.
+ SourceAccessConfigurations []types.SourceAccessConfiguration
+
+ // The position in a stream from which to start reading. Required for Amazon
+ // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported
+ // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed
+ // Apache Kafka.
+ StartingPosition types.EventSourcePosition
+
+ // With StartingPosition set to AT_TIMESTAMP , the time from which to start
+ // reading. StartingPositionTimestamp cannot be in the future.
+ StartingPositionTimestamp *time.Time
+
+ // The state of the event source mapping. It can be one of the following: Creating
+ // , Enabling , Enabled , Disabling , Disabled , Updating , or Deleting .
+ State *string
+
+ // Indicates whether a user or Lambda made the last change to the event source
+ // mapping.
+ StateTransitionReason *string
+
+ // The name of the Kafka topic.
+ Topics []string
+
+ // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing
+ // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds
+ // indicates no tumbling window.
+ TumblingWindowInSeconds *int32
+
+ // The identifier of the event source mapping.
+ UUID *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteEventSourceMappingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEventSourceMapping{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEventSourceMapping{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteEventSourceMapping"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteEventSourceMappingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEventSourceMapping(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteEventSourceMapping(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteEventSourceMapping",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunction.go
new file mode 100644
index 00000000..93742ffb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunction.go
@@ -0,0 +1,177 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a Lambda function. To delete a specific function version, use the
+// Qualifier parameter. Otherwise, all versions and aliases are deleted. This
+// doesn't require the user to have explicit permissions for DeleteAlias.
+//
+// To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon
+// Web Services services and resources that invoke your function directly, delete
+// the trigger in the service where you originally configured it.
+func (c *Client) DeleteFunction(ctx context.Context, params *DeleteFunctionInput, optFns ...func(*Options)) (*DeleteFunctionOutput, error) {
+ if params == nil {
+ params = &DeleteFunctionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteFunction", params, optFns, c.addOperationDeleteFunctionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteFunctionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteFunctionInput struct {
+
+ // The name or ARN of the Lambda function or version.
+ //
+ // Name formats
+ //
+ // - Function name – my-function (name-only), my-function:1 (with version).
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // You can append a version number or alias to any of the formats. The length
+ // constraint applies only to the full ARN. If you specify only the function name,
+ // it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specify a version to delete. You can't delete a version that an alias
+ // references.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteFunctionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFunction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFunction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFunction"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteFunctionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunction(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteFunction(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteFunction",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionCodeSigningConfig.go
new file mode 100644
index 00000000..955cc74b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionCodeSigningConfig.go
@@ -0,0 +1,166 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Removes the code signing configuration from the function.
+func (c *Client) DeleteFunctionCodeSigningConfig(ctx context.Context, params *DeleteFunctionCodeSigningConfigInput, optFns ...func(*Options)) (*DeleteFunctionCodeSigningConfigOutput, error) {
+ if params == nil {
+ params = &DeleteFunctionCodeSigningConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteFunctionCodeSigningConfig", params, optFns, c.addOperationDeleteFunctionCodeSigningConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteFunctionCodeSigningConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteFunctionCodeSigningConfigInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteFunctionCodeSigningConfigOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteFunctionCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFunctionCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFunctionCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFunctionCodeSigningConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteFunctionCodeSigningConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunctionCodeSigningConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteFunctionCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteFunctionCodeSigningConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionConcurrency.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionConcurrency.go
new file mode 100644
index 00000000..576bd48c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionConcurrency.go
@@ -0,0 +1,166 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Removes a concurrent execution limit from a function.
+func (c *Client) DeleteFunctionConcurrency(ctx context.Context, params *DeleteFunctionConcurrencyInput, optFns ...func(*Options)) (*DeleteFunctionConcurrencyOutput, error) {
+ if params == nil {
+ params = &DeleteFunctionConcurrencyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteFunctionConcurrency", params, optFns, c.addOperationDeleteFunctionConcurrencyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteFunctionConcurrencyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteFunctionConcurrencyInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteFunctionConcurrencyOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteFunctionConcurrencyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFunctionConcurrency{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFunctionConcurrency{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFunctionConcurrency"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteFunctionConcurrencyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunctionConcurrency(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteFunctionConcurrency(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteFunctionConcurrency",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionEventInvokeConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionEventInvokeConfig.go
new file mode 100644
index 00000000..77a13e57
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionEventInvokeConfig.go
@@ -0,0 +1,173 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the configuration for asynchronous invocation for a function, version,
+// or alias.
+//
+// To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.
+func (c *Client) DeleteFunctionEventInvokeConfig(ctx context.Context, params *DeleteFunctionEventInvokeConfigInput, optFns ...func(*Options)) (*DeleteFunctionEventInvokeConfigOutput, error) {
+ if params == nil {
+ params = &DeleteFunctionEventInvokeConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteFunctionEventInvokeConfig", params, optFns, c.addOperationDeleteFunctionEventInvokeConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteFunctionEventInvokeConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteFunctionEventInvokeConfigInput struct {
+
+ // The name or ARN of the Lambda function, version, or alias.
+ //
+ // Name formats
+ //
+ // - Function name - my-function (name-only), my-function:v1 (with alias).
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN - 123456789012:function:my-function .
+ //
+ // You can append a version number or alias to any of the formats. The length
+ // constraint applies only to the full ARN. If you specify only the function name,
+ // it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // A version number or alias name.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteFunctionEventInvokeConfigOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteFunctionEventInvokeConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFunctionEventInvokeConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFunctionEventInvokeConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFunctionEventInvokeConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteFunctionEventInvokeConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunctionEventInvokeConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteFunctionEventInvokeConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteFunctionEventInvokeConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionUrlConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionUrlConfig.go
new file mode 100644
index 00000000..fd42b76d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionUrlConfig.go
@@ -0,0 +1,170 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a Lambda function URL. When you delete a function URL, you can't
+// recover it. Creating a new function URL results in a different URL address.
+func (c *Client) DeleteFunctionUrlConfig(ctx context.Context, params *DeleteFunctionUrlConfigInput, optFns ...func(*Options)) (*DeleteFunctionUrlConfigOutput, error) {
+ if params == nil {
+ params = &DeleteFunctionUrlConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteFunctionUrlConfig", params, optFns, c.addOperationDeleteFunctionUrlConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteFunctionUrlConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteFunctionUrlConfigInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The alias name.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteFunctionUrlConfigOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFunctionUrlConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFunctionUrlConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFunctionUrlConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteFunctionUrlConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunctionUrlConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteFunctionUrlConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteLayerVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteLayerVersion.go
new file mode 100644
index 00000000..ed6afac1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteLayerVersion.go
@@ -0,0 +1,164 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a version of an [Lambda layer]. Deleted versions can no longer be viewed or added to
+// functions. To avoid breaking functions, a copy of the version remains in Lambda
+// until no functions refer to it.
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+func (c *Client) DeleteLayerVersion(ctx context.Context, params *DeleteLayerVersionInput, optFns ...func(*Options)) (*DeleteLayerVersionOutput, error) {
+ if params == nil {
+ params = &DeleteLayerVersionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteLayerVersion", params, optFns, c.addOperationDeleteLayerVersionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteLayerVersionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteLayerVersionInput struct {
+
+ // The name or Amazon Resource Name (ARN) of the layer.
+ //
+ // This member is required.
+ LayerName *string
+
+ // The version number.
+ //
+ // This member is required.
+ VersionNumber *int64
+
+ noSmithyDocumentSerde
+}
+
+type DeleteLayerVersionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteLayerVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteLayerVersion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteLayerVersion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLayerVersion"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteLayerVersionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLayerVersion(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteLayerVersion(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteLayerVersion",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteProvisionedConcurrencyConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteProvisionedConcurrencyConfig.go
new file mode 100644
index 00000000..38f2b0e0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteProvisionedConcurrencyConfig.go
@@ -0,0 +1,171 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the provisioned concurrency configuration for a function.
+func (c *Client) DeleteProvisionedConcurrencyConfig(ctx context.Context, params *DeleteProvisionedConcurrencyConfigInput, optFns ...func(*Options)) (*DeleteProvisionedConcurrencyConfigOutput, error) {
+ if params == nil {
+ params = &DeleteProvisionedConcurrencyConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteProvisionedConcurrencyConfig", params, optFns, c.addOperationDeleteProvisionedConcurrencyConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteProvisionedConcurrencyConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteProvisionedConcurrencyConfigInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The version number or alias name.
+ //
+ // This member is required.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteProvisionedConcurrencyConfigOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteProvisionedConcurrencyConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteProvisionedConcurrencyConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteProvisionedConcurrencyConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteProvisionedConcurrencyConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteProvisionedConcurrencyConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteProvisionedConcurrencyConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteProvisionedConcurrencyConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAccountSettings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAccountSettings.go
new file mode 100644
index 00000000..c4678f03
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAccountSettings.go
@@ -0,0 +1,157 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Retrieves details about your account's [limits] and usage in an Amazon Web Services
+// Region.
+//
+// [limits]: https://docs.aws.amazon.com/lambda/latest/dg/limits.html
+func (c *Client) GetAccountSettings(ctx context.Context, params *GetAccountSettingsInput, optFns ...func(*Options)) (*GetAccountSettingsOutput, error) {
+ if params == nil {
+ params = &GetAccountSettingsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetAccountSettings", params, optFns, c.addOperationGetAccountSettingsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetAccountSettingsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetAccountSettingsInput struct {
+ noSmithyDocumentSerde
+}
+
+type GetAccountSettingsOutput struct {
+
+ // Limits that are related to concurrency and code storage.
+ AccountLimit *types.AccountLimit
+
+ // The number of functions and amount of storage in use.
+ AccountUsage *types.AccountUsage
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetAccountSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAccountSettings{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAccountSettings{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccountSettings"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSettings(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetAccountSettings(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetAccountSettings",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAlias.go
new file mode 100644
index 00000000..c65d0026
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAlias.go
@@ -0,0 +1,198 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns details about a Lambda function [alias].
+//
+// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
+func (c *Client) GetAlias(ctx context.Context, params *GetAliasInput, optFns ...func(*Options)) (*GetAliasOutput, error) {
+ if params == nil {
+ params = &GetAliasInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetAlias", params, optFns, c.addOperationGetAliasMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetAliasOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetAliasInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The name of the alias.
+ //
+ // This member is required.
+ Name *string
+
+ noSmithyDocumentSerde
+}
+
+// Provides configuration information about a Lambda function [alias].
+//
+// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
+type GetAliasOutput struct {
+
+ // The Amazon Resource Name (ARN) of the alias.
+ AliasArn *string
+
+ // A description of the alias.
+ Description *string
+
+ // The function version that the alias invokes.
+ FunctionVersion *string
+
+ // The name of the alias.
+ Name *string
+
+ // A unique identifier that changes when you update the alias.
+ RevisionId *string
+
+ // The [routing configuration] of the alias.
+ //
+ // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html
+ RoutingConfig *types.AliasRoutingConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetAliasMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetAlias"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetAliasValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAlias(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetAlias(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetAlias",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetCodeSigningConfig.go
new file mode 100644
index 00000000..630f2a93
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetCodeSigningConfig.go
@@ -0,0 +1,162 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns information about the specified code signing configuration.
+func (c *Client) GetCodeSigningConfig(ctx context.Context, params *GetCodeSigningConfigInput, optFns ...func(*Options)) (*GetCodeSigningConfigOutput, error) {
+ if params == nil {
+ params = &GetCodeSigningConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetCodeSigningConfig", params, optFns, c.addOperationGetCodeSigningConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetCodeSigningConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetCodeSigningConfigInput struct {
+
+ // The The Amazon Resource Name (ARN) of the code signing configuration.
+ //
+ // This member is required.
+ CodeSigningConfigArn *string
+
+ noSmithyDocumentSerde
+}
+
+type GetCodeSigningConfigOutput struct {
+
+ // The code signing configuration
+ //
+ // This member is required.
+ CodeSigningConfig *types.CodeSigningConfig
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetCodeSigningConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetCodeSigningConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCodeSigningConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetCodeSigningConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetEventSourceMapping.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetEventSourceMapping.go
new file mode 100644
index 00000000..38d8d396
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetEventSourceMapping.go
@@ -0,0 +1,324 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Returns details about an event source mapping. You can get the identifier of a
+// mapping from the output of ListEventSourceMappings.
+func (c *Client) GetEventSourceMapping(ctx context.Context, params *GetEventSourceMappingInput, optFns ...func(*Options)) (*GetEventSourceMappingOutput, error) {
+ if params == nil {
+ params = &GetEventSourceMappingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetEventSourceMapping", params, optFns, c.addOperationGetEventSourceMappingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetEventSourceMappingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetEventSourceMappingInput struct {
+
+ // The identifier of the event source mapping.
+ //
+ // This member is required.
+ UUID *string
+
+ noSmithyDocumentSerde
+}
+
+// A mapping between an Amazon Web Services resource and a Lambda function. For
+// details, see CreateEventSourceMapping.
+type GetEventSourceMappingOutput struct {
+
+ // Specific configuration settings for an Amazon Managed Streaming for Apache
+ // Kafka (Amazon MSK) event source.
+ AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig
+
+ // The maximum number of records in each batch that Lambda pulls from your stream
+ // or queue and sends to your function. Lambda passes all of the records in the
+ // batch to the function in a single call, up to the payload limit for synchronous
+ // invocation (6 MB).
+ //
+ // Default value: Varies by service. For Amazon SQS, the default is 10. For all
+ // other services, the default is 100.
+ //
+ // Related setting: When you set BatchSize to a value greater than 10, you must
+ // set MaximumBatchingWindowInSeconds to at least 1.
+ BatchSize *int32
+
+ // (Kinesis and DynamoDB Streams only) If the function returns an error, split the
+ // batch in two and retry. The default value is false.
+ BisectBatchOnFunctionError *bool
+
+ // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event
+ // sources only) A configuration object that specifies the destination of an event
+ // after Lambda processes it.
+ DestinationConfig *types.DestinationConfig
+
+ // Specific configuration settings for a DocumentDB event source.
+ DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig
+
+ // The Amazon Resource Name (ARN) of the event source.
+ EventSourceArn *string
+
+ // The Amazon Resource Name (ARN) of the event source mapping.
+ EventSourceMappingArn *string
+
+ // An object that defines the filter criteria that determine whether Lambda should
+ // process an event. For more information, see [Lambda event filtering].
+ //
+ // If filter criteria is encrypted, this field shows up as null in the response of
+ // ListEventSourceMapping API calls. You can view this field in plaintext in the
+ // response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have
+ // kms:Decrypt permissions for the correct KMS key.
+ //
+ // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html
+ FilterCriteria *types.FilterCriteria
+
+ // An object that contains details about an error related to filter criteria
+ // encryption.
+ FilterCriteriaError *types.FilterCriteriaError
+
+ // The ARN of the Lambda function.
+ FunctionArn *string
+
+ // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type
+ // enums applied to the event source mapping.
+ FunctionResponseTypes []types.FunctionResponseType
+
+ // The ARN of the Key Management Service (KMS) customer managed key that Lambda
+ // uses to encrypt your function's [filter criteria].
+ //
+ // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics
+ KMSKeyArn *string
+
+ // The date that the event source mapping was last updated or that its state
+ // changed.
+ LastModified *time.Time
+
+ // The result of the last Lambda invocation of your function.
+ LastProcessingResult *string
+
+ // The maximum amount of time, in seconds, that Lambda spends gathering records
+ // before invoking the function. You can configure MaximumBatchingWindowInSeconds
+ // to any value from 0 seconds to 300 seconds in increments of seconds.
+ //
+ // For streams and Amazon SQS event sources, the default batching window is 0
+ // seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB
+ // event sources, the default batching window is 500 ms. Note that because you can
+ // only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot
+ // revert back to the 500 ms default batching window after you have changed it. To
+ // restore the default batching window, you must create a new event source mapping.
+ //
+ // Related setting: For streams and Amazon SQS event sources, when you set
+ // BatchSize to a value greater than 10, you must set
+ // MaximumBatchingWindowInSeconds to at least 1.
+ MaximumBatchingWindowInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records older than the specified
+ // age. The default value is -1, which sets the maximum age to infinite. When the
+ // value is set to infinite, Lambda never discards old records.
+ //
+ // The minimum valid value for maximum record age is 60s. Although values less
+ // than 60 and greater than -1 fall within the parameter's absolute range, they are
+ // not allowed
+ MaximumRecordAgeInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records after the specified number
+ // of retries. The default value is -1, which sets the maximum number of retries to
+ // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records
+ // until the record expires in the event source.
+ MaximumRetryAttempts *int32
+
+ // The metrics configuration for your event source. For more information, see [Event source mapping metrics].
+ //
+ // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics
+ MetricsConfig *types.EventSourceMappingMetricsConfig
+
+ // (Kinesis and DynamoDB Streams only) The number of batches to process
+ // concurrently from each shard. The default value is 1.
+ ParallelizationFactor *int32
+
+ // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode
+ // configuration for the event source. For more information, see [Provisioned Mode].
+ //
+ // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode
+ ProvisionedPollerConfig *types.ProvisionedPollerConfig
+
+ // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
+ Queues []string
+
+ // (Amazon SQS only) The scaling configuration for the event source. For more
+ // information, see [Configuring maximum concurrency for Amazon SQS event sources].
+ //
+ // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency
+ ScalingConfig *types.ScalingConfig
+
+ // The self-managed Apache Kafka cluster for your event source.
+ SelfManagedEventSource *types.SelfManagedEventSource
+
+ // Specific configuration settings for a self-managed Apache Kafka event source.
+ SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig
+
+ // An array of the authentication protocol, VPC components, or virtual host to
+ // secure and define your event source.
+ SourceAccessConfigurations []types.SourceAccessConfiguration
+
+ // The position in a stream from which to start reading. Required for Amazon
+ // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported
+ // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed
+ // Apache Kafka.
+ StartingPosition types.EventSourcePosition
+
+ // With StartingPosition set to AT_TIMESTAMP , the time from which to start
+ // reading. StartingPositionTimestamp cannot be in the future.
+ StartingPositionTimestamp *time.Time
+
+ // The state of the event source mapping. It can be one of the following: Creating
+ // , Enabling , Enabled , Disabling , Disabled , Updating , or Deleting .
+ State *string
+
+ // Indicates whether a user or Lambda made the last change to the event source
+ // mapping.
+ StateTransitionReason *string
+
+ // The name of the Kafka topic.
+ Topics []string
+
+ // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing
+ // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds
+ // indicates no tumbling window.
+ TumblingWindowInSeconds *int32
+
+ // The identifier of the event source mapping.
+ UUID *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetEventSourceMappingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetEventSourceMapping{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetEventSourceMapping{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetEventSourceMapping"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetEventSourceMappingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEventSourceMapping(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetEventSourceMapping(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetEventSourceMapping",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunction.go
new file mode 100644
index 00000000..82a8b8cb
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunction.go
@@ -0,0 +1,803 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ smithywaiter "github.com/aws/smithy-go/waiter"
+ "time"
+)
+
+// Returns information about the function or function version, with a link to
+// download the deployment package that's valid for 10 minutes. If you specify a
+// function version, only details that are specific to that version are returned.
+func (c *Client) GetFunction(ctx context.Context, params *GetFunctionInput, optFns ...func(*Options)) (*GetFunctionOutput, error) {
+ if params == nil {
+ params = &GetFunctionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetFunction", params, optFns, c.addOperationGetFunctionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetFunctionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetFunctionInput struct {
+
+ // The name or ARN of the Lambda function, version, or alias.
+ //
+ // Name formats
+ //
+ // - Function name – my-function (name-only), my-function:v1 (with alias).
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // You can append a version number or alias to any of the formats. The length
+ // constraint applies only to the full ARN. If you specify only the function name,
+ // it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specify a version or alias to get details about a published version of the
+ // function.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type GetFunctionOutput struct {
+
+ // The deployment package of the function or version.
+ Code *types.FunctionCodeLocation
+
+ // The function's [reserved concurrency].
+ //
+ // [reserved concurrency]: https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html
+ Concurrency *types.Concurrency
+
+ // The configuration of the function or version.
+ Configuration *types.FunctionConfiguration
+
+ // The function's [tags]. Lambda returns tag data only if you have explicit allow
+ // permissions for [lambda:ListTags].
+ //
+ // [lambda:ListTags]: https://docs.aws.amazon.com/lambda/latest/api/API_ListTags.html
+ // [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html
+ Tags map[string]string
+
+ // An object that contains details about an error related to retrieving tags.
+ TagsError *types.TagsError
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunction"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetFunctionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunction(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// FunctionActiveV2WaiterOptions are waiter options for FunctionActiveV2Waiter
+type FunctionActiveV2WaiterOptions struct {
+
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ //
+ // Passing options here is functionally equivalent to passing values to this
+ // config's ClientOptions field that extend the inner client's APIOptions directly.
+ APIOptions []func(*middleware.Stack) error
+
+ // Functional options to be passed to all operations invoked by this client.
+ //
+ // Function values that modify the inner APIOptions are applied after the waiter
+ // config's own APIOptions modifiers.
+ ClientOptions []func(*Options)
+
+ // MinDelay is the minimum amount of time to delay between retries. If unset,
+ // FunctionActiveV2Waiter will use default minimum delay of 1 seconds. Note that
+ // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
+ MinDelay time.Duration
+
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or
+ // set to zero, FunctionActiveV2Waiter will use default max delay of 120 seconds.
+ // Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
+ MaxDelay time.Duration
+
+ // LogWaitAttempts is used to enable logging for waiter retry attempts
+ LogWaitAttempts bool
+
+ // Retryable is function that can be used to override the service defined
+ // waiter-behavior based on operation output, or returned error. This function is
+ // used by the waiter to decide if a state is retryable or a terminal state.
+ //
+ // By default service-modeled logic will populate this option. This option can
+ // thus be used to define a custom waiter state with fall-back to service-modeled
+ // waiter state mutators.The function returns an error in case of a failure state.
+ // In case of retry state, this function returns a bool value of true and nil
+ // error, while in case of success it returns a bool value of false and nil error.
+ Retryable func(context.Context, *GetFunctionInput, *GetFunctionOutput, error) (bool, error)
+}
+
+// FunctionActiveV2Waiter defines the waiters for FunctionActiveV2
+type FunctionActiveV2Waiter struct {
+ client GetFunctionAPIClient
+
+ options FunctionActiveV2WaiterOptions
+}
+
+// NewFunctionActiveV2Waiter constructs a FunctionActiveV2Waiter.
+func NewFunctionActiveV2Waiter(client GetFunctionAPIClient, optFns ...func(*FunctionActiveV2WaiterOptions)) *FunctionActiveV2Waiter {
+ options := FunctionActiveV2WaiterOptions{}
+ options.MinDelay = 1 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = functionActiveV2StateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &FunctionActiveV2Waiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for FunctionActiveV2 waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
+func (w *FunctionActiveV2Waiter) Wait(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionActiveV2WaiterOptions)) error {
+ _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
+ return err
+}
+
+// WaitForOutput calls the waiter function for FunctionActiveV2 waiter and returns
+// the output of the successful operation. The maxWaitDur is the maximum wait
+// duration the waiter will wait. The maxWaitDur is required and must be greater
+// than zero.
+func (w *FunctionActiveV2Waiter) WaitForOutput(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionActiveV2WaiterOptions)) (*GetFunctionOutput, error) {
+ if maxWaitDur <= 0 {
+ return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
+ }
+
+ options := w.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.MaxDelay <= 0 {
+ options.MaxDelay = 120 * time.Second
+ }
+
+ if options.MinDelay > options.MaxDelay {
+ return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
+ }
+
+ ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
+ defer cancelFn()
+
+ logger := smithywaiter.Logger{}
+ remainingTime := maxWaitDur
+
+ var attempt int64
+ for {
+
+ attempt++
+ apiOptions := options.APIOptions
+ start := time.Now()
+
+ if options.LogWaitAttempts {
+ logger.Attempt = attempt
+ apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
+ apiOptions = append(apiOptions, logger.AddLogger)
+ }
+
+ out, err := w.client.GetFunction(ctx, params, func(o *Options) {
+ baseOpts := []func(*Options){
+ addIsWaiterUserAgent,
+ }
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ for _, opt := range baseOpts {
+ opt(o)
+ }
+ for _, opt := range options.ClientOptions {
+ opt(o)
+ }
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return nil, err
+ }
+ if !retryable {
+ return out, nil
+ }
+
+ remainingTime -= time.Since(start)
+ if remainingTime < options.MinDelay || remainingTime <= 0 {
+ break
+ }
+
+ // compute exponential backoff between waiter retries
+ delay, err := smithywaiter.ComputeDelay(
+ attempt, options.MinDelay, options.MaxDelay, remainingTime,
+ )
+ if err != nil {
+ return nil, fmt.Errorf("error computing waiter delay, %w", err)
+ }
+
+ remainingTime -= delay
+ // sleep for the delay amount before invoking a request
+ if err := smithytime.SleepWithContext(ctx, delay); err != nil {
+ return nil, fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return nil, fmt.Errorf("exceeded max wait time for FunctionActiveV2 waiter")
+}
+
+func functionActiveV2StateRetryable(ctx context.Context, input *GetFunctionInput, output *GetFunctionOutput, err error) (bool, error) {
+
+ if err == nil {
+ v1 := output.Configuration
+ var v2 types.State
+ if v1 != nil {
+ v3 := v1.State
+ v2 = v3
+ }
+ expectedValue := "Active"
+ var pathValue string
+ pathValue = string(v2)
+ if pathValue == expectedValue {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ v1 := output.Configuration
+ var v2 types.State
+ if v1 != nil {
+ v3 := v1.State
+ v2 = v3
+ }
+ expectedValue := "Failed"
+ var pathValue string
+ pathValue = string(v2)
+ if pathValue == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+
+ if err == nil {
+ v1 := output.Configuration
+ var v2 types.State
+ if v1 != nil {
+ v3 := v1.State
+ v2 = v3
+ }
+ expectedValue := "Pending"
+ var pathValue string
+ pathValue = string(v2)
+ if pathValue == expectedValue {
+ return true, nil
+ }
+ }
+
+ if err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+// FunctionExistsWaiterOptions are waiter options for FunctionExistsWaiter
+type FunctionExistsWaiterOptions struct {
+
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ //
+ // Passing options here is functionally equivalent to passing values to this
+ // config's ClientOptions field that extend the inner client's APIOptions directly.
+ APIOptions []func(*middleware.Stack) error
+
+ // Functional options to be passed to all operations invoked by this client.
+ //
+ // Function values that modify the inner APIOptions are applied after the waiter
+ // config's own APIOptions modifiers.
+ ClientOptions []func(*Options)
+
+ // MinDelay is the minimum amount of time to delay between retries. If unset,
+ // FunctionExistsWaiter will use default minimum delay of 1 seconds. Note that
+ // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
+ MinDelay time.Duration
+
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or
+ // set to zero, FunctionExistsWaiter will use default max delay of 120 seconds.
+ // Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
+ MaxDelay time.Duration
+
+ // LogWaitAttempts is used to enable logging for waiter retry attempts
+ LogWaitAttempts bool
+
+ // Retryable is function that can be used to override the service defined
+ // waiter-behavior based on operation output, or returned error. This function is
+ // used by the waiter to decide if a state is retryable or a terminal state.
+ //
+ // By default service-modeled logic will populate this option. This option can
+ // thus be used to define a custom waiter state with fall-back to service-modeled
+ // waiter state mutators.The function returns an error in case of a failure state.
+ // In case of retry state, this function returns a bool value of true and nil
+ // error, while in case of success it returns a bool value of false and nil error.
+ Retryable func(context.Context, *GetFunctionInput, *GetFunctionOutput, error) (bool, error)
+}
+
+// FunctionExistsWaiter defines the waiters for FunctionExists
+type FunctionExistsWaiter struct {
+ client GetFunctionAPIClient
+
+ options FunctionExistsWaiterOptions
+}
+
+// NewFunctionExistsWaiter constructs a FunctionExistsWaiter.
+func NewFunctionExistsWaiter(client GetFunctionAPIClient, optFns ...func(*FunctionExistsWaiterOptions)) *FunctionExistsWaiter {
+ options := FunctionExistsWaiterOptions{}
+ options.MinDelay = 1 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = functionExistsStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &FunctionExistsWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for FunctionExists waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *FunctionExistsWaiter) Wait(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionExistsWaiterOptions)) error {
+ _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
+ return err
+}
+
+// WaitForOutput calls the waiter function for FunctionExists waiter and returns
+// the output of the successful operation. The maxWaitDur is the maximum wait
+// duration the waiter will wait. The maxWaitDur is required and must be greater
+// than zero.
+func (w *FunctionExistsWaiter) WaitForOutput(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionExistsWaiterOptions)) (*GetFunctionOutput, error) {
+ if maxWaitDur <= 0 {
+ return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
+ }
+
+ options := w.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.MaxDelay <= 0 {
+ options.MaxDelay = 120 * time.Second
+ }
+
+ if options.MinDelay > options.MaxDelay {
+ return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
+ }
+
+ ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
+ defer cancelFn()
+
+ logger := smithywaiter.Logger{}
+ remainingTime := maxWaitDur
+
+ var attempt int64
+ for {
+
+ attempt++
+ apiOptions := options.APIOptions
+ start := time.Now()
+
+ if options.LogWaitAttempts {
+ logger.Attempt = attempt
+ apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
+ apiOptions = append(apiOptions, logger.AddLogger)
+ }
+
+ out, err := w.client.GetFunction(ctx, params, func(o *Options) {
+ baseOpts := []func(*Options){
+ addIsWaiterUserAgent,
+ }
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ for _, opt := range baseOpts {
+ opt(o)
+ }
+ for _, opt := range options.ClientOptions {
+ opt(o)
+ }
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return nil, err
+ }
+ if !retryable {
+ return out, nil
+ }
+
+ remainingTime -= time.Since(start)
+ if remainingTime < options.MinDelay || remainingTime <= 0 {
+ break
+ }
+
+ // compute exponential backoff between waiter retries
+ delay, err := smithywaiter.ComputeDelay(
+ attempt, options.MinDelay, options.MaxDelay, remainingTime,
+ )
+ if err != nil {
+ return nil, fmt.Errorf("error computing waiter delay, %w", err)
+ }
+
+ remainingTime -= delay
+ // sleep for the delay amount before invoking a request
+ if err := smithytime.SleepWithContext(ctx, delay); err != nil {
+ return nil, fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return nil, fmt.Errorf("exceeded max wait time for FunctionExists waiter")
+}
+
+func functionExistsStateRetryable(ctx context.Context, input *GetFunctionInput, output *GetFunctionOutput, err error) (bool, error) {
+
+ if err == nil {
+ return false, nil
+ }
+
+ if err != nil {
+ var errorType *types.ResourceNotFoundException
+ if errors.As(err, &errorType) {
+ return true, nil
+ }
+ }
+
+ if err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+// FunctionUpdatedV2WaiterOptions are waiter options for FunctionUpdatedV2Waiter
+type FunctionUpdatedV2WaiterOptions struct {
+
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ //
+ // Passing options here is functionally equivalent to passing values to this
+ // config's ClientOptions field that extend the inner client's APIOptions directly.
+ APIOptions []func(*middleware.Stack) error
+
+ // Functional options to be passed to all operations invoked by this client.
+ //
+ // Function values that modify the inner APIOptions are applied after the waiter
+ // config's own APIOptions modifiers.
+ ClientOptions []func(*Options)
+
+ // MinDelay is the minimum amount of time to delay between retries. If unset,
+ // FunctionUpdatedV2Waiter will use default minimum delay of 1 seconds. Note that
+ // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
+ MinDelay time.Duration
+
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or
+ // set to zero, FunctionUpdatedV2Waiter will use default max delay of 120 seconds.
+ // Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
+ MaxDelay time.Duration
+
+ // LogWaitAttempts is used to enable logging for waiter retry attempts
+ LogWaitAttempts bool
+
+ // Retryable is function that can be used to override the service defined
+ // waiter-behavior based on operation output, or returned error. This function is
+ // used by the waiter to decide if a state is retryable or a terminal state.
+ //
+ // By default service-modeled logic will populate this option. This option can
+ // thus be used to define a custom waiter state with fall-back to service-modeled
+ // waiter state mutators.The function returns an error in case of a failure state.
+ // In case of retry state, this function returns a bool value of true and nil
+ // error, while in case of success it returns a bool value of false and nil error.
+ Retryable func(context.Context, *GetFunctionInput, *GetFunctionOutput, error) (bool, error)
+}
+
+// FunctionUpdatedV2Waiter defines the waiters for FunctionUpdatedV2
+type FunctionUpdatedV2Waiter struct {
+ client GetFunctionAPIClient
+
+ options FunctionUpdatedV2WaiterOptions
+}
+
+// NewFunctionUpdatedV2Waiter constructs a FunctionUpdatedV2Waiter.
+func NewFunctionUpdatedV2Waiter(client GetFunctionAPIClient, optFns ...func(*FunctionUpdatedV2WaiterOptions)) *FunctionUpdatedV2Waiter {
+ options := FunctionUpdatedV2WaiterOptions{}
+ options.MinDelay = 1 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = functionUpdatedV2StateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &FunctionUpdatedV2Waiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for FunctionUpdatedV2 waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
+func (w *FunctionUpdatedV2Waiter) Wait(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionUpdatedV2WaiterOptions)) error {
+ _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
+ return err
+}
+
+// WaitForOutput calls the waiter function for FunctionUpdatedV2 waiter and
+// returns the output of the successful operation. The maxWaitDur is the maximum
+// wait duration the waiter will wait. The maxWaitDur is required and must be
+// greater than zero.
+func (w *FunctionUpdatedV2Waiter) WaitForOutput(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionUpdatedV2WaiterOptions)) (*GetFunctionOutput, error) {
+ if maxWaitDur <= 0 {
+ return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
+ }
+
+ options := w.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.MaxDelay <= 0 {
+ options.MaxDelay = 120 * time.Second
+ }
+
+ if options.MinDelay > options.MaxDelay {
+ return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
+ }
+
+ ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
+ defer cancelFn()
+
+ logger := smithywaiter.Logger{}
+ remainingTime := maxWaitDur
+
+ var attempt int64
+ for {
+
+ attempt++
+ apiOptions := options.APIOptions
+ start := time.Now()
+
+ if options.LogWaitAttempts {
+ logger.Attempt = attempt
+ apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
+ apiOptions = append(apiOptions, logger.AddLogger)
+ }
+
+ out, err := w.client.GetFunction(ctx, params, func(o *Options) {
+ baseOpts := []func(*Options){
+ addIsWaiterUserAgent,
+ }
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ for _, opt := range baseOpts {
+ opt(o)
+ }
+ for _, opt := range options.ClientOptions {
+ opt(o)
+ }
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return nil, err
+ }
+ if !retryable {
+ return out, nil
+ }
+
+ remainingTime -= time.Since(start)
+ if remainingTime < options.MinDelay || remainingTime <= 0 {
+ break
+ }
+
+ // compute exponential backoff between waiter retries
+ delay, err := smithywaiter.ComputeDelay(
+ attempt, options.MinDelay, options.MaxDelay, remainingTime,
+ )
+ if err != nil {
+ return nil, fmt.Errorf("error computing waiter delay, %w", err)
+ }
+
+ remainingTime -= delay
+ // sleep for the delay amount before invoking a request
+ if err := smithytime.SleepWithContext(ctx, delay); err != nil {
+ return nil, fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return nil, fmt.Errorf("exceeded max wait time for FunctionUpdatedV2 waiter")
+}
+
+func functionUpdatedV2StateRetryable(ctx context.Context, input *GetFunctionInput, output *GetFunctionOutput, err error) (bool, error) {
+
+ if err == nil {
+ v1 := output.Configuration
+ var v2 types.LastUpdateStatus
+ if v1 != nil {
+ v3 := v1.LastUpdateStatus
+ v2 = v3
+ }
+ expectedValue := "Successful"
+ var pathValue string
+ pathValue = string(v2)
+ if pathValue == expectedValue {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ v1 := output.Configuration
+ var v2 types.LastUpdateStatus
+ if v1 != nil {
+ v3 := v1.LastUpdateStatus
+ v2 = v3
+ }
+ expectedValue := "Failed"
+ var pathValue string
+ pathValue = string(v2)
+ if pathValue == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+
+ if err == nil {
+ v1 := output.Configuration
+ var v2 types.LastUpdateStatus
+ if v1 != nil {
+ v3 := v1.LastUpdateStatus
+ v2 = v3
+ }
+ expectedValue := "InProgress"
+ var pathValue string
+ pathValue = string(v2)
+ if pathValue == expectedValue {
+ return true, nil
+ }
+ }
+
+ if err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+// GetFunctionAPIClient is a client that implements the GetFunction operation.
+type GetFunctionAPIClient interface {
+ GetFunction(context.Context, *GetFunctionInput, ...func(*Options)) (*GetFunctionOutput, error)
+}
+
+var _ GetFunctionAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opGetFunction(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetFunction",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionCodeSigningConfig.go
new file mode 100644
index 00000000..f9024f50
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionCodeSigningConfig.go
@@ -0,0 +1,188 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the code signing configuration for the specified function.
+func (c *Client) GetFunctionCodeSigningConfig(ctx context.Context, params *GetFunctionCodeSigningConfigInput, optFns ...func(*Options)) (*GetFunctionCodeSigningConfigOutput, error) {
+ if params == nil {
+ params = &GetFunctionCodeSigningConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetFunctionCodeSigningConfig", params, optFns, c.addOperationGetFunctionCodeSigningConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetFunctionCodeSigningConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetFunctionCodeSigningConfigInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ noSmithyDocumentSerde
+}
+
+type GetFunctionCodeSigningConfigOutput struct {
+
+ // The The Amazon Resource Name (ARN) of the code signing configuration.
+ //
+ // This member is required.
+ CodeSigningConfigArn *string
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetFunctionCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionCodeSigningConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetFunctionCodeSigningConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionCodeSigningConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetFunctionCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetFunctionCodeSigningConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConcurrency.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConcurrency.go
new file mode 100644
index 00000000..307ed61d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConcurrency.go
@@ -0,0 +1,171 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns details about the reserved concurrency configuration for a function. To
+// set a concurrency limit for a function, use PutFunctionConcurrency.
+func (c *Client) GetFunctionConcurrency(ctx context.Context, params *GetFunctionConcurrencyInput, optFns ...func(*Options)) (*GetFunctionConcurrencyOutput, error) {
+ if params == nil {
+ params = &GetFunctionConcurrencyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetFunctionConcurrency", params, optFns, c.addOperationGetFunctionConcurrencyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetFunctionConcurrencyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetFunctionConcurrencyInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ noSmithyDocumentSerde
+}
+
+type GetFunctionConcurrencyOutput struct {
+
+ // The number of simultaneous executions that are reserved for the function.
+ ReservedConcurrentExecutions *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetFunctionConcurrencyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionConcurrency{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionConcurrency{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionConcurrency"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetFunctionConcurrencyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionConcurrency(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetFunctionConcurrency(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetFunctionConcurrency",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConfiguration.go
new file mode 100644
index 00000000..40785e59
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConfiguration.go
@@ -0,0 +1,941 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithytime "github.com/aws/smithy-go/time"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ smithywaiter "github.com/aws/smithy-go/waiter"
+ "time"
+)
+
+// Returns the version-specific settings of a Lambda function or version. The
+// output includes only options that can vary between versions of a function. To
+// modify these settings, use UpdateFunctionConfiguration.
+//
+// To get all of a function's details, including function-level settings, use GetFunction.
+func (c *Client) GetFunctionConfiguration(ctx context.Context, params *GetFunctionConfigurationInput, optFns ...func(*Options)) (*GetFunctionConfigurationOutput, error) {
+ if params == nil {
+ params = &GetFunctionConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetFunctionConfiguration", params, optFns, c.addOperationGetFunctionConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetFunctionConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetFunctionConfigurationInput struct {
+
+ // The name or ARN of the Lambda function, version, or alias.
+ //
+ // Name formats
+ //
+ // - Function name – my-function (name-only), my-function:v1 (with alias).
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // You can append a version number or alias to any of the formats. The length
+ // constraint applies only to the full ARN. If you specify only the function name,
+ // it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specify a version or alias to get details about a published version of the
+ // function.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+// Details about a function's configuration.
+type GetFunctionConfigurationOutput struct {
+
+ // The instruction set architecture that the function supports. Architecture is a
+ // string array with one of the valid values. The default architecture value is
+ // x86_64 .
+ Architectures []types.Architecture
+
+ // The SHA256 hash of the function's deployment package.
+ CodeSha256 *string
+
+ // The size of the function's deployment package, in bytes.
+ CodeSize int64
+
+ // The function's dead letter queue.
+ DeadLetterConfig *types.DeadLetterConfig
+
+ // The function's description.
+ Description *string
+
+ // The function's [environment variables]. Omitted from CloudTrail logs.
+ //
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
+ Environment *types.EnvironmentResponse
+
+ // The size of the function's /tmp directory in MB. The default value is 512, but
+ // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)].
+ //
+ // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
+ EphemeralStorage *types.EphemeralStorage
+
+ // Connection settings for an [Amazon EFS file system].
+ //
+ // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html
+ FileSystemConfigs []types.FileSystemConfig
+
+ // The function's Amazon Resource Name (ARN).
+ FunctionArn *string
+
+ // The name of the function.
+ FunctionName *string
+
+ // The function that Lambda calls to begin running your function.
+ Handler *string
+
+ // The function's image configuration values.
+ ImageConfigResponse *types.ImageConfigResponse
+
+ // The ARN of the Key Management Service (KMS) customer managed key that's used to
+ // encrypt the following resources:
+ //
+ // - The function's [environment variables].
+ //
+ // - The function's [Lambda SnapStart]snapshots.
+ //
+ // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment
+ // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda].
+ //
+ // - The optimized version of the container image that's used for function
+ // invocations. Note that this is not the same key that's used to protect your
+ // container image in the Amazon Elastic Container Registry (Amazon ECR). For more
+ // information, see [Function lifecycle].
+ //
+ // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key].
+ //
+ // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+ // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption
+ // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption
+ // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle
+ // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+ KMSKeyArn *string
+
+ // The date and time that the function was last updated, in [ISO-8601 format]
+ // (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ LastModified *string
+
+ // The status of the last update that was performed on the function. This is first
+ // set to Successful after function creation completes.
+ LastUpdateStatus types.LastUpdateStatus
+
+ // The reason for the last update that was performed on the function.
+ LastUpdateStatusReason *string
+
+ // The reason code for the last update that was performed on the function.
+ LastUpdateStatusReasonCode types.LastUpdateStatusReasonCode
+
+ // The function's [layers].
+ //
+ // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+ Layers []types.Layer
+
+ // The function's Amazon CloudWatch Logs configuration settings.
+ LoggingConfig *types.LoggingConfig
+
+ // For Lambda@Edge functions, the ARN of the main function.
+ MasterArn *string
+
+ // The amount of memory available to the function at runtime.
+ MemorySize *int32
+
+ // The type of deployment package. Set to Image for container image and set Zip
+ // for .zip file archive.
+ PackageType types.PackageType
+
+ // The latest updated revision of the function or alias.
+ RevisionId *string
+
+ // The function's execution role.
+ Role *string
+
+ // The identifier of the function's [runtime]. Runtime is required if the deployment
+ // package is a .zip file archive. Specifying a runtime results in an error if
+ // you're deploying a function using a container image.
+ //
+ // The following list includes deprecated runtimes. Lambda blocks creating new
+ // functions and updating existing functions shortly after each runtime is
+ // deprecated. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ Runtime types.Runtime
+
+ // The ARN of the runtime and any errors that occured.
+ RuntimeVersionConfig *types.RuntimeVersionConfig
+
+ // The ARN of the signing job.
+ SigningJobArn *string
+
+ // The ARN of the signing profile version.
+ SigningProfileVersionArn *string
+
+ // Set ApplyOn to PublishedVersions to create a snapshot of the initialized
+ // execution environment when you publish a function version. For more information,
+ // see [Improving startup performance with Lambda SnapStart].
+ //
+ // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
+ SnapStart *types.SnapStartResponse
+
+ // The current state of the function. When the state is Inactive , you can
+ // reactivate the function by invoking it.
+ State types.State
+
+ // The reason for the function's current state.
+ StateReason *string
+
+ // The reason code for the function's current state. When the code is Creating ,
+ // you can't invoke or modify the function.
+ StateReasonCode types.StateReasonCode
+
+ // The amount of time in seconds that Lambda allows a function to run before
+ // stopping it.
+ Timeout *int32
+
+ // The function's X-Ray tracing configuration.
+ TracingConfig *types.TracingConfigResponse
+
+ // The version of the Lambda function.
+ Version *string
+
+ // The function's networking configuration.
+ VpcConfig *types.VpcConfigResponse
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetFunctionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetFunctionConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// FunctionActiveWaiterOptions are waiter options for FunctionActiveWaiter
+type FunctionActiveWaiterOptions struct {
+
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ //
+ // Passing options here is functionally equivalent to passing values to this
+ // config's ClientOptions field that extend the inner client's APIOptions directly.
+ APIOptions []func(*middleware.Stack) error
+
+ // Functional options to be passed to all operations invoked by this client.
+ //
+ // Function values that modify the inner APIOptions are applied after the waiter
+ // config's own APIOptions modifiers.
+ ClientOptions []func(*Options)
+
+ // MinDelay is the minimum amount of time to delay between retries. If unset,
+ // FunctionActiveWaiter will use default minimum delay of 5 seconds. Note that
+ // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
+ MinDelay time.Duration
+
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or
+ // set to zero, FunctionActiveWaiter will use default max delay of 120 seconds.
+ // Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
+ MaxDelay time.Duration
+
+ // LogWaitAttempts is used to enable logging for waiter retry attempts
+ LogWaitAttempts bool
+
+ // Retryable is function that can be used to override the service defined
+ // waiter-behavior based on operation output, or returned error. This function is
+ // used by the waiter to decide if a state is retryable or a terminal state.
+ //
+ // By default service-modeled logic will populate this option. This option can
+ // thus be used to define a custom waiter state with fall-back to service-modeled
+ // waiter state mutators.The function returns an error in case of a failure state.
+ // In case of retry state, this function returns a bool value of true and nil
+ // error, while in case of success it returns a bool value of false and nil error.
+ Retryable func(context.Context, *GetFunctionConfigurationInput, *GetFunctionConfigurationOutput, error) (bool, error)
+}
+
+// FunctionActiveWaiter defines the waiters for FunctionActive
+type FunctionActiveWaiter struct {
+ client GetFunctionConfigurationAPIClient
+
+ options FunctionActiveWaiterOptions
+}
+
+// NewFunctionActiveWaiter constructs a FunctionActiveWaiter.
+func NewFunctionActiveWaiter(client GetFunctionConfigurationAPIClient, optFns ...func(*FunctionActiveWaiterOptions)) *FunctionActiveWaiter {
+ options := FunctionActiveWaiterOptions{}
+ options.MinDelay = 5 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = functionActiveStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &FunctionActiveWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for FunctionActive waiter. The maxWaitDur is the
+// maximum wait duration the waiter will wait. The maxWaitDur is required and must
+// be greater than zero.
+func (w *FunctionActiveWaiter) Wait(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*FunctionActiveWaiterOptions)) error {
+ _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
+ return err
+}
+
+// WaitForOutput calls the waiter function for FunctionActive waiter and returns
+// the output of the successful operation. The maxWaitDur is the maximum wait
+// duration the waiter will wait. The maxWaitDur is required and must be greater
+// than zero.
+func (w *FunctionActiveWaiter) WaitForOutput(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*FunctionActiveWaiterOptions)) (*GetFunctionConfigurationOutput, error) {
+ if maxWaitDur <= 0 {
+ return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
+ }
+
+ options := w.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.MaxDelay <= 0 {
+ options.MaxDelay = 120 * time.Second
+ }
+
+ if options.MinDelay > options.MaxDelay {
+ return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
+ }
+
+ ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
+ defer cancelFn()
+
+ logger := smithywaiter.Logger{}
+ remainingTime := maxWaitDur
+
+ var attempt int64
+ for {
+
+ attempt++
+ apiOptions := options.APIOptions
+ start := time.Now()
+
+ if options.LogWaitAttempts {
+ logger.Attempt = attempt
+ apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
+ apiOptions = append(apiOptions, logger.AddLogger)
+ }
+
+ out, err := w.client.GetFunctionConfiguration(ctx, params, func(o *Options) {
+ baseOpts := []func(*Options){
+ addIsWaiterUserAgent,
+ }
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ for _, opt := range baseOpts {
+ opt(o)
+ }
+ for _, opt := range options.ClientOptions {
+ opt(o)
+ }
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return nil, err
+ }
+ if !retryable {
+ return out, nil
+ }
+
+ remainingTime -= time.Since(start)
+ if remainingTime < options.MinDelay || remainingTime <= 0 {
+ break
+ }
+
+ // compute exponential backoff between waiter retries
+ delay, err := smithywaiter.ComputeDelay(
+ attempt, options.MinDelay, options.MaxDelay, remainingTime,
+ )
+ if err != nil {
+ return nil, fmt.Errorf("error computing waiter delay, %w", err)
+ }
+
+ remainingTime -= delay
+ // sleep for the delay amount before invoking a request
+ if err := smithytime.SleepWithContext(ctx, delay); err != nil {
+ return nil, fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return nil, fmt.Errorf("exceeded max wait time for FunctionActive waiter")
+}
+
+func functionActiveStateRetryable(ctx context.Context, input *GetFunctionConfigurationInput, output *GetFunctionConfigurationOutput, err error) (bool, error) {
+
+ if err == nil {
+ v1 := output.State
+ expectedValue := "Active"
+ var pathValue string
+ pathValue = string(v1)
+ if pathValue == expectedValue {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ v1 := output.State
+ expectedValue := "Failed"
+ var pathValue string
+ pathValue = string(v1)
+ if pathValue == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+
+ if err == nil {
+ v1 := output.State
+ expectedValue := "Pending"
+ var pathValue string
+ pathValue = string(v1)
+ if pathValue == expectedValue {
+ return true, nil
+ }
+ }
+
+ if err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+// FunctionUpdatedWaiterOptions are waiter options for FunctionUpdatedWaiter
+type FunctionUpdatedWaiterOptions struct {
+
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ //
+ // Passing options here is functionally equivalent to passing values to this
+ // config's ClientOptions field that extend the inner client's APIOptions directly.
+ APIOptions []func(*middleware.Stack) error
+
+ // Functional options to be passed to all operations invoked by this client.
+ //
+ // Function values that modify the inner APIOptions are applied after the waiter
+ // config's own APIOptions modifiers.
+ ClientOptions []func(*Options)
+
+ // MinDelay is the minimum amount of time to delay between retries. If unset,
+ // FunctionUpdatedWaiter will use default minimum delay of 5 seconds. Note that
+ // MinDelay must resolve to a value lesser than or equal to the MaxDelay.
+ MinDelay time.Duration
+
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or
+ // set to zero, FunctionUpdatedWaiter will use default max delay of 120 seconds.
+ // Note that MaxDelay must resolve to value greater than or equal to the MinDelay.
+ MaxDelay time.Duration
+
+ // LogWaitAttempts is used to enable logging for waiter retry attempts
+ LogWaitAttempts bool
+
+ // Retryable is function that can be used to override the service defined
+ // waiter-behavior based on operation output, or returned error. This function is
+ // used by the waiter to decide if a state is retryable or a terminal state.
+ //
+ // By default service-modeled logic will populate this option. This option can
+ // thus be used to define a custom waiter state with fall-back to service-modeled
+ // waiter state mutators.The function returns an error in case of a failure state.
+ // In case of retry state, this function returns a bool value of true and nil
+ // error, while in case of success it returns a bool value of false and nil error.
+ Retryable func(context.Context, *GetFunctionConfigurationInput, *GetFunctionConfigurationOutput, error) (bool, error)
+}
+
+// FunctionUpdatedWaiter defines the waiters for FunctionUpdated
+type FunctionUpdatedWaiter struct {
+ client GetFunctionConfigurationAPIClient
+
+ options FunctionUpdatedWaiterOptions
+}
+
+// NewFunctionUpdatedWaiter constructs a FunctionUpdatedWaiter.
+func NewFunctionUpdatedWaiter(client GetFunctionConfigurationAPIClient, optFns ...func(*FunctionUpdatedWaiterOptions)) *FunctionUpdatedWaiter {
+ options := FunctionUpdatedWaiterOptions{}
+ options.MinDelay = 5 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = functionUpdatedStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &FunctionUpdatedWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for FunctionUpdated waiter. The maxWaitDur is
+// the maximum wait duration the waiter will wait. The maxWaitDur is required and
+// must be greater than zero.
+func (w *FunctionUpdatedWaiter) Wait(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*FunctionUpdatedWaiterOptions)) error {
+ _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
+ return err
+}
+
+// WaitForOutput calls the waiter function for FunctionUpdated waiter and returns
+// the output of the successful operation. The maxWaitDur is the maximum wait
+// duration the waiter will wait. The maxWaitDur is required and must be greater
+// than zero.
+func (w *FunctionUpdatedWaiter) WaitForOutput(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*FunctionUpdatedWaiterOptions)) (*GetFunctionConfigurationOutput, error) {
+ if maxWaitDur <= 0 {
+ return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
+ }
+
+ options := w.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.MaxDelay <= 0 {
+ options.MaxDelay = 120 * time.Second
+ }
+
+ if options.MinDelay > options.MaxDelay {
+ return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
+ }
+
+ ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
+ defer cancelFn()
+
+ logger := smithywaiter.Logger{}
+ remainingTime := maxWaitDur
+
+ var attempt int64
+ for {
+
+ attempt++
+ apiOptions := options.APIOptions
+ start := time.Now()
+
+ if options.LogWaitAttempts {
+ logger.Attempt = attempt
+ apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
+ apiOptions = append(apiOptions, logger.AddLogger)
+ }
+
+ out, err := w.client.GetFunctionConfiguration(ctx, params, func(o *Options) {
+ baseOpts := []func(*Options){
+ addIsWaiterUserAgent,
+ }
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ for _, opt := range baseOpts {
+ opt(o)
+ }
+ for _, opt := range options.ClientOptions {
+ opt(o)
+ }
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return nil, err
+ }
+ if !retryable {
+ return out, nil
+ }
+
+ remainingTime -= time.Since(start)
+ if remainingTime < options.MinDelay || remainingTime <= 0 {
+ break
+ }
+
+ // compute exponential backoff between waiter retries
+ delay, err := smithywaiter.ComputeDelay(
+ attempt, options.MinDelay, options.MaxDelay, remainingTime,
+ )
+ if err != nil {
+ return nil, fmt.Errorf("error computing waiter delay, %w", err)
+ }
+
+ remainingTime -= delay
+ // sleep for the delay amount before invoking a request
+ if err := smithytime.SleepWithContext(ctx, delay); err != nil {
+ return nil, fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return nil, fmt.Errorf("exceeded max wait time for FunctionUpdated waiter")
+}
+
+func functionUpdatedStateRetryable(ctx context.Context, input *GetFunctionConfigurationInput, output *GetFunctionConfigurationOutput, err error) (bool, error) {
+
+ if err == nil {
+ v1 := output.LastUpdateStatus
+ expectedValue := "Successful"
+ var pathValue string
+ pathValue = string(v1)
+ if pathValue == expectedValue {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ v1 := output.LastUpdateStatus
+ expectedValue := "Failed"
+ var pathValue string
+ pathValue = string(v1)
+ if pathValue == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+
+ if err == nil {
+ v1 := output.LastUpdateStatus
+ expectedValue := "InProgress"
+ var pathValue string
+ pathValue = string(v1)
+ if pathValue == expectedValue {
+ return true, nil
+ }
+ }
+
+ if err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+// PublishedVersionActiveWaiterOptions are waiter options for
+// PublishedVersionActiveWaiter
+type PublishedVersionActiveWaiterOptions struct {
+
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ //
+ // Passing options here is functionally equivalent to passing values to this
+ // config's ClientOptions field that extend the inner client's APIOptions directly.
+ APIOptions []func(*middleware.Stack) error
+
+ // Functional options to be passed to all operations invoked by this client.
+ //
+ // Function values that modify the inner APIOptions are applied after the waiter
+ // config's own APIOptions modifiers.
+ ClientOptions []func(*Options)
+
+ // MinDelay is the minimum amount of time to delay between retries. If unset,
+ // PublishedVersionActiveWaiter will use default minimum delay of 5 seconds. Note
+ // that MinDelay must resolve to a value lesser than or equal to the MaxDelay.
+ MinDelay time.Duration
+
+ // MaxDelay is the maximum amount of time to delay between retries. If unset or
+ // set to zero, PublishedVersionActiveWaiter will use default max delay of 120
+ // seconds. Note that MaxDelay must resolve to value greater than or equal to the
+ // MinDelay.
+ MaxDelay time.Duration
+
+ // LogWaitAttempts is used to enable logging for waiter retry attempts
+ LogWaitAttempts bool
+
+ // Retryable is function that can be used to override the service defined
+ // waiter-behavior based on operation output, or returned error. This function is
+ // used by the waiter to decide if a state is retryable or a terminal state.
+ //
+ // By default service-modeled logic will populate this option. This option can
+ // thus be used to define a custom waiter state with fall-back to service-modeled
+ // waiter state mutators.The function returns an error in case of a failure state.
+ // In case of retry state, this function returns a bool value of true and nil
+ // error, while in case of success it returns a bool value of false and nil error.
+ Retryable func(context.Context, *GetFunctionConfigurationInput, *GetFunctionConfigurationOutput, error) (bool, error)
+}
+
+// PublishedVersionActiveWaiter defines the waiters for PublishedVersionActive
+type PublishedVersionActiveWaiter struct {
+ client GetFunctionConfigurationAPIClient
+
+ options PublishedVersionActiveWaiterOptions
+}
+
+// NewPublishedVersionActiveWaiter constructs a PublishedVersionActiveWaiter.
+func NewPublishedVersionActiveWaiter(client GetFunctionConfigurationAPIClient, optFns ...func(*PublishedVersionActiveWaiterOptions)) *PublishedVersionActiveWaiter {
+ options := PublishedVersionActiveWaiterOptions{}
+ options.MinDelay = 5 * time.Second
+ options.MaxDelay = 120 * time.Second
+ options.Retryable = publishedVersionActiveStateRetryable
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+ return &PublishedVersionActiveWaiter{
+ client: client,
+ options: options,
+ }
+}
+
+// Wait calls the waiter function for PublishedVersionActive waiter. The
+// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is
+// required and must be greater than zero.
+func (w *PublishedVersionActiveWaiter) Wait(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*PublishedVersionActiveWaiterOptions)) error {
+ _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...)
+ return err
+}
+
+// WaitForOutput calls the waiter function for PublishedVersionActive waiter and
+// returns the output of the successful operation. The maxWaitDur is the maximum
+// wait duration the waiter will wait. The maxWaitDur is required and must be
+// greater than zero.
+func (w *PublishedVersionActiveWaiter) WaitForOutput(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*PublishedVersionActiveWaiterOptions)) (*GetFunctionConfigurationOutput, error) {
+ if maxWaitDur <= 0 {
+ return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero")
+ }
+
+ options := w.options
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ if options.MaxDelay <= 0 {
+ options.MaxDelay = 120 * time.Second
+ }
+
+ if options.MinDelay > options.MaxDelay {
+ return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay)
+ }
+
+ ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur)
+ defer cancelFn()
+
+ logger := smithywaiter.Logger{}
+ remainingTime := maxWaitDur
+
+ var attempt int64
+ for {
+
+ attempt++
+ apiOptions := options.APIOptions
+ start := time.Now()
+
+ if options.LogWaitAttempts {
+ logger.Attempt = attempt
+ apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...)
+ apiOptions = append(apiOptions, logger.AddLogger)
+ }
+
+ out, err := w.client.GetFunctionConfiguration(ctx, params, func(o *Options) {
+ baseOpts := []func(*Options){
+ addIsWaiterUserAgent,
+ }
+ o.APIOptions = append(o.APIOptions, apiOptions...)
+ for _, opt := range baseOpts {
+ opt(o)
+ }
+ for _, opt := range options.ClientOptions {
+ opt(o)
+ }
+ })
+
+ retryable, err := options.Retryable(ctx, params, out, err)
+ if err != nil {
+ return nil, err
+ }
+ if !retryable {
+ return out, nil
+ }
+
+ remainingTime -= time.Since(start)
+ if remainingTime < options.MinDelay || remainingTime <= 0 {
+ break
+ }
+
+ // compute exponential backoff between waiter retries
+ delay, err := smithywaiter.ComputeDelay(
+ attempt, options.MinDelay, options.MaxDelay, remainingTime,
+ )
+ if err != nil {
+ return nil, fmt.Errorf("error computing waiter delay, %w", err)
+ }
+
+ remainingTime -= delay
+ // sleep for the delay amount before invoking a request
+ if err := smithytime.SleepWithContext(ctx, delay); err != nil {
+ return nil, fmt.Errorf("request cancelled while waiting, %w", err)
+ }
+ }
+ return nil, fmt.Errorf("exceeded max wait time for PublishedVersionActive waiter")
+}
+
+func publishedVersionActiveStateRetryable(ctx context.Context, input *GetFunctionConfigurationInput, output *GetFunctionConfigurationOutput, err error) (bool, error) {
+
+ if err == nil {
+ v1 := output.State
+ expectedValue := "Active"
+ var pathValue string
+ pathValue = string(v1)
+ if pathValue == expectedValue {
+ return false, nil
+ }
+ }
+
+ if err == nil {
+ v1 := output.State
+ expectedValue := "Failed"
+ var pathValue string
+ pathValue = string(v1)
+ if pathValue == expectedValue {
+ return false, fmt.Errorf("waiter state transitioned to Failure")
+ }
+ }
+
+ if err == nil {
+ v1 := output.State
+ expectedValue := "Pending"
+ var pathValue string
+ pathValue = string(v1)
+ if pathValue == expectedValue {
+ return true, nil
+ }
+ }
+
+ if err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+// GetFunctionConfigurationAPIClient is a client that implements the
+// GetFunctionConfiguration operation.
+type GetFunctionConfigurationAPIClient interface {
+ GetFunctionConfiguration(context.Context, *GetFunctionConfigurationInput, ...func(*Options)) (*GetFunctionConfigurationOutput, error)
+}
+
+var _ GetFunctionConfigurationAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opGetFunctionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetFunctionConfiguration",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionEventInvokeConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionEventInvokeConfig.go
new file mode 100644
index 00000000..c41d92ac
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionEventInvokeConfig.go
@@ -0,0 +1,206 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Retrieves the configuration for asynchronous invocation for a function,
+// version, or alias.
+//
+// To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.
+func (c *Client) GetFunctionEventInvokeConfig(ctx context.Context, params *GetFunctionEventInvokeConfigInput, optFns ...func(*Options)) (*GetFunctionEventInvokeConfigOutput, error) {
+ if params == nil {
+ params = &GetFunctionEventInvokeConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetFunctionEventInvokeConfig", params, optFns, c.addOperationGetFunctionEventInvokeConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetFunctionEventInvokeConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetFunctionEventInvokeConfigInput struct {
+
+ // The name or ARN of the Lambda function, version, or alias.
+ //
+ // Name formats
+ //
+ // - Function name - my-function (name-only), my-function:v1 (with alias).
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN - 123456789012:function:my-function .
+ //
+ // You can append a version number or alias to any of the formats. The length
+ // constraint applies only to the full ARN. If you specify only the function name,
+ // it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // A version number or alias name.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type GetFunctionEventInvokeConfigOutput struct {
+
+ // A destination for events after they have been sent to a function for processing.
+ //
+ // Destinations
+ //
+ // - Function - The Amazon Resource Name (ARN) of a Lambda function.
+ //
+ // - Queue - The ARN of a standard SQS queue.
+ //
+ // - Bucket - The ARN of an Amazon S3 bucket.
+ //
+ // - Topic - The ARN of a standard SNS topic.
+ //
+ // - Event Bus - The ARN of an Amazon EventBridge event bus.
+ //
+ // S3 buckets are supported only for on-failure destinations. To retain records of
+ // successful invocations, use another destination type.
+ DestinationConfig *types.DestinationConfig
+
+ // The Amazon Resource Name (ARN) of the function.
+ FunctionArn *string
+
+ // The date and time that the configuration was last updated.
+ LastModified *time.Time
+
+ // The maximum age of a request that Lambda sends to a function for processing.
+ MaximumEventAgeInSeconds *int32
+
+ // The maximum number of times to retry when the function returns an error.
+ MaximumRetryAttempts *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetFunctionEventInvokeConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionEventInvokeConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionEventInvokeConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionEventInvokeConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetFunctionEventInvokeConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionEventInvokeConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetFunctionEventInvokeConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetFunctionEventInvokeConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionRecursionConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionRecursionConfig.go
new file mode 100644
index 00000000..c46f0aea
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionRecursionConfig.go
@@ -0,0 +1,171 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns your function's [recursive loop detection] configuration.
+//
+// [recursive loop detection]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-recursion.html
+func (c *Client) GetFunctionRecursionConfig(ctx context.Context, params *GetFunctionRecursionConfigInput, optFns ...func(*Options)) (*GetFunctionRecursionConfigOutput, error) {
+ if params == nil {
+ params = &GetFunctionRecursionConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetFunctionRecursionConfig", params, optFns, c.addOperationGetFunctionRecursionConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetFunctionRecursionConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetFunctionRecursionConfigInput struct {
+
+ //
+ //
+ // This member is required.
+ FunctionName *string
+
+ noSmithyDocumentSerde
+}
+
+type GetFunctionRecursionConfigOutput struct {
+
+ // If your function's recursive loop detection configuration is Allow , Lambda
+ // doesn't take any action when it detects your function being invoked as part of a
+ // recursive loop.
+ //
+ // If your function's recursive loop detection configuration is Terminate , Lambda
+ // stops your function being invoked and notifies you when it detects your function
+ // being invoked as part of a recursive loop.
+ //
+ // By default, Lambda sets your function's configuration to Terminate . You can
+ // update this configuration using the PutFunctionRecursionConfigaction.
+ RecursiveLoop types.RecursiveLoop
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetFunctionRecursionConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionRecursionConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionRecursionConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionRecursionConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetFunctionRecursionConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionRecursionConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetFunctionRecursionConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetFunctionRecursionConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionUrlConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionUrlConfig.go
new file mode 100644
index 00000000..9772ade0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionUrlConfig.go
@@ -0,0 +1,224 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns details about a Lambda function URL.
+func (c *Client) GetFunctionUrlConfig(ctx context.Context, params *GetFunctionUrlConfigInput, optFns ...func(*Options)) (*GetFunctionUrlConfigOutput, error) {
+ if params == nil {
+ params = &GetFunctionUrlConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetFunctionUrlConfig", params, optFns, c.addOperationGetFunctionUrlConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetFunctionUrlConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetFunctionUrlConfigInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The alias name.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type GetFunctionUrlConfigOutput struct {
+
+ // The type of authentication that your function URL uses. Set to AWS_IAM if you
+ // want to restrict access to authenticated users only. Set to NONE if you want to
+ // bypass IAM authentication to create a public endpoint. For more information, see
+ // [Security and auth model for Lambda function URLs].
+ //
+ // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html
+ //
+ // This member is required.
+ AuthType types.FunctionUrlAuthType
+
+ // When the function URL was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ //
+ // This member is required.
+ CreationTime *string
+
+ // The Amazon Resource Name (ARN) of your function.
+ //
+ // This member is required.
+ FunctionArn *string
+
+ // The HTTP URL endpoint for your function.
+ //
+ // This member is required.
+ FunctionUrl *string
+
+ // When the function URL configuration was last updated, in [ISO-8601 format]
+ // (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ //
+ // This member is required.
+ LastModifiedTime *string
+
+ // The [cross-origin resource sharing (CORS)] settings for your function URL.
+ //
+ // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
+ Cors *types.Cors
+
+ // Use one of the following options:
+ //
+ // - BUFFERED – This is the default option. Lambda invokes your function using
+ // the Invoke API operation. Invocation results are available when the payload is
+ // complete. The maximum payload size is 6 MB.
+ //
+ // - RESPONSE_STREAM – Your function streams payload results as they become
+ // available. Lambda invokes your function using the InvokeWithResponseStream API
+ // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase].
+ //
+ // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html
+ InvokeMode types.InvokeMode
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionUrlConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionUrlConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionUrlConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetFunctionUrlConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionUrlConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetFunctionUrlConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersion.go
new file mode 100644
index 00000000..7bf59fbe
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersion.go
@@ -0,0 +1,203 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns information about a version of an [Lambda layer], with a link to download the layer
+// archive that's valid for 10 minutes.
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+func (c *Client) GetLayerVersion(ctx context.Context, params *GetLayerVersionInput, optFns ...func(*Options)) (*GetLayerVersionOutput, error) {
+ if params == nil {
+ params = &GetLayerVersionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetLayerVersion", params, optFns, c.addOperationGetLayerVersionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetLayerVersionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetLayerVersionInput struct {
+
+ // The name or Amazon Resource Name (ARN) of the layer.
+ //
+ // This member is required.
+ LayerName *string
+
+ // The version number.
+ //
+ // This member is required.
+ VersionNumber *int64
+
+ noSmithyDocumentSerde
+}
+
+type GetLayerVersionOutput struct {
+
+ // A list of compatible [instruction set architectures].
+ //
+ // [instruction set architectures]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html
+ CompatibleArchitectures []types.Architecture
+
+ // The layer's compatible runtimes.
+ //
+ // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ CompatibleRuntimes []types.Runtime
+
+ // Details about the layer version.
+ Content *types.LayerVersionContentOutput
+
+ // The date that the layer version was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ CreatedDate *string
+
+ // The description of the version.
+ Description *string
+
+ // The ARN of the layer.
+ LayerArn *string
+
+ // The ARN of the layer version.
+ LayerVersionArn *string
+
+ // The layer's software license.
+ LicenseInfo *string
+
+ // The version number.
+ Version int64
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetLayerVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLayerVersion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLayerVersion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetLayerVersion"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetLayerVersionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLayerVersion(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetLayerVersion(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetLayerVersion",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionByArn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionByArn.go
new file mode 100644
index 00000000..4f51e388
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionByArn.go
@@ -0,0 +1,198 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns information about a version of an [Lambda layer], with a link to download the layer
+// archive that's valid for 10 minutes.
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+func (c *Client) GetLayerVersionByArn(ctx context.Context, params *GetLayerVersionByArnInput, optFns ...func(*Options)) (*GetLayerVersionByArnOutput, error) {
+ if params == nil {
+ params = &GetLayerVersionByArnInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetLayerVersionByArn", params, optFns, c.addOperationGetLayerVersionByArnMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetLayerVersionByArnOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetLayerVersionByArnInput struct {
+
+ // The ARN of the layer version.
+ //
+ // This member is required.
+ Arn *string
+
+ noSmithyDocumentSerde
+}
+
+type GetLayerVersionByArnOutput struct {
+
+ // A list of compatible [instruction set architectures].
+ //
+ // [instruction set architectures]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html
+ CompatibleArchitectures []types.Architecture
+
+ // The layer's compatible runtimes.
+ //
+ // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ CompatibleRuntimes []types.Runtime
+
+ // Details about the layer version.
+ Content *types.LayerVersionContentOutput
+
+ // The date that the layer version was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ CreatedDate *string
+
+ // The description of the version.
+ Description *string
+
+ // The ARN of the layer.
+ LayerArn *string
+
+ // The ARN of the layer version.
+ LayerVersionArn *string
+
+ // The layer's software license.
+ LicenseInfo *string
+
+ // The version number.
+ Version int64
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetLayerVersionByArnMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLayerVersionByArn{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLayerVersionByArn{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetLayerVersionByArn"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetLayerVersionByArnValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLayerVersionByArn(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetLayerVersionByArn(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetLayerVersionByArn",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionPolicy.go
new file mode 100644
index 00000000..99efc27f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionPolicy.go
@@ -0,0 +1,169 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the permission policy for a version of an [Lambda layer]. For more information, see AddLayerVersionPermission.
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+func (c *Client) GetLayerVersionPolicy(ctx context.Context, params *GetLayerVersionPolicyInput, optFns ...func(*Options)) (*GetLayerVersionPolicyOutput, error) {
+ if params == nil {
+ params = &GetLayerVersionPolicyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetLayerVersionPolicy", params, optFns, c.addOperationGetLayerVersionPolicyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetLayerVersionPolicyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetLayerVersionPolicyInput struct {
+
+ // The name or Amazon Resource Name (ARN) of the layer.
+ //
+ // This member is required.
+ LayerName *string
+
+ // The version number.
+ //
+ // This member is required.
+ VersionNumber *int64
+
+ noSmithyDocumentSerde
+}
+
+type GetLayerVersionPolicyOutput struct {
+
+ // The policy document.
+ Policy *string
+
+ // A unique identifier for the current revision of the policy.
+ RevisionId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetLayerVersionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLayerVersionPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLayerVersionPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetLayerVersionPolicy"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetLayerVersionPolicyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLayerVersionPolicy(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetLayerVersionPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetLayerVersionPolicy",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetPolicy.go
new file mode 100644
index 00000000..974dc9b7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetPolicy.go
@@ -0,0 +1,179 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the [resource-based IAM policy] for a function, version, or alias.
+//
+// [resource-based IAM policy]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html
+func (c *Client) GetPolicy(ctx context.Context, params *GetPolicyInput, optFns ...func(*Options)) (*GetPolicyOutput, error) {
+ if params == nil {
+ params = &GetPolicyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetPolicy", params, optFns, c.addOperationGetPolicyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetPolicyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetPolicyInput struct {
+
+ // The name or ARN of the Lambda function, version, or alias.
+ //
+ // Name formats
+ //
+ // - Function name – my-function (name-only), my-function:v1 (with alias).
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // You can append a version number or alias to any of the formats. The length
+ // constraint applies only to the full ARN. If you specify only the function name,
+ // it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specify a version or alias to get the policy for that resource.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type GetPolicyOutput struct {
+
+ // The resource-based policy.
+ Policy *string
+
+ // A unique identifier for the current revision of the policy.
+ RevisionId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetPolicy"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetPolicyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPolicy(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetPolicy",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetProvisionedConcurrencyConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetProvisionedConcurrencyConfig.go
new file mode 100644
index 00000000..9dfc91fc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetProvisionedConcurrencyConfig.go
@@ -0,0 +1,197 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Retrieves the provisioned concurrency configuration for a function's alias or
+// version.
+func (c *Client) GetProvisionedConcurrencyConfig(ctx context.Context, params *GetProvisionedConcurrencyConfigInput, optFns ...func(*Options)) (*GetProvisionedConcurrencyConfigOutput, error) {
+ if params == nil {
+ params = &GetProvisionedConcurrencyConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetProvisionedConcurrencyConfig", params, optFns, c.addOperationGetProvisionedConcurrencyConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetProvisionedConcurrencyConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetProvisionedConcurrencyConfigInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The version number or alias name.
+ //
+ // This member is required.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type GetProvisionedConcurrencyConfigOutput struct {
+
+ // The amount of provisioned concurrency allocated. When a weighted alias is used
+ // during linear and canary deployments, this value fluctuates depending on the
+ // amount of concurrency that is provisioned for the function versions.
+ AllocatedProvisionedConcurrentExecutions *int32
+
+ // The amount of provisioned concurrency available.
+ AvailableProvisionedConcurrentExecutions *int32
+
+ // The date and time that a user last updated the configuration, in [ISO 8601 format].
+ //
+ // [ISO 8601 format]: https://www.iso.org/iso-8601-date-and-time-format.html
+ LastModified *string
+
+ // The amount of provisioned concurrency requested.
+ RequestedProvisionedConcurrentExecutions *int32
+
+ // The status of the allocation process.
+ Status types.ProvisionedConcurrencyStatusEnum
+
+ // For failed allocations, the reason that provisioned concurrency could not be
+ // allocated.
+ StatusReason *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetProvisionedConcurrencyConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetProvisionedConcurrencyConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetProvisionedConcurrencyConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetProvisionedConcurrencyConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetProvisionedConcurrencyConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetProvisionedConcurrencyConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetProvisionedConcurrencyConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetProvisionedConcurrencyConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetRuntimeManagementConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetRuntimeManagementConfig.go
new file mode 100644
index 00000000..dfd9862a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetRuntimeManagementConfig.go
@@ -0,0 +1,189 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Retrieves the runtime management configuration for a function's version. If the
+// runtime update mode is Manual, this includes the ARN of the runtime version and
+// the runtime update mode. If the runtime update mode is Auto or Function update,
+// this includes the runtime update mode and null is returned for the ARN. For
+// more information, see [Runtime updates].
+//
+// [Runtime updates]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html
+func (c *Client) GetRuntimeManagementConfig(ctx context.Context, params *GetRuntimeManagementConfigInput, optFns ...func(*Options)) (*GetRuntimeManagementConfigOutput, error) {
+ if params == nil {
+ params = &GetRuntimeManagementConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetRuntimeManagementConfig", params, optFns, c.addOperationGetRuntimeManagementConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetRuntimeManagementConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetRuntimeManagementConfigInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specify a version of the function. This can be $LATEST or a published version
+ // number. If no value is specified, the configuration for the $LATEST version is
+ // returned.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type GetRuntimeManagementConfigOutput struct {
+
+ // The Amazon Resource Name (ARN) of your function.
+ FunctionArn *string
+
+ // The ARN of the runtime the function is configured to use. If the runtime update
+ // mode is Manual, the ARN is returned, otherwise null is returned.
+ RuntimeVersionArn *string
+
+ // The current runtime update mode of the function.
+ UpdateRuntimeOn types.UpdateRuntimeOn
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetRuntimeManagementConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRuntimeManagementConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetRuntimeManagementConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetRuntimeManagementConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetRuntimeManagementConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRuntimeManagementConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetRuntimeManagementConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetRuntimeManagementConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_Invoke.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_Invoke.go
new file mode 100644
index 00000000..588e867f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_Invoke.go
@@ -0,0 +1,266 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Invokes a Lambda function. You can invoke a function synchronously (and wait
+// for the response), or asynchronously. By default, Lambda invokes your function
+// synchronously (i.e. the InvocationType is RequestResponse ). To invoke a
+// function asynchronously, set InvocationType to Event . Lambda passes the
+// ClientContext object to your function for synchronous invocations only.
+//
+// For [synchronous invocation], details about the function response, including errors, are included in
+// the response body and headers. For either invocation type, you can find more
+// information in the [execution log]and [trace].
+//
+// When an error occurs, your function may be invoked multiple times. Retry
+// behavior varies by error type, client, event source, and invocation type. For
+// example, if you invoke a function asynchronously and it returns an error, Lambda
+// executes the function up to two more times. For more information, see [Error handling and automatic retries in Lambda].
+//
+// For [asynchronous invocation], Lambda adds events to a queue before sending them to your function. If
+// your function does not have enough capacity to keep up with the queue, events
+// may be lost. Occasionally, your function may receive the same event multiple
+// times, even if no error occurs. To retain events that were not processed,
+// configure your function with a [dead-letter queue].
+//
+// The status code in the API response doesn't reflect function errors. Error
+// codes are reserved for errors that prevent your function from executing, such as
+// permissions errors, [quota]errors, or issues with your function's code and
+// configuration. For example, Lambda returns TooManyRequestsException if running
+// the function would cause you to exceed a concurrency limit at either the account
+// level ( ConcurrentInvocationLimitExceeded ) or function level (
+// ReservedFunctionConcurrentInvocationLimitExceeded ).
+//
+// For functions with a long timeout, your client might disconnect during
+// synchronous invocation while it waits for a response. Configure your HTTP
+// client, SDK, firewall, proxy, or operating system to allow for long connections
+// with timeout or keep-alive settings.
+//
+// This operation requires permission for the [lambda:InvokeFunction] action. For details on how to set
+// up permissions for cross-account invocations, see [Granting function access to other accounts].
+//
+// [execution log]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html
+// [asynchronous invocation]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html
+// [trace]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
+// [dead-letter queue]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq
+// [Error handling and automatic retries in Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-retries.html
+// [lambda:InvokeFunction]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html
+// [quota]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
+// [synchronous invocation]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-sync.html
+// [Granting function access to other accounts]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke
+func (c *Client) Invoke(ctx context.Context, params *InvokeInput, optFns ...func(*Options)) (*InvokeOutput, error) {
+ if params == nil {
+ params = &InvokeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "Invoke", params, optFns, c.addOperationInvokeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*InvokeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type InvokeInput struct {
+
+ // The name or ARN of the Lambda function, version, or alias.
+ //
+ // Name formats
+ //
+ // - Function name – my-function (name-only), my-function:v1 (with alias).
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // You can append a version number or alias to any of the formats. The length
+ // constraint applies only to the full ARN. If you specify only the function name,
+ // it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Up to 3,583 bytes of base64-encoded data about the invoking client to pass to
+ // the function in the context object. Lambda passes the ClientContext object to
+ // your function for synchronous invocations only.
+ ClientContext *string
+
+ // Choose from the following options.
+ //
+ // - RequestResponse (default) – Invoke the function synchronously. Keep the
+ // connection open until the function returns a response or times out. The API
+ // response includes the function response and additional data.
+ //
+ // - Event – Invoke the function asynchronously. Send events that fail multiple
+ // times to the function's dead-letter queue (if one is configured). The API
+ // response only includes a status code.
+ //
+ // - DryRun – Validate parameter values and verify that the user or role has
+ // permission to invoke the function.
+ InvocationType types.InvocationType
+
+ // Set to Tail to include the execution log in the response. Applies to
+ // synchronously invoked functions only.
+ LogType types.LogType
+
+ // The JSON that you want to provide to your Lambda function as input.
+ //
+ // You can enter the JSON directly. For example, --payload '{ "key": "value" }' .
+ // You can also specify a file path. For example, --payload file://payload.json .
+ Payload []byte
+
+ // Specify a version or alias to invoke a published version of the function.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type InvokeOutput struct {
+
+ // The version of the function that executed. When you invoke a function with an
+ // alias, this indicates which version the alias resolved to.
+ ExecutedVersion *string
+
+ // If present, indicates that an error occurred during function execution. Details
+ // about the error are included in the response payload.
+ FunctionError *string
+
+ // The last 4 KB of the execution log, which is base64-encoded.
+ LogResult *string
+
+ // The response from the function, or an error object.
+ Payload []byte
+
+ // The HTTP status code is in the 200 range for a successful request. For the
+ // RequestResponse invocation type, this status code is 200. For the Event
+ // invocation type, this status code is 202. For the DryRun invocation type, the
+ // status code is 204.
+ StatusCode int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationInvokeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpInvoke{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpInvoke{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "Invoke"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpInvokeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInvoke(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opInvoke(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "Invoke",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeAsync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeAsync.go
new file mode 100644
index 00000000..8508bbf1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeAsync.go
@@ -0,0 +1,186 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+)
+
+// For asynchronous function invocation, use Invoke.
+//
+// Invokes a function asynchronously.
+//
+// If you do use the InvokeAsync action, note that it doesn't support the use of
+// X-Ray active tracing. Trace ID is not propagated to the function, even if X-Ray
+// active tracing is turned on.
+//
+// Deprecated: This operation has been deprecated.
+func (c *Client) InvokeAsync(ctx context.Context, params *InvokeAsyncInput, optFns ...func(*Options)) (*InvokeAsyncOutput, error) {
+ if params == nil {
+ params = &InvokeAsyncInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "InvokeAsync", params, optFns, c.addOperationInvokeAsyncMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*InvokeAsyncOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type InvokeAsyncInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The JSON that you want to provide to your Lambda function as input.
+ //
+ // This member is required.
+ InvokeArgs io.Reader
+
+ noSmithyDocumentSerde
+}
+
+// A success response ( 202 Accepted ) indicates that the request is queued for
+// invocation.
+type InvokeAsyncOutput struct {
+
+ // The status code.
+ Status int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationInvokeAsyncMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpInvokeAsync{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpInvokeAsync{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "InvokeAsync"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpInvokeAsyncValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInvokeAsync(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opInvokeAsync(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "InvokeAsync",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeWithResponseStream.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeWithResponseStream.go
new file mode 100644
index 00000000..9e62a06f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeWithResponseStream.go
@@ -0,0 +1,320 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithysync "github.com/aws/smithy-go/sync"
+ "sync"
+)
+
+// Configure your Lambda functions to stream response payloads back to clients.
+// For more information, see [Configuring a Lambda function to stream responses].
+//
+// This operation requires permission for the [lambda:InvokeFunction] action. For details on how to set
+// up permissions for cross-account invocations, see [Granting function access to other accounts].
+//
+// [Configuring a Lambda function to stream responses]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html
+// [lambda:InvokeFunction]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html
+// [Granting function access to other accounts]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke
+func (c *Client) InvokeWithResponseStream(ctx context.Context, params *InvokeWithResponseStreamInput, optFns ...func(*Options)) (*InvokeWithResponseStreamOutput, error) {
+ if params == nil {
+ params = &InvokeWithResponseStreamInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "InvokeWithResponseStream", params, optFns, c.addOperationInvokeWithResponseStreamMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*InvokeWithResponseStreamOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type InvokeWithResponseStreamInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Up to 3,583 bytes of base64-encoded data about the invoking client to pass to
+ // the function in the context object.
+ ClientContext *string
+
+ // Use one of the following options:
+ //
+ // - RequestResponse (default) – Invoke the function synchronously. Keep the
+ // connection open until the function returns a response or times out. The API
+ // operation response includes the function response and additional data.
+ //
+ // - DryRun – Validate parameter values and verify that the IAM user or role has
+ // permission to invoke the function.
+ InvocationType types.ResponseStreamingInvocationType
+
+ // Set to Tail to include the execution log in the response. Applies to
+ // synchronously invoked functions only.
+ LogType types.LogType
+
+ // The JSON that you want to provide to your Lambda function as input.
+ //
+ // You can enter the JSON directly. For example, --payload '{ "key": "value" }' .
+ // You can also specify a file path. For example, --payload file://payload.json .
+ Payload []byte
+
+ // The alias name.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type InvokeWithResponseStreamOutput struct {
+
+ // The version of the function that executed. When you invoke a function with an
+ // alias, this indicates which version the alias resolved to.
+ ExecutedVersion *string
+
+ // The type of data the stream is returning.
+ ResponseStreamContentType *string
+
+ // For a successful request, the HTTP status code is in the 200 range. For the
+ // RequestResponse invocation type, this status code is 200. For the DryRun
+ // invocation type, this status code is 204.
+ StatusCode int32
+
+ eventStream *InvokeWithResponseStreamEventStream
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+// GetStream returns the type to interact with the event stream.
+func (o *InvokeWithResponseStreamOutput) GetStream() *InvokeWithResponseStreamEventStream {
+ return o.eventStream
+}
+
+func (c *Client) addOperationInvokeWithResponseStreamMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpInvokeWithResponseStream{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpInvokeWithResponseStream{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "InvokeWithResponseStream"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addEventStreamInvokeWithResponseStreamMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpInvokeWithResponseStreamValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInvokeWithResponseStream(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opInvokeWithResponseStream(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "InvokeWithResponseStream",
+ }
+}
+
+// InvokeWithResponseStreamEventStream provides the event stream handling for the InvokeWithResponseStream operation.
+//
+// For testing and mocking the event stream this type should be initialized via
+// the NewInvokeWithResponseStreamEventStream constructor function. Using the functional options
+// to pass in nested mock behavior.
+type InvokeWithResponseStreamEventStream struct {
+ // InvokeWithResponseStreamResponseEventReader is the EventStream reader for the
+ // InvokeWithResponseStreamResponseEvent events. This value is automatically set by
+ // the SDK when the API call is made Use this member when unit testing your code
+ // with the SDK to mock out the EventStream Reader.
+ //
+ // Must not be nil.
+ Reader InvokeWithResponseStreamResponseEventReader
+
+ done chan struct{}
+ closeOnce sync.Once
+ err *smithysync.OnceErr
+}
+
+// NewInvokeWithResponseStreamEventStream initializes an InvokeWithResponseStreamEventStream.
+// This function should only be used for testing and mocking the InvokeWithResponseStreamEventStream
+// stream within your application.
+//
+// The Reader member must be set before reading events from the stream.
+func NewInvokeWithResponseStreamEventStream(optFns ...func(*InvokeWithResponseStreamEventStream)) *InvokeWithResponseStreamEventStream {
+ es := &InvokeWithResponseStreamEventStream{
+ done: make(chan struct{}),
+ err: smithysync.NewOnceErr(),
+ }
+ for _, fn := range optFns {
+ fn(es)
+ }
+ return es
+}
+
+// Events returns a channel to read events from.
+func (es *InvokeWithResponseStreamEventStream) Events() <-chan types.InvokeWithResponseStreamResponseEvent {
+ return es.Reader.Events()
+}
+
+// Close closes the stream. This will also cause the stream to be closed.
+// Close must be called when done using the stream API. Not calling Close
+// may result in resource leaks.
+//
+// Will close the underlying EventStream writer and reader, and no more events can be
+// sent or received.
+func (es *InvokeWithResponseStreamEventStream) Close() error {
+ es.closeOnce.Do(es.safeClose)
+ return es.Err()
+}
+
+func (es *InvokeWithResponseStreamEventStream) safeClose() {
+ close(es.done)
+
+ es.Reader.Close()
+}
+
+// Err returns any error that occurred while reading or writing EventStream Events
+// from the service API's response. Returns nil if there were no errors.
+func (es *InvokeWithResponseStreamEventStream) Err() error {
+ if err := es.err.Err(); err != nil {
+ return err
+ }
+
+ if err := es.Reader.Err(); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (es *InvokeWithResponseStreamEventStream) waitStreamClose() {
+ type errorSet interface {
+ ErrorSet() <-chan struct{}
+ }
+
+ var outputErrCh <-chan struct{}
+ if v, ok := es.Reader.(errorSet); ok {
+ outputErrCh = v.ErrorSet()
+ }
+ var outputClosedCh <-chan struct{}
+ if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok {
+ outputClosedCh = v.Closed()
+ }
+
+ select {
+ case <-es.done:
+ case <-outputErrCh:
+ es.err.SetError(es.Reader.Err())
+ es.Close()
+
+ case <-outputClosedCh:
+ if err := es.Reader.Err(); err != nil {
+ es.err.SetError(es.Reader.Err())
+ }
+ es.Close()
+
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListAliases.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListAliases.go
new file mode 100644
index 00000000..8634e1cc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListAliases.go
@@ -0,0 +1,278 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a list of [aliases] for a Lambda function.
+//
+// [aliases]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
+func (c *Client) ListAliases(ctx context.Context, params *ListAliasesInput, optFns ...func(*Options)) (*ListAliasesOutput, error) {
+ if params == nil {
+ params = &ListAliasesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListAliases", params, optFns, c.addOperationListAliasesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListAliasesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListAliasesInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specify a function version to only list aliases that invoke that version.
+ FunctionVersion *string
+
+ // Specify the pagination token that's returned by a previous request to retrieve
+ // the next page of results.
+ Marker *string
+
+ // Limit the number of aliases returned.
+ MaxItems *int32
+
+ noSmithyDocumentSerde
+}
+
+type ListAliasesOutput struct {
+
+ // A list of aliases.
+ Aliases []types.AliasConfiguration
+
+ // The pagination token that's included if more results are available.
+ NextMarker *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListAliases{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAliases{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListAliases"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListAliasesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAliases(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListAliasesPaginatorOptions is the paginator options for ListAliases
+type ListAliasesPaginatorOptions struct {
+ // Limit the number of aliases returned.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListAliasesPaginator is a paginator for ListAliases
+type ListAliasesPaginator struct {
+ options ListAliasesPaginatorOptions
+ client ListAliasesAPIClient
+ params *ListAliasesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListAliasesPaginator returns a new ListAliasesPaginator
+func NewListAliasesPaginator(client ListAliasesAPIClient, params *ListAliasesInput, optFns ...func(*ListAliasesPaginatorOptions)) *ListAliasesPaginator {
+ if params == nil {
+ params = &ListAliasesInput{}
+ }
+
+ options := ListAliasesPaginatorOptions{}
+ if params.MaxItems != nil {
+ options.Limit = *params.MaxItems
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListAliasesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListAliasesPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListAliases page.
+func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAliasesOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxItems = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListAliases(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListAliasesAPIClient is a client that implements the ListAliases operation.
+type ListAliasesAPIClient interface {
+ ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error)
+}
+
+var _ ListAliasesAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListAliases(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListAliases",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListCodeSigningConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListCodeSigningConfigs.go
new file mode 100644
index 00000000..69457e3a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListCodeSigningConfigs.go
@@ -0,0 +1,259 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a list of [code signing configurations]. A request returns up to 10,000 configurations per call. You
+// can use the MaxItems parameter to return fewer configurations per call.
+//
+// [code signing configurations]: https://docs.aws.amazon.com/lambda/latest/dg/configuring-codesigning.html
+func (c *Client) ListCodeSigningConfigs(ctx context.Context, params *ListCodeSigningConfigsInput, optFns ...func(*Options)) (*ListCodeSigningConfigsOutput, error) {
+ if params == nil {
+ params = &ListCodeSigningConfigsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListCodeSigningConfigs", params, optFns, c.addOperationListCodeSigningConfigsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListCodeSigningConfigsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListCodeSigningConfigsInput struct {
+
+ // Specify the pagination token that's returned by a previous request to retrieve
+ // the next page of results.
+ Marker *string
+
+ // Maximum number of items to return.
+ MaxItems *int32
+
+ noSmithyDocumentSerde
+}
+
+type ListCodeSigningConfigsOutput struct {
+
+ // The code signing configurations
+ CodeSigningConfigs []types.CodeSigningConfig
+
+ // The pagination token that's included if more results are available.
+ NextMarker *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListCodeSigningConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListCodeSigningConfigs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCodeSigningConfigs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListCodeSigningConfigs"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCodeSigningConfigs(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListCodeSigningConfigsPaginatorOptions is the paginator options for
+// ListCodeSigningConfigs
+type ListCodeSigningConfigsPaginatorOptions struct {
+ // Maximum number of items to return.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListCodeSigningConfigsPaginator is a paginator for ListCodeSigningConfigs
+type ListCodeSigningConfigsPaginator struct {
+ options ListCodeSigningConfigsPaginatorOptions
+ client ListCodeSigningConfigsAPIClient
+ params *ListCodeSigningConfigsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListCodeSigningConfigsPaginator returns a new ListCodeSigningConfigsPaginator
+func NewListCodeSigningConfigsPaginator(client ListCodeSigningConfigsAPIClient, params *ListCodeSigningConfigsInput, optFns ...func(*ListCodeSigningConfigsPaginatorOptions)) *ListCodeSigningConfigsPaginator {
+ if params == nil {
+ params = &ListCodeSigningConfigsInput{}
+ }
+
+ options := ListCodeSigningConfigsPaginatorOptions{}
+ if params.MaxItems != nil {
+ options.Limit = *params.MaxItems
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListCodeSigningConfigsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListCodeSigningConfigsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListCodeSigningConfigs page.
+func (p *ListCodeSigningConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCodeSigningConfigsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxItems = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListCodeSigningConfigs(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListCodeSigningConfigsAPIClient is a client that implements the
+// ListCodeSigningConfigs operation.
+type ListCodeSigningConfigsAPIClient interface {
+ ListCodeSigningConfigs(context.Context, *ListCodeSigningConfigsInput, ...func(*Options)) (*ListCodeSigningConfigsOutput, error)
+}
+
+var _ ListCodeSigningConfigsAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListCodeSigningConfigs(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListCodeSigningConfigs",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListEventSourceMappings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListEventSourceMappings.go
new file mode 100644
index 00000000..60fe6b30
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListEventSourceMappings.go
@@ -0,0 +1,297 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Lists event source mappings. Specify an EventSourceArn to show only event
+// source mappings for a single event source.
+func (c *Client) ListEventSourceMappings(ctx context.Context, params *ListEventSourceMappingsInput, optFns ...func(*Options)) (*ListEventSourceMappingsOutput, error) {
+ if params == nil {
+ params = &ListEventSourceMappingsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListEventSourceMappings", params, optFns, c.addOperationListEventSourceMappingsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListEventSourceMappingsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListEventSourceMappingsInput struct {
+
+ // The Amazon Resource Name (ARN) of the event source.
+ //
+ // - Amazon Kinesis – The ARN of the data stream or a stream consumer.
+ //
+ // - Amazon DynamoDB Streams – The ARN of the stream.
+ //
+ // - Amazon Simple Queue Service – The ARN of the queue.
+ //
+ // - Amazon Managed Streaming for Apache Kafka – The ARN of the cluster or the
+ // ARN of the VPC connection (for [cross-account event source mappings]).
+ //
+ // - Amazon MQ – The ARN of the broker.
+ //
+ // - Amazon DocumentDB – The ARN of the DocumentDB change stream.
+ //
+ // [cross-account event source mappings]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc
+ EventSourceArn *string
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – MyFunction .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Version or Alias ARN –
+ // arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD .
+ //
+ // - Partial ARN – 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it's limited to 64 characters in length.
+ FunctionName *string
+
+ // A pagination token returned by a previous call.
+ Marker *string
+
+ // The maximum number of event source mappings to return. Note that
+ // ListEventSourceMappings returns a maximum of 100 items in each response, even if
+ // you set the number higher.
+ MaxItems *int32
+
+ noSmithyDocumentSerde
+}
+
+type ListEventSourceMappingsOutput struct {
+
+ // A list of event source mappings.
+ EventSourceMappings []types.EventSourceMappingConfiguration
+
+ // A pagination token that's returned when the response doesn't contain all event
+ // source mappings.
+ NextMarker *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListEventSourceMappingsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListEventSourceMappings{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEventSourceMappings{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListEventSourceMappings"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventSourceMappings(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListEventSourceMappingsPaginatorOptions is the paginator options for
+// ListEventSourceMappings
+type ListEventSourceMappingsPaginatorOptions struct {
+ // The maximum number of event source mappings to return. Note that
+ // ListEventSourceMappings returns a maximum of 100 items in each response, even if
+ // you set the number higher.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListEventSourceMappingsPaginator is a paginator for ListEventSourceMappings
+type ListEventSourceMappingsPaginator struct {
+ options ListEventSourceMappingsPaginatorOptions
+ client ListEventSourceMappingsAPIClient
+ params *ListEventSourceMappingsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListEventSourceMappingsPaginator returns a new
+// ListEventSourceMappingsPaginator
+func NewListEventSourceMappingsPaginator(client ListEventSourceMappingsAPIClient, params *ListEventSourceMappingsInput, optFns ...func(*ListEventSourceMappingsPaginatorOptions)) *ListEventSourceMappingsPaginator {
+ if params == nil {
+ params = &ListEventSourceMappingsInput{}
+ }
+
+ options := ListEventSourceMappingsPaginatorOptions{}
+ if params.MaxItems != nil {
+ options.Limit = *params.MaxItems
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListEventSourceMappingsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListEventSourceMappingsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListEventSourceMappings page.
+func (p *ListEventSourceMappingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEventSourceMappingsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxItems = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListEventSourceMappings(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListEventSourceMappingsAPIClient is a client that implements the
+// ListEventSourceMappings operation.
+type ListEventSourceMappingsAPIClient interface {
+ ListEventSourceMappings(context.Context, *ListEventSourceMappingsInput, ...func(*Options)) (*ListEventSourceMappingsOutput, error)
+}
+
+var _ ListEventSourceMappingsAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListEventSourceMappings(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListEventSourceMappings",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionEventInvokeConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionEventInvokeConfigs.go
new file mode 100644
index 00000000..edc12f5b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionEventInvokeConfigs.go
@@ -0,0 +1,279 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Retrieves a list of configurations for asynchronous invocation for a function.
+//
+// To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.
+func (c *Client) ListFunctionEventInvokeConfigs(ctx context.Context, params *ListFunctionEventInvokeConfigsInput, optFns ...func(*Options)) (*ListFunctionEventInvokeConfigsOutput, error) {
+ if params == nil {
+ params = &ListFunctionEventInvokeConfigsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListFunctionEventInvokeConfigs", params, optFns, c.addOperationListFunctionEventInvokeConfigsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListFunctionEventInvokeConfigsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListFunctionEventInvokeConfigsInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - my-function .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN - 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specify the pagination token that's returned by a previous request to retrieve
+ // the next page of results.
+ Marker *string
+
+ // The maximum number of configurations to return.
+ MaxItems *int32
+
+ noSmithyDocumentSerde
+}
+
+type ListFunctionEventInvokeConfigsOutput struct {
+
+ // A list of configurations.
+ FunctionEventInvokeConfigs []types.FunctionEventInvokeConfig
+
+ // The pagination token that's included if more results are available.
+ NextMarker *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListFunctionEventInvokeConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListFunctionEventInvokeConfigs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFunctionEventInvokeConfigs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListFunctionEventInvokeConfigs"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListFunctionEventInvokeConfigsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctionEventInvokeConfigs(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListFunctionEventInvokeConfigsPaginatorOptions is the paginator options for
+// ListFunctionEventInvokeConfigs
+type ListFunctionEventInvokeConfigsPaginatorOptions struct {
+ // The maximum number of configurations to return.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListFunctionEventInvokeConfigsPaginator is a paginator for
+// ListFunctionEventInvokeConfigs
+type ListFunctionEventInvokeConfigsPaginator struct {
+ options ListFunctionEventInvokeConfigsPaginatorOptions
+ client ListFunctionEventInvokeConfigsAPIClient
+ params *ListFunctionEventInvokeConfigsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListFunctionEventInvokeConfigsPaginator returns a new
+// ListFunctionEventInvokeConfigsPaginator
+func NewListFunctionEventInvokeConfigsPaginator(client ListFunctionEventInvokeConfigsAPIClient, params *ListFunctionEventInvokeConfigsInput, optFns ...func(*ListFunctionEventInvokeConfigsPaginatorOptions)) *ListFunctionEventInvokeConfigsPaginator {
+ if params == nil {
+ params = &ListFunctionEventInvokeConfigsInput{}
+ }
+
+ options := ListFunctionEventInvokeConfigsPaginatorOptions{}
+ if params.MaxItems != nil {
+ options.Limit = *params.MaxItems
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListFunctionEventInvokeConfigsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListFunctionEventInvokeConfigsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListFunctionEventInvokeConfigs page.
+func (p *ListFunctionEventInvokeConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFunctionEventInvokeConfigsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxItems = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListFunctionEventInvokeConfigs(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListFunctionEventInvokeConfigsAPIClient is a client that implements the
+// ListFunctionEventInvokeConfigs operation.
+type ListFunctionEventInvokeConfigsAPIClient interface {
+ ListFunctionEventInvokeConfigs(context.Context, *ListFunctionEventInvokeConfigsInput, ...func(*Options)) (*ListFunctionEventInvokeConfigsOutput, error)
+}
+
+var _ ListFunctionEventInvokeConfigsAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListFunctionEventInvokeConfigs(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListFunctionEventInvokeConfigs",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionUrlConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionUrlConfigs.go
new file mode 100644
index 00000000..e96814a5
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionUrlConfigs.go
@@ -0,0 +1,281 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a list of Lambda function URLs for the specified function.
+func (c *Client) ListFunctionUrlConfigs(ctx context.Context, params *ListFunctionUrlConfigsInput, optFns ...func(*Options)) (*ListFunctionUrlConfigsOutput, error) {
+ if params == nil {
+ params = &ListFunctionUrlConfigsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListFunctionUrlConfigs", params, optFns, c.addOperationListFunctionUrlConfigsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListFunctionUrlConfigsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListFunctionUrlConfigsInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specify the pagination token that's returned by a previous request to retrieve
+ // the next page of results.
+ Marker *string
+
+ // The maximum number of function URLs to return in the response. Note that
+ // ListFunctionUrlConfigs returns a maximum of 50 items in each response, even if
+ // you set the number higher.
+ MaxItems *int32
+
+ noSmithyDocumentSerde
+}
+
+type ListFunctionUrlConfigsOutput struct {
+
+ // A list of function URL configurations.
+ //
+ // This member is required.
+ FunctionUrlConfigs []types.FunctionUrlConfig
+
+ // The pagination token that's included if more results are available.
+ NextMarker *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListFunctionUrlConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListFunctionUrlConfigs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFunctionUrlConfigs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListFunctionUrlConfigs"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListFunctionUrlConfigsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctionUrlConfigs(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListFunctionUrlConfigsPaginatorOptions is the paginator options for
+// ListFunctionUrlConfigs
+type ListFunctionUrlConfigsPaginatorOptions struct {
+ // The maximum number of function URLs to return in the response. Note that
+ // ListFunctionUrlConfigs returns a maximum of 50 items in each response, even if
+ // you set the number higher.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListFunctionUrlConfigsPaginator is a paginator for ListFunctionUrlConfigs
+type ListFunctionUrlConfigsPaginator struct {
+ options ListFunctionUrlConfigsPaginatorOptions
+ client ListFunctionUrlConfigsAPIClient
+ params *ListFunctionUrlConfigsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListFunctionUrlConfigsPaginator returns a new ListFunctionUrlConfigsPaginator
+func NewListFunctionUrlConfigsPaginator(client ListFunctionUrlConfigsAPIClient, params *ListFunctionUrlConfigsInput, optFns ...func(*ListFunctionUrlConfigsPaginatorOptions)) *ListFunctionUrlConfigsPaginator {
+ if params == nil {
+ params = &ListFunctionUrlConfigsInput{}
+ }
+
+ options := ListFunctionUrlConfigsPaginatorOptions{}
+ if params.MaxItems != nil {
+ options.Limit = *params.MaxItems
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListFunctionUrlConfigsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListFunctionUrlConfigsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListFunctionUrlConfigs page.
+func (p *ListFunctionUrlConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFunctionUrlConfigsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxItems = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListFunctionUrlConfigs(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListFunctionUrlConfigsAPIClient is a client that implements the
+// ListFunctionUrlConfigs operation.
+type ListFunctionUrlConfigsAPIClient interface {
+ ListFunctionUrlConfigs(context.Context, *ListFunctionUrlConfigsInput, ...func(*Options)) (*ListFunctionUrlConfigsOutput, error)
+}
+
+var _ ListFunctionUrlConfigsAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListFunctionUrlConfigs(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListFunctionUrlConfigs",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctions.go
new file mode 100644
index 00000000..db0042b9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctions.go
@@ -0,0 +1,277 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a list of Lambda functions, with the version-specific configuration of
+// each. Lambda returns up to 50 functions per call.
+//
+// Set FunctionVersion to ALL to include all published versions of each function
+// in addition to the unpublished version.
+//
+// The ListFunctions operation returns a subset of the FunctionConfiguration fields. To get the
+// additional fields (State, StateReasonCode, StateReason, LastUpdateStatus,
+// LastUpdateStatusReason, LastUpdateStatusReasonCode, RuntimeVersionConfig) for a
+// function or version, use GetFunction.
+func (c *Client) ListFunctions(ctx context.Context, params *ListFunctionsInput, optFns ...func(*Options)) (*ListFunctionsOutput, error) {
+ if params == nil {
+ params = &ListFunctionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListFunctions", params, optFns, c.addOperationListFunctionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListFunctionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListFunctionsInput struct {
+
+ // Set to ALL to include entries for all published versions of each function.
+ FunctionVersion types.FunctionVersion
+
+ // Specify the pagination token that's returned by a previous request to retrieve
+ // the next page of results.
+ Marker *string
+
+ // For Lambda@Edge functions, the Amazon Web Services Region of the master
+ // function. For example, us-east-1 filters the list of functions to include only
+ // Lambda@Edge functions replicated from a master function in US East (N.
+ // Virginia). If specified, you must set FunctionVersion to ALL .
+ MasterRegion *string
+
+ // The maximum number of functions to return in the response. Note that
+ // ListFunctions returns a maximum of 50 items in each response, even if you set
+ // the number higher.
+ MaxItems *int32
+
+ noSmithyDocumentSerde
+}
+
+// A list of Lambda functions.
+type ListFunctionsOutput struct {
+
+ // A list of Lambda functions.
+ Functions []types.FunctionConfiguration
+
+ // The pagination token that's included if more results are available.
+ NextMarker *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListFunctionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListFunctions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFunctions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListFunctions"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctions(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListFunctionsPaginatorOptions is the paginator options for ListFunctions
+type ListFunctionsPaginatorOptions struct {
+ // The maximum number of functions to return in the response. Note that
+ // ListFunctions returns a maximum of 50 items in each response, even if you set
+ // the number higher.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListFunctionsPaginator is a paginator for ListFunctions
+type ListFunctionsPaginator struct {
+ options ListFunctionsPaginatorOptions
+ client ListFunctionsAPIClient
+ params *ListFunctionsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListFunctionsPaginator returns a new ListFunctionsPaginator
+func NewListFunctionsPaginator(client ListFunctionsAPIClient, params *ListFunctionsInput, optFns ...func(*ListFunctionsPaginatorOptions)) *ListFunctionsPaginator {
+ if params == nil {
+ params = &ListFunctionsInput{}
+ }
+
+ options := ListFunctionsPaginatorOptions{}
+ if params.MaxItems != nil {
+ options.Limit = *params.MaxItems
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListFunctionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListFunctionsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListFunctions page.
+func (p *ListFunctionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFunctionsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxItems = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListFunctions(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListFunctionsAPIClient is a client that implements the ListFunctions operation.
+type ListFunctionsAPIClient interface {
+ ListFunctions(context.Context, *ListFunctionsInput, ...func(*Options)) (*ListFunctionsOutput, error)
+}
+
+var _ ListFunctionsAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListFunctions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListFunctions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go
new file mode 100644
index 00000000..c5f53f8e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go
@@ -0,0 +1,267 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// List the functions that use the specified code signing configuration. You can
+// use this method prior to deleting a code signing configuration, to verify that
+// no functions are using it.
+func (c *Client) ListFunctionsByCodeSigningConfig(ctx context.Context, params *ListFunctionsByCodeSigningConfigInput, optFns ...func(*Options)) (*ListFunctionsByCodeSigningConfigOutput, error) {
+ if params == nil {
+ params = &ListFunctionsByCodeSigningConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListFunctionsByCodeSigningConfig", params, optFns, c.addOperationListFunctionsByCodeSigningConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListFunctionsByCodeSigningConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListFunctionsByCodeSigningConfigInput struct {
+
+ // The The Amazon Resource Name (ARN) of the code signing configuration.
+ //
+ // This member is required.
+ CodeSigningConfigArn *string
+
+ // Specify the pagination token that's returned by a previous request to retrieve
+ // the next page of results.
+ Marker *string
+
+ // Maximum number of items to return.
+ MaxItems *int32
+
+ noSmithyDocumentSerde
+}
+
+type ListFunctionsByCodeSigningConfigOutput struct {
+
+ // The function ARNs.
+ FunctionArns []string
+
+ // The pagination token that's included if more results are available.
+ NextMarker *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListFunctionsByCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListFunctionsByCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListFunctionsByCodeSigningConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListFunctionsByCodeSigningConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctionsByCodeSigningConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListFunctionsByCodeSigningConfigPaginatorOptions is the paginator options for
+// ListFunctionsByCodeSigningConfig
+type ListFunctionsByCodeSigningConfigPaginatorOptions struct {
+ // Maximum number of items to return.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListFunctionsByCodeSigningConfigPaginator is a paginator for
+// ListFunctionsByCodeSigningConfig
+type ListFunctionsByCodeSigningConfigPaginator struct {
+ options ListFunctionsByCodeSigningConfigPaginatorOptions
+ client ListFunctionsByCodeSigningConfigAPIClient
+ params *ListFunctionsByCodeSigningConfigInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListFunctionsByCodeSigningConfigPaginator returns a new
+// ListFunctionsByCodeSigningConfigPaginator
+func NewListFunctionsByCodeSigningConfigPaginator(client ListFunctionsByCodeSigningConfigAPIClient, params *ListFunctionsByCodeSigningConfigInput, optFns ...func(*ListFunctionsByCodeSigningConfigPaginatorOptions)) *ListFunctionsByCodeSigningConfigPaginator {
+ if params == nil {
+ params = &ListFunctionsByCodeSigningConfigInput{}
+ }
+
+ options := ListFunctionsByCodeSigningConfigPaginatorOptions{}
+ if params.MaxItems != nil {
+ options.Limit = *params.MaxItems
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListFunctionsByCodeSigningConfigPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListFunctionsByCodeSigningConfigPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListFunctionsByCodeSigningConfig page.
+func (p *ListFunctionsByCodeSigningConfigPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFunctionsByCodeSigningConfigOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxItems = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListFunctionsByCodeSigningConfig(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListFunctionsByCodeSigningConfigAPIClient is a client that implements the
+// ListFunctionsByCodeSigningConfig operation.
+type ListFunctionsByCodeSigningConfigAPIClient interface {
+ ListFunctionsByCodeSigningConfig(context.Context, *ListFunctionsByCodeSigningConfigInput, ...func(*Options)) (*ListFunctionsByCodeSigningConfigOutput, error)
+}
+
+var _ ListFunctionsByCodeSigningConfigAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListFunctionsByCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListFunctionsByCodeSigningConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayerVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayerVersions.go
new file mode 100644
index 00000000..93c12454
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayerVersions.go
@@ -0,0 +1,283 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Lists the versions of an [Lambda layer]. Versions that have been deleted aren't listed.
+// Specify a [runtime identifier]to list only versions that indicate that they're compatible with that
+// runtime. Specify a compatible architecture to include only layer versions that
+// are compatible with that architecture.
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+// [runtime identifier]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+func (c *Client) ListLayerVersions(ctx context.Context, params *ListLayerVersionsInput, optFns ...func(*Options)) (*ListLayerVersionsOutput, error) {
+ if params == nil {
+ params = &ListLayerVersionsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListLayerVersions", params, optFns, c.addOperationListLayerVersionsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListLayerVersionsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListLayerVersionsInput struct {
+
+ // The name or Amazon Resource Name (ARN) of the layer.
+ //
+ // This member is required.
+ LayerName *string
+
+ // The compatible [instruction set architecture].
+ //
+ // [instruction set architecture]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html
+ CompatibleArchitecture types.Architecture
+
+ // A runtime identifier.
+ //
+ // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ CompatibleRuntime types.Runtime
+
+ // A pagination token returned by a previous call.
+ Marker *string
+
+ // The maximum number of versions to return.
+ MaxItems *int32
+
+ noSmithyDocumentSerde
+}
+
+type ListLayerVersionsOutput struct {
+
+ // A list of versions.
+ LayerVersions []types.LayerVersionsListItem
+
+ // A pagination token returned when the response doesn't contain all versions.
+ NextMarker *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListLayerVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListLayerVersions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLayerVersions{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListLayerVersions"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListLayerVersionsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLayerVersions(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListLayerVersionsPaginatorOptions is the paginator options for ListLayerVersions
+type ListLayerVersionsPaginatorOptions struct {
+ // The maximum number of versions to return.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListLayerVersionsPaginator is a paginator for ListLayerVersions
+type ListLayerVersionsPaginator struct {
+ options ListLayerVersionsPaginatorOptions
+ client ListLayerVersionsAPIClient
+ params *ListLayerVersionsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListLayerVersionsPaginator returns a new ListLayerVersionsPaginator
+func NewListLayerVersionsPaginator(client ListLayerVersionsAPIClient, params *ListLayerVersionsInput, optFns ...func(*ListLayerVersionsPaginatorOptions)) *ListLayerVersionsPaginator {
+ if params == nil {
+ params = &ListLayerVersionsInput{}
+ }
+
+ options := ListLayerVersionsPaginatorOptions{}
+ if params.MaxItems != nil {
+ options.Limit = *params.MaxItems
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListLayerVersionsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListLayerVersionsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListLayerVersions page.
+func (p *ListLayerVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLayerVersionsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxItems = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListLayerVersions(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListLayerVersionsAPIClient is a client that implements the ListLayerVersions
+// operation.
+type ListLayerVersionsAPIClient interface {
+ ListLayerVersions(context.Context, *ListLayerVersionsInput, ...func(*Options)) (*ListLayerVersionsOutput, error)
+}
+
+var _ ListLayerVersionsAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListLayerVersions(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListLayerVersions",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayers.go
new file mode 100644
index 00000000..471b9fe2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayers.go
@@ -0,0 +1,275 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Lists [Lambda layers] and shows information about the latest version of each. Specify a [runtime identifier] to
+// list only layers that indicate that they're compatible with that runtime.
+// Specify a compatible architecture to include only layers that are compatible
+// with that [instruction set architecture].
+//
+// [instruction set architecture]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html
+// [runtime identifier]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+// [Lambda layers]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html
+func (c *Client) ListLayers(ctx context.Context, params *ListLayersInput, optFns ...func(*Options)) (*ListLayersOutput, error) {
+ if params == nil {
+ params = &ListLayersInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListLayers", params, optFns, c.addOperationListLayersMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListLayersOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListLayersInput struct {
+
+ // The compatible [instruction set architecture].
+ //
+ // [instruction set architecture]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html
+ CompatibleArchitecture types.Architecture
+
+ // A runtime identifier.
+ //
+ // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ CompatibleRuntime types.Runtime
+
+ // A pagination token returned by a previous call.
+ Marker *string
+
+ // The maximum number of layers to return.
+ MaxItems *int32
+
+ noSmithyDocumentSerde
+}
+
+type ListLayersOutput struct {
+
+ // A list of function layers.
+ Layers []types.LayersListItem
+
+ // A pagination token returned when the response doesn't contain all layers.
+ NextMarker *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListLayersMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListLayers{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLayers{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListLayers"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLayers(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListLayersPaginatorOptions is the paginator options for ListLayers
+type ListLayersPaginatorOptions struct {
+ // The maximum number of layers to return.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListLayersPaginator is a paginator for ListLayers
+type ListLayersPaginator struct {
+ options ListLayersPaginatorOptions
+ client ListLayersAPIClient
+ params *ListLayersInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListLayersPaginator returns a new ListLayersPaginator
+func NewListLayersPaginator(client ListLayersAPIClient, params *ListLayersInput, optFns ...func(*ListLayersPaginatorOptions)) *ListLayersPaginator {
+ if params == nil {
+ params = &ListLayersInput{}
+ }
+
+ options := ListLayersPaginatorOptions{}
+ if params.MaxItems != nil {
+ options.Limit = *params.MaxItems
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListLayersPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListLayersPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListLayers page.
+func (p *ListLayersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLayersOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxItems = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListLayers(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListLayersAPIClient is a client that implements the ListLayers operation.
+type ListLayersAPIClient interface {
+ ListLayers(context.Context, *ListLayersInput, ...func(*Options)) (*ListLayersOutput, error)
+}
+
+var _ ListLayersAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListLayers(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListLayers",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go
new file mode 100644
index 00000000..1e80fa1c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go
@@ -0,0 +1,277 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Retrieves a list of provisioned concurrency configurations for a function.
+func (c *Client) ListProvisionedConcurrencyConfigs(ctx context.Context, params *ListProvisionedConcurrencyConfigsInput, optFns ...func(*Options)) (*ListProvisionedConcurrencyConfigsOutput, error) {
+ if params == nil {
+ params = &ListProvisionedConcurrencyConfigsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListProvisionedConcurrencyConfigs", params, optFns, c.addOperationListProvisionedConcurrencyConfigsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListProvisionedConcurrencyConfigsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListProvisionedConcurrencyConfigsInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specify the pagination token that's returned by a previous request to retrieve
+ // the next page of results.
+ Marker *string
+
+ // Specify a number to limit the number of configurations returned.
+ MaxItems *int32
+
+ noSmithyDocumentSerde
+}
+
+type ListProvisionedConcurrencyConfigsOutput struct {
+
+ // The pagination token that's included if more results are available.
+ NextMarker *string
+
+ // A list of provisioned concurrency configurations.
+ ProvisionedConcurrencyConfigs []types.ProvisionedConcurrencyConfigListItem
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListProvisionedConcurrencyConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListProvisionedConcurrencyConfigs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListProvisionedConcurrencyConfigs"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListProvisionedConcurrencyConfigsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProvisionedConcurrencyConfigs(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListProvisionedConcurrencyConfigsPaginatorOptions is the paginator options for
+// ListProvisionedConcurrencyConfigs
+type ListProvisionedConcurrencyConfigsPaginatorOptions struct {
+ // Specify a number to limit the number of configurations returned.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListProvisionedConcurrencyConfigsPaginator is a paginator for
+// ListProvisionedConcurrencyConfigs
+type ListProvisionedConcurrencyConfigsPaginator struct {
+ options ListProvisionedConcurrencyConfigsPaginatorOptions
+ client ListProvisionedConcurrencyConfigsAPIClient
+ params *ListProvisionedConcurrencyConfigsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListProvisionedConcurrencyConfigsPaginator returns a new
+// ListProvisionedConcurrencyConfigsPaginator
+func NewListProvisionedConcurrencyConfigsPaginator(client ListProvisionedConcurrencyConfigsAPIClient, params *ListProvisionedConcurrencyConfigsInput, optFns ...func(*ListProvisionedConcurrencyConfigsPaginatorOptions)) *ListProvisionedConcurrencyConfigsPaginator {
+ if params == nil {
+ params = &ListProvisionedConcurrencyConfigsInput{}
+ }
+
+ options := ListProvisionedConcurrencyConfigsPaginatorOptions{}
+ if params.MaxItems != nil {
+ options.Limit = *params.MaxItems
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListProvisionedConcurrencyConfigsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListProvisionedConcurrencyConfigsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListProvisionedConcurrencyConfigs page.
+func (p *ListProvisionedConcurrencyConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListProvisionedConcurrencyConfigsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxItems = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListProvisionedConcurrencyConfigs(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListProvisionedConcurrencyConfigsAPIClient is a client that implements the
+// ListProvisionedConcurrencyConfigs operation.
+type ListProvisionedConcurrencyConfigsAPIClient interface {
+ ListProvisionedConcurrencyConfigs(context.Context, *ListProvisionedConcurrencyConfigsInput, ...func(*Options)) (*ListProvisionedConcurrencyConfigsOutput, error)
+}
+
+var _ ListProvisionedConcurrencyConfigsAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListProvisionedConcurrencyConfigs(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListProvisionedConcurrencyConfigs",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListTags.go
new file mode 100644
index 00000000..aa140911
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListTags.go
@@ -0,0 +1,163 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a function, event source mapping, or code signing configuration's [tags]. You
+// can also view function tags with GetFunction.
+//
+// [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html
+func (c *Client) ListTags(ctx context.Context, params *ListTagsInput, optFns ...func(*Options)) (*ListTagsOutput, error) {
+ if params == nil {
+ params = &ListTagsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListTags", params, optFns, c.addOperationListTagsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListTagsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListTagsInput struct {
+
+ // The resource's Amazon Resource Name (ARN). Note: Lambda does not support adding
+ // tags to function aliases or versions.
+ //
+ // This member is required.
+ Resource *string
+
+ noSmithyDocumentSerde
+}
+
+type ListTagsOutput struct {
+
+ // The function's tags.
+ Tags map[string]string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListTags{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTags{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListTags"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListTagsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTags(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opListTags(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListTags",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListVersionsByFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListVersionsByFunction.go
new file mode 100644
index 00000000..fca5741c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListVersionsByFunction.go
@@ -0,0 +1,282 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a list of [versions], with the version-specific configuration of each. Lambda
+// returns up to 50 versions per call.
+//
+// [versions]: https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
+func (c *Client) ListVersionsByFunction(ctx context.Context, params *ListVersionsByFunctionInput, optFns ...func(*Options)) (*ListVersionsByFunctionOutput, error) {
+ if params == nil {
+ params = &ListVersionsByFunctionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListVersionsByFunction", params, optFns, c.addOperationListVersionsByFunctionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListVersionsByFunctionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListVersionsByFunctionInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specify the pagination token that's returned by a previous request to retrieve
+ // the next page of results.
+ Marker *string
+
+ // The maximum number of versions to return. Note that ListVersionsByFunction
+ // returns a maximum of 50 items in each response, even if you set the number
+ // higher.
+ MaxItems *int32
+
+ noSmithyDocumentSerde
+}
+
+type ListVersionsByFunctionOutput struct {
+
+ // The pagination token that's included if more results are available.
+ NextMarker *string
+
+ // A list of Lambda function versions.
+ Versions []types.FunctionConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListVersionsByFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpListVersionsByFunction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListVersionsByFunction{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListVersionsByFunction"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListVersionsByFunctionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVersionsByFunction(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListVersionsByFunctionPaginatorOptions is the paginator options for
+// ListVersionsByFunction
+type ListVersionsByFunctionPaginatorOptions struct {
+ // The maximum number of versions to return. Note that ListVersionsByFunction
+ // returns a maximum of 50 items in each response, even if you set the number
+ // higher.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListVersionsByFunctionPaginator is a paginator for ListVersionsByFunction
+type ListVersionsByFunctionPaginator struct {
+ options ListVersionsByFunctionPaginatorOptions
+ client ListVersionsByFunctionAPIClient
+ params *ListVersionsByFunctionInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListVersionsByFunctionPaginator returns a new ListVersionsByFunctionPaginator
+func NewListVersionsByFunctionPaginator(client ListVersionsByFunctionAPIClient, params *ListVersionsByFunctionInput, optFns ...func(*ListVersionsByFunctionPaginatorOptions)) *ListVersionsByFunctionPaginator {
+ if params == nil {
+ params = &ListVersionsByFunctionInput{}
+ }
+
+ options := ListVersionsByFunctionPaginatorOptions{}
+ if params.MaxItems != nil {
+ options.Limit = *params.MaxItems
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListVersionsByFunctionPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListVersionsByFunctionPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListVersionsByFunction page.
+func (p *ListVersionsByFunctionPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListVersionsByFunctionOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.MaxItems = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListVersionsByFunction(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListVersionsByFunctionAPIClient is a client that implements the
+// ListVersionsByFunction operation.
+type ListVersionsByFunctionAPIClient interface {
+ ListVersionsByFunction(context.Context, *ListVersionsByFunctionInput, ...func(*Options)) (*ListVersionsByFunctionOutput, error)
+}
+
+var _ ListVersionsByFunctionAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListVersionsByFunction(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListVersionsByFunction",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishLayerVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishLayerVersion.go
new file mode 100644
index 00000000..223a273b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishLayerVersion.go
@@ -0,0 +1,233 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates an [Lambda layer] from a ZIP archive. Each time you call PublishLayerVersion with the
+// same layer name, a new version is created.
+//
+// Add layers to your function with CreateFunction or UpdateFunctionConfiguration.
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+func (c *Client) PublishLayerVersion(ctx context.Context, params *PublishLayerVersionInput, optFns ...func(*Options)) (*PublishLayerVersionOutput, error) {
+ if params == nil {
+ params = &PublishLayerVersionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PublishLayerVersion", params, optFns, c.addOperationPublishLayerVersionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PublishLayerVersionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PublishLayerVersionInput struct {
+
+ // The function layer archive.
+ //
+ // This member is required.
+ Content *types.LayerVersionContentInput
+
+ // The name or Amazon Resource Name (ARN) of the layer.
+ //
+ // This member is required.
+ LayerName *string
+
+ // A list of compatible [instruction set architectures].
+ //
+ // [instruction set architectures]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html
+ CompatibleArchitectures []types.Architecture
+
+ // A list of compatible [function runtimes]. Used for filtering with ListLayers and ListLayerVersions.
+ //
+ // The following list includes deprecated runtimes. For more information, see [Runtime deprecation policy].
+ //
+ // [function runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+ // [Runtime deprecation policy]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy
+ CompatibleRuntimes []types.Runtime
+
+ // The description of the version.
+ Description *string
+
+ // The layer's software license. It can be any of the following:
+ //
+ // - An [SPDX license identifier]. For example, MIT .
+ //
+ // - The URL of a license hosted on the internet. For example,
+ // https://opensource.org/licenses/MIT .
+ //
+ // - The full text of the license.
+ //
+ // [SPDX license identifier]: https://spdx.org/licenses/
+ LicenseInfo *string
+
+ noSmithyDocumentSerde
+}
+
+type PublishLayerVersionOutput struct {
+
+ // A list of compatible [instruction set architectures].
+ //
+ // [instruction set architectures]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html
+ CompatibleArchitectures []types.Architecture
+
+ // The layer's compatible runtimes.
+ //
+ // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ CompatibleRuntimes []types.Runtime
+
+ // Details about the layer version.
+ Content *types.LayerVersionContentOutput
+
+ // The date that the layer version was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ CreatedDate *string
+
+ // The description of the version.
+ Description *string
+
+ // The ARN of the layer.
+ LayerArn *string
+
+ // The ARN of the layer version.
+ LayerVersionArn *string
+
+ // The layer's software license.
+ LicenseInfo *string
+
+ // The version number.
+ Version int64
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPublishLayerVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpPublishLayerVersion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPublishLayerVersion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PublishLayerVersion"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPublishLayerVersionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPublishLayerVersion(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPublishLayerVersion(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PublishLayerVersion",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishVersion.go
new file mode 100644
index 00000000..15b0cbb1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishVersion.go
@@ -0,0 +1,359 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a [version] from the current code and configuration of a function. Use versions
+// to create a snapshot of your function code and configuration that doesn't
+// change.
+//
+// Lambda doesn't publish a version if the function's configuration and code
+// haven't changed since the last version. Use UpdateFunctionCodeor UpdateFunctionConfiguration to update the function before
+// publishing a version.
+//
+// Clients can invoke versions directly or with an alias. To create an alias, use CreateAlias.
+//
+// [version]: https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
+func (c *Client) PublishVersion(ctx context.Context, params *PublishVersionInput, optFns ...func(*Options)) (*PublishVersionOutput, error) {
+ if params == nil {
+ params = &PublishVersionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PublishVersion", params, optFns, c.addOperationPublishVersionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PublishVersionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PublishVersionInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Only publish a version if the hash value matches the value that's specified.
+ // Use this option to avoid publishing a version if the function code has changed
+ // since you last updated it. You can get the hash for the version that you
+ // uploaded from the output of UpdateFunctionCode.
+ CodeSha256 *string
+
+ // A description for the version to override the description in the function
+ // configuration.
+ Description *string
+
+ // Only update the function if the revision ID matches the ID that's specified.
+ // Use this option to avoid publishing a version if the function configuration has
+ // changed since you last updated it.
+ RevisionId *string
+
+ noSmithyDocumentSerde
+}
+
+// Details about a function's configuration.
+type PublishVersionOutput struct {
+
+ // The instruction set architecture that the function supports. Architecture is a
+ // string array with one of the valid values. The default architecture value is
+ // x86_64 .
+ Architectures []types.Architecture
+
+ // The SHA256 hash of the function's deployment package.
+ CodeSha256 *string
+
+ // The size of the function's deployment package, in bytes.
+ CodeSize int64
+
+ // The function's dead letter queue.
+ DeadLetterConfig *types.DeadLetterConfig
+
+ // The function's description.
+ Description *string
+
+ // The function's [environment variables]. Omitted from CloudTrail logs.
+ //
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
+ Environment *types.EnvironmentResponse
+
+ // The size of the function's /tmp directory in MB. The default value is 512, but
+ // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)].
+ //
+ // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
+ EphemeralStorage *types.EphemeralStorage
+
+ // Connection settings for an [Amazon EFS file system].
+ //
+ // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html
+ FileSystemConfigs []types.FileSystemConfig
+
+ // The function's Amazon Resource Name (ARN).
+ FunctionArn *string
+
+ // The name of the function.
+ FunctionName *string
+
+ // The function that Lambda calls to begin running your function.
+ Handler *string
+
+ // The function's image configuration values.
+ ImageConfigResponse *types.ImageConfigResponse
+
+ // The ARN of the Key Management Service (KMS) customer managed key that's used to
+ // encrypt the following resources:
+ //
+ // - The function's [environment variables].
+ //
+ // - The function's [Lambda SnapStart]snapshots.
+ //
+ // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment
+ // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda].
+ //
+ // - The optimized version of the container image that's used for function
+ // invocations. Note that this is not the same key that's used to protect your
+ // container image in the Amazon Elastic Container Registry (Amazon ECR). For more
+ // information, see [Function lifecycle].
+ //
+ // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key].
+ //
+ // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+ // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption
+ // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption
+ // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle
+ // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+ KMSKeyArn *string
+
+ // The date and time that the function was last updated, in [ISO-8601 format]
+ // (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ LastModified *string
+
+ // The status of the last update that was performed on the function. This is first
+ // set to Successful after function creation completes.
+ LastUpdateStatus types.LastUpdateStatus
+
+ // The reason for the last update that was performed on the function.
+ LastUpdateStatusReason *string
+
+ // The reason code for the last update that was performed on the function.
+ LastUpdateStatusReasonCode types.LastUpdateStatusReasonCode
+
+ // The function's [layers].
+ //
+ // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+ Layers []types.Layer
+
+ // The function's Amazon CloudWatch Logs configuration settings.
+ LoggingConfig *types.LoggingConfig
+
+ // For Lambda@Edge functions, the ARN of the main function.
+ MasterArn *string
+
+ // The amount of memory available to the function at runtime.
+ MemorySize *int32
+
+ // The type of deployment package. Set to Image for container image and set Zip
+ // for .zip file archive.
+ PackageType types.PackageType
+
+ // The latest updated revision of the function or alias.
+ RevisionId *string
+
+ // The function's execution role.
+ Role *string
+
+ // The identifier of the function's [runtime]. Runtime is required if the deployment
+ // package is a .zip file archive. Specifying a runtime results in an error if
+ // you're deploying a function using a container image.
+ //
+ // The following list includes deprecated runtimes. Lambda blocks creating new
+ // functions and updating existing functions shortly after each runtime is
+ // deprecated. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ Runtime types.Runtime
+
+ // The ARN of the runtime and any errors that occured.
+ RuntimeVersionConfig *types.RuntimeVersionConfig
+
+ // The ARN of the signing job.
+ SigningJobArn *string
+
+ // The ARN of the signing profile version.
+ SigningProfileVersionArn *string
+
+ // Set ApplyOn to PublishedVersions to create a snapshot of the initialized
+ // execution environment when you publish a function version. For more information,
+ // see [Improving startup performance with Lambda SnapStart].
+ //
+ // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
+ SnapStart *types.SnapStartResponse
+
+ // The current state of the function. When the state is Inactive , you can
+ // reactivate the function by invoking it.
+ State types.State
+
+ // The reason for the function's current state.
+ StateReason *string
+
+ // The reason code for the function's current state. When the code is Creating ,
+ // you can't invoke or modify the function.
+ StateReasonCode types.StateReasonCode
+
+ // The amount of time in seconds that Lambda allows a function to run before
+ // stopping it.
+ Timeout *int32
+
+ // The function's X-Ray tracing configuration.
+ TracingConfig *types.TracingConfigResponse
+
+ // The version of the Lambda function.
+ Version *string
+
+ // The function's networking configuration.
+ VpcConfig *types.VpcConfigResponse
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPublishVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpPublishVersion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPublishVersion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PublishVersion"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPublishVersionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPublishVersion(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPublishVersion(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PublishVersion",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionCodeSigningConfig.go
new file mode 100644
index 00000000..b6ce4301
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionCodeSigningConfig.go
@@ -0,0 +1,195 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Update the code signing configuration for the function. Changes to the code
+// signing configuration take effect the next time a user tries to deploy a code
+// package to the function.
+func (c *Client) PutFunctionCodeSigningConfig(ctx context.Context, params *PutFunctionCodeSigningConfigInput, optFns ...func(*Options)) (*PutFunctionCodeSigningConfigOutput, error) {
+ if params == nil {
+ params = &PutFunctionCodeSigningConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutFunctionCodeSigningConfig", params, optFns, c.addOperationPutFunctionCodeSigningConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutFunctionCodeSigningConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutFunctionCodeSigningConfigInput struct {
+
+ // The The Amazon Resource Name (ARN) of the code signing configuration.
+ //
+ // This member is required.
+ CodeSigningConfigArn *string
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ noSmithyDocumentSerde
+}
+
+type PutFunctionCodeSigningConfigOutput struct {
+
+ // The The Amazon Resource Name (ARN) of the code signing configuration.
+ //
+ // This member is required.
+ CodeSigningConfigArn *string
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutFunctionCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpPutFunctionCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutFunctionCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutFunctionCodeSigningConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutFunctionCodeSigningConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFunctionCodeSigningConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutFunctionCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutFunctionCodeSigningConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionConcurrency.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionConcurrency.go
new file mode 100644
index 00000000..46720967
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionConcurrency.go
@@ -0,0 +1,192 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Sets the maximum number of simultaneous executions for a function, and reserves
+// capacity for that concurrency level.
+//
+// Concurrency settings apply to the function as a whole, including all published
+// versions and the unpublished version. Reserving concurrency both ensures that
+// your function has capacity to process the specified number of events
+// simultaneously, and prevents it from scaling beyond that level. Use GetFunctionto see the
+// current setting for a function.
+//
+// Use GetAccountSettings to see your Regional concurrency limit. You can reserve concurrency for as
+// many functions as you like, as long as you leave at least 100 simultaneous
+// executions unreserved for functions that aren't configured with a per-function
+// limit. For more information, see [Lambda function scaling].
+//
+// [Lambda function scaling]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-scaling.html
+func (c *Client) PutFunctionConcurrency(ctx context.Context, params *PutFunctionConcurrencyInput, optFns ...func(*Options)) (*PutFunctionConcurrencyOutput, error) {
+ if params == nil {
+ params = &PutFunctionConcurrencyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutFunctionConcurrency", params, optFns, c.addOperationPutFunctionConcurrencyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutFunctionConcurrencyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutFunctionConcurrencyInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The number of simultaneous executions to reserve for the function.
+ //
+ // This member is required.
+ ReservedConcurrentExecutions *int32
+
+ noSmithyDocumentSerde
+}
+
+type PutFunctionConcurrencyOutput struct {
+
+ // The number of concurrent executions that are reserved for this function. For
+ // more information, see [Managing Lambda reserved concurrency].
+ //
+ // [Managing Lambda reserved concurrency]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
+ ReservedConcurrentExecutions *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutFunctionConcurrencyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpPutFunctionConcurrency{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutFunctionConcurrency{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutFunctionConcurrency"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutFunctionConcurrencyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFunctionConcurrency(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutFunctionConcurrency(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutFunctionConcurrency",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionEventInvokeConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionEventInvokeConfig.go
new file mode 100644
index 00000000..9d6a0e4d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionEventInvokeConfig.go
@@ -0,0 +1,248 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Configures options for [asynchronous invocation] on a function, version, or alias. If a configuration
+// already exists for a function, version, or alias, this operation overwrites it.
+// If you exclude any settings, they are removed. To set one option without
+// affecting existing settings for other options, use UpdateFunctionEventInvokeConfig.
+//
+// By default, Lambda retries an asynchronous invocation twice if the function
+// returns an error. It retains events in a queue for up to six hours. When an
+// event fails all processing attempts or stays in the asynchronous invocation
+// queue for too long, Lambda discards it. To retain discarded events, configure a
+// dead-letter queue with UpdateFunctionConfiguration.
+//
+// To send an invocation record to a queue, topic, S3 bucket, function, or event
+// bus, specify a [destination]. You can configure separate destinations for successful
+// invocations (on-success) and events that fail all processing attempts
+// (on-failure). You can configure destinations in addition to or instead of a
+// dead-letter queue.
+//
+// S3 buckets are supported only for on-failure destinations. To retain records of
+// successful invocations, use another destination type.
+//
+// [asynchronous invocation]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html
+// [destination]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations
+func (c *Client) PutFunctionEventInvokeConfig(ctx context.Context, params *PutFunctionEventInvokeConfigInput, optFns ...func(*Options)) (*PutFunctionEventInvokeConfigOutput, error) {
+ if params == nil {
+ params = &PutFunctionEventInvokeConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutFunctionEventInvokeConfig", params, optFns, c.addOperationPutFunctionEventInvokeConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutFunctionEventInvokeConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutFunctionEventInvokeConfigInput struct {
+
+ // The name or ARN of the Lambda function, version, or alias.
+ //
+ // Name formats
+ //
+ // - Function name - my-function (name-only), my-function:v1 (with alias).
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN - 123456789012:function:my-function .
+ //
+ // You can append a version number or alias to any of the formats. The length
+ // constraint applies only to the full ARN. If you specify only the function name,
+ // it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // A destination for events after they have been sent to a function for processing.
+ //
+ // Destinations
+ //
+ // - Function - The Amazon Resource Name (ARN) of a Lambda function.
+ //
+ // - Queue - The ARN of a standard SQS queue.
+ //
+ // - Bucket - The ARN of an Amazon S3 bucket.
+ //
+ // - Topic - The ARN of a standard SNS topic.
+ //
+ // - Event Bus - The ARN of an Amazon EventBridge event bus.
+ //
+ // S3 buckets are supported only for on-failure destinations. To retain records of
+ // successful invocations, use another destination type.
+ DestinationConfig *types.DestinationConfig
+
+ // The maximum age of a request that Lambda sends to a function for processing.
+ MaximumEventAgeInSeconds *int32
+
+ // The maximum number of times to retry when the function returns an error.
+ MaximumRetryAttempts *int32
+
+ // A version number or alias name.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type PutFunctionEventInvokeConfigOutput struct {
+
+ // A destination for events after they have been sent to a function for processing.
+ //
+ // Destinations
+ //
+ // - Function - The Amazon Resource Name (ARN) of a Lambda function.
+ //
+ // - Queue - The ARN of a standard SQS queue.
+ //
+ // - Bucket - The ARN of an Amazon S3 bucket.
+ //
+ // - Topic - The ARN of a standard SNS topic.
+ //
+ // - Event Bus - The ARN of an Amazon EventBridge event bus.
+ //
+ // S3 buckets are supported only for on-failure destinations. To retain records of
+ // successful invocations, use another destination type.
+ DestinationConfig *types.DestinationConfig
+
+ // The Amazon Resource Name (ARN) of the function.
+ FunctionArn *string
+
+ // The date and time that the configuration was last updated.
+ LastModified *time.Time
+
+ // The maximum age of a request that Lambda sends to a function for processing.
+ MaximumEventAgeInSeconds *int32
+
+ // The maximum number of times to retry when the function returns an error.
+ MaximumRetryAttempts *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutFunctionEventInvokeConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpPutFunctionEventInvokeConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutFunctionEventInvokeConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutFunctionEventInvokeConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutFunctionEventInvokeConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFunctionEventInvokeConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutFunctionEventInvokeConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutFunctionEventInvokeConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionRecursionConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionRecursionConfig.go
new file mode 100644
index 00000000..78ee7b84
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionRecursionConfig.go
@@ -0,0 +1,215 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Sets your function's [recursive loop detection] configuration.
+//
+// When you configure a Lambda function to output to the same service or resource
+// that invokes the function, it's possible to create an infinite recursive loop.
+// For example, a Lambda function might write a message to an Amazon Simple Queue
+// Service (Amazon SQS) queue, which then invokes the same function. This
+// invocation causes the function to write another message to the queue, which in
+// turn invokes the function again.
+//
+// Lambda can detect certain types of recursive loops shortly after they occur.
+// When Lambda detects a recursive loop and your function's recursive loop
+// detection configuration is set to Terminate , it stops your function being
+// invoked and notifies you.
+//
+// [recursive loop detection]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-recursion.html
+func (c *Client) PutFunctionRecursionConfig(ctx context.Context, params *PutFunctionRecursionConfigInput, optFns ...func(*Options)) (*PutFunctionRecursionConfigOutput, error) {
+ if params == nil {
+ params = &PutFunctionRecursionConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutFunctionRecursionConfig", params, optFns, c.addOperationPutFunctionRecursionConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutFunctionRecursionConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutFunctionRecursionConfigInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // If you set your function's recursive loop detection configuration to Allow ,
+ // Lambda doesn't take any action when it detects your function being invoked as
+ // part of a recursive loop. We recommend that you only use this setting if your
+ // design intentionally uses a Lambda function to write data back to the same
+ // Amazon Web Services resource that invokes it.
+ //
+ // If you set your function's recursive loop detection configuration to Terminate ,
+ // Lambda stops your function being invoked and notifies you when it detects your
+ // function being invoked as part of a recursive loop.
+ //
+ // By default, Lambda sets your function's configuration to Terminate .
+ //
+ // If your design intentionally uses a Lambda function to write data back to the
+ // same Amazon Web Services resource that invokes the function, then use caution
+ // and implement suitable guard rails to prevent unexpected charges being billed to
+ // your Amazon Web Services account. To learn more about best practices for using
+ // recursive invocation patterns, see [Recursive patterns that cause run-away Lambda functions]in Serverless Land.
+ //
+ // [Recursive patterns that cause run-away Lambda functions]: https://serverlessland.com/content/service/lambda/guides/aws-lambda-operator-guide/recursive-runaway
+ //
+ // This member is required.
+ RecursiveLoop types.RecursiveLoop
+
+ noSmithyDocumentSerde
+}
+
+type PutFunctionRecursionConfigOutput struct {
+
+ // The status of your function's recursive loop detection configuration.
+ //
+ // When this value is set to Allow and Lambda detects your function being invoked
+ // as part of a recursive loop, it doesn't take any action.
+ //
+ // When this value is set to Terminate and Lambda detects your function being
+ // invoked as part of a recursive loop, it stops your function being invoked and
+ // notifies you.
+ RecursiveLoop types.RecursiveLoop
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutFunctionRecursionConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpPutFunctionRecursionConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutFunctionRecursionConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutFunctionRecursionConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutFunctionRecursionConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFunctionRecursionConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutFunctionRecursionConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutFunctionRecursionConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutProvisionedConcurrencyConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutProvisionedConcurrencyConfig.go
new file mode 100644
index 00000000..7dbb42af
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutProvisionedConcurrencyConfig.go
@@ -0,0 +1,201 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Adds a provisioned concurrency configuration to a function's alias or version.
+func (c *Client) PutProvisionedConcurrencyConfig(ctx context.Context, params *PutProvisionedConcurrencyConfigInput, optFns ...func(*Options)) (*PutProvisionedConcurrencyConfigOutput, error) {
+ if params == nil {
+ params = &PutProvisionedConcurrencyConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutProvisionedConcurrencyConfig", params, optFns, c.addOperationPutProvisionedConcurrencyConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutProvisionedConcurrencyConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutProvisionedConcurrencyConfigInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The amount of provisioned concurrency to allocate for the version or alias.
+ //
+ // This member is required.
+ ProvisionedConcurrentExecutions *int32
+
+ // The version number or alias name.
+ //
+ // This member is required.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type PutProvisionedConcurrencyConfigOutput struct {
+
+ // The amount of provisioned concurrency allocated. When a weighted alias is used
+ // during linear and canary deployments, this value fluctuates depending on the
+ // amount of concurrency that is provisioned for the function versions.
+ AllocatedProvisionedConcurrentExecutions *int32
+
+ // The amount of provisioned concurrency available.
+ AvailableProvisionedConcurrentExecutions *int32
+
+ // The date and time that a user last updated the configuration, in [ISO 8601 format].
+ //
+ // [ISO 8601 format]: https://www.iso.org/iso-8601-date-and-time-format.html
+ LastModified *string
+
+ // The amount of provisioned concurrency requested.
+ RequestedProvisionedConcurrentExecutions *int32
+
+ // The status of the allocation process.
+ Status types.ProvisionedConcurrencyStatusEnum
+
+ // For failed allocations, the reason that provisioned concurrency could not be
+ // allocated.
+ StatusReason *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutProvisionedConcurrencyConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpPutProvisionedConcurrencyConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutProvisionedConcurrencyConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutProvisionedConcurrencyConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutProvisionedConcurrencyConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutProvisionedConcurrencyConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutProvisionedConcurrencyConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutRuntimeManagementConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutRuntimeManagementConfig.go
new file mode 100644
index 00000000..f514d2f8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutRuntimeManagementConfig.go
@@ -0,0 +1,220 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Sets the runtime management configuration for a function's version. For more
+// information, see [Runtime updates].
+//
+// [Runtime updates]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html
+func (c *Client) PutRuntimeManagementConfig(ctx context.Context, params *PutRuntimeManagementConfigInput, optFns ...func(*Options)) (*PutRuntimeManagementConfigOutput, error) {
+ if params == nil {
+ params = &PutRuntimeManagementConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutRuntimeManagementConfig", params, optFns, c.addOperationPutRuntimeManagementConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutRuntimeManagementConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutRuntimeManagementConfigInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Specify the runtime update mode.
+ //
+ // - Auto (default) - Automatically update to the most recent and secure runtime
+ // version using a [Two-phase runtime version rollout]. This is the best choice for most customers to ensure they
+ // always benefit from runtime updates.
+ //
+ // - Function update - Lambda updates the runtime of your function to the most
+ // recent and secure runtime version when you update your function. This approach
+ // synchronizes runtime updates with function deployments, giving you control over
+ // when runtime updates are applied and allowing you to detect and mitigate rare
+ // runtime update incompatibilities early. When using this setting, you need to
+ // regularly update your functions to keep their runtime up-to-date.
+ //
+ // - Manual - You specify a runtime version in your function configuration. The
+ // function will use this runtime version indefinitely. In the rare case where a
+ // new runtime version is incompatible with an existing function, this allows you
+ // to roll back your function to an earlier runtime version. For more information,
+ // see [Roll back a runtime version].
+ //
+ // [Two-phase runtime version rollout]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase
+ // [Roll back a runtime version]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback
+ //
+ // This member is required.
+ UpdateRuntimeOn types.UpdateRuntimeOn
+
+ // Specify a version of the function. This can be $LATEST or a published version
+ // number. If no value is specified, the configuration for the $LATEST version is
+ // returned.
+ Qualifier *string
+
+ // The ARN of the runtime version you want the function to use.
+ //
+ // This is only required if you're using the Manual runtime update mode.
+ RuntimeVersionArn *string
+
+ noSmithyDocumentSerde
+}
+
+type PutRuntimeManagementConfigOutput struct {
+
+ // The ARN of the function
+ //
+ // This member is required.
+ FunctionArn *string
+
+ // The runtime update mode.
+ //
+ // This member is required.
+ UpdateRuntimeOn types.UpdateRuntimeOn
+
+ // The ARN of the runtime the function is configured to use. If the runtime update
+ // mode is manual, the ARN is returned, otherwise null is returned.
+ RuntimeVersionArn *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutRuntimeManagementConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpPutRuntimeManagementConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutRuntimeManagementConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutRuntimeManagementConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutRuntimeManagementConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRuntimeManagementConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutRuntimeManagementConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutRuntimeManagementConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemoveLayerVersionPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemoveLayerVersionPermission.go
new file mode 100644
index 00000000..ee2ed14a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemoveLayerVersionPermission.go
@@ -0,0 +1,172 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Removes a statement from the permissions policy for a version of an [Lambda layer]. For more
+// information, see AddLayerVersionPermission.
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+func (c *Client) RemoveLayerVersionPermission(ctx context.Context, params *RemoveLayerVersionPermissionInput, optFns ...func(*Options)) (*RemoveLayerVersionPermissionOutput, error) {
+ if params == nil {
+ params = &RemoveLayerVersionPermissionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RemoveLayerVersionPermission", params, optFns, c.addOperationRemoveLayerVersionPermissionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RemoveLayerVersionPermissionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RemoveLayerVersionPermissionInput struct {
+
+ // The name or Amazon Resource Name (ARN) of the layer.
+ //
+ // This member is required.
+ LayerName *string
+
+ // The identifier that was specified when the statement was added.
+ //
+ // This member is required.
+ StatementId *string
+
+ // The version number.
+ //
+ // This member is required.
+ VersionNumber *int64
+
+ // Only update the policy if the revision ID matches the ID specified. Use this
+ // option to avoid modifying a policy that has changed since you last read it.
+ RevisionId *string
+
+ noSmithyDocumentSerde
+}
+
+type RemoveLayerVersionPermissionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRemoveLayerVersionPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpRemoveLayerVersionPermission{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRemoveLayerVersionPermission{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "RemoveLayerVersionPermission"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpRemoveLayerVersionPermissionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveLayerVersionPermission(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opRemoveLayerVersionPermission(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "RemoveLayerVersionPermission",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemovePermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemovePermission.go
new file mode 100644
index 00000000..b9132292
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemovePermission.go
@@ -0,0 +1,182 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Revokes function-use permission from an Amazon Web Services service or another
+// Amazon Web Services account. You can get the ID of the statement from the output
+// of GetPolicy.
+func (c *Client) RemovePermission(ctx context.Context, params *RemovePermissionInput, optFns ...func(*Options)) (*RemovePermissionOutput, error) {
+ if params == nil {
+ params = &RemovePermissionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RemovePermission", params, optFns, c.addOperationRemovePermissionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RemovePermissionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RemovePermissionInput struct {
+
+ // The name or ARN of the Lambda function, version, or alias.
+ //
+ // Name formats
+ //
+ // - Function name – my-function (name-only), my-function:v1 (with alias).
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // You can append a version number or alias to any of the formats. The length
+ // constraint applies only to the full ARN. If you specify only the function name,
+ // it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // Statement ID of the permission to remove.
+ //
+ // This member is required.
+ StatementId *string
+
+ // Specify a version or alias to remove permissions from a published version of
+ // the function.
+ Qualifier *string
+
+ // Update the policy only if the revision ID matches the ID that's specified. Use
+ // this option to avoid modifying a policy that has changed since you last read it.
+ RevisionId *string
+
+ noSmithyDocumentSerde
+}
+
+type RemovePermissionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpRemovePermission{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRemovePermission{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "RemovePermission"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpRemovePermissionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemovePermission(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opRemovePermission(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "RemovePermission",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_TagResource.go
new file mode 100644
index 00000000..f58cad0a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_TagResource.go
@@ -0,0 +1,162 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Adds [tags] to a function, event source mapping, or code signing configuration.
+//
+// [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html
+func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) {
+ if params == nil {
+ params = &TagResourceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*TagResourceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type TagResourceInput struct {
+
+ // The resource's Amazon Resource Name (ARN).
+ //
+ // This member is required.
+ Resource *string
+
+ // A list of tags to apply to the resource.
+ //
+ // This member is required.
+ Tags map[string]string
+
+ noSmithyDocumentSerde
+}
+
+type TagResourceOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpTagResourceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "TagResource",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UntagResource.go
new file mode 100644
index 00000000..13a7707a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UntagResource.go
@@ -0,0 +1,162 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Removes [tags] from a function, event source mapping, or code signing configuration.
+//
+// [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html
+func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) {
+ if params == nil {
+ params = &UntagResourceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UntagResourceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UntagResourceInput struct {
+
+ // The resource's Amazon Resource Name (ARN).
+ //
+ // This member is required.
+ Resource *string
+
+ // A list of tag keys to remove from the resource.
+ //
+ // This member is required.
+ TagKeys []string
+
+ noSmithyDocumentSerde
+}
+
+type UntagResourceOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUntagResourceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UntagResource",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateAlias.go
new file mode 100644
index 00000000..646e0487
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateAlias.go
@@ -0,0 +1,213 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Updates the configuration of a Lambda function [alias].
+//
+// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
+func (c *Client) UpdateAlias(ctx context.Context, params *UpdateAliasInput, optFns ...func(*Options)) (*UpdateAliasOutput, error) {
+ if params == nil {
+ params = &UpdateAliasInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateAlias", params, optFns, c.addOperationUpdateAliasMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateAliasOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateAliasInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name - MyFunction .
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Partial ARN - 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The name of the alias.
+ //
+ // This member is required.
+ Name *string
+
+ // A description of the alias.
+ Description *string
+
+ // The function version that the alias invokes.
+ FunctionVersion *string
+
+ // Only update the alias if the revision ID matches the ID that's specified. Use
+ // this option to avoid modifying an alias that has changed since you last read it.
+ RevisionId *string
+
+ // The [routing configuration] of the alias.
+ //
+ // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html#configuring-alias-routing
+ RoutingConfig *types.AliasRoutingConfiguration
+
+ noSmithyDocumentSerde
+}
+
+// Provides configuration information about a Lambda function [alias].
+//
+// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
+type UpdateAliasOutput struct {
+
+ // The Amazon Resource Name (ARN) of the alias.
+ AliasArn *string
+
+ // A description of the alias.
+ Description *string
+
+ // The function version that the alias invokes.
+ FunctionVersion *string
+
+ // The name of the alias.
+ Name *string
+
+ // A unique identifier that changes when you update the alias.
+ RevisionId *string
+
+ // The [routing configuration] of the alias.
+ //
+ // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html
+ RoutingConfig *types.AliasRoutingConfiguration
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateAliasMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAlias"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUpdateAliasValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAlias(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUpdateAlias(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UpdateAlias",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateCodeSigningConfig.go
new file mode 100644
index 00000000..39e1e8d9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateCodeSigningConfig.go
@@ -0,0 +1,173 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Update the code signing configuration. Changes to the code signing
+// configuration take effect the next time a user tries to deploy a code package to
+// the function.
+func (c *Client) UpdateCodeSigningConfig(ctx context.Context, params *UpdateCodeSigningConfigInput, optFns ...func(*Options)) (*UpdateCodeSigningConfigOutput, error) {
+ if params == nil {
+ params = &UpdateCodeSigningConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateCodeSigningConfig", params, optFns, c.addOperationUpdateCodeSigningConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateCodeSigningConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateCodeSigningConfigInput struct {
+
+ // The The Amazon Resource Name (ARN) of the code signing configuration.
+ //
+ // This member is required.
+ CodeSigningConfigArn *string
+
+ // Signing profiles for this code signing configuration.
+ AllowedPublishers *types.AllowedPublishers
+
+ // The code signing policy.
+ CodeSigningPolicies *types.CodeSigningPolicies
+
+ // Descriptive name for this code signing configuration.
+ Description *string
+
+ noSmithyDocumentSerde
+}
+
+type UpdateCodeSigningConfigOutput struct {
+
+ // The code signing configuration
+ //
+ // This member is required.
+ CodeSigningConfig *types.CodeSigningConfig
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateCodeSigningConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateCodeSigningConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUpdateCodeSigningConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCodeSigningConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUpdateCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UpdateCodeSigningConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateEventSourceMapping.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateEventSourceMapping.go
new file mode 100644
index 00000000..401adfe8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateEventSourceMapping.go
@@ -0,0 +1,519 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Updates an event source mapping. You can change the function that Lambda
+// invokes, or pause invocation and resume later from the same location.
+//
+// For details about how to configure different event sources, see the following
+// topics.
+//
+// [Amazon DynamoDB Streams]
+//
+// [Amazon Kinesis]
+//
+// [Amazon SQS]
+//
+// [Amazon MQ and RabbitMQ]
+//
+// [Amazon MSK]
+//
+// [Apache Kafka]
+//
+// [Amazon DocumentDB]
+//
+// The following error handling options are available only for DynamoDB and
+// Kinesis event sources:
+//
+// - BisectBatchOnFunctionError – If the function returns an error, split the
+// batch in two and retry.
+//
+// - MaximumRecordAgeInSeconds – Discard records older than the specified age.
+// The default value is infinite (-1). When set to infinite (-1), failed records
+// are retried until the record expires
+//
+// - MaximumRetryAttempts – Discard records after the specified number of
+// retries. The default value is infinite (-1). When set to infinite (-1), failed
+// records are retried until the record expires.
+//
+// - ParallelizationFactor – Process multiple batches from each shard
+// concurrently.
+//
+// For stream sources (DynamoDB, Kinesis, Amazon MSK, and self-managed Apache
+// Kafka), the following option is also available:
+//
+// - DestinationConfig – Send discarded records to an Amazon SQS queue, Amazon
+// SNS topic, or Amazon S3 bucket.
+//
+// For information about which configuration parameters apply to each event
+// source, see the following topics.
+//
+// [Amazon DynamoDB Streams]
+//
+// [Amazon Kinesis]
+//
+// [Amazon SQS]
+//
+// [Amazon MQ and RabbitMQ]
+//
+// [Amazon MSK]
+//
+// [Apache Kafka]
+//
+// [Amazon DocumentDB]
+//
+// [Amazon DynamoDB Streams]: https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-params
+// [Amazon SQS]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-params
+// [Amazon MSK]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-parms
+// [Amazon Kinesis]: https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-params
+// [Amazon MQ and RabbitMQ]: https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-params
+// [Apache Kafka]: https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms
+// [Amazon DocumentDB]: https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html#docdb-configuration
+func (c *Client) UpdateEventSourceMapping(ctx context.Context, params *UpdateEventSourceMappingInput, optFns ...func(*Options)) (*UpdateEventSourceMappingOutput, error) {
+ if params == nil {
+ params = &UpdateEventSourceMappingInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateEventSourceMapping", params, optFns, c.addOperationUpdateEventSourceMappingMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateEventSourceMappingOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateEventSourceMappingInput struct {
+
+ // The identifier of the event source mapping.
+ //
+ // This member is required.
+ UUID *string
+
+ // The maximum number of records in each batch that Lambda pulls from your stream
+ // or queue and sends to your function. Lambda passes all of the records in the
+ // batch to the function in a single call, up to the payload limit for synchronous
+ // invocation (6 MB).
+ //
+ // - Amazon Kinesis – Default 100. Max 10,000.
+ //
+ // - Amazon DynamoDB Streams – Default 100. Max 10,000.
+ //
+ // - Amazon Simple Queue Service – Default 10. For standard queues the max is
+ // 10,000. For FIFO queues the max is 10.
+ //
+ // - Amazon Managed Streaming for Apache Kafka – Default 100. Max 10,000.
+ //
+ // - Self-managed Apache Kafka – Default 100. Max 10,000.
+ //
+ // - Amazon MQ (ActiveMQ and RabbitMQ) – Default 100. Max 10,000.
+ //
+ // - DocumentDB – Default 100. Max 10,000.
+ BatchSize *int32
+
+ // (Kinesis and DynamoDB Streams only) If the function returns an error, split the
+ // batch in two and retry.
+ BisectBatchOnFunctionError *bool
+
+ // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only) A
+ // configuration object that specifies the destination of an event after Lambda
+ // processes it.
+ DestinationConfig *types.DestinationConfig
+
+ // Specific configuration settings for a DocumentDB event source.
+ DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig
+
+ // When true, the event source mapping is active. When false, Lambda pauses
+ // polling and invocation.
+ //
+ // Default: True
+ Enabled *bool
+
+ // An object that defines the filter criteria that determine whether Lambda should
+ // process an event. For more information, see [Lambda event filtering].
+ //
+ // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html
+ FilterCriteria *types.FilterCriteria
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – MyFunction .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
+ //
+ // - Version or Alias ARN –
+ // arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD .
+ //
+ // - Partial ARN – 123456789012:function:MyFunction .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it's limited to 64 characters in length.
+ FunctionName *string
+
+ // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type
+ // enums applied to the event source mapping.
+ FunctionResponseTypes []types.FunctionResponseType
+
+ // The ARN of the Key Management Service (KMS) customer managed key that Lambda
+ // uses to encrypt your function's [filter criteria]. By default, Lambda does not encrypt your
+ // filter criteria object. Specify this property to encrypt data using your own
+ // customer managed key.
+ //
+ // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics
+ KMSKeyArn *string
+
+ // The maximum amount of time, in seconds, that Lambda spends gathering records
+ // before invoking the function. You can configure MaximumBatchingWindowInSeconds
+ // to any value from 0 seconds to 300 seconds in increments of seconds.
+ //
+ // For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching
+ // window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and
+ // DocumentDB event sources, the default batching window is 500 ms. Note that
+ // because you can only change MaximumBatchingWindowInSeconds in increments of
+ // seconds, you cannot revert back to the 500 ms default batching window after you
+ // have changed it. To restore the default batching window, you must create a new
+ // event source mapping.
+ //
+ // Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you
+ // set BatchSize to a value greater than 10, you must set
+ // MaximumBatchingWindowInSeconds to at least 1.
+ MaximumBatchingWindowInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records older than the specified
+ // age. The default value is infinite (-1).
+ MaximumRecordAgeInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records after the specified number
+ // of retries. The default value is infinite (-1). When set to infinite (-1),
+ // failed records are retried until the record expires.
+ MaximumRetryAttempts *int32
+
+ // The metrics configuration for your event source. For more information, see [Event source mapping metrics].
+ //
+ // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics
+ MetricsConfig *types.EventSourceMappingMetricsConfig
+
+ // (Kinesis and DynamoDB Streams only) The number of batches to process from each
+ // shard concurrently.
+ ParallelizationFactor *int32
+
+ // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode
+ // configuration for the event source. For more information, see [Provisioned Mode].
+ //
+ // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode
+ ProvisionedPollerConfig *types.ProvisionedPollerConfig
+
+ // (Amazon SQS only) The scaling configuration for the event source. For more
+ // information, see [Configuring maximum concurrency for Amazon SQS event sources].
+ //
+ // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency
+ ScalingConfig *types.ScalingConfig
+
+ // An array of authentication protocols or VPC components required to secure your
+ // event source.
+ SourceAccessConfigurations []types.SourceAccessConfiguration
+
+ // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing
+ // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds
+ // indicates no tumbling window.
+ TumblingWindowInSeconds *int32
+
+ noSmithyDocumentSerde
+}
+
+// A mapping between an Amazon Web Services resource and a Lambda function. For
+// details, see CreateEventSourceMapping.
+type UpdateEventSourceMappingOutput struct {
+
+ // Specific configuration settings for an Amazon Managed Streaming for Apache
+ // Kafka (Amazon MSK) event source.
+ AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig
+
+ // The maximum number of records in each batch that Lambda pulls from your stream
+ // or queue and sends to your function. Lambda passes all of the records in the
+ // batch to the function in a single call, up to the payload limit for synchronous
+ // invocation (6 MB).
+ //
+ // Default value: Varies by service. For Amazon SQS, the default is 10. For all
+ // other services, the default is 100.
+ //
+ // Related setting: When you set BatchSize to a value greater than 10, you must
+ // set MaximumBatchingWindowInSeconds to at least 1.
+ BatchSize *int32
+
+ // (Kinesis and DynamoDB Streams only) If the function returns an error, split the
+ // batch in two and retry. The default value is false.
+ BisectBatchOnFunctionError *bool
+
+ // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event
+ // sources only) A configuration object that specifies the destination of an event
+ // after Lambda processes it.
+ DestinationConfig *types.DestinationConfig
+
+ // Specific configuration settings for a DocumentDB event source.
+ DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig
+
+ // The Amazon Resource Name (ARN) of the event source.
+ EventSourceArn *string
+
+ // The Amazon Resource Name (ARN) of the event source mapping.
+ EventSourceMappingArn *string
+
+ // An object that defines the filter criteria that determine whether Lambda should
+ // process an event. For more information, see [Lambda event filtering].
+ //
+ // If filter criteria is encrypted, this field shows up as null in the response of
+ // ListEventSourceMapping API calls. You can view this field in plaintext in the
+ // response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have
+ // kms:Decrypt permissions for the correct KMS key.
+ //
+ // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html
+ FilterCriteria *types.FilterCriteria
+
+ // An object that contains details about an error related to filter criteria
+ // encryption.
+ FilterCriteriaError *types.FilterCriteriaError
+
+ // The ARN of the Lambda function.
+ FunctionArn *string
+
+ // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type
+ // enums applied to the event source mapping.
+ FunctionResponseTypes []types.FunctionResponseType
+
+ // The ARN of the Key Management Service (KMS) customer managed key that Lambda
+ // uses to encrypt your function's [filter criteria].
+ //
+ // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics
+ KMSKeyArn *string
+
+ // The date that the event source mapping was last updated or that its state
+ // changed.
+ LastModified *time.Time
+
+ // The result of the last Lambda invocation of your function.
+ LastProcessingResult *string
+
+ // The maximum amount of time, in seconds, that Lambda spends gathering records
+ // before invoking the function. You can configure MaximumBatchingWindowInSeconds
+ // to any value from 0 seconds to 300 seconds in increments of seconds.
+ //
+ // For streams and Amazon SQS event sources, the default batching window is 0
+ // seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB
+ // event sources, the default batching window is 500 ms. Note that because you can
+ // only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot
+ // revert back to the 500 ms default batching window after you have changed it. To
+ // restore the default batching window, you must create a new event source mapping.
+ //
+ // Related setting: For streams and Amazon SQS event sources, when you set
+ // BatchSize to a value greater than 10, you must set
+ // MaximumBatchingWindowInSeconds to at least 1.
+ MaximumBatchingWindowInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records older than the specified
+ // age. The default value is -1, which sets the maximum age to infinite. When the
+ // value is set to infinite, Lambda never discards old records.
+ //
+ // The minimum valid value for maximum record age is 60s. Although values less
+ // than 60 and greater than -1 fall within the parameter's absolute range, they are
+ // not allowed
+ MaximumRecordAgeInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records after the specified number
+ // of retries. The default value is -1, which sets the maximum number of retries to
+ // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records
+ // until the record expires in the event source.
+ MaximumRetryAttempts *int32
+
+ // The metrics configuration for your event source. For more information, see [Event source mapping metrics].
+ //
+ // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics
+ MetricsConfig *types.EventSourceMappingMetricsConfig
+
+ // (Kinesis and DynamoDB Streams only) The number of batches to process
+ // concurrently from each shard. The default value is 1.
+ ParallelizationFactor *int32
+
+ // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode
+ // configuration for the event source. For more information, see [Provisioned Mode].
+ //
+ // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode
+ ProvisionedPollerConfig *types.ProvisionedPollerConfig
+
+ // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
+ Queues []string
+
+ // (Amazon SQS only) The scaling configuration for the event source. For more
+ // information, see [Configuring maximum concurrency for Amazon SQS event sources].
+ //
+ // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency
+ ScalingConfig *types.ScalingConfig
+
+ // The self-managed Apache Kafka cluster for your event source.
+ SelfManagedEventSource *types.SelfManagedEventSource
+
+ // Specific configuration settings for a self-managed Apache Kafka event source.
+ SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig
+
+ // An array of the authentication protocol, VPC components, or virtual host to
+ // secure and define your event source.
+ SourceAccessConfigurations []types.SourceAccessConfiguration
+
+ // The position in a stream from which to start reading. Required for Amazon
+ // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported
+ // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed
+ // Apache Kafka.
+ StartingPosition types.EventSourcePosition
+
+ // With StartingPosition set to AT_TIMESTAMP , the time from which to start
+ // reading. StartingPositionTimestamp cannot be in the future.
+ StartingPositionTimestamp *time.Time
+
+ // The state of the event source mapping. It can be one of the following: Creating
+ // , Enabling , Enabled , Disabling , Disabled , Updating , or Deleting .
+ State *string
+
+ // Indicates whether a user or Lambda made the last change to the event source
+ // mapping.
+ StateTransitionReason *string
+
+ // The name of the Kafka topic.
+ Topics []string
+
+ // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing
+ // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds
+ // indicates no tumbling window.
+ TumblingWindowInSeconds *int32
+
+ // The identifier of the event source mapping.
+ UUID *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateEventSourceMappingMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateEventSourceMapping{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateEventSourceMapping{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateEventSourceMapping"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUpdateEventSourceMappingValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEventSourceMapping(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUpdateEventSourceMapping(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UpdateEventSourceMapping",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionCode.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionCode.go
new file mode 100644
index 00000000..746b6707
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionCode.go
@@ -0,0 +1,401 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Updates a Lambda function's code. If code signing is enabled for the function,
+// the code package must be signed by a trusted publisher. For more information,
+// see [Configuring code signing for Lambda].
+//
+// If the function's package type is Image , then you must specify the code package
+// in ImageUri as the URI of a [container image] in the Amazon ECR registry.
+//
+// If the function's package type is Zip , then you must specify the deployment
+// package as a [.zip file archive]. Enter the Amazon S3 bucket and key of the code .zip file
+// location. You can also provide the function code inline using the ZipFile field.
+//
+// The code in the deployment package must be compatible with the target
+// instruction set architecture of the function ( x86-64 or arm64 ).
+//
+// The function's code is locked when you publish a version. You can't modify the
+// code of a published version, only the unpublished version.
+//
+// For a function defined as a container image, Lambda resolves the image tag to
+// an image digest. In Amazon ECR, if you update the image tag to a new image,
+// Lambda does not automatically update the function.
+//
+// [.zip file archive]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip
+// [Configuring code signing for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html
+// [container image]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html
+func (c *Client) UpdateFunctionCode(ctx context.Context, params *UpdateFunctionCodeInput, optFns ...func(*Options)) (*UpdateFunctionCodeOutput, error) {
+ if params == nil {
+ params = &UpdateFunctionCodeInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateFunctionCode", params, optFns, c.addOperationUpdateFunctionCodeMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateFunctionCodeOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateFunctionCodeInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The instruction set architecture that the function supports. Enter a string
+ // array with one of the valid values (arm64 or x86_64). The default value is
+ // x86_64 .
+ Architectures []types.Architecture
+
+ // Set to true to validate the request parameters and access permissions without
+ // modifying the function code.
+ DryRun bool
+
+ // URI of a container image in the Amazon ECR registry. Do not use for a function
+ // defined with a .zip file archive.
+ ImageUri *string
+
+ // Set to true to publish a new version of the function after updating the code.
+ // This has the same effect as calling PublishVersionseparately.
+ Publish bool
+
+ // Update the function only if the revision ID matches the ID that's specified.
+ // Use this option to avoid modifying a function that has changed since you last
+ // read it.
+ RevisionId *string
+
+ // An Amazon S3 bucket in the same Amazon Web Services Region as your function.
+ // The bucket can be in a different Amazon Web Services account. Use only with a
+ // function defined with a .zip file archive deployment package.
+ S3Bucket *string
+
+ // The Amazon S3 key of the deployment package. Use only with a function defined
+ // with a .zip file archive deployment package.
+ S3Key *string
+
+ // For versioned objects, the version of the deployment package object to use.
+ S3ObjectVersion *string
+
+ // The ARN of the Key Management Service (KMS) customer managed key that's used to
+ // encrypt your function's .zip deployment package. If you don't provide a customer
+ // managed key, Lambda uses an Amazon Web Services managed key.
+ SourceKMSKeyArn *string
+
+ // The base64-encoded contents of the deployment package. Amazon Web Services SDK
+ // and CLI clients handle the encoding for you. Use only with a function defined
+ // with a .zip file archive deployment package.
+ ZipFile []byte
+
+ noSmithyDocumentSerde
+}
+
+// Details about a function's configuration.
+type UpdateFunctionCodeOutput struct {
+
+ // The instruction set architecture that the function supports. Architecture is a
+ // string array with one of the valid values. The default architecture value is
+ // x86_64 .
+ Architectures []types.Architecture
+
+ // The SHA256 hash of the function's deployment package.
+ CodeSha256 *string
+
+ // The size of the function's deployment package, in bytes.
+ CodeSize int64
+
+ // The function's dead letter queue.
+ DeadLetterConfig *types.DeadLetterConfig
+
+ // The function's description.
+ Description *string
+
+ // The function's [environment variables]. Omitted from CloudTrail logs.
+ //
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
+ Environment *types.EnvironmentResponse
+
+ // The size of the function's /tmp directory in MB. The default value is 512, but
+ // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)].
+ //
+ // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
+ EphemeralStorage *types.EphemeralStorage
+
+ // Connection settings for an [Amazon EFS file system].
+ //
+ // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html
+ FileSystemConfigs []types.FileSystemConfig
+
+ // The function's Amazon Resource Name (ARN).
+ FunctionArn *string
+
+ // The name of the function.
+ FunctionName *string
+
+ // The function that Lambda calls to begin running your function.
+ Handler *string
+
+ // The function's image configuration values.
+ ImageConfigResponse *types.ImageConfigResponse
+
+ // The ARN of the Key Management Service (KMS) customer managed key that's used to
+ // encrypt the following resources:
+ //
+ // - The function's [environment variables].
+ //
+ // - The function's [Lambda SnapStart]snapshots.
+ //
+ // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment
+ // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda].
+ //
+ // - The optimized version of the container image that's used for function
+ // invocations. Note that this is not the same key that's used to protect your
+ // container image in the Amazon Elastic Container Registry (Amazon ECR). For more
+ // information, see [Function lifecycle].
+ //
+ // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key].
+ //
+ // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+ // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption
+ // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption
+ // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle
+ // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+ KMSKeyArn *string
+
+ // The date and time that the function was last updated, in [ISO-8601 format]
+ // (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ LastModified *string
+
+ // The status of the last update that was performed on the function. This is first
+ // set to Successful after function creation completes.
+ LastUpdateStatus types.LastUpdateStatus
+
+ // The reason for the last update that was performed on the function.
+ LastUpdateStatusReason *string
+
+ // The reason code for the last update that was performed on the function.
+ LastUpdateStatusReasonCode types.LastUpdateStatusReasonCode
+
+ // The function's [layers].
+ //
+ // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+ Layers []types.Layer
+
+ // The function's Amazon CloudWatch Logs configuration settings.
+ LoggingConfig *types.LoggingConfig
+
+ // For Lambda@Edge functions, the ARN of the main function.
+ MasterArn *string
+
+ // The amount of memory available to the function at runtime.
+ MemorySize *int32
+
+ // The type of deployment package. Set to Image for container image and set Zip
+ // for .zip file archive.
+ PackageType types.PackageType
+
+ // The latest updated revision of the function or alias.
+ RevisionId *string
+
+ // The function's execution role.
+ Role *string
+
+ // The identifier of the function's [runtime]. Runtime is required if the deployment
+ // package is a .zip file archive. Specifying a runtime results in an error if
+ // you're deploying a function using a container image.
+ //
+ // The following list includes deprecated runtimes. Lambda blocks creating new
+ // functions and updating existing functions shortly after each runtime is
+ // deprecated. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ Runtime types.Runtime
+
+ // The ARN of the runtime and any errors that occured.
+ RuntimeVersionConfig *types.RuntimeVersionConfig
+
+ // The ARN of the signing job.
+ SigningJobArn *string
+
+ // The ARN of the signing profile version.
+ SigningProfileVersionArn *string
+
+ // Set ApplyOn to PublishedVersions to create a snapshot of the initialized
+ // execution environment when you publish a function version. For more information,
+ // see [Improving startup performance with Lambda SnapStart].
+ //
+ // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
+ SnapStart *types.SnapStartResponse
+
+ // The current state of the function. When the state is Inactive , you can
+ // reactivate the function by invoking it.
+ State types.State
+
+ // The reason for the function's current state.
+ StateReason *string
+
+ // The reason code for the function's current state. When the code is Creating ,
+ // you can't invoke or modify the function.
+ StateReasonCode types.StateReasonCode
+
+ // The amount of time in seconds that Lambda allows a function to run before
+ // stopping it.
+ Timeout *int32
+
+ // The function's X-Ray tracing configuration.
+ TracingConfig *types.TracingConfigResponse
+
+ // The version of the Lambda function.
+ Version *string
+
+ // The function's networking configuration.
+ VpcConfig *types.VpcConfigResponse
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateFunctionCodeMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFunctionCode{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFunctionCode{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFunctionCode"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUpdateFunctionCodeValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFunctionCode(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUpdateFunctionCode(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UpdateFunctionCode",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionConfiguration.go
new file mode 100644
index 00000000..82139327
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionConfiguration.go
@@ -0,0 +1,475 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Modify the version-specific settings of a Lambda function.
+//
+// When you update a function, Lambda provisions an instance of the function and
+// its supporting resources. If your function connects to a VPC, this process can
+// take a minute. During this time, you can't modify the function, but you can
+// still invoke it. The LastUpdateStatus , LastUpdateStatusReason , and
+// LastUpdateStatusReasonCode fields in the response from GetFunctionConfiguration indicate when the
+// update is complete and the function is processing events with the new
+// configuration. For more information, see [Lambda function states].
+//
+// These settings can vary between versions of a function and are locked when you
+// publish a version. You can't modify the configuration of a published version,
+// only the unpublished version.
+//
+// To configure function concurrency, use PutFunctionConcurrency. To grant invoke permissions to an
+// Amazon Web Services account or Amazon Web Services service, use AddPermission.
+//
+// [Lambda function states]: https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html
+func (c *Client) UpdateFunctionConfiguration(ctx context.Context, params *UpdateFunctionConfigurationInput, optFns ...func(*Options)) (*UpdateFunctionConfigurationOutput, error) {
+ if params == nil {
+ params = &UpdateFunctionConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateFunctionConfiguration", params, optFns, c.addOperationUpdateFunctionConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateFunctionConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateFunctionConfigurationInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // A dead-letter queue configuration that specifies the queue or topic where
+ // Lambda sends asynchronous events when they fail processing. For more
+ // information, see [Dead-letter queues].
+ //
+ // [Dead-letter queues]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq
+ DeadLetterConfig *types.DeadLetterConfig
+
+ // A description of the function.
+ Description *string
+
+ // Environment variables that are accessible from function code during execution.
+ Environment *types.Environment
+
+ // The size of the function's /tmp directory in MB. The default value is 512, but
+ // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)].
+ //
+ // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
+ EphemeralStorage *types.EphemeralStorage
+
+ // Connection settings for an Amazon EFS file system.
+ FileSystemConfigs []types.FileSystemConfig
+
+ // The name of the method within your code that Lambda calls to run your function.
+ // Handler is required if the deployment package is a .zip file archive. The format
+ // includes the file name. It can also include namespaces and other qualifiers,
+ // depending on the runtime. For more information, see [Lambda programming model].
+ //
+ // [Lambda programming model]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html
+ Handler *string
+
+ // [Container image configuration values] that override the values in the container image Docker file.
+ //
+ // [Container image configuration values]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms
+ ImageConfig *types.ImageConfig
+
+ // The ARN of the Key Management Service (KMS) customer managed key that's used to
+ // encrypt the following resources:
+ //
+ // - The function's [environment variables].
+ //
+ // - The function's [Lambda SnapStart]snapshots.
+ //
+ // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment
+ // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda].
+ //
+ // - The optimized version of the container image that's used for function
+ // invocations. Note that this is not the same key that's used to protect your
+ // container image in the Amazon Elastic Container Registry (Amazon ECR). For more
+ // information, see [Function lifecycle].
+ //
+ // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key].
+ //
+ // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+ // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption
+ // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption
+ // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle
+ // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+ KMSKeyArn *string
+
+ // A list of [function layers] to add to the function's execution environment. Specify each layer
+ // by its ARN, including the version.
+ //
+ // [function layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+ Layers []string
+
+ // The function's Amazon CloudWatch Logs configuration settings.
+ LoggingConfig *types.LoggingConfig
+
+ // The amount of [memory available to the function] at runtime. Increasing the function memory also increases its
+ // CPU allocation. The default value is 128 MB. The value can be any multiple of 1
+ // MB.
+ //
+ // [memory available to the function]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console
+ MemorySize *int32
+
+ // Update the function only if the revision ID matches the ID that's specified.
+ // Use this option to avoid modifying a function that has changed since you last
+ // read it.
+ RevisionId *string
+
+ // The Amazon Resource Name (ARN) of the function's execution role.
+ Role *string
+
+ // The identifier of the function's [runtime]. Runtime is required if the deployment
+ // package is a .zip file archive. Specifying a runtime results in an error if
+ // you're deploying a function using a container image.
+ //
+ // The following list includes deprecated runtimes. Lambda blocks creating new
+ // functions and updating existing functions shortly after each runtime is
+ // deprecated. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ Runtime types.Runtime
+
+ // The function's [SnapStart] setting.
+ //
+ // [SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
+ SnapStart *types.SnapStart
+
+ // The amount of time (in seconds) that Lambda allows a function to run before
+ // stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.
+ // For more information, see [Lambda execution environment].
+ //
+ // [Lambda execution environment]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html
+ Timeout *int32
+
+ // Set Mode to Active to sample and trace a subset of incoming requests with [X-Ray].
+ //
+ // [X-Ray]: https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html
+ TracingConfig *types.TracingConfig
+
+ // For network connectivity to Amazon Web Services resources in a VPC, specify a
+ // list of security groups and subnets in the VPC. When you connect a function to a
+ // VPC, it can access resources and the internet only through that VPC. For more
+ // information, see [Configuring a Lambda function to access resources in a VPC].
+ //
+ // [Configuring a Lambda function to access resources in a VPC]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
+ VpcConfig *types.VpcConfig
+
+ noSmithyDocumentSerde
+}
+
+// Details about a function's configuration.
+type UpdateFunctionConfigurationOutput struct {
+
+ // The instruction set architecture that the function supports. Architecture is a
+ // string array with one of the valid values. The default architecture value is
+ // x86_64 .
+ Architectures []types.Architecture
+
+ // The SHA256 hash of the function's deployment package.
+ CodeSha256 *string
+
+ // The size of the function's deployment package, in bytes.
+ CodeSize int64
+
+ // The function's dead letter queue.
+ DeadLetterConfig *types.DeadLetterConfig
+
+ // The function's description.
+ Description *string
+
+ // The function's [environment variables]. Omitted from CloudTrail logs.
+ //
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
+ Environment *types.EnvironmentResponse
+
+ // The size of the function's /tmp directory in MB. The default value is 512, but
+ // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)].
+ //
+ // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
+ EphemeralStorage *types.EphemeralStorage
+
+ // Connection settings for an [Amazon EFS file system].
+ //
+ // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html
+ FileSystemConfigs []types.FileSystemConfig
+
+ // The function's Amazon Resource Name (ARN).
+ FunctionArn *string
+
+ // The name of the function.
+ FunctionName *string
+
+ // The function that Lambda calls to begin running your function.
+ Handler *string
+
+ // The function's image configuration values.
+ ImageConfigResponse *types.ImageConfigResponse
+
+ // The ARN of the Key Management Service (KMS) customer managed key that's used to
+ // encrypt the following resources:
+ //
+ // - The function's [environment variables].
+ //
+ // - The function's [Lambda SnapStart]snapshots.
+ //
+ // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment
+ // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda].
+ //
+ // - The optimized version of the container image that's used for function
+ // invocations. Note that this is not the same key that's used to protect your
+ // container image in the Amazon Elastic Container Registry (Amazon ECR). For more
+ // information, see [Function lifecycle].
+ //
+ // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key].
+ //
+ // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+ // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption
+ // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption
+ // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle
+ // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+ KMSKeyArn *string
+
+ // The date and time that the function was last updated, in [ISO-8601 format]
+ // (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ LastModified *string
+
+ // The status of the last update that was performed on the function. This is first
+ // set to Successful after function creation completes.
+ LastUpdateStatus types.LastUpdateStatus
+
+ // The reason for the last update that was performed on the function.
+ LastUpdateStatusReason *string
+
+ // The reason code for the last update that was performed on the function.
+ LastUpdateStatusReasonCode types.LastUpdateStatusReasonCode
+
+ // The function's [layers].
+ //
+ // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+ Layers []types.Layer
+
+ // The function's Amazon CloudWatch Logs configuration settings.
+ LoggingConfig *types.LoggingConfig
+
+ // For Lambda@Edge functions, the ARN of the main function.
+ MasterArn *string
+
+ // The amount of memory available to the function at runtime.
+ MemorySize *int32
+
+ // The type of deployment package. Set to Image for container image and set Zip
+ // for .zip file archive.
+ PackageType types.PackageType
+
+ // The latest updated revision of the function or alias.
+ RevisionId *string
+
+ // The function's execution role.
+ Role *string
+
+ // The identifier of the function's [runtime]. Runtime is required if the deployment
+ // package is a .zip file archive. Specifying a runtime results in an error if
+ // you're deploying a function using a container image.
+ //
+ // The following list includes deprecated runtimes. Lambda blocks creating new
+ // functions and updating existing functions shortly after each runtime is
+ // deprecated. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ Runtime types.Runtime
+
+ // The ARN of the runtime and any errors that occured.
+ RuntimeVersionConfig *types.RuntimeVersionConfig
+
+ // The ARN of the signing job.
+ SigningJobArn *string
+
+ // The ARN of the signing profile version.
+ SigningProfileVersionArn *string
+
+ // Set ApplyOn to PublishedVersions to create a snapshot of the initialized
+ // execution environment when you publish a function version. For more information,
+ // see [Improving startup performance with Lambda SnapStart].
+ //
+ // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
+ SnapStart *types.SnapStartResponse
+
+ // The current state of the function. When the state is Inactive , you can
+ // reactivate the function by invoking it.
+ State types.State
+
+ // The reason for the function's current state.
+ StateReason *string
+
+ // The reason code for the function's current state. When the code is Creating ,
+ // you can't invoke or modify the function.
+ StateReasonCode types.StateReasonCode
+
+ // The amount of time in seconds that Lambda allows a function to run before
+ // stopping it.
+ Timeout *int32
+
+ // The function's X-Ray tracing configuration.
+ TracingConfig *types.TracingConfigResponse
+
+ // The version of the Lambda function.
+ Version *string
+
+ // The function's networking configuration.
+ VpcConfig *types.VpcConfigResponse
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateFunctionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFunctionConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFunctionConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFunctionConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUpdateFunctionConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFunctionConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUpdateFunctionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UpdateFunctionConfiguration",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go
new file mode 100644
index 00000000..556c9bcf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go
@@ -0,0 +1,230 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Updates the configuration for asynchronous invocation for a function, version,
+// or alias.
+//
+// To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.
+func (c *Client) UpdateFunctionEventInvokeConfig(ctx context.Context, params *UpdateFunctionEventInvokeConfigInput, optFns ...func(*Options)) (*UpdateFunctionEventInvokeConfigOutput, error) {
+ if params == nil {
+ params = &UpdateFunctionEventInvokeConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateFunctionEventInvokeConfig", params, optFns, c.addOperationUpdateFunctionEventInvokeConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateFunctionEventInvokeConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateFunctionEventInvokeConfigInput struct {
+
+ // The name or ARN of the Lambda function, version, or alias.
+ //
+ // Name formats
+ //
+ // - Function name - my-function (name-only), my-function:v1 (with alias).
+ //
+ // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN - 123456789012:function:my-function .
+ //
+ // You can append a version number or alias to any of the formats. The length
+ // constraint applies only to the full ARN. If you specify only the function name,
+ // it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // A destination for events after they have been sent to a function for processing.
+ //
+ // Destinations
+ //
+ // - Function - The Amazon Resource Name (ARN) of a Lambda function.
+ //
+ // - Queue - The ARN of a standard SQS queue.
+ //
+ // - Bucket - The ARN of an Amazon S3 bucket.
+ //
+ // - Topic - The ARN of a standard SNS topic.
+ //
+ // - Event Bus - The ARN of an Amazon EventBridge event bus.
+ //
+ // S3 buckets are supported only for on-failure destinations. To retain records of
+ // successful invocations, use another destination type.
+ DestinationConfig *types.DestinationConfig
+
+ // The maximum age of a request that Lambda sends to a function for processing.
+ MaximumEventAgeInSeconds *int32
+
+ // The maximum number of times to retry when the function returns an error.
+ MaximumRetryAttempts *int32
+
+ // A version number or alias name.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type UpdateFunctionEventInvokeConfigOutput struct {
+
+ // A destination for events after they have been sent to a function for processing.
+ //
+ // Destinations
+ //
+ // - Function - The Amazon Resource Name (ARN) of a Lambda function.
+ //
+ // - Queue - The ARN of a standard SQS queue.
+ //
+ // - Bucket - The ARN of an Amazon S3 bucket.
+ //
+ // - Topic - The ARN of a standard SNS topic.
+ //
+ // - Event Bus - The ARN of an Amazon EventBridge event bus.
+ //
+ // S3 buckets are supported only for on-failure destinations. To retain records of
+ // successful invocations, use another destination type.
+ DestinationConfig *types.DestinationConfig
+
+ // The Amazon Resource Name (ARN) of the function.
+ FunctionArn *string
+
+ // The date and time that the configuration was last updated.
+ LastModified *time.Time
+
+ // The maximum age of a request that Lambda sends to a function for processing.
+ MaximumEventAgeInSeconds *int32
+
+ // The maximum number of times to retry when the function returns an error.
+ MaximumRetryAttempts *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateFunctionEventInvokeConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFunctionEventInvokeConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFunctionEventInvokeConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFunctionEventInvokeConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUpdateFunctionEventInvokeConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFunctionEventInvokeConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUpdateFunctionEventInvokeConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UpdateFunctionEventInvokeConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionUrlConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionUrlConfig.go
new file mode 100644
index 00000000..6d4d451a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionUrlConfig.go
@@ -0,0 +1,250 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Updates the configuration for a Lambda function URL.
+func (c *Client) UpdateFunctionUrlConfig(ctx context.Context, params *UpdateFunctionUrlConfigInput, optFns ...func(*Options)) (*UpdateFunctionUrlConfigOutput, error) {
+ if params == nil {
+ params = &UpdateFunctionUrlConfigInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateFunctionUrlConfig", params, optFns, c.addOperationUpdateFunctionUrlConfigMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateFunctionUrlConfigOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateFunctionUrlConfigInput struct {
+
+ // The name or ARN of the Lambda function.
+ //
+ // Name formats
+ //
+ // - Function name – my-function .
+ //
+ // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function .
+ //
+ // - Partial ARN – 123456789012:function:my-function .
+ //
+ // The length constraint applies only to the full ARN. If you specify only the
+ // function name, it is limited to 64 characters in length.
+ //
+ // This member is required.
+ FunctionName *string
+
+ // The type of authentication that your function URL uses. Set to AWS_IAM if you
+ // want to restrict access to authenticated users only. Set to NONE if you want to
+ // bypass IAM authentication to create a public endpoint. For more information, see
+ // [Security and auth model for Lambda function URLs].
+ //
+ // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html
+ AuthType types.FunctionUrlAuthType
+
+ // The [cross-origin resource sharing (CORS)] settings for your function URL.
+ //
+ // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
+ Cors *types.Cors
+
+ // Use one of the following options:
+ //
+ // - BUFFERED – This is the default option. Lambda invokes your function using
+ // the Invoke API operation. Invocation results are available when the payload is
+ // complete. The maximum payload size is 6 MB.
+ //
+ // - RESPONSE_STREAM – Your function streams payload results as they become
+ // available. Lambda invokes your function using the InvokeWithResponseStream API
+ // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase].
+ //
+ // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html
+ InvokeMode types.InvokeMode
+
+ // The alias name.
+ Qualifier *string
+
+ noSmithyDocumentSerde
+}
+
+type UpdateFunctionUrlConfigOutput struct {
+
+ // The type of authentication that your function URL uses. Set to AWS_IAM if you
+ // want to restrict access to authenticated users only. Set to NONE if you want to
+ // bypass IAM authentication to create a public endpoint. For more information, see
+ // [Security and auth model for Lambda function URLs].
+ //
+ // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html
+ //
+ // This member is required.
+ AuthType types.FunctionUrlAuthType
+
+ // When the function URL was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ //
+ // This member is required.
+ CreationTime *string
+
+ // The Amazon Resource Name (ARN) of your function.
+ //
+ // This member is required.
+ FunctionArn *string
+
+ // The HTTP URL endpoint for your function.
+ //
+ // This member is required.
+ FunctionUrl *string
+
+ // When the function URL configuration was last updated, in [ISO-8601 format]
+ // (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ //
+ // This member is required.
+ LastModifiedTime *string
+
+ // The [cross-origin resource sharing (CORS)] settings for your function URL.
+ //
+ // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
+ Cors *types.Cors
+
+ // Use one of the following options:
+ //
+ // - BUFFERED – This is the default option. Lambda invokes your function using
+ // the Invoke API operation. Invocation results are available when the payload is
+ // complete. The maximum payload size is 6 MB.
+ //
+ // - RESPONSE_STREAM – Your function streams payload results as they become
+ // available. Lambda invokes your function using the InvokeWithResponseStream API
+ // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase].
+ //
+ // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html
+ InvokeMode types.InvokeMode
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFunctionUrlConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFunctionUrlConfig{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFunctionUrlConfig"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addCredentialSource(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUpdateFunctionUrlConfigValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFunctionUrlConfig(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUpdateFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UpdateFunctionUrlConfig",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/auth.go
new file mode 100644
index 00000000..a96cd4dc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/auth.go
@@ -0,0 +1,313 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ smithy "github.com/aws/smithy-go"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/metrics"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) {
+ params.Region = options.Region
+}
+
+type setLegacyContextSigningOptionsMiddleware struct {
+}
+
+func (*setLegacyContextSigningOptionsMiddleware) ID() string {
+ return "setLegacyContextSigningOptions"
+}
+
+func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ schemeID := rscheme.Scheme.SchemeID()
+
+ if sn := awsmiddleware.GetSigningName(ctx); sn != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn)
+ }
+ }
+
+ if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr})
+ }
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before)
+}
+
+type withAnonymous struct {
+ resolver AuthSchemeResolver
+}
+
+var _ AuthSchemeResolver = (*withAnonymous)(nil)
+
+func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ opts, err := v.resolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return nil, err
+ }
+
+ opts = append(opts, &smithyauth.Option{
+ SchemeID: smithyauth.SchemeIDAnonymous,
+ })
+ return opts, nil
+}
+
+func wrapWithAnonymousAuth(options *Options) {
+ if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok {
+ return
+ }
+
+ options.AuthSchemeResolver = &withAnonymous{
+ resolver: options.AuthSchemeResolver,
+ }
+}
+
+// AuthResolverParameters contains the set of inputs necessary for auth scheme
+// resolution.
+type AuthResolverParameters struct {
+ // The name of the operation being invoked.
+ Operation string
+
+ // The region in which the operation is being invoked.
+ Region string
+}
+
+func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters {
+ params := &AuthResolverParameters{
+ Operation: operation,
+ }
+
+ bindAuthParamsRegion(ctx, params, input, options)
+
+ return params
+}
+
+// AuthSchemeResolver returns a set of possible authentication options for an
+// operation.
+type AuthSchemeResolver interface {
+ ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
+}
+
+type defaultAuthSchemeResolver struct{}
+
+var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil)
+
+func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ if overrides, ok := operationAuthOptions[params.Operation]; ok {
+ return overrides(params), nil
+ }
+ return serviceAuthOptions(params), nil
+}
+
+var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{}
+
+func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {
+ SchemeID: smithyauth.SchemeIDSigV4,
+ SignerProperties: func() smithy.Properties {
+ var props smithy.Properties
+ smithyhttp.SetSigV4SigningName(&props, "lambda")
+ smithyhttp.SetSigV4SigningRegion(&props, params.Region)
+ return props
+ }(),
+ },
+ }
+}
+
+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,
+) {
+ _, span := tracing.StartSpan(ctx, "ResolveAuthScheme")
+ defer span.End()
+
+ params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options)
+ options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
+ }
+
+ scheme, ok := m.selectScheme(options)
+ if !ok {
+ return out, metadata, fmt.Errorf("could not select an auth scheme")
+ }
+
+ ctx = setResolvedAuthScheme(ctx, scheme)
+
+ span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID())
+ span.End()
+ return next.HandleFinalize(ctx, in)
+}
+
+func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) {
+ for _, option := range options {
+ if option.SchemeID == smithyauth.SchemeIDAnonymous {
+ return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true
+ }
+
+ for _, scheme := range m.options.AuthSchemes {
+ if scheme.SchemeID() != option.SchemeID {
+ continue
+ }
+
+ if scheme.IdentityResolver(m.options) != nil {
+ return newResolvedAuthScheme(scheme, option), true
+ }
+ }
+ }
+
+ return nil, false
+}
+
+type resolvedAuthSchemeKey struct{}
+
+type resolvedAuthScheme struct {
+ Scheme smithyhttp.AuthScheme
+ IdentityProperties smithy.Properties
+ SignerProperties smithy.Properties
+}
+
+func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme {
+ return &resolvedAuthScheme{
+ Scheme: scheme,
+ IdentityProperties: option.IdentityProperties,
+ SignerProperties: option.SignerProperties,
+ }
+}
+
+func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context {
+ return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme)
+}
+
+func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme {
+ v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme)
+ return v
+}
+
+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,
+) {
+ innerCtx, span := tracing.StartSpan(ctx, "GetIdentity")
+ defer span.End()
+
+ rscheme := getResolvedAuthScheme(innerCtx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ resolver := rscheme.Scheme.IdentityResolver(m.options)
+ if resolver == nil {
+ return out, metadata, fmt.Errorf("no identity resolver")
+ }
+
+ identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration",
+ func() (smithyauth.Identity, error) {
+ return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties)
+ },
+ func(o *metrics.RecordMetricOptions) {
+ o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID())
+ })
+ if err != nil {
+ return out, metadata, fmt.Errorf("get identity: %w", err)
+ }
+
+ ctx = setIdentity(ctx, identity)
+
+ span.End()
+ return next.HandleFinalize(ctx, in)
+}
+
+type identityKey struct{}
+
+func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context {
+ return middleware.WithStackValue(ctx, identityKey{}, identity)
+}
+
+func getIdentity(ctx context.Context) smithyauth.Identity {
+ v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity)
+ return v
+}
+
+type signRequestMiddleware struct {
+ options Options
+}
+
+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,
+) {
+ _, span := tracing.StartSpan(ctx, "SignRequest")
+ defer span.End()
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request)
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ identity := getIdentity(ctx)
+ if identity == nil {
+ return out, metadata, fmt.Errorf("no identity")
+ }
+
+ signer := rscheme.Scheme.Signer()
+ if signer == nil {
+ return out, metadata, fmt.Errorf("no signer")
+ }
+
+ _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) {
+ return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties)
+ }, func(o *metrics.RecordMetricOptions) {
+ o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID())
+ })
+ if err != nil {
+ return out, metadata, fmt.Errorf("sign request: %w", err)
+ }
+
+ span.End()
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/deserializers.go
new file mode 100644
index 00000000..c04976e2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/deserializers.go
@@ -0,0 +1,21699 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ smithy "github.com/aws/smithy-go"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithytime "github.com/aws/smithy-go/time"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "io/ioutil"
+ "math"
+ "strings"
+ "time"
+)
+
+func deserializeS3Expires(v string) (*time.Time, error) {
+ t, err := smithytime.ParseHTTPDate(v)
+ if err != nil {
+ return nil, nil
+ }
+ return &t, nil
+}
+
+type awsRestjson1_deserializeOpAddLayerVersionPermission struct {
+}
+
+func (*awsRestjson1_deserializeOpAddLayerVersionPermission) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpAddLayerVersionPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorAddLayerVersionPermission(response, &metadata)
+ }
+ output := &AddLayerVersionPermissionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentAddLayerVersionPermissionOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorAddLayerVersionPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("PolicyLengthExceededException", errorCode):
+ return awsRestjson1_deserializeErrorPolicyLengthExceededException(response, errorBody)
+
+ case strings.EqualFold("PreconditionFailedException", errorCode):
+ return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentAddLayerVersionPermissionOutput(v **AddLayerVersionPermissionOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *AddLayerVersionPermissionOutput
+ if *v == nil {
+ sv = &AddLayerVersionPermissionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ case "Statement":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Statement = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpAddPermission struct {
+}
+
+func (*awsRestjson1_deserializeOpAddPermission) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpAddPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorAddPermission(response, &metadata)
+ }
+ output := &AddPermissionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentAddPermissionOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorAddPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("PolicyLengthExceededException", errorCode):
+ return awsRestjson1_deserializeErrorPolicyLengthExceededException(response, errorBody)
+
+ case strings.EqualFold("PreconditionFailedException", errorCode):
+ return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentAddPermissionOutput(v **AddPermissionOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *AddPermissionOutput
+ if *v == nil {
+ sv = &AddPermissionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Statement":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Statement = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpCreateAlias struct {
+}
+
+func (*awsRestjson1_deserializeOpCreateAlias) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpCreateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorCreateAlias(response, &metadata)
+ }
+ output := &CreateAliasOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentCreateAliasOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorCreateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentCreateAliasOutput(v **CreateAliasOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CreateAliasOutput
+ if *v == nil {
+ sv = &CreateAliasOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AliasArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.AliasArn = ptr.String(jtv)
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "FunctionVersion":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Version to be of type string, got %T instead", value)
+ }
+ sv.FunctionVersion = ptr.String(jtv)
+ }
+
+ case "Name":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Alias to be of type string, got %T instead", value)
+ }
+ sv.Name = ptr.String(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ case "RoutingConfig":
+ if err := awsRestjson1_deserializeDocumentAliasRoutingConfiguration(&sv.RoutingConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpCreateCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpCreateCodeSigningConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpCreateCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorCreateCodeSigningConfig(response, &metadata)
+ }
+ output := &CreateCodeSigningConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentCreateCodeSigningConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorCreateCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentCreateCodeSigningConfigOutput(v **CreateCodeSigningConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CreateCodeSigningConfigOutput
+ if *v == nil {
+ sv = &CreateCodeSigningConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CodeSigningConfig":
+ if err := awsRestjson1_deserializeDocumentCodeSigningConfig(&sv.CodeSigningConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpCreateEventSourceMapping struct {
+}
+
+func (*awsRestjson1_deserializeOpCreateEventSourceMapping) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpCreateEventSourceMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorCreateEventSourceMapping(response, &metadata)
+ }
+ output := &CreateEventSourceMappingOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentCreateEventSourceMappingOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorCreateEventSourceMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentCreateEventSourceMappingOutput(v **CreateEventSourceMappingOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CreateEventSourceMappingOutput
+ if *v == nil {
+ sv = &CreateEventSourceMappingOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AmazonManagedKafkaEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "BatchSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected BatchSize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.BatchSize = ptr.Int32(int32(i64))
+ }
+
+ case "BisectBatchOnFunctionError":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BisectBatchOnFunctionError to be of type *bool, got %T instead", value)
+ }
+ sv.BisectBatchOnFunctionError = ptr.Bool(jtv)
+ }
+
+ case "DestinationConfig":
+ if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil {
+ return err
+ }
+
+ case "DocumentDBEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(&sv.DocumentDBEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "EventSourceArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.EventSourceArn = ptr.String(jtv)
+ }
+
+ case "EventSourceMappingArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value)
+ }
+ sv.EventSourceMappingArn = ptr.String(jtv)
+ }
+
+ case "FilterCriteria":
+ if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil {
+ return err
+ }
+
+ case "FilterCriteriaError":
+ if err := awsRestjson1_deserializeDocumentFilterCriteriaError(&sv.FilterCriteriaError, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionResponseTypes":
+ if err := awsRestjson1_deserializeDocumentFunctionResponseTypeList(&sv.FunctionResponseTypes, value); err != nil {
+ return err
+ }
+
+ case "KMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value)
+ }
+ sv.KMSKeyArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "LastProcessingResult":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.LastProcessingResult = ptr.String(jtv)
+ }
+
+ case "MaximumBatchingWindowInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumBatchingWindowInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumBatchingWindowInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRecordAgeInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRecordAgeInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRecordAgeInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRetryAttempts":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRetryAttemptsEventSourceMapping to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRetryAttempts = ptr.Int32(int32(i64))
+ }
+
+ case "MetricsConfig":
+ if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(&sv.MetricsConfig, value); err != nil {
+ return err
+ }
+
+ case "ParallelizationFactor":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ParallelizationFactor to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ParallelizationFactor = ptr.Int32(int32(i64))
+ }
+
+ case "ProvisionedPollerConfig":
+ if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil {
+ return err
+ }
+
+ case "Queues":
+ if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil {
+ return err
+ }
+
+ case "ScalingConfig":
+ if err := awsRestjson1_deserializeDocumentScalingConfig(&sv.ScalingConfig, value); err != nil {
+ return err
+ }
+
+ case "SelfManagedEventSource":
+ if err := awsRestjson1_deserializeDocumentSelfManagedEventSource(&sv.SelfManagedEventSource, value); err != nil {
+ return err
+ }
+
+ case "SelfManagedKafkaEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "SourceAccessConfigurations":
+ if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil {
+ return err
+ }
+
+ case "StartingPosition":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EventSourcePosition to be of type string, got %T instead", value)
+ }
+ sv.StartingPosition = types.EventSourcePosition(jtv)
+ }
+
+ case "StartingPositionTimestamp":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.StartingPositionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "State":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.State = ptr.String(jtv)
+ }
+
+ case "StateTransitionReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.StateTransitionReason = ptr.String(jtv)
+ }
+
+ case "Topics":
+ if err := awsRestjson1_deserializeDocumentTopics(&sv.Topics, value); err != nil {
+ return err
+ }
+
+ case "TumblingWindowInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected TumblingWindowInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.TumblingWindowInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "UUID":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.UUID = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpCreateFunction struct {
+}
+
+func (*awsRestjson1_deserializeOpCreateFunction) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpCreateFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorCreateFunction(response, &metadata)
+ }
+ output := &CreateFunctionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentCreateFunctionOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorCreateFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody)
+
+ case strings.EqualFold("CodeStorageExceededException", errorCode):
+ return awsRestjson1_deserializeErrorCodeStorageExceededException(response, errorBody)
+
+ case strings.EqualFold("CodeVerificationFailedException", errorCode):
+ return awsRestjson1_deserializeErrorCodeVerificationFailedException(response, errorBody)
+
+ case strings.EqualFold("InvalidCodeSignatureException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidCodeSignatureException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentCreateFunctionOutput(v **CreateFunctionOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CreateFunctionOutput
+ if *v == nil {
+ sv = &CreateFunctionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Architectures":
+ if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil {
+ return err
+ }
+
+ case "CodeSha256":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.CodeSha256 = ptr.String(jtv)
+ }
+
+ case "CodeSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.CodeSize = i64
+ }
+
+ case "DeadLetterConfig":
+ if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil {
+ return err
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "Environment":
+ if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil {
+ return err
+ }
+
+ case "EphemeralStorage":
+ if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil {
+ return err
+ }
+
+ case "FileSystemConfigs":
+ if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value)
+ }
+ sv.FunctionName = ptr.String(jtv)
+ }
+
+ case "Handler":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Handler to be of type string, got %T instead", value)
+ }
+ sv.Handler = ptr.String(jtv)
+ }
+
+ case "ImageConfigResponse":
+ if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil {
+ return err
+ }
+
+ case "KMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value)
+ }
+ sv.KMSKeyArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModified = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatus":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatus = types.LastUpdateStatus(jtv)
+ }
+
+ case "LastUpdateStatusReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReason = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatusReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv)
+ }
+
+ case "Layers":
+ if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil {
+ return err
+ }
+
+ case "LoggingConfig":
+ if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil {
+ return err
+ }
+
+ case "MasterArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.MasterArn = ptr.String(jtv)
+ }
+
+ case "MemorySize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MemorySize = ptr.Int32(int32(i64))
+ }
+
+ case "PackageType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PackageType to be of type string, got %T instead", value)
+ }
+ sv.PackageType = types.PackageType(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ case "Role":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
+ }
+ sv.Role = ptr.String(jtv)
+ }
+
+ case "Runtime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Runtime to be of type string, got %T instead", value)
+ }
+ sv.Runtime = types.Runtime(jtv)
+ }
+
+ case "RuntimeVersionConfig":
+ if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil {
+ return err
+ }
+
+ case "SigningJobArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningJobArn = ptr.String(jtv)
+ }
+
+ case "SigningProfileVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningProfileVersionArn = ptr.String(jtv)
+ }
+
+ case "SnapStart":
+ if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil {
+ return err
+ }
+
+ case "State":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected State to be of type string, got %T instead", value)
+ }
+ sv.State = types.State(jtv)
+ }
+
+ case "StateReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReason to be of type string, got %T instead", value)
+ }
+ sv.StateReason = ptr.String(jtv)
+ }
+
+ case "StateReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value)
+ }
+ sv.StateReasonCode = types.StateReasonCode(jtv)
+ }
+
+ case "Timeout":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Timeout to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Timeout = ptr.Int32(int32(i64))
+ }
+
+ case "TracingConfig":
+ if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil {
+ return err
+ }
+
+ case "Version":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Version to be of type string, got %T instead", value)
+ }
+ sv.Version = ptr.String(jtv)
+ }
+
+ case "VpcConfig":
+ if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpCreateFunctionUrlConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpCreateFunctionUrlConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpCreateFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorCreateFunctionUrlConfig(response, &metadata)
+ }
+ output := &CreateFunctionUrlConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentCreateFunctionUrlConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorCreateFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentCreateFunctionUrlConfigOutput(v **CreateFunctionUrlConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CreateFunctionUrlConfigOutput
+ if *v == nil {
+ sv = &CreateFunctionUrlConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AuthType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionUrlAuthType to be of type string, got %T instead", value)
+ }
+ sv.AuthType = types.FunctionUrlAuthType(jtv)
+ }
+
+ case "Cors":
+ if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil {
+ return err
+ }
+
+ case "CreationTime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.CreationTime = ptr.String(jtv)
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionUrl":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value)
+ }
+ sv.FunctionUrl = ptr.String(jtv)
+ }
+
+ case "InvokeMode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value)
+ }
+ sv.InvokeMode = types.InvokeMode(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpDeleteAlias struct {
+}
+
+func (*awsRestjson1_deserializeOpDeleteAlias) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpDeleteAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorDeleteAlias(response, &metadata)
+ }
+ output := &DeleteAliasOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorDeleteAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpDeleteCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpDeleteCodeSigningConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpDeleteCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorDeleteCodeSigningConfig(response, &metadata)
+ }
+ output := &DeleteCodeSigningConfigOutput{}
+ out.Result = output
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorDeleteCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpDeleteEventSourceMapping struct {
+}
+
+func (*awsRestjson1_deserializeOpDeleteEventSourceMapping) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpDeleteEventSourceMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorDeleteEventSourceMapping(response, &metadata)
+ }
+ output := &DeleteEventSourceMappingOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentDeleteEventSourceMappingOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorDeleteEventSourceMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceInUseException", errorCode):
+ return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentDeleteEventSourceMappingOutput(v **DeleteEventSourceMappingOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *DeleteEventSourceMappingOutput
+ if *v == nil {
+ sv = &DeleteEventSourceMappingOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AmazonManagedKafkaEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "BatchSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected BatchSize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.BatchSize = ptr.Int32(int32(i64))
+ }
+
+ case "BisectBatchOnFunctionError":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BisectBatchOnFunctionError to be of type *bool, got %T instead", value)
+ }
+ sv.BisectBatchOnFunctionError = ptr.Bool(jtv)
+ }
+
+ case "DestinationConfig":
+ if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil {
+ return err
+ }
+
+ case "DocumentDBEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(&sv.DocumentDBEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "EventSourceArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.EventSourceArn = ptr.String(jtv)
+ }
+
+ case "EventSourceMappingArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value)
+ }
+ sv.EventSourceMappingArn = ptr.String(jtv)
+ }
+
+ case "FilterCriteria":
+ if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil {
+ return err
+ }
+
+ case "FilterCriteriaError":
+ if err := awsRestjson1_deserializeDocumentFilterCriteriaError(&sv.FilterCriteriaError, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionResponseTypes":
+ if err := awsRestjson1_deserializeDocumentFunctionResponseTypeList(&sv.FunctionResponseTypes, value); err != nil {
+ return err
+ }
+
+ case "KMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value)
+ }
+ sv.KMSKeyArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "LastProcessingResult":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.LastProcessingResult = ptr.String(jtv)
+ }
+
+ case "MaximumBatchingWindowInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumBatchingWindowInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumBatchingWindowInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRecordAgeInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRecordAgeInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRecordAgeInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRetryAttempts":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRetryAttemptsEventSourceMapping to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRetryAttempts = ptr.Int32(int32(i64))
+ }
+
+ case "MetricsConfig":
+ if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(&sv.MetricsConfig, value); err != nil {
+ return err
+ }
+
+ case "ParallelizationFactor":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ParallelizationFactor to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ParallelizationFactor = ptr.Int32(int32(i64))
+ }
+
+ case "ProvisionedPollerConfig":
+ if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil {
+ return err
+ }
+
+ case "Queues":
+ if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil {
+ return err
+ }
+
+ case "ScalingConfig":
+ if err := awsRestjson1_deserializeDocumentScalingConfig(&sv.ScalingConfig, value); err != nil {
+ return err
+ }
+
+ case "SelfManagedEventSource":
+ if err := awsRestjson1_deserializeDocumentSelfManagedEventSource(&sv.SelfManagedEventSource, value); err != nil {
+ return err
+ }
+
+ case "SelfManagedKafkaEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "SourceAccessConfigurations":
+ if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil {
+ return err
+ }
+
+ case "StartingPosition":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EventSourcePosition to be of type string, got %T instead", value)
+ }
+ sv.StartingPosition = types.EventSourcePosition(jtv)
+ }
+
+ case "StartingPositionTimestamp":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.StartingPositionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "State":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.State = ptr.String(jtv)
+ }
+
+ case "StateTransitionReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.StateTransitionReason = ptr.String(jtv)
+ }
+
+ case "Topics":
+ if err := awsRestjson1_deserializeDocumentTopics(&sv.Topics, value); err != nil {
+ return err
+ }
+
+ case "TumblingWindowInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected TumblingWindowInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.TumblingWindowInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "UUID":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.UUID = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpDeleteFunction struct {
+}
+
+func (*awsRestjson1_deserializeOpDeleteFunction) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpDeleteFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorDeleteFunction(response, &metadata)
+ }
+ output := &DeleteFunctionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorDeleteFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpDeleteFunctionCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpDeleteFunctionCodeSigningConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpDeleteFunctionCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorDeleteFunctionCodeSigningConfig(response, &metadata)
+ }
+ output := &DeleteFunctionCodeSigningConfigOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorDeleteFunctionCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpDeleteFunctionConcurrency struct {
+}
+
+func (*awsRestjson1_deserializeOpDeleteFunctionConcurrency) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpDeleteFunctionConcurrency) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorDeleteFunctionConcurrency(response, &metadata)
+ }
+ output := &DeleteFunctionConcurrencyOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorDeleteFunctionConcurrency(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpDeleteFunctionEventInvokeConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpDeleteFunctionEventInvokeConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpDeleteFunctionEventInvokeConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorDeleteFunctionEventInvokeConfig(response, &metadata)
+ }
+ output := &DeleteFunctionEventInvokeConfigOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorDeleteFunctionEventInvokeConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpDeleteFunctionUrlConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpDeleteFunctionUrlConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpDeleteFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorDeleteFunctionUrlConfig(response, &metadata)
+ }
+ output := &DeleteFunctionUrlConfigOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorDeleteFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpDeleteLayerVersion struct {
+}
+
+func (*awsRestjson1_deserializeOpDeleteLayerVersion) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpDeleteLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorDeleteLayerVersion(response, &metadata)
+ }
+ output := &DeleteLayerVersionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorDeleteLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorDeleteProvisionedConcurrencyConfig(response, &metadata)
+ }
+ output := &DeleteProvisionedConcurrencyConfigOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorDeleteProvisionedConcurrencyConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpGetAccountSettings struct {
+}
+
+func (*awsRestjson1_deserializeOpGetAccountSettings) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetAccountSettings(response, &metadata)
+ }
+ output := &GetAccountSettingsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetAccountSettingsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetAccountSettingsOutput(v **GetAccountSettingsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetAccountSettingsOutput
+ if *v == nil {
+ sv = &GetAccountSettingsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AccountLimit":
+ if err := awsRestjson1_deserializeDocumentAccountLimit(&sv.AccountLimit, value); err != nil {
+ return err
+ }
+
+ case "AccountUsage":
+ if err := awsRestjson1_deserializeDocumentAccountUsage(&sv.AccountUsage, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetAlias struct {
+}
+
+func (*awsRestjson1_deserializeOpGetAlias) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetAlias(response, &metadata)
+ }
+ output := &GetAliasOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetAliasOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetAliasOutput(v **GetAliasOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetAliasOutput
+ if *v == nil {
+ sv = &GetAliasOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AliasArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.AliasArn = ptr.String(jtv)
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "FunctionVersion":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Version to be of type string, got %T instead", value)
+ }
+ sv.FunctionVersion = ptr.String(jtv)
+ }
+
+ case "Name":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Alias to be of type string, got %T instead", value)
+ }
+ sv.Name = ptr.String(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ case "RoutingConfig":
+ if err := awsRestjson1_deserializeDocumentAliasRoutingConfiguration(&sv.RoutingConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpGetCodeSigningConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetCodeSigningConfig(response, &metadata)
+ }
+ output := &GetCodeSigningConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetCodeSigningConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetCodeSigningConfigOutput(v **GetCodeSigningConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetCodeSigningConfigOutput
+ if *v == nil {
+ sv = &GetCodeSigningConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CodeSigningConfig":
+ if err := awsRestjson1_deserializeDocumentCodeSigningConfig(&sv.CodeSigningConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetEventSourceMapping struct {
+}
+
+func (*awsRestjson1_deserializeOpGetEventSourceMapping) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetEventSourceMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetEventSourceMapping(response, &metadata)
+ }
+ output := &GetEventSourceMappingOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetEventSourceMappingOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetEventSourceMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetEventSourceMappingOutput(v **GetEventSourceMappingOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetEventSourceMappingOutput
+ if *v == nil {
+ sv = &GetEventSourceMappingOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AmazonManagedKafkaEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "BatchSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected BatchSize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.BatchSize = ptr.Int32(int32(i64))
+ }
+
+ case "BisectBatchOnFunctionError":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BisectBatchOnFunctionError to be of type *bool, got %T instead", value)
+ }
+ sv.BisectBatchOnFunctionError = ptr.Bool(jtv)
+ }
+
+ case "DestinationConfig":
+ if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil {
+ return err
+ }
+
+ case "DocumentDBEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(&sv.DocumentDBEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "EventSourceArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.EventSourceArn = ptr.String(jtv)
+ }
+
+ case "EventSourceMappingArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value)
+ }
+ sv.EventSourceMappingArn = ptr.String(jtv)
+ }
+
+ case "FilterCriteria":
+ if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil {
+ return err
+ }
+
+ case "FilterCriteriaError":
+ if err := awsRestjson1_deserializeDocumentFilterCriteriaError(&sv.FilterCriteriaError, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionResponseTypes":
+ if err := awsRestjson1_deserializeDocumentFunctionResponseTypeList(&sv.FunctionResponseTypes, value); err != nil {
+ return err
+ }
+
+ case "KMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value)
+ }
+ sv.KMSKeyArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "LastProcessingResult":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.LastProcessingResult = ptr.String(jtv)
+ }
+
+ case "MaximumBatchingWindowInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumBatchingWindowInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumBatchingWindowInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRecordAgeInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRecordAgeInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRecordAgeInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRetryAttempts":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRetryAttemptsEventSourceMapping to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRetryAttempts = ptr.Int32(int32(i64))
+ }
+
+ case "MetricsConfig":
+ if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(&sv.MetricsConfig, value); err != nil {
+ return err
+ }
+
+ case "ParallelizationFactor":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ParallelizationFactor to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ParallelizationFactor = ptr.Int32(int32(i64))
+ }
+
+ case "ProvisionedPollerConfig":
+ if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil {
+ return err
+ }
+
+ case "Queues":
+ if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil {
+ return err
+ }
+
+ case "ScalingConfig":
+ if err := awsRestjson1_deserializeDocumentScalingConfig(&sv.ScalingConfig, value); err != nil {
+ return err
+ }
+
+ case "SelfManagedEventSource":
+ if err := awsRestjson1_deserializeDocumentSelfManagedEventSource(&sv.SelfManagedEventSource, value); err != nil {
+ return err
+ }
+
+ case "SelfManagedKafkaEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "SourceAccessConfigurations":
+ if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil {
+ return err
+ }
+
+ case "StartingPosition":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EventSourcePosition to be of type string, got %T instead", value)
+ }
+ sv.StartingPosition = types.EventSourcePosition(jtv)
+ }
+
+ case "StartingPositionTimestamp":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.StartingPositionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "State":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.State = ptr.String(jtv)
+ }
+
+ case "StateTransitionReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.StateTransitionReason = ptr.String(jtv)
+ }
+
+ case "Topics":
+ if err := awsRestjson1_deserializeDocumentTopics(&sv.Topics, value); err != nil {
+ return err
+ }
+
+ case "TumblingWindowInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected TumblingWindowInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.TumblingWindowInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "UUID":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.UUID = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetFunction struct {
+}
+
+func (*awsRestjson1_deserializeOpGetFunction) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetFunction(response, &metadata)
+ }
+ output := &GetFunctionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetFunctionOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetFunctionOutput(v **GetFunctionOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetFunctionOutput
+ if *v == nil {
+ sv = &GetFunctionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Code":
+ if err := awsRestjson1_deserializeDocumentFunctionCodeLocation(&sv.Code, value); err != nil {
+ return err
+ }
+
+ case "Concurrency":
+ if err := awsRestjson1_deserializeDocumentConcurrency(&sv.Concurrency, value); err != nil {
+ return err
+ }
+
+ case "Configuration":
+ if err := awsRestjson1_deserializeDocumentFunctionConfiguration(&sv.Configuration, value); err != nil {
+ return err
+ }
+
+ case "Tags":
+ if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil {
+ return err
+ }
+
+ case "TagsError":
+ if err := awsRestjson1_deserializeDocumentTagsError(&sv.TagsError, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetFunctionCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpGetFunctionCodeSigningConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetFunctionCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetFunctionCodeSigningConfig(response, &metadata)
+ }
+ output := &GetFunctionCodeSigningConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetFunctionCodeSigningConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetFunctionCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetFunctionCodeSigningConfigOutput(v **GetFunctionCodeSigningConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetFunctionCodeSigningConfigOutput
+ if *v == nil {
+ sv = &GetFunctionCodeSigningConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CodeSigningConfigArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CodeSigningConfigArn to be of type string, got %T instead", value)
+ }
+ sv.CodeSigningConfigArn = ptr.String(jtv)
+ }
+
+ case "FunctionName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionName to be of type string, got %T instead", value)
+ }
+ sv.FunctionName = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetFunctionConcurrency struct {
+}
+
+func (*awsRestjson1_deserializeOpGetFunctionConcurrency) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetFunctionConcurrency) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetFunctionConcurrency(response, &metadata)
+ }
+ output := &GetFunctionConcurrencyOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetFunctionConcurrencyOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetFunctionConcurrency(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetFunctionConcurrencyOutput(v **GetFunctionConcurrencyOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetFunctionConcurrencyOutput
+ if *v == nil {
+ sv = &GetFunctionConcurrencyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ReservedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetFunctionConfiguration struct {
+}
+
+func (*awsRestjson1_deserializeOpGetFunctionConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetFunctionConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetFunctionConfiguration(response, &metadata)
+ }
+ output := &GetFunctionConfigurationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetFunctionConfigurationOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetFunctionConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetFunctionConfigurationOutput(v **GetFunctionConfigurationOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetFunctionConfigurationOutput
+ if *v == nil {
+ sv = &GetFunctionConfigurationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Architectures":
+ if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil {
+ return err
+ }
+
+ case "CodeSha256":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.CodeSha256 = ptr.String(jtv)
+ }
+
+ case "CodeSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.CodeSize = i64
+ }
+
+ case "DeadLetterConfig":
+ if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil {
+ return err
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "Environment":
+ if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil {
+ return err
+ }
+
+ case "EphemeralStorage":
+ if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil {
+ return err
+ }
+
+ case "FileSystemConfigs":
+ if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value)
+ }
+ sv.FunctionName = ptr.String(jtv)
+ }
+
+ case "Handler":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Handler to be of type string, got %T instead", value)
+ }
+ sv.Handler = ptr.String(jtv)
+ }
+
+ case "ImageConfigResponse":
+ if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil {
+ return err
+ }
+
+ case "KMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value)
+ }
+ sv.KMSKeyArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModified = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatus":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatus = types.LastUpdateStatus(jtv)
+ }
+
+ case "LastUpdateStatusReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReason = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatusReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv)
+ }
+
+ case "Layers":
+ if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil {
+ return err
+ }
+
+ case "LoggingConfig":
+ if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil {
+ return err
+ }
+
+ case "MasterArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.MasterArn = ptr.String(jtv)
+ }
+
+ case "MemorySize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MemorySize = ptr.Int32(int32(i64))
+ }
+
+ case "PackageType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PackageType to be of type string, got %T instead", value)
+ }
+ sv.PackageType = types.PackageType(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ case "Role":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
+ }
+ sv.Role = ptr.String(jtv)
+ }
+
+ case "Runtime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Runtime to be of type string, got %T instead", value)
+ }
+ sv.Runtime = types.Runtime(jtv)
+ }
+
+ case "RuntimeVersionConfig":
+ if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil {
+ return err
+ }
+
+ case "SigningJobArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningJobArn = ptr.String(jtv)
+ }
+
+ case "SigningProfileVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningProfileVersionArn = ptr.String(jtv)
+ }
+
+ case "SnapStart":
+ if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil {
+ return err
+ }
+
+ case "State":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected State to be of type string, got %T instead", value)
+ }
+ sv.State = types.State(jtv)
+ }
+
+ case "StateReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReason to be of type string, got %T instead", value)
+ }
+ sv.StateReason = ptr.String(jtv)
+ }
+
+ case "StateReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value)
+ }
+ sv.StateReasonCode = types.StateReasonCode(jtv)
+ }
+
+ case "Timeout":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Timeout to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Timeout = ptr.Int32(int32(i64))
+ }
+
+ case "TracingConfig":
+ if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil {
+ return err
+ }
+
+ case "Version":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Version to be of type string, got %T instead", value)
+ }
+ sv.Version = ptr.String(jtv)
+ }
+
+ case "VpcConfig":
+ if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetFunctionEventInvokeConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpGetFunctionEventInvokeConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetFunctionEventInvokeConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetFunctionEventInvokeConfig(response, &metadata)
+ }
+ output := &GetFunctionEventInvokeConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetFunctionEventInvokeConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetFunctionEventInvokeConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetFunctionEventInvokeConfigOutput(v **GetFunctionEventInvokeConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetFunctionEventInvokeConfigOutput
+ if *v == nil {
+ sv = &GetFunctionEventInvokeConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "DestinationConfig":
+ if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "MaximumEventAgeInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRetryAttempts":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRetryAttempts = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetFunctionRecursionConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpGetFunctionRecursionConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetFunctionRecursionConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetFunctionRecursionConfig(response, &metadata)
+ }
+ output := &GetFunctionRecursionConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetFunctionRecursionConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetFunctionRecursionConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetFunctionRecursionConfigOutput(v **GetFunctionRecursionConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetFunctionRecursionConfigOutput
+ if *v == nil {
+ sv = &GetFunctionRecursionConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "RecursiveLoop":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RecursiveLoop to be of type string, got %T instead", value)
+ }
+ sv.RecursiveLoop = types.RecursiveLoop(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetFunctionUrlConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpGetFunctionUrlConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetFunctionUrlConfig(response, &metadata)
+ }
+ output := &GetFunctionUrlConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetFunctionUrlConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetFunctionUrlConfigOutput(v **GetFunctionUrlConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetFunctionUrlConfigOutput
+ if *v == nil {
+ sv = &GetFunctionUrlConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AuthType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionUrlAuthType to be of type string, got %T instead", value)
+ }
+ sv.AuthType = types.FunctionUrlAuthType(jtv)
+ }
+
+ case "Cors":
+ if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil {
+ return err
+ }
+
+ case "CreationTime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.CreationTime = ptr.String(jtv)
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionUrl":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value)
+ }
+ sv.FunctionUrl = ptr.String(jtv)
+ }
+
+ case "InvokeMode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value)
+ }
+ sv.InvokeMode = types.InvokeMode(jtv)
+ }
+
+ case "LastModifiedTime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModifiedTime = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetLayerVersion struct {
+}
+
+func (*awsRestjson1_deserializeOpGetLayerVersion) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetLayerVersion(response, &metadata)
+ }
+ output := &GetLayerVersionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetLayerVersionOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetLayerVersionOutput(v **GetLayerVersionOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetLayerVersionOutput
+ if *v == nil {
+ sv = &GetLayerVersionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CompatibleArchitectures":
+ if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil {
+ return err
+ }
+
+ case "CompatibleRuntimes":
+ if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil {
+ return err
+ }
+
+ case "Content":
+ if err := awsRestjson1_deserializeDocumentLayerVersionContentOutput(&sv.Content, value); err != nil {
+ return err
+ }
+
+ case "CreatedDate":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.CreatedDate = ptr.String(jtv)
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "LayerArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value)
+ }
+ sv.LayerArn = ptr.String(jtv)
+ }
+
+ case "LayerVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value)
+ }
+ sv.LayerVersionArn = ptr.String(jtv)
+ }
+
+ case "LicenseInfo":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value)
+ }
+ sv.LicenseInfo = ptr.String(jtv)
+ }
+
+ case "Version":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Version = i64
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetLayerVersionByArn struct {
+}
+
+func (*awsRestjson1_deserializeOpGetLayerVersionByArn) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetLayerVersionByArn) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetLayerVersionByArn(response, &metadata)
+ }
+ output := &GetLayerVersionByArnOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetLayerVersionByArnOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetLayerVersionByArn(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetLayerVersionByArnOutput(v **GetLayerVersionByArnOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetLayerVersionByArnOutput
+ if *v == nil {
+ sv = &GetLayerVersionByArnOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CompatibleArchitectures":
+ if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil {
+ return err
+ }
+
+ case "CompatibleRuntimes":
+ if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil {
+ return err
+ }
+
+ case "Content":
+ if err := awsRestjson1_deserializeDocumentLayerVersionContentOutput(&sv.Content, value); err != nil {
+ return err
+ }
+
+ case "CreatedDate":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.CreatedDate = ptr.String(jtv)
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "LayerArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value)
+ }
+ sv.LayerArn = ptr.String(jtv)
+ }
+
+ case "LayerVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value)
+ }
+ sv.LayerVersionArn = ptr.String(jtv)
+ }
+
+ case "LicenseInfo":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value)
+ }
+ sv.LicenseInfo = ptr.String(jtv)
+ }
+
+ case "Version":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Version = i64
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetLayerVersionPolicy struct {
+}
+
+func (*awsRestjson1_deserializeOpGetLayerVersionPolicy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetLayerVersionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetLayerVersionPolicy(response, &metadata)
+ }
+ output := &GetLayerVersionPolicyOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetLayerVersionPolicyOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetLayerVersionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetLayerVersionPolicyOutput(v **GetLayerVersionPolicyOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetLayerVersionPolicyOutput
+ if *v == nil {
+ sv = &GetLayerVersionPolicyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Policy":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Policy = ptr.String(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetPolicy struct {
+}
+
+func (*awsRestjson1_deserializeOpGetPolicy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetPolicy(response, &metadata)
+ }
+ output := &GetPolicyOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetPolicyOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetPolicyOutput(v **GetPolicyOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetPolicyOutput
+ if *v == nil {
+ sv = &GetPolicyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Policy":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Policy = ptr.String(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetProvisionedConcurrencyConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpGetProvisionedConcurrencyConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetProvisionedConcurrencyConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetProvisionedConcurrencyConfig(response, &metadata)
+ }
+ output := &GetProvisionedConcurrencyConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetProvisionedConcurrencyConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetProvisionedConcurrencyConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ProvisionedConcurrencyConfigNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorProvisionedConcurrencyConfigNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetProvisionedConcurrencyConfigOutput(v **GetProvisionedConcurrencyConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetProvisionedConcurrencyConfigOutput
+ if *v == nil {
+ sv = &GetProvisionedConcurrencyConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AllocatedProvisionedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.AllocatedProvisionedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ case "AvailableProvisionedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.AvailableProvisionedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ case "LastModified":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModified = ptr.String(jtv)
+ }
+
+ case "RequestedProvisionedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.RequestedProvisionedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ case "Status":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ProvisionedConcurrencyStatusEnum to be of type string, got %T instead", value)
+ }
+ sv.Status = types.ProvisionedConcurrencyStatusEnum(jtv)
+ }
+
+ case "StatusReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.StatusReason = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpGetRuntimeManagementConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpGetRuntimeManagementConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpGetRuntimeManagementConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response, &metadata)
+ }
+ output := &GetRuntimeManagementConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(v **GetRuntimeManagementConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetRuntimeManagementConfigOutput
+ if *v == nil {
+ sv = &GetRuntimeManagementConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "RuntimeVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RuntimeVersionArn to be of type string, got %T instead", value)
+ }
+ sv.RuntimeVersionArn = ptr.String(jtv)
+ }
+
+ case "UpdateRuntimeOn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected UpdateRuntimeOn to be of type string, got %T instead", value)
+ }
+ sv.UpdateRuntimeOn = types.UpdateRuntimeOn(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpInvoke struct {
+}
+
+func (*awsRestjson1_deserializeOpInvoke) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpInvoke) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorInvoke(response, &metadata)
+ }
+ output := &InvokeOutput{}
+ out.Result = output
+
+ err = awsRestjson1_deserializeOpHttpBindingsInvokeOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ err = awsRestjson1_deserializeOpDocumentInvokeOutput(output, response.Body, response.ContentLength)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)}
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorInvoke(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("EC2AccessDeniedException", errorCode):
+ return awsRestjson1_deserializeErrorEC2AccessDeniedException(response, errorBody)
+
+ case strings.EqualFold("EC2ThrottledException", errorCode):
+ return awsRestjson1_deserializeErrorEC2ThrottledException(response, errorBody)
+
+ case strings.EqualFold("EC2UnexpectedException", errorCode):
+ return awsRestjson1_deserializeErrorEC2UnexpectedException(response, errorBody)
+
+ case strings.EqualFold("EFSIOException", errorCode):
+ return awsRestjson1_deserializeErrorEFSIOException(response, errorBody)
+
+ case strings.EqualFold("EFSMountConnectivityException", errorCode):
+ return awsRestjson1_deserializeErrorEFSMountConnectivityException(response, errorBody)
+
+ case strings.EqualFold("EFSMountFailureException", errorCode):
+ return awsRestjson1_deserializeErrorEFSMountFailureException(response, errorBody)
+
+ case strings.EqualFold("EFSMountTimeoutException", errorCode):
+ return awsRestjson1_deserializeErrorEFSMountTimeoutException(response, errorBody)
+
+ case strings.EqualFold("ENILimitReachedException", errorCode):
+ return awsRestjson1_deserializeErrorENILimitReachedException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("InvalidRequestContentException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestContentException(response, errorBody)
+
+ case strings.EqualFold("InvalidRuntimeException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRuntimeException(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurityGroupIDException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidSecurityGroupIDException(response, errorBody)
+
+ case strings.EqualFold("InvalidSubnetIDException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidSubnetIDException(response, errorBody)
+
+ case strings.EqualFold("InvalidZipFileException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidZipFileException(response, errorBody)
+
+ case strings.EqualFold("KMSAccessDeniedException", errorCode):
+ return awsRestjson1_deserializeErrorKMSAccessDeniedException(response, errorBody)
+
+ case strings.EqualFold("KMSDisabledException", errorCode):
+ return awsRestjson1_deserializeErrorKMSDisabledException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsRestjson1_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KMSNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorKMSNotFoundException(response, errorBody)
+
+ case strings.EqualFold("RecursiveInvocationException", errorCode):
+ return awsRestjson1_deserializeErrorRecursiveInvocationException(response, errorBody)
+
+ case strings.EqualFold("RequestTooLargeException", errorCode):
+ return awsRestjson1_deserializeErrorRequestTooLargeException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotReadyException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotReadyException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("SnapStartException", errorCode):
+ return awsRestjson1_deserializeErrorSnapStartException(response, errorBody)
+
+ case strings.EqualFold("SnapStartNotReadyException", errorCode):
+ return awsRestjson1_deserializeErrorSnapStartNotReadyException(response, errorBody)
+
+ case strings.EqualFold("SnapStartTimeoutException", errorCode):
+ return awsRestjson1_deserializeErrorSnapStartTimeoutException(response, errorBody)
+
+ case strings.EqualFold("SubnetIPAddressLimitReachedException", errorCode):
+ return awsRestjson1_deserializeErrorSubnetIPAddressLimitReachedException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedMediaTypeException", errorCode):
+ return awsRestjson1_deserializeErrorUnsupportedMediaTypeException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpHttpBindingsInvokeOutput(v *InvokeOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("X-Amz-Executed-Version"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ExecutedVersion = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("X-Amz-Function-Error"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.FunctionError = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("X-Amz-Log-Result"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.LogResult = ptr.String(headerValues[0])
+ }
+
+ v.StatusCode = int32(response.StatusCode)
+
+ return nil
+}
+func awsRestjson1_deserializeOpDocumentInvokeOutput(v *InvokeOutput, body io.ReadCloser, contentLength int64) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization of nil %T", v)
+ }
+
+ var buf bytes.Buffer
+ if contentLength > 0 {
+ buf.Grow(int(contentLength))
+ } else {
+ buf.Grow(512)
+ }
+
+ _, err := buf.ReadFrom(body)
+ if err != nil {
+ return err
+ }
+ if buf.Len() > 0 {
+ v.Payload = buf.Bytes()
+ }
+ return nil
+}
+
+type awsRestjson1_deserializeOpInvokeAsync struct {
+}
+
+func (*awsRestjson1_deserializeOpInvokeAsync) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpInvokeAsync) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorInvokeAsync(response, &metadata)
+ }
+ output := &InvokeAsyncOutput{}
+ out.Result = output
+
+ err = awsRestjson1_deserializeOpHttpBindingsInvokeAsyncOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorInvokeAsync(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidRequestContentException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestContentException(response, errorBody)
+
+ case strings.EqualFold("InvalidRuntimeException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRuntimeException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpHttpBindingsInvokeAsyncOutput(v *InvokeAsyncOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ v.Status = int32(response.StatusCode)
+
+ return nil
+}
+
+type awsRestjson1_deserializeOpInvokeWithResponseStream struct {
+}
+
+func (*awsRestjson1_deserializeOpInvokeWithResponseStream) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpInvokeWithResponseStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response, &metadata)
+ }
+ output := &InvokeWithResponseStreamOutput{}
+ out.Result = output
+
+ err = awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(output, response)
+ if err != nil {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)}
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("EC2AccessDeniedException", errorCode):
+ return awsRestjson1_deserializeErrorEC2AccessDeniedException(response, errorBody)
+
+ case strings.EqualFold("EC2ThrottledException", errorCode):
+ return awsRestjson1_deserializeErrorEC2ThrottledException(response, errorBody)
+
+ case strings.EqualFold("EC2UnexpectedException", errorCode):
+ return awsRestjson1_deserializeErrorEC2UnexpectedException(response, errorBody)
+
+ case strings.EqualFold("EFSIOException", errorCode):
+ return awsRestjson1_deserializeErrorEFSIOException(response, errorBody)
+
+ case strings.EqualFold("EFSMountConnectivityException", errorCode):
+ return awsRestjson1_deserializeErrorEFSMountConnectivityException(response, errorBody)
+
+ case strings.EqualFold("EFSMountFailureException", errorCode):
+ return awsRestjson1_deserializeErrorEFSMountFailureException(response, errorBody)
+
+ case strings.EqualFold("EFSMountTimeoutException", errorCode):
+ return awsRestjson1_deserializeErrorEFSMountTimeoutException(response, errorBody)
+
+ case strings.EqualFold("ENILimitReachedException", errorCode):
+ return awsRestjson1_deserializeErrorENILimitReachedException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("InvalidRequestContentException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRequestContentException(response, errorBody)
+
+ case strings.EqualFold("InvalidRuntimeException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidRuntimeException(response, errorBody)
+
+ case strings.EqualFold("InvalidSecurityGroupIDException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidSecurityGroupIDException(response, errorBody)
+
+ case strings.EqualFold("InvalidSubnetIDException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidSubnetIDException(response, errorBody)
+
+ case strings.EqualFold("InvalidZipFileException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidZipFileException(response, errorBody)
+
+ case strings.EqualFold("KMSAccessDeniedException", errorCode):
+ return awsRestjson1_deserializeErrorKMSAccessDeniedException(response, errorBody)
+
+ case strings.EqualFold("KMSDisabledException", errorCode):
+ return awsRestjson1_deserializeErrorKMSDisabledException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsRestjson1_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KMSNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorKMSNotFoundException(response, errorBody)
+
+ case strings.EqualFold("RecursiveInvocationException", errorCode):
+ return awsRestjson1_deserializeErrorRecursiveInvocationException(response, errorBody)
+
+ case strings.EqualFold("RequestTooLargeException", errorCode):
+ return awsRestjson1_deserializeErrorRequestTooLargeException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotReadyException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotReadyException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("SnapStartException", errorCode):
+ return awsRestjson1_deserializeErrorSnapStartException(response, errorBody)
+
+ case strings.EqualFold("SnapStartNotReadyException", errorCode):
+ return awsRestjson1_deserializeErrorSnapStartNotReadyException(response, errorBody)
+
+ case strings.EqualFold("SnapStartTimeoutException", errorCode):
+ return awsRestjson1_deserializeErrorSnapStartTimeoutException(response, errorBody)
+
+ case strings.EqualFold("SubnetIPAddressLimitReachedException", errorCode):
+ return awsRestjson1_deserializeErrorSubnetIPAddressLimitReachedException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedMediaTypeException", errorCode):
+ return awsRestjson1_deserializeErrorUnsupportedMediaTypeException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(v *InvokeWithResponseStreamOutput, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("X-Amz-Executed-Version"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ExecutedVersion = ptr.String(headerValues[0])
+ }
+
+ if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ResponseStreamContentType = ptr.String(headerValues[0])
+ }
+
+ v.StatusCode = int32(response.StatusCode)
+
+ return nil
+}
+
+type awsRestjson1_deserializeOpListAliases struct {
+}
+
+func (*awsRestjson1_deserializeOpListAliases) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListAliases(response, &metadata)
+ }
+ output := &ListAliasesOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListAliasesOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListAliasesOutput(v **ListAliasesOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListAliasesOutput
+ if *v == nil {
+ sv = &ListAliasesOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Aliases":
+ if err := awsRestjson1_deserializeDocumentAliasList(&sv.Aliases, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListCodeSigningConfigs struct {
+}
+
+func (*awsRestjson1_deserializeOpListCodeSigningConfigs) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListCodeSigningConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response, &metadata)
+ }
+ output := &ListCodeSigningConfigsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(v **ListCodeSigningConfigsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListCodeSigningConfigsOutput
+ if *v == nil {
+ sv = &ListCodeSigningConfigsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CodeSigningConfigs":
+ if err := awsRestjson1_deserializeDocumentCodeSigningConfigList(&sv.CodeSigningConfigs, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListEventSourceMappings struct {
+}
+
+func (*awsRestjson1_deserializeOpListEventSourceMappings) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListEventSourceMappings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListEventSourceMappings(response, &metadata)
+ }
+ output := &ListEventSourceMappingsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListEventSourceMappings(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(v **ListEventSourceMappingsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListEventSourceMappingsOutput
+ if *v == nil {
+ sv = &ListEventSourceMappingsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "EventSourceMappings":
+ if err := awsRestjson1_deserializeDocumentEventSourceMappingsList(&sv.EventSourceMappings, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListFunctionEventInvokeConfigs struct {
+}
+
+func (*awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response, &metadata)
+ }
+ output := &ListFunctionEventInvokeConfigsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(v **ListFunctionEventInvokeConfigsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListFunctionEventInvokeConfigsOutput
+ if *v == nil {
+ sv = &ListFunctionEventInvokeConfigsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "FunctionEventInvokeConfigs":
+ if err := awsRestjson1_deserializeDocumentFunctionEventInvokeConfigList(&sv.FunctionEventInvokeConfigs, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListFunctions struct {
+}
+
+func (*awsRestjson1_deserializeOpListFunctions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListFunctions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListFunctions(response, &metadata)
+ }
+ output := &ListFunctionsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListFunctionsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListFunctions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListFunctionsOutput
+ if *v == nil {
+ sv = &ListFunctionsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Functions":
+ if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Functions, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response, &metadata)
+ }
+ output := &ListFunctionsByCodeSigningConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(v **ListFunctionsByCodeSigningConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListFunctionsByCodeSigningConfigOutput
+ if *v == nil {
+ sv = &ListFunctionsByCodeSigningConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "FunctionArns":
+ if err := awsRestjson1_deserializeDocumentFunctionArnList(&sv.FunctionArns, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListFunctionUrlConfigs struct {
+}
+
+func (*awsRestjson1_deserializeOpListFunctionUrlConfigs) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response, &metadata)
+ }
+ output := &ListFunctionUrlConfigsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunctionUrlConfigsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListFunctionUrlConfigsOutput
+ if *v == nil {
+ sv = &ListFunctionUrlConfigsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "FunctionUrlConfigs":
+ if err := awsRestjson1_deserializeDocumentFunctionUrlConfigList(&sv.FunctionUrlConfigs, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListLayers struct {
+}
+
+func (*awsRestjson1_deserializeOpListLayers) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListLayers(response, &metadata)
+ }
+ output := &ListLayersOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListLayersOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListLayers(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListLayersOutput
+ if *v == nil {
+ sv = &ListLayersOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Layers":
+ if err := awsRestjson1_deserializeDocumentLayersList(&sv.Layers, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListLayerVersions struct {
+}
+
+func (*awsRestjson1_deserializeOpListLayerVersions) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListLayerVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListLayerVersions(response, &metadata)
+ }
+ output := &ListLayerVersionsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListLayerVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVersionsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListLayerVersionsOutput
+ if *v == nil {
+ sv = &ListLayerVersionsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "LayerVersions":
+ if err := awsRestjson1_deserializeDocumentLayerVersionsList(&sv.LayerVersions, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs struct {
+}
+
+func (*awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response, &metadata)
+ }
+ output := &ListProvisionedConcurrencyConfigsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v **ListProvisionedConcurrencyConfigsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListProvisionedConcurrencyConfigsOutput
+ if *v == nil {
+ sv = &ListProvisionedConcurrencyConfigsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ case "ProvisionedConcurrencyConfigs":
+ if err := awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigList(&sv.ProvisionedConcurrencyConfigs, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListTags struct {
+}
+
+func (*awsRestjson1_deserializeOpListTags) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListTags(response, &metadata)
+ }
+ output := &ListTagsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListTagsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListTags(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListTagsOutput(v **ListTagsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListTagsOutput
+ if *v == nil {
+ sv = &ListTagsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Tags":
+ if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpListVersionsByFunction struct {
+}
+
+func (*awsRestjson1_deserializeOpListVersionsByFunction) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpListVersionsByFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorListVersionsByFunction(response, &metadata)
+ }
+ output := &ListVersionsByFunctionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorListVersionsByFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(v **ListVersionsByFunctionOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListVersionsByFunctionOutput
+ if *v == nil {
+ sv = &ListVersionsByFunctionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ case "Versions":
+ if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Versions, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpPublishLayerVersion struct {
+}
+
+func (*awsRestjson1_deserializeOpPublishLayerVersion) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpPublishLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorPublishLayerVersion(response, &metadata)
+ }
+ output := &PublishLayerVersionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorPublishLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("CodeStorageExceededException", errorCode):
+ return awsRestjson1_deserializeErrorCodeStorageExceededException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(v **PublishLayerVersionOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *PublishLayerVersionOutput
+ if *v == nil {
+ sv = &PublishLayerVersionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CompatibleArchitectures":
+ if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil {
+ return err
+ }
+
+ case "CompatibleRuntimes":
+ if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil {
+ return err
+ }
+
+ case "Content":
+ if err := awsRestjson1_deserializeDocumentLayerVersionContentOutput(&sv.Content, value); err != nil {
+ return err
+ }
+
+ case "CreatedDate":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.CreatedDate = ptr.String(jtv)
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "LayerArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value)
+ }
+ sv.LayerArn = ptr.String(jtv)
+ }
+
+ case "LayerVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value)
+ }
+ sv.LayerVersionArn = ptr.String(jtv)
+ }
+
+ case "LicenseInfo":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value)
+ }
+ sv.LicenseInfo = ptr.String(jtv)
+ }
+
+ case "Version":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Version = i64
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpPublishVersion struct {
+}
+
+func (*awsRestjson1_deserializeOpPublishVersion) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpPublishVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorPublishVersion(response, &metadata)
+ }
+ output := &PublishVersionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentPublishVersionOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorPublishVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("CodeStorageExceededException", errorCode):
+ return awsRestjson1_deserializeErrorCodeStorageExceededException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("PreconditionFailedException", errorCode):
+ return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentPublishVersionOutput(v **PublishVersionOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *PublishVersionOutput
+ if *v == nil {
+ sv = &PublishVersionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Architectures":
+ if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil {
+ return err
+ }
+
+ case "CodeSha256":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.CodeSha256 = ptr.String(jtv)
+ }
+
+ case "CodeSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.CodeSize = i64
+ }
+
+ case "DeadLetterConfig":
+ if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil {
+ return err
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "Environment":
+ if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil {
+ return err
+ }
+
+ case "EphemeralStorage":
+ if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil {
+ return err
+ }
+
+ case "FileSystemConfigs":
+ if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value)
+ }
+ sv.FunctionName = ptr.String(jtv)
+ }
+
+ case "Handler":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Handler to be of type string, got %T instead", value)
+ }
+ sv.Handler = ptr.String(jtv)
+ }
+
+ case "ImageConfigResponse":
+ if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil {
+ return err
+ }
+
+ case "KMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value)
+ }
+ sv.KMSKeyArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModified = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatus":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatus = types.LastUpdateStatus(jtv)
+ }
+
+ case "LastUpdateStatusReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReason = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatusReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv)
+ }
+
+ case "Layers":
+ if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil {
+ return err
+ }
+
+ case "LoggingConfig":
+ if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil {
+ return err
+ }
+
+ case "MasterArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.MasterArn = ptr.String(jtv)
+ }
+
+ case "MemorySize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MemorySize = ptr.Int32(int32(i64))
+ }
+
+ case "PackageType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PackageType to be of type string, got %T instead", value)
+ }
+ sv.PackageType = types.PackageType(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ case "Role":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
+ }
+ sv.Role = ptr.String(jtv)
+ }
+
+ case "Runtime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Runtime to be of type string, got %T instead", value)
+ }
+ sv.Runtime = types.Runtime(jtv)
+ }
+
+ case "RuntimeVersionConfig":
+ if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil {
+ return err
+ }
+
+ case "SigningJobArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningJobArn = ptr.String(jtv)
+ }
+
+ case "SigningProfileVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningProfileVersionArn = ptr.String(jtv)
+ }
+
+ case "SnapStart":
+ if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil {
+ return err
+ }
+
+ case "State":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected State to be of type string, got %T instead", value)
+ }
+ sv.State = types.State(jtv)
+ }
+
+ case "StateReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReason to be of type string, got %T instead", value)
+ }
+ sv.StateReason = ptr.String(jtv)
+ }
+
+ case "StateReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value)
+ }
+ sv.StateReasonCode = types.StateReasonCode(jtv)
+ }
+
+ case "Timeout":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Timeout to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Timeout = ptr.Int32(int32(i64))
+ }
+
+ case "TracingConfig":
+ if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil {
+ return err
+ }
+
+ case "Version":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Version to be of type string, got %T instead", value)
+ }
+ sv.Version = ptr.String(jtv)
+ }
+
+ case "VpcConfig":
+ if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpPutFunctionCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionCodeSigningConfig(response, &metadata)
+ }
+ output := &PutFunctionCodeSigningConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorPutFunctionCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(v **PutFunctionCodeSigningConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *PutFunctionCodeSigningConfigOutput
+ if *v == nil {
+ sv = &PutFunctionCodeSigningConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CodeSigningConfigArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CodeSigningConfigArn to be of type string, got %T instead", value)
+ }
+ sv.CodeSigningConfigArn = ptr.String(jtv)
+ }
+
+ case "FunctionName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionName to be of type string, got %T instead", value)
+ }
+ sv.FunctionName = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpPutFunctionConcurrency struct {
+}
+
+func (*awsRestjson1_deserializeOpPutFunctionConcurrency) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpPutFunctionConcurrency) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionConcurrency(response, &metadata)
+ }
+ output := &PutFunctionConcurrencyOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorPutFunctionConcurrency(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(v **PutFunctionConcurrencyOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *PutFunctionConcurrencyOutput
+ if *v == nil {
+ sv = &PutFunctionConcurrencyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ReservedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpPutFunctionEventInvokeConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response, &metadata)
+ }
+ output := &PutFunctionEventInvokeConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(v **PutFunctionEventInvokeConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *PutFunctionEventInvokeConfigOutput
+ if *v == nil {
+ sv = &PutFunctionEventInvokeConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "DestinationConfig":
+ if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "MaximumEventAgeInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRetryAttempts":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRetryAttempts = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpPutFunctionRecursionConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpPutFunctionRecursionConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpPutFunctionRecursionConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response, &metadata)
+ }
+ output := &PutFunctionRecursionConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(v **PutFunctionRecursionConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *PutFunctionRecursionConfigOutput
+ if *v == nil {
+ sv = &PutFunctionRecursionConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "RecursiveLoop":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RecursiveLoop to be of type string, got %T instead", value)
+ }
+ sv.RecursiveLoop = types.RecursiveLoop(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response, &metadata)
+ }
+ output := &PutProvisionedConcurrencyConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(v **PutProvisionedConcurrencyConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *PutProvisionedConcurrencyConfigOutput
+ if *v == nil {
+ sv = &PutProvisionedConcurrencyConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AllocatedProvisionedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.AllocatedProvisionedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ case "AvailableProvisionedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.AvailableProvisionedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ case "LastModified":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModified = ptr.String(jtv)
+ }
+
+ case "RequestedProvisionedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.RequestedProvisionedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ case "Status":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ProvisionedConcurrencyStatusEnum to be of type string, got %T instead", value)
+ }
+ sv.Status = types.ProvisionedConcurrencyStatusEnum(jtv)
+ }
+
+ case "StatusReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.StatusReason = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpPutRuntimeManagementConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpPutRuntimeManagementConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpPutRuntimeManagementConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorPutRuntimeManagementConfig(response, &metadata)
+ }
+ output := &PutRuntimeManagementConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentPutRuntimeManagementConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorPutRuntimeManagementConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentPutRuntimeManagementConfigOutput(v **PutRuntimeManagementConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *PutRuntimeManagementConfigOutput
+ if *v == nil {
+ sv = &PutRuntimeManagementConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "RuntimeVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RuntimeVersionArn to be of type string, got %T instead", value)
+ }
+ sv.RuntimeVersionArn = ptr.String(jtv)
+ }
+
+ case "UpdateRuntimeOn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected UpdateRuntimeOn to be of type string, got %T instead", value)
+ }
+ sv.UpdateRuntimeOn = types.UpdateRuntimeOn(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpRemoveLayerVersionPermission struct {
+}
+
+func (*awsRestjson1_deserializeOpRemoveLayerVersionPermission) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpRemoveLayerVersionPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorRemoveLayerVersionPermission(response, &metadata)
+ }
+ output := &RemoveLayerVersionPermissionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorRemoveLayerVersionPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("PreconditionFailedException", errorCode):
+ return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpRemovePermission struct {
+}
+
+func (*awsRestjson1_deserializeOpRemovePermission) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpRemovePermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorRemovePermission(response, &metadata)
+ }
+ output := &RemovePermissionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorRemovePermission(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("PreconditionFailedException", errorCode):
+ return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpTagResource struct {
+}
+
+func (*awsRestjson1_deserializeOpTagResource) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata)
+ }
+ output := &TagResourceOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpUntagResource struct {
+}
+
+func (*awsRestjson1_deserializeOpUntagResource) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata)
+ }
+ output := &UntagResourceOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsRestjson1_deserializeOpUpdateAlias struct {
+}
+
+func (*awsRestjson1_deserializeOpUpdateAlias) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpUpdateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorUpdateAlias(response, &metadata)
+ }
+ output := &UpdateAliasOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentUpdateAliasOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorUpdateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("PreconditionFailedException", errorCode):
+ return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentUpdateAliasOutput(v **UpdateAliasOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *UpdateAliasOutput
+ if *v == nil {
+ sv = &UpdateAliasOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AliasArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.AliasArn = ptr.String(jtv)
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "FunctionVersion":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Version to be of type string, got %T instead", value)
+ }
+ sv.FunctionVersion = ptr.String(jtv)
+ }
+
+ case "Name":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Alias to be of type string, got %T instead", value)
+ }
+ sv.Name = ptr.String(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ case "RoutingConfig":
+ if err := awsRestjson1_deserializeDocumentAliasRoutingConfiguration(&sv.RoutingConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpUpdateCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpUpdateCodeSigningConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpUpdateCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorUpdateCodeSigningConfig(response, &metadata)
+ }
+ output := &UpdateCodeSigningConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentUpdateCodeSigningConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorUpdateCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentUpdateCodeSigningConfigOutput(v **UpdateCodeSigningConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *UpdateCodeSigningConfigOutput
+ if *v == nil {
+ sv = &UpdateCodeSigningConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CodeSigningConfig":
+ if err := awsRestjson1_deserializeDocumentCodeSigningConfig(&sv.CodeSigningConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpUpdateEventSourceMapping struct {
+}
+
+func (*awsRestjson1_deserializeOpUpdateEventSourceMapping) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpUpdateEventSourceMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorUpdateEventSourceMapping(response, &metadata)
+ }
+ output := &UpdateEventSourceMappingOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentUpdateEventSourceMappingOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorUpdateEventSourceMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceInUseException", errorCode):
+ return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentUpdateEventSourceMappingOutput(v **UpdateEventSourceMappingOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *UpdateEventSourceMappingOutput
+ if *v == nil {
+ sv = &UpdateEventSourceMappingOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AmazonManagedKafkaEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "BatchSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected BatchSize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.BatchSize = ptr.Int32(int32(i64))
+ }
+
+ case "BisectBatchOnFunctionError":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BisectBatchOnFunctionError to be of type *bool, got %T instead", value)
+ }
+ sv.BisectBatchOnFunctionError = ptr.Bool(jtv)
+ }
+
+ case "DestinationConfig":
+ if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil {
+ return err
+ }
+
+ case "DocumentDBEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(&sv.DocumentDBEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "EventSourceArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.EventSourceArn = ptr.String(jtv)
+ }
+
+ case "EventSourceMappingArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value)
+ }
+ sv.EventSourceMappingArn = ptr.String(jtv)
+ }
+
+ case "FilterCriteria":
+ if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil {
+ return err
+ }
+
+ case "FilterCriteriaError":
+ if err := awsRestjson1_deserializeDocumentFilterCriteriaError(&sv.FilterCriteriaError, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionResponseTypes":
+ if err := awsRestjson1_deserializeDocumentFunctionResponseTypeList(&sv.FunctionResponseTypes, value); err != nil {
+ return err
+ }
+
+ case "KMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value)
+ }
+ sv.KMSKeyArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "LastProcessingResult":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.LastProcessingResult = ptr.String(jtv)
+ }
+
+ case "MaximumBatchingWindowInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumBatchingWindowInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumBatchingWindowInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRecordAgeInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRecordAgeInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRecordAgeInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRetryAttempts":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRetryAttemptsEventSourceMapping to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRetryAttempts = ptr.Int32(int32(i64))
+ }
+
+ case "MetricsConfig":
+ if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(&sv.MetricsConfig, value); err != nil {
+ return err
+ }
+
+ case "ParallelizationFactor":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ParallelizationFactor to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ParallelizationFactor = ptr.Int32(int32(i64))
+ }
+
+ case "ProvisionedPollerConfig":
+ if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil {
+ return err
+ }
+
+ case "Queues":
+ if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil {
+ return err
+ }
+
+ case "ScalingConfig":
+ if err := awsRestjson1_deserializeDocumentScalingConfig(&sv.ScalingConfig, value); err != nil {
+ return err
+ }
+
+ case "SelfManagedEventSource":
+ if err := awsRestjson1_deserializeDocumentSelfManagedEventSource(&sv.SelfManagedEventSource, value); err != nil {
+ return err
+ }
+
+ case "SelfManagedKafkaEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "SourceAccessConfigurations":
+ if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil {
+ return err
+ }
+
+ case "StartingPosition":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EventSourcePosition to be of type string, got %T instead", value)
+ }
+ sv.StartingPosition = types.EventSourcePosition(jtv)
+ }
+
+ case "StartingPositionTimestamp":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.StartingPositionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "State":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.State = ptr.String(jtv)
+ }
+
+ case "StateTransitionReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.StateTransitionReason = ptr.String(jtv)
+ }
+
+ case "Topics":
+ if err := awsRestjson1_deserializeDocumentTopics(&sv.Topics, value); err != nil {
+ return err
+ }
+
+ case "TumblingWindowInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected TumblingWindowInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.TumblingWindowInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "UUID":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.UUID = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpUpdateFunctionCode struct {
+}
+
+func (*awsRestjson1_deserializeOpUpdateFunctionCode) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpUpdateFunctionCode) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorUpdateFunctionCode(response, &metadata)
+ }
+ output := &UpdateFunctionCodeOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentUpdateFunctionCodeOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorUpdateFunctionCode(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody)
+
+ case strings.EqualFold("CodeStorageExceededException", errorCode):
+ return awsRestjson1_deserializeErrorCodeStorageExceededException(response, errorBody)
+
+ case strings.EqualFold("CodeVerificationFailedException", errorCode):
+ return awsRestjson1_deserializeErrorCodeVerificationFailedException(response, errorBody)
+
+ case strings.EqualFold("InvalidCodeSignatureException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidCodeSignatureException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("PreconditionFailedException", errorCode):
+ return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentUpdateFunctionCodeOutput(v **UpdateFunctionCodeOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *UpdateFunctionCodeOutput
+ if *v == nil {
+ sv = &UpdateFunctionCodeOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Architectures":
+ if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil {
+ return err
+ }
+
+ case "CodeSha256":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.CodeSha256 = ptr.String(jtv)
+ }
+
+ case "CodeSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.CodeSize = i64
+ }
+
+ case "DeadLetterConfig":
+ if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil {
+ return err
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "Environment":
+ if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil {
+ return err
+ }
+
+ case "EphemeralStorage":
+ if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil {
+ return err
+ }
+
+ case "FileSystemConfigs":
+ if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value)
+ }
+ sv.FunctionName = ptr.String(jtv)
+ }
+
+ case "Handler":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Handler to be of type string, got %T instead", value)
+ }
+ sv.Handler = ptr.String(jtv)
+ }
+
+ case "ImageConfigResponse":
+ if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil {
+ return err
+ }
+
+ case "KMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value)
+ }
+ sv.KMSKeyArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModified = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatus":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatus = types.LastUpdateStatus(jtv)
+ }
+
+ case "LastUpdateStatusReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReason = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatusReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv)
+ }
+
+ case "Layers":
+ if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil {
+ return err
+ }
+
+ case "LoggingConfig":
+ if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil {
+ return err
+ }
+
+ case "MasterArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.MasterArn = ptr.String(jtv)
+ }
+
+ case "MemorySize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MemorySize = ptr.Int32(int32(i64))
+ }
+
+ case "PackageType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PackageType to be of type string, got %T instead", value)
+ }
+ sv.PackageType = types.PackageType(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ case "Role":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
+ }
+ sv.Role = ptr.String(jtv)
+ }
+
+ case "Runtime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Runtime to be of type string, got %T instead", value)
+ }
+ sv.Runtime = types.Runtime(jtv)
+ }
+
+ case "RuntimeVersionConfig":
+ if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil {
+ return err
+ }
+
+ case "SigningJobArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningJobArn = ptr.String(jtv)
+ }
+
+ case "SigningProfileVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningProfileVersionArn = ptr.String(jtv)
+ }
+
+ case "SnapStart":
+ if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil {
+ return err
+ }
+
+ case "State":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected State to be of type string, got %T instead", value)
+ }
+ sv.State = types.State(jtv)
+ }
+
+ case "StateReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReason to be of type string, got %T instead", value)
+ }
+ sv.StateReason = ptr.String(jtv)
+ }
+
+ case "StateReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value)
+ }
+ sv.StateReasonCode = types.StateReasonCode(jtv)
+ }
+
+ case "Timeout":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Timeout to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Timeout = ptr.Int32(int32(i64))
+ }
+
+ case "TracingConfig":
+ if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil {
+ return err
+ }
+
+ case "Version":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Version to be of type string, got %T instead", value)
+ }
+ sv.Version = ptr.String(jtv)
+ }
+
+ case "VpcConfig":
+ if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpUpdateFunctionConfiguration struct {
+}
+
+func (*awsRestjson1_deserializeOpUpdateFunctionConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpUpdateFunctionConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorUpdateFunctionConfiguration(response, &metadata)
+ }
+ output := &UpdateFunctionConfigurationOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentUpdateFunctionConfigurationOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorUpdateFunctionConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody)
+
+ case strings.EqualFold("CodeVerificationFailedException", errorCode):
+ return awsRestjson1_deserializeErrorCodeVerificationFailedException(response, errorBody)
+
+ case strings.EqualFold("InvalidCodeSignatureException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidCodeSignatureException(response, errorBody)
+
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("PreconditionFailedException", errorCode):
+ return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentUpdateFunctionConfigurationOutput(v **UpdateFunctionConfigurationOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *UpdateFunctionConfigurationOutput
+ if *v == nil {
+ sv = &UpdateFunctionConfigurationOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Architectures":
+ if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil {
+ return err
+ }
+
+ case "CodeSha256":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.CodeSha256 = ptr.String(jtv)
+ }
+
+ case "CodeSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.CodeSize = i64
+ }
+
+ case "DeadLetterConfig":
+ if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil {
+ return err
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "Environment":
+ if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil {
+ return err
+ }
+
+ case "EphemeralStorage":
+ if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil {
+ return err
+ }
+
+ case "FileSystemConfigs":
+ if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value)
+ }
+ sv.FunctionName = ptr.String(jtv)
+ }
+
+ case "Handler":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Handler to be of type string, got %T instead", value)
+ }
+ sv.Handler = ptr.String(jtv)
+ }
+
+ case "ImageConfigResponse":
+ if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil {
+ return err
+ }
+
+ case "KMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value)
+ }
+ sv.KMSKeyArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModified = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatus":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatus = types.LastUpdateStatus(jtv)
+ }
+
+ case "LastUpdateStatusReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReason = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatusReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv)
+ }
+
+ case "Layers":
+ if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil {
+ return err
+ }
+
+ case "LoggingConfig":
+ if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil {
+ return err
+ }
+
+ case "MasterArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.MasterArn = ptr.String(jtv)
+ }
+
+ case "MemorySize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MemorySize = ptr.Int32(int32(i64))
+ }
+
+ case "PackageType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PackageType to be of type string, got %T instead", value)
+ }
+ sv.PackageType = types.PackageType(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ case "Role":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
+ }
+ sv.Role = ptr.String(jtv)
+ }
+
+ case "Runtime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Runtime to be of type string, got %T instead", value)
+ }
+ sv.Runtime = types.Runtime(jtv)
+ }
+
+ case "RuntimeVersionConfig":
+ if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil {
+ return err
+ }
+
+ case "SigningJobArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningJobArn = ptr.String(jtv)
+ }
+
+ case "SigningProfileVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningProfileVersionArn = ptr.String(jtv)
+ }
+
+ case "SnapStart":
+ if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil {
+ return err
+ }
+
+ case "State":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected State to be of type string, got %T instead", value)
+ }
+ sv.State = types.State(jtv)
+ }
+
+ case "StateReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReason to be of type string, got %T instead", value)
+ }
+ sv.StateReason = ptr.String(jtv)
+ }
+
+ case "StateReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value)
+ }
+ sv.StateReasonCode = types.StateReasonCode(jtv)
+ }
+
+ case "Timeout":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Timeout to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Timeout = ptr.Int32(int32(i64))
+ }
+
+ case "TracingConfig":
+ if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil {
+ return err
+ }
+
+ case "Version":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Version to be of type string, got %T instead", value)
+ }
+ sv.Version = ptr.String(jtv)
+ }
+
+ case "VpcConfig":
+ if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpUpdateFunctionEventInvokeConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpUpdateFunctionEventInvokeConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpUpdateFunctionEventInvokeConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorUpdateFunctionEventInvokeConfig(response, &metadata)
+ }
+ output := &UpdateFunctionEventInvokeConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentUpdateFunctionEventInvokeConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorUpdateFunctionEventInvokeConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentUpdateFunctionEventInvokeConfigOutput(v **UpdateFunctionEventInvokeConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *UpdateFunctionEventInvokeConfigOutput
+ if *v == nil {
+ sv = &UpdateFunctionEventInvokeConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "DestinationConfig":
+ if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "MaximumEventAgeInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRetryAttempts":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRetryAttempts = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestjson1_deserializeOpUpdateFunctionUrlConfig struct {
+}
+
+func (*awsRestjson1_deserializeOpUpdateFunctionUrlConfig) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpUpdateFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestjson1_deserializeOpErrorUpdateFunctionUrlConfig(response, &metadata)
+ }
+ output := &UpdateFunctionUrlConfigOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsRestjson1_deserializeOpDocumentUpdateFunctionUrlConfigOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestjson1_deserializeOpErrorUpdateFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+ if len(headerCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(headerCode)
+ }
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ jsonCode, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if len(headerCode) == 0 && len(jsonCode) != 0 {
+ errorCode = restjson.SanitizeErrorCode(jsonCode)
+ }
+ if len(message) != 0 {
+ errorMessage = message
+ }
+
+ switch {
+ case strings.EqualFold("InvalidParameterValueException", errorCode):
+ return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody)
+
+ case strings.EqualFold("ResourceConflictException", errorCode):
+ return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody)
+
+ case strings.EqualFold("ResourceNotFoundException", errorCode):
+ return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody)
+
+ case strings.EqualFold("ServiceException", errorCode):
+ return awsRestjson1_deserializeErrorServiceException(response, errorBody)
+
+ case strings.EqualFold("TooManyRequestsException", errorCode):
+ return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestjson1_deserializeOpDocumentUpdateFunctionUrlConfigOutput(v **UpdateFunctionUrlConfigOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *UpdateFunctionUrlConfigOutput
+ if *v == nil {
+ sv = &UpdateFunctionUrlConfigOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AuthType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionUrlAuthType to be of type string, got %T instead", value)
+ }
+ sv.AuthType = types.FunctionUrlAuthType(jtv)
+ }
+
+ case "Cors":
+ if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil {
+ return err
+ }
+
+ case "CreationTime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.CreationTime = ptr.String(jtv)
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionUrl":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value)
+ }
+ sv.FunctionUrl = ptr.String(jtv)
+ }
+
+ case "InvokeMode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value)
+ }
+ sv.InvokeMode = types.InvokeMode(jtv)
+ }
+
+ case "LastModifiedTime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModifiedTime = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeEventStreamInvokeWithResponseStreamResponseEvent(v *types.InvokeWithResponseStreamResponseEvent, msg *eventstream.Message) error {
+ if v == nil {
+ return fmt.Errorf("unexpected serialization of nil %T", v)
+ }
+
+ eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader)
+ if eventType == nil {
+ return fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader)
+ }
+
+ switch {
+ case strings.EqualFold("InvokeComplete", eventType.String()):
+ vv := &types.InvokeWithResponseStreamResponseEventMemberInvokeComplete{}
+ if err := awsRestjson1_deserializeEventMessageInvokeWithResponseStreamCompleteEvent(&vv.Value, msg); err != nil {
+ return err
+ }
+ *v = vv
+ return nil
+
+ case strings.EqualFold("PayloadChunk", eventType.String()):
+ vv := &types.InvokeWithResponseStreamResponseEventMemberPayloadChunk{}
+ if err := awsRestjson1_deserializeEventMessageInvokeResponseStreamUpdate(&vv.Value, msg); err != nil {
+ return err
+ }
+ *v = vv
+ return nil
+
+ default:
+ buffer := bytes.NewBuffer(nil)
+ eventstream.NewEncoder().Encode(buffer, *msg)
+ *v = &types.UnknownUnionMember{
+ Tag: eventType.String(),
+ Value: buffer.Bytes(),
+ }
+ return nil
+
+ }
+}
+
+func awsRestjson1_deserializeEventStreamExceptionInvokeWithResponseStreamResponseEvent(msg *eventstream.Message) error {
+ exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader)
+ if exceptionType == nil {
+ return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader)
+ }
+
+ switch {
+ default:
+ br := bytes.NewReader(msg.Payload)
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(br, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ code, message, err := restjson.GetErrorInfo(decoder)
+ if err != nil {
+ return err
+ }
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+ if ev := exceptionType.String(); len(ev) > 0 {
+ errorCode = ev
+ } else if ev := code; len(ev) > 0 {
+ errorCode = ev
+ }
+ if ev := message; len(ev) > 0 {
+ errorMessage = ev
+ }
+ return &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+
+ }
+}
+
+func awsRestjson1_deserializeEventMessageInvokeResponseStreamUpdate(v *types.InvokeResponseStreamUpdate, msg *eventstream.Message) error {
+ if v == nil {
+ return fmt.Errorf("unexpected serialization of nil %T", v)
+ }
+
+ if msg.Payload != nil {
+ bsv := make([]byte, len(msg.Payload))
+ copy(bsv, msg.Payload)
+
+ v.Payload = bsv
+ }
+ return nil
+}
+
+func awsRestjson1_deserializeEventMessageInvokeWithResponseStreamCompleteEvent(v *types.InvokeWithResponseStreamCompleteEvent, msg *eventstream.Message) error {
+ if v == nil {
+ return fmt.Errorf("unexpected serialization of nil %T", v)
+ }
+
+ br := bytes.NewReader(msg.Payload)
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(br, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ if err := awsRestjson1_deserializeDocumentInvokeWithResponseStreamCompleteEvent(&v, shape); err != nil {
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ }
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvokeWithResponseStreamCompleteEvent(v **types.InvokeWithResponseStreamCompleteEvent, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvokeWithResponseStreamCompleteEvent
+ if *v == nil {
+ sv = &types.InvokeWithResponseStreamCompleteEvent{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ErrorCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.ErrorCode = ptr.String(jtv)
+ }
+
+ case "ErrorDetails":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.ErrorDetails = ptr.String(jtv)
+ }
+
+ case "LogResult":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.LogResult = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeOpHttpBindingsTooManyRequestsException(v *types.TooManyRequestsException, response *smithyhttp.Response) error {
+ if v == nil {
+ return fmt.Errorf("unsupported deserialization for nil %T", v)
+ }
+
+ if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.RetryAfterSeconds = ptr.String(headerValues[0])
+ }
+
+ return nil
+}
+func awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.CodeSigningConfigNotFoundException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentCodeSigningConfigNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorCodeStorageExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.CodeStorageExceededException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentCodeStorageExceededException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorCodeVerificationFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.CodeVerificationFailedException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentCodeVerificationFailedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorEC2AccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.EC2AccessDeniedException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentEC2AccessDeniedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorEC2ThrottledException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.EC2ThrottledException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentEC2ThrottledException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorEC2UnexpectedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.EC2UnexpectedException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentEC2UnexpectedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorEFSIOException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.EFSIOException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentEFSIOException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorEFSMountConnectivityException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.EFSMountConnectivityException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentEFSMountConnectivityException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorEFSMountFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.EFSMountFailureException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentEFSMountFailureException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorEFSMountTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.EFSMountTimeoutException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentEFSMountTimeoutException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorENILimitReachedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ENILimitReachedException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentENILimitReachedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidCodeSignatureException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidCodeSignatureException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidCodeSignatureException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidParameterValueException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidParameterValueException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidParameterValueException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidRequestContentException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidRequestContentException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidRequestContentException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidRuntimeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidRuntimeException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidRuntimeException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidSecurityGroupIDException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidSecurityGroupIDException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidSecurityGroupIDException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidSubnetIDException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidSubnetIDException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidSubnetIDException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorInvalidZipFileException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidZipFileException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentInvalidZipFileException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorKMSAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.KMSAccessDeniedException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentKMSAccessDeniedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorKMSDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.KMSDisabledException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentKMSDisabledException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorKMSInvalidStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.KMSInvalidStateException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentKMSInvalidStateException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorKMSNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.KMSNotFoundException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentKMSNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorPolicyLengthExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.PolicyLengthExceededException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentPolicyLengthExceededException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorPreconditionFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.PreconditionFailedException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentPreconditionFailedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorProvisionedConcurrencyConfigNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ProvisionedConcurrencyConfigNotFoundException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorRecursiveInvocationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.RecursiveInvocationException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentRecursiveInvocationException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorRequestTooLargeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.RequestTooLargeException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentRequestTooLargeException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorResourceConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ResourceConflictException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentResourceConflictException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ResourceInUseException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentResourceInUseException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ResourceNotFoundException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorResourceNotReadyException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ResourceNotReadyException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentResourceNotReadyException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorServiceException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.ServiceException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentServiceException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorSnapStartException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.SnapStartException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentSnapStartException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorSnapStartNotReadyException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.SnapStartNotReadyException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentSnapStartNotReadyException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorSnapStartTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.SnapStartTimeoutException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentSnapStartTimeoutException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorSubnetIPAddressLimitReachedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.SubnetIPAddressLimitReachedException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentSubnetIPAddressLimitReachedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.TooManyRequestsException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentTooManyRequestsException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ if err := awsRestjson1_deserializeOpHttpBindingsTooManyRequestsException(output, response); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)}
+ }
+
+ return output
+}
+
+func awsRestjson1_deserializeErrorUnsupportedMediaTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.UnsupportedMediaTypeException{}
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ err := awsRestjson1_deserializeDocumentUnsupportedMediaTypeException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+
+ return output
+}
+
+func awsRestjson1_deserializeDocumentAccountLimit(v **types.AccountLimit, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AccountLimit
+ if *v == nil {
+ sv = &types.AccountLimit{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CodeSizeUnzipped":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.CodeSizeUnzipped = i64
+ }
+
+ case "CodeSizeZipped":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.CodeSizeZipped = i64
+ }
+
+ case "ConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ConcurrentExecutions = int32(i64)
+ }
+
+ case "TotalCodeSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.TotalCodeSize = i64
+ }
+
+ case "UnreservedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected UnreservedConcurrentExecutions to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.UnreservedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAccountUsage(v **types.AccountUsage, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AccountUsage
+ if *v == nil {
+ sv = &types.AccountUsage{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "FunctionCount":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.FunctionCount = i64
+ }
+
+ case "TotalCodeSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.TotalCodeSize = i64
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAdditionalVersionWeights(v *map[string]float64, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var mv map[string]float64
+ if *v == nil {
+ mv = map[string]float64{}
+ } else {
+ mv = *v
+ }
+
+ for key, value := range shape {
+ var parsedVal float64
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ parsedVal = f64
+
+ case string:
+ var f64 float64
+ switch {
+ case strings.EqualFold(jtv, "NaN"):
+ f64 = math.NaN()
+
+ case strings.EqualFold(jtv, "Infinity"):
+ f64 = math.Inf(1)
+
+ case strings.EqualFold(jtv, "-Infinity"):
+ f64 = math.Inf(-1)
+
+ default:
+ return fmt.Errorf("unknown JSON number value: %s", jtv)
+
+ }
+ parsedVal = f64
+
+ default:
+ return fmt.Errorf("expected Weight to be a JSON Number, got %T instead", value)
+
+ }
+ }
+ mv[key] = parsedVal
+
+ }
+ *v = mv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAliasConfiguration(v **types.AliasConfiguration, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AliasConfiguration
+ if *v == nil {
+ sv = &types.AliasConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AliasArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.AliasArn = ptr.String(jtv)
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "FunctionVersion":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Version to be of type string, got %T instead", value)
+ }
+ sv.FunctionVersion = ptr.String(jtv)
+ }
+
+ case "Name":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Alias to be of type string, got %T instead", value)
+ }
+ sv.Name = ptr.String(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ case "RoutingConfig":
+ if err := awsRestjson1_deserializeDocumentAliasRoutingConfiguration(&sv.RoutingConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAliasList(v *[]types.AliasConfiguration, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.AliasConfiguration
+ if *v == nil {
+ cv = []types.AliasConfiguration{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.AliasConfiguration
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentAliasConfiguration(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAliasRoutingConfiguration(v **types.AliasRoutingConfiguration, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AliasRoutingConfiguration
+ if *v == nil {
+ sv = &types.AliasRoutingConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AdditionalVersionWeights":
+ if err := awsRestjson1_deserializeDocumentAdditionalVersionWeights(&sv.AdditionalVersionWeights, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAllowedPublishers(v **types.AllowedPublishers, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AllowedPublishers
+ if *v == nil {
+ sv = &types.AllowedPublishers{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "SigningProfileVersionArns":
+ if err := awsRestjson1_deserializeDocumentSigningProfileVersionArns(&sv.SigningProfileVersionArns, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAllowMethodsList(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Method to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAllowOriginsList(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Origin to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(v **types.AmazonManagedKafkaEventSourceConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AmazonManagedKafkaEventSourceConfig
+ if *v == nil {
+ sv = &types.AmazonManagedKafkaEventSourceConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ConsumerGroupId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected URI to be of type string, got %T instead", value)
+ }
+ sv.ConsumerGroupId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentArchitecturesList(v *[]types.Architecture, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.Architecture
+ if *v == nil {
+ cv = []types.Architecture{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.Architecture
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Architecture to be of type string, got %T instead", value)
+ }
+ col = types.Architecture(jtv)
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentCodeSigningConfig(v **types.CodeSigningConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CodeSigningConfig
+ if *v == nil {
+ sv = &types.CodeSigningConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AllowedPublishers":
+ if err := awsRestjson1_deserializeDocumentAllowedPublishers(&sv.AllowedPublishers, value); err != nil {
+ return err
+ }
+
+ case "CodeSigningConfigArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CodeSigningConfigArn to be of type string, got %T instead", value)
+ }
+ sv.CodeSigningConfigArn = ptr.String(jtv)
+ }
+
+ case "CodeSigningConfigId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CodeSigningConfigId to be of type string, got %T instead", value)
+ }
+ sv.CodeSigningConfigId = ptr.String(jtv)
+ }
+
+ case "CodeSigningPolicies":
+ if err := awsRestjson1_deserializeDocumentCodeSigningPolicies(&sv.CodeSigningPolicies, value); err != nil {
+ return err
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModified = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentCodeSigningConfigList(v *[]types.CodeSigningConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.CodeSigningConfig
+ if *v == nil {
+ cv = []types.CodeSigningConfig{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.CodeSigningConfig
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentCodeSigningConfig(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentCodeSigningConfigNotFoundException(v **types.CodeSigningConfigNotFoundException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CodeSigningConfigNotFoundException
+ if *v == nil {
+ sv = &types.CodeSigningConfigNotFoundException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentCodeSigningPolicies(v **types.CodeSigningPolicies, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CodeSigningPolicies
+ if *v == nil {
+ sv = &types.CodeSigningPolicies{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "UntrustedArtifactOnDeployment":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CodeSigningPolicy to be of type string, got %T instead", value)
+ }
+ sv.UntrustedArtifactOnDeployment = types.CodeSigningPolicy(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentCodeStorageExceededException(v **types.CodeStorageExceededException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CodeStorageExceededException
+ if *v == nil {
+ sv = &types.CodeStorageExceededException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentCodeVerificationFailedException(v **types.CodeVerificationFailedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CodeVerificationFailedException
+ if *v == nil {
+ sv = &types.CodeVerificationFailedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentCompatibleArchitectures(v *[]types.Architecture, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.Architecture
+ if *v == nil {
+ cv = []types.Architecture{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.Architecture
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Architecture to be of type string, got %T instead", value)
+ }
+ col = types.Architecture(jtv)
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentCompatibleRuntimes(v *[]types.Runtime, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.Runtime
+ if *v == nil {
+ cv = []types.Runtime{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.Runtime
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Runtime to be of type string, got %T instead", value)
+ }
+ col = types.Runtime(jtv)
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentConcurrency(v **types.Concurrency, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.Concurrency
+ if *v == nil {
+ sv = &types.Concurrency{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ReservedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentCors(v **types.Cors, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.Cors
+ if *v == nil {
+ sv = &types.Cors{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AllowCredentials":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected AllowCredentials to be of type *bool, got %T instead", value)
+ }
+ sv.AllowCredentials = ptr.Bool(jtv)
+ }
+
+ case "AllowHeaders":
+ if err := awsRestjson1_deserializeDocumentHeadersList(&sv.AllowHeaders, value); err != nil {
+ return err
+ }
+
+ case "AllowMethods":
+ if err := awsRestjson1_deserializeDocumentAllowMethodsList(&sv.AllowMethods, value); err != nil {
+ return err
+ }
+
+ case "AllowOrigins":
+ if err := awsRestjson1_deserializeDocumentAllowOriginsList(&sv.AllowOrigins, value); err != nil {
+ return err
+ }
+
+ case "ExposeHeaders":
+ if err := awsRestjson1_deserializeDocumentHeadersList(&sv.ExposeHeaders, value); err != nil {
+ return err
+ }
+
+ case "MaxAge":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaxAge to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaxAge = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentDeadLetterConfig(v **types.DeadLetterConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.DeadLetterConfig
+ if *v == nil {
+ sv = &types.DeadLetterConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "TargetArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value)
+ }
+ sv.TargetArn = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentDestinationConfig(v **types.DestinationConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.DestinationConfig
+ if *v == nil {
+ sv = &types.DestinationConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "OnFailure":
+ if err := awsRestjson1_deserializeDocumentOnFailure(&sv.OnFailure, value); err != nil {
+ return err
+ }
+
+ case "OnSuccess":
+ if err := awsRestjson1_deserializeDocumentOnSuccess(&sv.OnSuccess, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(v **types.DocumentDBEventSourceConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.DocumentDBEventSourceConfig
+ if *v == nil {
+ sv = &types.DocumentDBEventSourceConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CollectionName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CollectionName to be of type string, got %T instead", value)
+ }
+ sv.CollectionName = ptr.String(jtv)
+ }
+
+ case "DatabaseName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected DatabaseName to be of type string, got %T instead", value)
+ }
+ sv.DatabaseName = ptr.String(jtv)
+ }
+
+ case "FullDocument":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FullDocument to be of type string, got %T instead", value)
+ }
+ sv.FullDocument = types.FullDocument(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEC2AccessDeniedException(v **types.EC2AccessDeniedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EC2AccessDeniedException
+ if *v == nil {
+ sv = &types.EC2AccessDeniedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEC2ThrottledException(v **types.EC2ThrottledException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EC2ThrottledException
+ if *v == nil {
+ sv = &types.EC2ThrottledException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEC2UnexpectedException(v **types.EC2UnexpectedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EC2UnexpectedException
+ if *v == nil {
+ sv = &types.EC2UnexpectedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "EC2ErrorCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.EC2ErrorCode = ptr.String(jtv)
+ }
+
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEFSIOException(v **types.EFSIOException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EFSIOException
+ if *v == nil {
+ sv = &types.EFSIOException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEFSMountConnectivityException(v **types.EFSMountConnectivityException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EFSMountConnectivityException
+ if *v == nil {
+ sv = &types.EFSMountConnectivityException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEFSMountFailureException(v **types.EFSMountFailureException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EFSMountFailureException
+ if *v == nil {
+ sv = &types.EFSMountFailureException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEFSMountTimeoutException(v **types.EFSMountTimeoutException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EFSMountTimeoutException
+ if *v == nil {
+ sv = &types.EFSMountTimeoutException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEndpointLists(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Endpoint to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEndpoints(v *map[string][]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var mv map[string][]string
+ if *v == nil {
+ mv = map[string][]string{}
+ } else {
+ mv = *v
+ }
+
+ for key, value := range shape {
+ var parsedVal []string
+ mapVar := parsedVal
+ if err := awsRestjson1_deserializeDocumentEndpointLists(&mapVar, value); err != nil {
+ return err
+ }
+ parsedVal = mapVar
+ mv[key] = parsedVal
+
+ }
+ *v = mv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentENILimitReachedException(v **types.ENILimitReachedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ENILimitReachedException
+ if *v == nil {
+ sv = &types.ENILimitReachedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEnvironmentError(v **types.EnvironmentError, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EnvironmentError
+ if *v == nil {
+ sv = &types.EnvironmentError{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ErrorCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.ErrorCode = ptr.String(jtv)
+ }
+
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEnvironmentResponse(v **types.EnvironmentResponse, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EnvironmentResponse
+ if *v == nil {
+ sv = &types.EnvironmentResponse{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Error":
+ if err := awsRestjson1_deserializeDocumentEnvironmentError(&sv.Error, value); err != nil {
+ return err
+ }
+
+ case "Variables":
+ if err := awsRestjson1_deserializeDocumentEnvironmentVariables(&sv.Variables, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEnvironmentVariables(v *map[string]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var mv map[string]string
+ if *v == nil {
+ mv = map[string]string{}
+ } else {
+ mv = *v
+ }
+
+ for key, value := range shape {
+ var parsedVal string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EnvironmentVariableValue to be of type string, got %T instead", value)
+ }
+ parsedVal = jtv
+ }
+ mv[key] = parsedVal
+
+ }
+ *v = mv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEphemeralStorage(v **types.EphemeralStorage, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EphemeralStorage
+ if *v == nil {
+ sv = &types.EphemeralStorage{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Size":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected EphemeralStorageSize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Size = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEventSourceMappingConfiguration(v **types.EventSourceMappingConfiguration, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EventSourceMappingConfiguration
+ if *v == nil {
+ sv = &types.EventSourceMappingConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AmazonManagedKafkaEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "BatchSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected BatchSize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.BatchSize = ptr.Int32(int32(i64))
+ }
+
+ case "BisectBatchOnFunctionError":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BisectBatchOnFunctionError to be of type *bool, got %T instead", value)
+ }
+ sv.BisectBatchOnFunctionError = ptr.Bool(jtv)
+ }
+
+ case "DestinationConfig":
+ if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil {
+ return err
+ }
+
+ case "DocumentDBEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(&sv.DocumentDBEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "EventSourceArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.EventSourceArn = ptr.String(jtv)
+ }
+
+ case "EventSourceMappingArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value)
+ }
+ sv.EventSourceMappingArn = ptr.String(jtv)
+ }
+
+ case "FilterCriteria":
+ if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil {
+ return err
+ }
+
+ case "FilterCriteriaError":
+ if err := awsRestjson1_deserializeDocumentFilterCriteriaError(&sv.FilterCriteriaError, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionResponseTypes":
+ if err := awsRestjson1_deserializeDocumentFunctionResponseTypeList(&sv.FunctionResponseTypes, value); err != nil {
+ return err
+ }
+
+ case "KMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value)
+ }
+ sv.KMSKeyArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "LastProcessingResult":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.LastProcessingResult = ptr.String(jtv)
+ }
+
+ case "MaximumBatchingWindowInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumBatchingWindowInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumBatchingWindowInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRecordAgeInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRecordAgeInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRecordAgeInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRetryAttempts":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRetryAttemptsEventSourceMapping to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRetryAttempts = ptr.Int32(int32(i64))
+ }
+
+ case "MetricsConfig":
+ if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(&sv.MetricsConfig, value); err != nil {
+ return err
+ }
+
+ case "ParallelizationFactor":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected ParallelizationFactor to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.ParallelizationFactor = ptr.Int32(int32(i64))
+ }
+
+ case "ProvisionedPollerConfig":
+ if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil {
+ return err
+ }
+
+ case "Queues":
+ if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil {
+ return err
+ }
+
+ case "ScalingConfig":
+ if err := awsRestjson1_deserializeDocumentScalingConfig(&sv.ScalingConfig, value); err != nil {
+ return err
+ }
+
+ case "SelfManagedEventSource":
+ if err := awsRestjson1_deserializeDocumentSelfManagedEventSource(&sv.SelfManagedEventSource, value); err != nil {
+ return err
+ }
+
+ case "SelfManagedKafkaEventSourceConfig":
+ if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil {
+ return err
+ }
+
+ case "SourceAccessConfigurations":
+ if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil {
+ return err
+ }
+
+ case "StartingPosition":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EventSourcePosition to be of type string, got %T instead", value)
+ }
+ sv.StartingPosition = types.EventSourcePosition(jtv)
+ }
+
+ case "StartingPositionTimestamp":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.StartingPositionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "State":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.State = ptr.String(jtv)
+ }
+
+ case "StateTransitionReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.StateTransitionReason = ptr.String(jtv)
+ }
+
+ case "Topics":
+ if err := awsRestjson1_deserializeDocumentTopics(&sv.Topics, value); err != nil {
+ return err
+ }
+
+ case "TumblingWindowInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected TumblingWindowInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.TumblingWindowInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "UUID":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.UUID = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEventSourceMappingMetricList(v *[]types.EventSourceMappingMetric, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.EventSourceMappingMetric
+ if *v == nil {
+ cv = []types.EventSourceMappingMetric{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.EventSourceMappingMetric
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EventSourceMappingMetric to be of type string, got %T instead", value)
+ }
+ col = types.EventSourceMappingMetric(jtv)
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(v **types.EventSourceMappingMetricsConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.EventSourceMappingMetricsConfig
+ if *v == nil {
+ sv = &types.EventSourceMappingMetricsConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Metrics":
+ if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricList(&sv.Metrics, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentEventSourceMappingsList(v *[]types.EventSourceMappingConfiguration, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.EventSourceMappingConfiguration
+ if *v == nil {
+ cv = []types.EventSourceMappingConfiguration{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.EventSourceMappingConfiguration
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentEventSourceMappingConfiguration(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFileSystemConfig(v **types.FileSystemConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.FileSystemConfig
+ if *v == nil {
+ sv = &types.FileSystemConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Arn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FileSystemArn to be of type string, got %T instead", value)
+ }
+ sv.Arn = ptr.String(jtv)
+ }
+
+ case "LocalMountPath":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LocalMountPath to be of type string, got %T instead", value)
+ }
+ sv.LocalMountPath = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFileSystemConfigList(v *[]types.FileSystemConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.FileSystemConfig
+ if *v == nil {
+ cv = []types.FileSystemConfig{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.FileSystemConfig
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentFileSystemConfig(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFilter(v **types.Filter, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.Filter
+ if *v == nil {
+ sv = &types.Filter{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Pattern":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Pattern to be of type string, got %T instead", value)
+ }
+ sv.Pattern = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFilterCriteria(v **types.FilterCriteria, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.FilterCriteria
+ if *v == nil {
+ sv = &types.FilterCriteria{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Filters":
+ if err := awsRestjson1_deserializeDocumentFilterList(&sv.Filters, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFilterCriteriaError(v **types.FilterCriteriaError, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.FilterCriteriaError
+ if *v == nil {
+ sv = &types.FilterCriteriaError{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ErrorCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FilterCriteriaErrorCode to be of type string, got %T instead", value)
+ }
+ sv.ErrorCode = ptr.String(jtv)
+ }
+
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FilterCriteriaErrorMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFilterList(v *[]types.Filter, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.Filter
+ if *v == nil {
+ cv = []types.Filter{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.Filter
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentFilter(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFunctionArnList(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFunctionCodeLocation(v **types.FunctionCodeLocation, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.FunctionCodeLocation
+ if *v == nil {
+ sv = &types.FunctionCodeLocation{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ImageUri":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.ImageUri = ptr.String(jtv)
+ }
+
+ case "Location":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Location = ptr.String(jtv)
+ }
+
+ case "RepositoryType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RepositoryType = ptr.String(jtv)
+ }
+
+ case "ResolvedImageUri":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.ResolvedImageUri = ptr.String(jtv)
+ }
+
+ case "SourceKMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.SourceKMSKeyArn = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFunctionConfiguration(v **types.FunctionConfiguration, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.FunctionConfiguration
+ if *v == nil {
+ sv = &types.FunctionConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Architectures":
+ if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil {
+ return err
+ }
+
+ case "CodeSha256":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.CodeSha256 = ptr.String(jtv)
+ }
+
+ case "CodeSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.CodeSize = i64
+ }
+
+ case "DeadLetterConfig":
+ if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil {
+ return err
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "Environment":
+ if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil {
+ return err
+ }
+
+ case "EphemeralStorage":
+ if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil {
+ return err
+ }
+
+ case "FileSystemConfigs":
+ if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value)
+ }
+ sv.FunctionName = ptr.String(jtv)
+ }
+
+ case "Handler":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Handler to be of type string, got %T instead", value)
+ }
+ sv.Handler = ptr.String(jtv)
+ }
+
+ case "ImageConfigResponse":
+ if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil {
+ return err
+ }
+
+ case "KMSKeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value)
+ }
+ sv.KMSKeyArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModified = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatus":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatus = types.LastUpdateStatus(jtv)
+ }
+
+ case "LastUpdateStatusReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReason = ptr.String(jtv)
+ }
+
+ case "LastUpdateStatusReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value)
+ }
+ sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv)
+ }
+
+ case "Layers":
+ if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil {
+ return err
+ }
+
+ case "LoggingConfig":
+ if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil {
+ return err
+ }
+
+ case "MasterArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.MasterArn = ptr.String(jtv)
+ }
+
+ case "MemorySize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MemorySize = ptr.Int32(int32(i64))
+ }
+
+ case "PackageType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PackageType to be of type string, got %T instead", value)
+ }
+ sv.PackageType = types.PackageType(jtv)
+ }
+
+ case "RevisionId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RevisionId = ptr.String(jtv)
+ }
+
+ case "Role":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
+ }
+ sv.Role = ptr.String(jtv)
+ }
+
+ case "Runtime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Runtime to be of type string, got %T instead", value)
+ }
+ sv.Runtime = types.Runtime(jtv)
+ }
+
+ case "RuntimeVersionConfig":
+ if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil {
+ return err
+ }
+
+ case "SigningJobArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningJobArn = ptr.String(jtv)
+ }
+
+ case "SigningProfileVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningProfileVersionArn = ptr.String(jtv)
+ }
+
+ case "SnapStart":
+ if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil {
+ return err
+ }
+
+ case "State":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected State to be of type string, got %T instead", value)
+ }
+ sv.State = types.State(jtv)
+ }
+
+ case "StateReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReason to be of type string, got %T instead", value)
+ }
+ sv.StateReason = ptr.String(jtv)
+ }
+
+ case "StateReasonCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value)
+ }
+ sv.StateReasonCode = types.StateReasonCode(jtv)
+ }
+
+ case "Timeout":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Timeout to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Timeout = ptr.Int32(int32(i64))
+ }
+
+ case "TracingConfig":
+ if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil {
+ return err
+ }
+
+ case "Version":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Version to be of type string, got %T instead", value)
+ }
+ sv.Version = ptr.String(jtv)
+ }
+
+ case "VpcConfig":
+ if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFunctionEventInvokeConfig(v **types.FunctionEventInvokeConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.FunctionEventInvokeConfig
+ if *v == nil {
+ sv = &types.FunctionEventInvokeConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "DestinationConfig":
+ if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil {
+ return err
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "MaximumEventAgeInSeconds":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64))
+ }
+
+ case "MaximumRetryAttempts":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumRetryAttempts = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFunctionEventInvokeConfigList(v *[]types.FunctionEventInvokeConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.FunctionEventInvokeConfig
+ if *v == nil {
+ cv = []types.FunctionEventInvokeConfig{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.FunctionEventInvokeConfig
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentFunctionEventInvokeConfig(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFunctionList(v *[]types.FunctionConfiguration, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.FunctionConfiguration
+ if *v == nil {
+ cv = []types.FunctionConfiguration{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.FunctionConfiguration
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentFunctionConfiguration(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFunctionResponseTypeList(v *[]types.FunctionResponseType, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.FunctionResponseType
+ if *v == nil {
+ cv = []types.FunctionResponseType{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.FunctionResponseType
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionResponseType to be of type string, got %T instead", value)
+ }
+ col = types.FunctionResponseType(jtv)
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFunctionUrlConfig(v **types.FunctionUrlConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.FunctionUrlConfig
+ if *v == nil {
+ sv = &types.FunctionUrlConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AuthType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionUrlAuthType to be of type string, got %T instead", value)
+ }
+ sv.AuthType = types.FunctionUrlAuthType(jtv)
+ }
+
+ case "Cors":
+ if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil {
+ return err
+ }
+
+ case "CreationTime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.CreationTime = ptr.String(jtv)
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "FunctionUrl":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value)
+ }
+ sv.FunctionUrl = ptr.String(jtv)
+ }
+
+ case "InvokeMode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value)
+ }
+ sv.InvokeMode = types.InvokeMode(jtv)
+ }
+
+ case "LastModifiedTime":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModifiedTime = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentFunctionUrlConfigList(v *[]types.FunctionUrlConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.FunctionUrlConfig
+ if *v == nil {
+ cv = []types.FunctionUrlConfig{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.FunctionUrlConfig
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentFunctionUrlConfig(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentHeadersList(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Header to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentImageConfig(v **types.ImageConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ImageConfig
+ if *v == nil {
+ sv = &types.ImageConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Command":
+ if err := awsRestjson1_deserializeDocumentStringList(&sv.Command, value); err != nil {
+ return err
+ }
+
+ case "EntryPoint":
+ if err := awsRestjson1_deserializeDocumentStringList(&sv.EntryPoint, value); err != nil {
+ return err
+ }
+
+ case "WorkingDirectory":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected WorkingDirectory to be of type string, got %T instead", value)
+ }
+ sv.WorkingDirectory = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentImageConfigError(v **types.ImageConfigError, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ImageConfigError
+ if *v == nil {
+ sv = &types.ImageConfigError{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ErrorCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.ErrorCode = ptr.String(jtv)
+ }
+
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentImageConfigResponse(v **types.ImageConfigResponse, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ImageConfigResponse
+ if *v == nil {
+ sv = &types.ImageConfigResponse{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Error":
+ if err := awsRestjson1_deserializeDocumentImageConfigError(&sv.Error, value); err != nil {
+ return err
+ }
+
+ case "ImageConfig":
+ if err := awsRestjson1_deserializeDocumentImageConfig(&sv.ImageConfig, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidCodeSignatureException(v **types.InvalidCodeSignatureException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidCodeSignatureException
+ if *v == nil {
+ sv = &types.InvalidCodeSignatureException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidParameterValueException(v **types.InvalidParameterValueException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidParameterValueException
+ if *v == nil {
+ sv = &types.InvalidParameterValueException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidRequestContentException(v **types.InvalidRequestContentException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidRequestContentException
+ if *v == nil {
+ sv = &types.InvalidRequestContentException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidRuntimeException(v **types.InvalidRuntimeException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidRuntimeException
+ if *v == nil {
+ sv = &types.InvalidRuntimeException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidSecurityGroupIDException(v **types.InvalidSecurityGroupIDException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidSecurityGroupIDException
+ if *v == nil {
+ sv = &types.InvalidSecurityGroupIDException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidSubnetIDException(v **types.InvalidSubnetIDException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidSubnetIDException
+ if *v == nil {
+ sv = &types.InvalidSubnetIDException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentInvalidZipFileException(v **types.InvalidZipFileException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidZipFileException
+ if *v == nil {
+ sv = &types.InvalidZipFileException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentKMSAccessDeniedException(v **types.KMSAccessDeniedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KMSAccessDeniedException
+ if *v == nil {
+ sv = &types.KMSAccessDeniedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentKMSDisabledException(v **types.KMSDisabledException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KMSDisabledException
+ if *v == nil {
+ sv = &types.KMSDisabledException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentKMSInvalidStateException(v **types.KMSInvalidStateException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KMSInvalidStateException
+ if *v == nil {
+ sv = &types.KMSInvalidStateException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentKMSNotFoundException(v **types.KMSNotFoundException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KMSNotFoundException
+ if *v == nil {
+ sv = &types.KMSNotFoundException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentLayer(v **types.Layer, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.Layer
+ if *v == nil {
+ sv = &types.Layer{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Arn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value)
+ }
+ sv.Arn = ptr.String(jtv)
+ }
+
+ case "CodeSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.CodeSize = i64
+ }
+
+ case "SigningJobArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningJobArn = ptr.String(jtv)
+ }
+
+ case "SigningProfileVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ sv.SigningProfileVersionArn = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentLayersList(v *[]types.LayersListItem, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.LayersListItem
+ if *v == nil {
+ cv = []types.LayersListItem{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.LayersListItem
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentLayersListItem(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentLayersListItem(v **types.LayersListItem, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.LayersListItem
+ if *v == nil {
+ sv = &types.LayersListItem{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "LatestMatchingVersion":
+ if err := awsRestjson1_deserializeDocumentLayerVersionsListItem(&sv.LatestMatchingVersion, value); err != nil {
+ return err
+ }
+
+ case "LayerArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value)
+ }
+ sv.LayerArn = ptr.String(jtv)
+ }
+
+ case "LayerName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LayerName to be of type string, got %T instead", value)
+ }
+ sv.LayerName = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentLayersReferenceList(v *[]types.Layer, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.Layer
+ if *v == nil {
+ cv = []types.Layer{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.Layer
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentLayer(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentLayerVersionContentOutput(v **types.LayerVersionContentOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.LayerVersionContentOutput
+ if *v == nil {
+ sv = &types.LayerVersionContentOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CodeSha256":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.CodeSha256 = ptr.String(jtv)
+ }
+
+ case "CodeSize":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.CodeSize = i64
+ }
+
+ case "Location":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Location = ptr.String(jtv)
+ }
+
+ case "SigningJobArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.SigningJobArn = ptr.String(jtv)
+ }
+
+ case "SigningProfileVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.SigningProfileVersionArn = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentLayerVersionsList(v *[]types.LayerVersionsListItem, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.LayerVersionsListItem
+ if *v == nil {
+ cv = []types.LayerVersionsListItem{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.LayerVersionsListItem
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentLayerVersionsListItem(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentLayerVersionsListItem(v **types.LayerVersionsListItem, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.LayerVersionsListItem
+ if *v == nil {
+ sv = &types.LayerVersionsListItem{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CompatibleArchitectures":
+ if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil {
+ return err
+ }
+
+ case "CompatibleRuntimes":
+ if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil {
+ return err
+ }
+
+ case "CreatedDate":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.CreatedDate = ptr.String(jtv)
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Description to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "LayerVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value)
+ }
+ sv.LayerVersionArn = ptr.String(jtv)
+ }
+
+ case "LicenseInfo":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value)
+ }
+ sv.LicenseInfo = ptr.String(jtv)
+ }
+
+ case "Version":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.Version = i64
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentLoggingConfig(v **types.LoggingConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.LoggingConfig
+ if *v == nil {
+ sv = &types.LoggingConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ApplicationLogLevel":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ApplicationLogLevel to be of type string, got %T instead", value)
+ }
+ sv.ApplicationLogLevel = types.ApplicationLogLevel(jtv)
+ }
+
+ case "LogFormat":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LogFormat to be of type string, got %T instead", value)
+ }
+ sv.LogFormat = types.LogFormat(jtv)
+ }
+
+ case "LogGroup":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected LogGroup to be of type string, got %T instead", value)
+ }
+ sv.LogGroup = ptr.String(jtv)
+ }
+
+ case "SystemLogLevel":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SystemLogLevel to be of type string, got %T instead", value)
+ }
+ sv.SystemLogLevel = types.SystemLogLevel(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentOnFailure(v **types.OnFailure, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.OnFailure
+ if *v == nil {
+ sv = &types.OnFailure{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Destination":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected DestinationArn to be of type string, got %T instead", value)
+ }
+ sv.Destination = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentOnSuccess(v **types.OnSuccess, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.OnSuccess
+ if *v == nil {
+ sv = &types.OnSuccess{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Destination":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected DestinationArn to be of type string, got %T instead", value)
+ }
+ sv.Destination = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentPolicyLengthExceededException(v **types.PolicyLengthExceededException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.PolicyLengthExceededException
+ if *v == nil {
+ sv = &types.PolicyLengthExceededException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentPreconditionFailedException(v **types.PreconditionFailedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.PreconditionFailedException
+ if *v == nil {
+ sv = &types.PreconditionFailedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigList(v *[]types.ProvisionedConcurrencyConfigListItem, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.ProvisionedConcurrencyConfigListItem
+ if *v == nil {
+ cv = []types.ProvisionedConcurrencyConfigListItem{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.ProvisionedConcurrencyConfigListItem
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigListItem(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigListItem(v **types.ProvisionedConcurrencyConfigListItem, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ProvisionedConcurrencyConfigListItem
+ if *v == nil {
+ sv = &types.ProvisionedConcurrencyConfigListItem{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AllocatedProvisionedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.AllocatedProvisionedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ case "AvailableProvisionedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.AvailableProvisionedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ case "FunctionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value)
+ }
+ sv.FunctionArn = ptr.String(jtv)
+ }
+
+ case "LastModified":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value)
+ }
+ sv.LastModified = ptr.String(jtv)
+ }
+
+ case "RequestedProvisionedConcurrentExecutions":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.RequestedProvisionedConcurrentExecutions = ptr.Int32(int32(i64))
+ }
+
+ case "Status":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ProvisionedConcurrencyStatusEnum to be of type string, got %T instead", value)
+ }
+ sv.Status = types.ProvisionedConcurrencyStatusEnum(jtv)
+ }
+
+ case "StatusReason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.StatusReason = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigNotFoundException(v **types.ProvisionedConcurrencyConfigNotFoundException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ProvisionedConcurrencyConfigNotFoundException
+ if *v == nil {
+ sv = &types.ProvisionedConcurrencyConfigNotFoundException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentProvisionedPollerConfig(v **types.ProvisionedPollerConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ProvisionedPollerConfig
+ if *v == nil {
+ sv = &types.ProvisionedPollerConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "MaximumPollers":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumNumberOfPollers to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumPollers = ptr.Int32(int32(i64))
+ }
+
+ case "MinimumPollers":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MinimumNumberOfPollers to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MinimumPollers = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentQueues(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Queue to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentRecursiveInvocationException(v **types.RecursiveInvocationException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.RecursiveInvocationException
+ if *v == nil {
+ sv = &types.RecursiveInvocationException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentRequestTooLargeException(v **types.RequestTooLargeException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.RequestTooLargeException
+ if *v == nil {
+ sv = &types.RequestTooLargeException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentResourceConflictException(v **types.ResourceConflictException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ResourceConflictException
+ if *v == nil {
+ sv = &types.ResourceConflictException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentResourceInUseException(v **types.ResourceInUseException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ResourceInUseException
+ if *v == nil {
+ sv = &types.ResourceInUseException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ResourceNotFoundException
+ if *v == nil {
+ sv = &types.ResourceNotFoundException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentResourceNotReadyException(v **types.ResourceNotReadyException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ResourceNotReadyException
+ if *v == nil {
+ sv = &types.ResourceNotReadyException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentRuntimeVersionConfig(v **types.RuntimeVersionConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.RuntimeVersionConfig
+ if *v == nil {
+ sv = &types.RuntimeVersionConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Error":
+ if err := awsRestjson1_deserializeDocumentRuntimeVersionError(&sv.Error, value); err != nil {
+ return err
+ }
+
+ case "RuntimeVersionArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RuntimeVersionArn to be of type string, got %T instead", value)
+ }
+ sv.RuntimeVersionArn = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentRuntimeVersionError(v **types.RuntimeVersionError, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.RuntimeVersionError
+ if *v == nil {
+ sv = &types.RuntimeVersionError{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ErrorCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.ErrorCode = ptr.String(jtv)
+ }
+
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentScalingConfig(v **types.ScalingConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ScalingConfig
+ if *v == nil {
+ sv = &types.ScalingConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "MaximumConcurrency":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected MaximumConcurrency to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.MaximumConcurrency = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSecurityGroupIds(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SecurityGroupId to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSelfManagedEventSource(v **types.SelfManagedEventSource, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.SelfManagedEventSource
+ if *v == nil {
+ sv = &types.SelfManagedEventSource{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Endpoints":
+ if err := awsRestjson1_deserializeDocumentEndpoints(&sv.Endpoints, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(v **types.SelfManagedKafkaEventSourceConfig, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.SelfManagedKafkaEventSourceConfig
+ if *v == nil {
+ sv = &types.SelfManagedKafkaEventSourceConfig{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ConsumerGroupId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected URI to be of type string, got %T instead", value)
+ }
+ sv.ConsumerGroupId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentServiceException(v **types.ServiceException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ServiceException
+ if *v == nil {
+ sv = &types.ServiceException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSigningProfileVersionArns(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Arn to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSnapStartException(v **types.SnapStartException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.SnapStartException
+ if *v == nil {
+ sv = &types.SnapStartException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSnapStartNotReadyException(v **types.SnapStartNotReadyException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.SnapStartNotReadyException
+ if *v == nil {
+ sv = &types.SnapStartNotReadyException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSnapStartResponse(v **types.SnapStartResponse, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.SnapStartResponse
+ if *v == nil {
+ sv = &types.SnapStartResponse{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ApplyOn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SnapStartApplyOn to be of type string, got %T instead", value)
+ }
+ sv.ApplyOn = types.SnapStartApplyOn(jtv)
+ }
+
+ case "OptimizationStatus":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SnapStartOptimizationStatus to be of type string, got %T instead", value)
+ }
+ sv.OptimizationStatus = types.SnapStartOptimizationStatus(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSnapStartTimeoutException(v **types.SnapStartTimeoutException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.SnapStartTimeoutException
+ if *v == nil {
+ sv = &types.SnapStartTimeoutException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSourceAccessConfiguration(v **types.SourceAccessConfiguration, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.SourceAccessConfiguration
+ if *v == nil {
+ sv = &types.SourceAccessConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SourceAccessType to be of type string, got %T instead", value)
+ }
+ sv.Type = types.SourceAccessType(jtv)
+ }
+
+ case "URI":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected URI to be of type string, got %T instead", value)
+ }
+ sv.URI = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSourceAccessConfigurations(v *[]types.SourceAccessConfiguration, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.SourceAccessConfiguration
+ if *v == nil {
+ cv = []types.SourceAccessConfiguration{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.SourceAccessConfiguration
+ destAddr := &col
+ if err := awsRestjson1_deserializeDocumentSourceAccessConfiguration(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentStringList(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSubnetIds(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SubnetId to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentSubnetIPAddressLimitReachedException(v **types.SubnetIPAddressLimitReachedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.SubnetIPAddressLimitReachedException
+ if *v == nil {
+ sv = &types.SubnetIPAddressLimitReachedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentTags(v *map[string]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var mv map[string]string
+ if *v == nil {
+ mv = map[string]string{}
+ } else {
+ mv = *v
+ }
+
+ for key, value := range shape {
+ var parsedVal string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TagValue to be of type string, got %T instead", value)
+ }
+ parsedVal = jtv
+ }
+ mv[key] = parsedVal
+
+ }
+ *v = mv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentTagsError(v **types.TagsError, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.TagsError
+ if *v == nil {
+ sv = &types.TagsError{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ErrorCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TagsErrorCode to be of type string, got %T instead", value)
+ }
+ sv.ErrorCode = ptr.String(jtv)
+ }
+
+ case "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TagsErrorMessage to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentTooManyRequestsException(v **types.TooManyRequestsException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.TooManyRequestsException
+ if *v == nil {
+ sv = &types.TooManyRequestsException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Reason":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ThrottleReason to be of type string, got %T instead", value)
+ }
+ sv.Reason = types.ThrottleReason(jtv)
+ }
+
+ case "retryAfterSeconds":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.RetryAfterSeconds = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentTopics(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected Topic to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentTracingConfigResponse(v **types.TracingConfigResponse, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.TracingConfigResponse
+ if *v == nil {
+ sv = &types.TracingConfigResponse{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Mode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TracingMode to be of type string, got %T instead", value)
+ }
+ sv.Mode = types.TracingMode(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentUnsupportedMediaTypeException(v **types.UnsupportedMediaTypeException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.UnsupportedMediaTypeException
+ if *v == nil {
+ sv = &types.UnsupportedMediaTypeException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ case "Type":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected String to be of type string, got %T instead", value)
+ }
+ sv.Type = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestjson1_deserializeDocumentVpcConfigResponse(v **types.VpcConfigResponse, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.VpcConfigResponse
+ if *v == nil {
+ sv = &types.VpcConfigResponse{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Ipv6AllowedForDualStack":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value)
+ }
+ sv.Ipv6AllowedForDualStack = ptr.Bool(jtv)
+ }
+
+ case "SecurityGroupIds":
+ if err := awsRestjson1_deserializeDocumentSecurityGroupIds(&sv.SecurityGroupIds, value); err != nil {
+ return err
+ }
+
+ case "SubnetIds":
+ if err := awsRestjson1_deserializeDocumentSubnetIds(&sv.SubnetIds, value); err != nil {
+ return err
+ }
+
+ case "VpcId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected VpcId to be of type string, got %T instead", value)
+ }
+ sv.VpcId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/doc.go
new file mode 100644
index 00000000..92c2a95f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/doc.go
@@ -0,0 +1,77 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+// Package lambda provides the API client, operations, and parameter types for AWS
+// Lambda.
+//
+// # Lambda
+//
+// # Overview
+//
+// Lambda is a compute service that lets you run code without provisioning or
+// managing servers. Lambda runs your code on a high-availability compute
+// infrastructure and performs all of the administration of the compute resources,
+// including server and operating system maintenance, capacity provisioning and
+// automatic scaling, code monitoring and logging. With Lambda, you can run code
+// for virtually any type of application or backend service. For more information
+// about the Lambda service, see [What is Lambda]in the Lambda Developer Guide.
+//
+// The Lambda API Reference provides information about each of the API methods,
+// including details about the parameters in each API request and response.
+//
+// You can use Software Development Kits (SDKs), Integrated Development
+// Environment (IDE) Toolkits, and command line tools to access the API. For
+// installation instructions, see [Tools for Amazon Web Services].
+//
+// For a list of Region-specific endpoints that Lambda supports, see [Lambda endpoints and quotas] in the
+// Amazon Web Services General Reference..
+//
+// When making the API calls, you will need to authenticate your request by
+// providing a signature. Lambda supports signature version 4. For more
+// information, see [Signature Version 4 signing process]in the Amazon Web Services General Reference..
+//
+// # CA certificates
+//
+// Because Amazon Web Services SDKs use the CA certificates from your computer,
+// changes to the certificates on the Amazon Web Services servers can cause
+// connection failures when you attempt to use an SDK. You can prevent these
+// failures by keeping your computer's CA certificates and operating system
+// up-to-date. If you encounter this issue in a corporate environment and do not
+// manage your own computer, you might need to ask an administrator to assist with
+// the update process. The following list shows minimum operating system and Java
+// versions:
+//
+// - Microsoft Windows versions that have updates from January 2005 or later
+// installed contain at least one of the required CAs in their trust list.
+//
+// - Mac OS X 10.4 with Java for Mac OS X 10.4 Release 5 (February 2007), Mac OS
+// X 10.5 (October 2007), and later versions contain at least one of the required
+// CAs in their trust list.
+//
+// - Red Hat Enterprise Linux 5 (March 2007), 6, and 7 and CentOS 5, 6, and 7
+// all contain at least one of the required CAs in their default trusted CA list.
+//
+// - Java 1.4.2_12 (May 2006), 5 Update 2 (March 2005), and all later versions,
+// including Java 6 (December 2006), 7, and 8, contain at least one of the required
+// CAs in their default trusted CA list.
+//
+// When accessing the Lambda management console or Lambda API endpoints, whether
+// through browsers or programmatically, you will need to ensure your client
+// machines support any of the following CAs:
+//
+// - Amazon Root CA 1
+//
+// - Starfield Services Root Certificate Authority - G2
+//
+// - Starfield Class 2 Certification Authority
+//
+// Root certificates from the first two authorities are available from [Amazon trust services], but
+// keeping your computer up-to-date is the more straightforward solution. To learn
+// more about ACM-provided certificates, see [Amazon Web Services Certificate Manager FAQs.]
+//
+// [Amazon Web Services Certificate Manager FAQs.]: http://aws.amazon.com/certificate-manager/faqs/#certificates
+// [What is Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/welcome.html
+// [Signature Version 4 signing process]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
+// [Tools for Amazon Web Services]: http://aws.amazon.com/tools/
+// [Amazon trust services]: https://www.amazontrust.com/repository/
+// [Lambda endpoints and quotas]: https://docs.aws.amazon.com/general/latest/gr/lambda-service.html
+package lambda
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/endpoints.go
new file mode 100644
index 00000000..e76ef488
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/endpoints.go
@@ -0,0 +1,537 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
+ internalendpoints "github.com/aws/aws-sdk-go-v2/service/lambda/internal/endpoints"
+ smithyauth "github.com/aws/smithy-go/auth"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+ "net/url"
+ "os"
+ "strings"
+)
+
+// EndpointResolverOptions is the service endpoint resolver options
+type EndpointResolverOptions = internalendpoints.Options
+
+// EndpointResolver interface for resolving service endpoints.
+type EndpointResolver interface {
+ ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+}
+
+var _ EndpointResolver = &internalendpoints.Resolver{}
+
+// NewDefaultEndpointResolver constructs a new service endpoint resolver
+func NewDefaultEndpointResolver() *internalendpoints.Resolver {
+ return internalendpoints.New()
+}
+
+// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
+// the EndpointResolver interface. This is useful when you want to add additional
+// endpoint resolving logic, or stub out specific endpoints with custom values.
+type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+
+func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return fn(region, options)
+}
+
+// EndpointResolverFromURL returns an EndpointResolver configured using the
+// provided endpoint url. By default, the resolved endpoint resolver uses the
+// client region as signing region, and the endpoint source is set to
+// EndpointSourceCustom.You can provide functional options to configure endpoint
+// values for the resolved endpoint.
+func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
+ e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
+ for _, fn := range optFns {
+ fn(&e)
+ }
+
+ return EndpointResolverFunc(
+ func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
+ if len(e.SigningRegion) == 0 {
+ e.SigningRegion = region
+ }
+ return e, nil
+ },
+ )
+}
+
+type ResolveEndpoint struct {
+ Resolver EndpointResolver
+ Options EndpointResolverOptions
+}
+
+func (*ResolveEndpoint) ID() string {
+ return "ResolveEndpoint"
+}
+
+func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.Resolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ eo := m.Options
+ eo.Logger = middleware.GetLogger(ctx)
+
+ var endpoint aws.Endpoint
+ endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
+ if err != nil {
+ nf := (&aws.EndpointNotFoundError{})
+ if errors.As(err, &nf) {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false)
+ return next.HandleSerialize(ctx, in)
+ }
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ if len(awsmiddleware.GetSigningName(ctx)) == 0 {
+ signingName := endpoint.SigningName
+ if len(signingName) == 0 {
+ signingName = "lambda"
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ }
+ ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
+ ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
+ return next.HandleSerialize(ctx, in)
+}
+func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Serialize.Insert(&ResolveEndpoint{
+ Resolver: o.EndpointResolver,
+ Options: o.EndpointOptions,
+ }, "OperationSerializer", middleware.Before)
+}
+
+func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
+ return err
+}
+
+type wrappedEndpointResolver struct {
+ awsResolver aws.EndpointResolverWithOptions
+}
+
+func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return w.awsResolver.ResolveEndpoint(ServiceID, region, options)
+}
+
+type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
+
+func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
+ return a(service, region)
+}
+
+var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
+
+// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error,
+// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked
+// via its middleware.
+//
+// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated.
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver {
+ var resolver aws.EndpointResolverWithOptions
+
+ if awsResolverWithOptions != nil {
+ resolver = awsResolverWithOptions
+ } else if awsResolver != nil {
+ resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
+ }
+
+ return &wrappedEndpointResolver{
+ awsResolver: resolver,
+ }
+}
+
+func finalizeClientEndpointResolverOptions(options *Options) {
+ options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
+
+ if len(options.EndpointOptions.ResolvedRegion) == 0 {
+ const fipsInfix = "-fips-"
+ const fipsPrefix = "fips-"
+ const fipsSuffix = "-fips"
+
+ if strings.Contains(options.Region, fipsInfix) ||
+ strings.Contains(options.Region, fipsPrefix) ||
+ strings.Contains(options.Region, fipsSuffix) {
+ options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
+ options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
+ options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
+ }
+ }
+
+}
+
+func resolveEndpointResolverV2(options *Options) {
+ if options.EndpointResolverV2 == nil {
+ options.EndpointResolverV2 = NewDefaultEndpointResolverV2()
+ }
+}
+
+func resolveBaseEndpoint(cfg aws.Config, o *Options) {
+ if cfg.BaseEndpoint != nil {
+ o.BaseEndpoint = cfg.BaseEndpoint
+ }
+
+ _, g := os.LookupEnv("AWS_ENDPOINT_URL")
+ _, s := os.LookupEnv("AWS_ENDPOINT_URL_LAMBDA")
+
+ if g && !s {
+ return
+ }
+
+ value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "Lambda", cfg.ConfigSources)
+ if found && err == nil {
+ o.BaseEndpoint = &value
+ }
+}
+
+func bindRegion(region string) *string {
+ if region == "" {
+ return nil
+ }
+ return aws.String(endpoints.MapFIPSRegion(region))
+}
+
+// EndpointParameters provides the parameters that influence how endpoints are
+// resolved.
+type EndpointParameters struct {
+ // The AWS region used to dispatch the request.
+ //
+ // Parameter is
+ // required.
+ //
+ // AWS::Region
+ Region *string
+
+ // When true, use the dual-stack endpoint. If the configured endpoint does not
+ // support dual-stack, dispatching the request MAY return an error.
+ //
+ // Defaults to
+ // false if no value is provided.
+ //
+ // AWS::UseDualStack
+ UseDualStack *bool
+
+ // When true, send this request to the FIPS-compliant regional endpoint. If the
+ // configured endpoint does not have a FIPS compliant endpoint, dispatching the
+ // request will return an error.
+ //
+ // Defaults to false if no value is
+ // provided.
+ //
+ // AWS::UseFIPS
+ UseFIPS *bool
+
+ // Override the endpoint used to send this request
+ //
+ // Parameter is
+ // required.
+ //
+ // SDK::Endpoint
+ Endpoint *string
+}
+
+// ValidateRequired validates required parameters are set.
+func (p EndpointParameters) ValidateRequired() error {
+ if p.UseDualStack == nil {
+ return fmt.Errorf("parameter UseDualStack is required")
+ }
+
+ if p.UseFIPS == nil {
+ return fmt.Errorf("parameter UseFIPS is required")
+ }
+
+ return nil
+}
+
+// WithDefaults returns a shallow copy of EndpointParameterswith default values
+// applied to members where applicable.
+func (p EndpointParameters) WithDefaults() EndpointParameters {
+ if p.UseDualStack == nil {
+ p.UseDualStack = ptr.Bool(false)
+ }
+
+ if p.UseFIPS == nil {
+ p.UseFIPS = ptr.Bool(false)
+ }
+ return p
+}
+
+type stringSlice []string
+
+func (s stringSlice) Get(i int) *string {
+ if i < 0 || i >= len(s) {
+ return nil
+ }
+
+ v := s[i]
+ return &v
+}
+
+// EndpointResolverV2 provides the interface for resolving service endpoints.
+type EndpointResolverV2 interface {
+ // ResolveEndpoint attempts to resolve the endpoint with the provided options,
+ // returning the endpoint if found. Otherwise an error is returned.
+ ResolveEndpoint(ctx context.Context, params EndpointParameters) (
+ smithyendpoints.Endpoint, error,
+ )
+}
+
+// resolver provides the implementation for resolving endpoints.
+type resolver struct{}
+
+func NewDefaultEndpointResolverV2() EndpointResolverV2 {
+ return &resolver{}
+}
+
+// ResolveEndpoint attempts to resolve the endpoint with the provided options,
+// returning the endpoint if found. Otherwise an error is returned.
+func (r *resolver) ResolveEndpoint(
+ ctx context.Context, params EndpointParameters,
+) (
+ endpoint smithyendpoints.Endpoint, err error,
+) {
+ params = params.WithDefaults()
+ if err = params.ValidateRequired(); err != nil {
+ return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err)
+ }
+ _UseDualStack := *params.UseDualStack
+ _UseFIPS := *params.UseFIPS
+
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if _UseFIPS == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported")
+ }
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported")
+ }
+ uriString := _Endpoint
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ if exprVal := params.Region; exprVal != nil {
+ _Region := *exprVal
+ _ = _Region
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _PartitionResult := *exprVal
+ _ = _PartitionResult
+ if _UseFIPS == true {
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsFIPS {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://lambda-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both")
+ }
+ }
+ if _UseFIPS == true {
+ if _PartitionResult.SupportsFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://lambda-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS")
+ }
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://lambda.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack")
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://lambda.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region")
+}
+
+type endpointParamsBinder interface {
+ bindEndpointParams(*EndpointParameters)
+}
+
+func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters {
+ params := &EndpointParameters{}
+
+ params.Region = bindRegion(options.Region)
+ params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled)
+ params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled)
+ params.Endpoint = options.BaseEndpoint
+
+ if b, ok := input.(endpointParamsBinder); ok {
+ b.bindEndpointParams(params)
+ }
+
+ return params
+}
+
+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,
+) {
+ _, span := tracing.StartSpan(ctx, "ResolveEndpoint")
+ defer span.End()
+
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.options.EndpointResolverV2 == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := bindEndpointParams(ctx, getOperationInput(ctx), m.options)
+ endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration",
+ func() (smithyendpoints.Endpoint, error) {
+ return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params)
+ })
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ span.SetProperty("client.call.resolved_endpoint", endpt.URI.String())
+
+ if endpt.URI.RawPath == "" && req.URL.RawPath != "" {
+ endpt.URI.RawPath = endpt.URI.Path
+ }
+ req.URL.Scheme = endpt.URI.Scheme
+ req.URL.Host = endpt.URI.Host
+ req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path)
+ req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath)
+ for k := range endpt.Headers {
+ req.Header.Set(k, endpt.Headers.Get(k))
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ opts, _ := smithyauth.GetAuthOptions(&endpt.Properties)
+ for _, o := range opts {
+ rscheme.SignerProperties.SetAll(&o.SignerProperties)
+ }
+
+ span.End()
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/eventstream.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/eventstream.go
new file mode 100644
index 00000000..9ad38fa0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/eventstream.go
@@ -0,0 +1,285 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+ smithysync "github.com/aws/smithy-go/sync"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "io/ioutil"
+ "sync"
+)
+
+// InvokeWithResponseStreamResponseEventReader provides the interface for reading
+// events from a stream.
+//
+// The writer's Close method must allow multiple concurrent calls.
+type InvokeWithResponseStreamResponseEventReader interface {
+ Events() <-chan types.InvokeWithResponseStreamResponseEvent
+ Close() error
+ Err() error
+}
+
+type invokeWithResponseStreamResponseEventReader struct {
+ stream chan types.InvokeWithResponseStreamResponseEvent
+ decoder *eventstream.Decoder
+ eventStream io.ReadCloser
+ err *smithysync.OnceErr
+ payloadBuf []byte
+ done chan struct{}
+ closeOnce sync.Once
+}
+
+func newInvokeWithResponseStreamResponseEventReader(readCloser io.ReadCloser, decoder *eventstream.Decoder) *invokeWithResponseStreamResponseEventReader {
+ w := &invokeWithResponseStreamResponseEventReader{
+ stream: make(chan types.InvokeWithResponseStreamResponseEvent),
+ decoder: decoder,
+ eventStream: readCloser,
+ err: smithysync.NewOnceErr(),
+ done: make(chan struct{}),
+ payloadBuf: make([]byte, 10*1024),
+ }
+
+ go w.readEventStream()
+
+ return w
+}
+
+func (r *invokeWithResponseStreamResponseEventReader) Events() <-chan types.InvokeWithResponseStreamResponseEvent {
+ return r.stream
+}
+
+func (r *invokeWithResponseStreamResponseEventReader) readEventStream() {
+ defer r.Close()
+ defer close(r.stream)
+
+ for {
+ r.payloadBuf = r.payloadBuf[0:0]
+ decodedMessage, err := r.decoder.Decode(r.eventStream, r.payloadBuf)
+ if err != nil {
+ if err == io.EOF {
+ return
+ }
+ select {
+ case <-r.done:
+ return
+ default:
+ r.err.SetError(err)
+ return
+ }
+ }
+
+ event, err := r.deserializeEventMessage(&decodedMessage)
+ if err != nil {
+ r.err.SetError(err)
+ return
+ }
+
+ select {
+ case r.stream <- event:
+ case <-r.done:
+ return
+ }
+
+ }
+}
+
+func (r *invokeWithResponseStreamResponseEventReader) deserializeEventMessage(msg *eventstream.Message) (types.InvokeWithResponseStreamResponseEvent, error) {
+ messageType := msg.Headers.Get(eventstreamapi.MessageTypeHeader)
+ if messageType == nil {
+ return nil, fmt.Errorf("%s event header not present", eventstreamapi.MessageTypeHeader)
+ }
+
+ switch messageType.String() {
+ case eventstreamapi.EventMessageType:
+ var v types.InvokeWithResponseStreamResponseEvent
+ if err := awsRestjson1_deserializeEventStreamInvokeWithResponseStreamResponseEvent(&v, msg); err != nil {
+ return nil, err
+ }
+ return v, nil
+
+ case eventstreamapi.ExceptionMessageType:
+ return nil, awsRestjson1_deserializeEventStreamExceptionInvokeWithResponseStreamResponseEvent(msg)
+
+ case eventstreamapi.ErrorMessageType:
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+ if header := msg.Headers.Get(eventstreamapi.ErrorCodeHeader); header != nil {
+ errorCode = header.String()
+ }
+ if header := msg.Headers.Get(eventstreamapi.ErrorMessageHeader); header != nil {
+ errorMessage = header.String()
+ }
+ return nil, &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+
+ default:
+ mc := msg.Clone()
+ return nil, &UnknownEventMessageError{
+ Type: messageType.String(),
+ Message: &mc,
+ }
+
+ }
+}
+
+func (r *invokeWithResponseStreamResponseEventReader) ErrorSet() <-chan struct{} {
+ return r.err.ErrorSet()
+}
+
+func (r *invokeWithResponseStreamResponseEventReader) Close() error {
+ r.closeOnce.Do(r.safeClose)
+ return r.Err()
+}
+
+func (r *invokeWithResponseStreamResponseEventReader) safeClose() {
+ close(r.done)
+ r.eventStream.Close()
+
+}
+
+func (r *invokeWithResponseStreamResponseEventReader) Err() error {
+ return r.err.Err()
+}
+
+func (r *invokeWithResponseStreamResponseEventReader) Closed() <-chan struct{} {
+ return r.done
+}
+
+type awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream struct {
+ LogEventStreamWrites bool
+ LogEventStreamReads bool
+}
+
+func (*awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream) ID() string {
+ return "OperationEventStreamDeserializer"
+}
+
+func (m *awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ defer func() {
+ if err == nil {
+ return
+ }
+ m.closeResponseBody(out)
+ }()
+
+ logger := middleware.GetLogger(ctx)
+
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type: %T", in.Request)
+ }
+ _ = request
+
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ deserializeOutput, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type: %T", out.RawResponse)
+ }
+ _ = deserializeOutput
+
+ output, ok := out.Result.(*InvokeWithResponseStreamOutput)
+ if out.Result != nil && !ok {
+ return out, metadata, fmt.Errorf("unexpected output result type: %T", out.Result)
+ } else if out.Result == nil {
+ output = &InvokeWithResponseStreamOutput{}
+ out.Result = output
+ }
+
+ eventReader := newInvokeWithResponseStreamResponseEventReader(
+ deserializeOutput.Body,
+ eventstream.NewDecoder(func(options *eventstream.DecoderOptions) {
+ options.Logger = logger
+ options.LogMessages = m.LogEventStreamReads
+
+ }),
+ )
+ defer func() {
+ if err == nil {
+ return
+ }
+ _ = eventReader.Close()
+ }()
+
+ output.eventStream = NewInvokeWithResponseStreamEventStream(func(stream *InvokeWithResponseStreamEventStream) {
+ stream.Reader = eventReader
+ })
+
+ go output.eventStream.waitStreamClose()
+
+ return out, metadata, nil
+}
+
+func (*awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream) closeResponseBody(out middleware.DeserializeOutput) {
+ if resp, ok := out.RawResponse.(*smithyhttp.Response); ok && resp != nil && resp.Body != nil {
+ _, _ = io.Copy(ioutil.Discard, resp.Body)
+ _ = resp.Body.Close()
+ }
+}
+
+func addEventStreamInvokeWithResponseStreamMiddleware(stack *middleware.Stack, options Options) error {
+ if err := stack.Deserialize.Insert(&awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream{
+ LogEventStreamWrites: options.ClientLogMode.IsRequestEventMessage(),
+ LogEventStreamReads: options.ClientLogMode.IsResponseEventMessage(),
+ }, "OperationDeserializer", middleware.Before); err != nil {
+ return err
+ }
+ return nil
+
+}
+
+// UnknownEventMessageError provides an error when a message is received from the stream,
+// but the reader is unable to determine what kind of message it is.
+type UnknownEventMessageError struct {
+ Type string
+ Message *eventstream.Message
+}
+
+// Error retruns the error message string.
+func (e *UnknownEventMessageError) Error() string {
+ return "unknown event stream message type, " + e.Type
+}
+
+func setSafeEventStreamClientLogMode(o *Options, operation string) {
+ switch operation {
+ case "InvokeWithResponseStream":
+ toggleEventStreamClientLogMode(o, false, true)
+ return
+
+ default:
+ return
+
+ }
+}
+func toggleEventStreamClientLogMode(o *Options, request, response bool) {
+ mode := o.ClientLogMode
+
+ if request && mode.IsRequestWithBody() {
+ mode.ClearRequestWithBody()
+ mode |= aws.LogRequest
+ }
+
+ if response && mode.IsResponseWithBody() {
+ mode.ClearResponseWithBody()
+ mode |= aws.LogResponse
+ }
+
+ o.ClientLogMode = mode
+
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/generated.json
new file mode 100644
index 00000000..9350ce58
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/generated.json
@@ -0,0 +1,104 @@
+{
+ "dependencies": {
+ "github.com/aws/aws-sdk-go-v2": "v1.4.0",
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream": "v0.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
+ "github.com/aws/smithy-go": "v1.4.0"
+ },
+ "files": [
+ "api_client.go",
+ "api_client_test.go",
+ "api_op_AddLayerVersionPermission.go",
+ "api_op_AddPermission.go",
+ "api_op_CreateAlias.go",
+ "api_op_CreateCodeSigningConfig.go",
+ "api_op_CreateEventSourceMapping.go",
+ "api_op_CreateFunction.go",
+ "api_op_CreateFunctionUrlConfig.go",
+ "api_op_DeleteAlias.go",
+ "api_op_DeleteCodeSigningConfig.go",
+ "api_op_DeleteEventSourceMapping.go",
+ "api_op_DeleteFunction.go",
+ "api_op_DeleteFunctionCodeSigningConfig.go",
+ "api_op_DeleteFunctionConcurrency.go",
+ "api_op_DeleteFunctionEventInvokeConfig.go",
+ "api_op_DeleteFunctionUrlConfig.go",
+ "api_op_DeleteLayerVersion.go",
+ "api_op_DeleteProvisionedConcurrencyConfig.go",
+ "api_op_GetAccountSettings.go",
+ "api_op_GetAlias.go",
+ "api_op_GetCodeSigningConfig.go",
+ "api_op_GetEventSourceMapping.go",
+ "api_op_GetFunction.go",
+ "api_op_GetFunctionCodeSigningConfig.go",
+ "api_op_GetFunctionConcurrency.go",
+ "api_op_GetFunctionConfiguration.go",
+ "api_op_GetFunctionEventInvokeConfig.go",
+ "api_op_GetFunctionRecursionConfig.go",
+ "api_op_GetFunctionUrlConfig.go",
+ "api_op_GetLayerVersion.go",
+ "api_op_GetLayerVersionByArn.go",
+ "api_op_GetLayerVersionPolicy.go",
+ "api_op_GetPolicy.go",
+ "api_op_GetProvisionedConcurrencyConfig.go",
+ "api_op_GetRuntimeManagementConfig.go",
+ "api_op_Invoke.go",
+ "api_op_InvokeAsync.go",
+ "api_op_InvokeWithResponseStream.go",
+ "api_op_ListAliases.go",
+ "api_op_ListCodeSigningConfigs.go",
+ "api_op_ListEventSourceMappings.go",
+ "api_op_ListFunctionEventInvokeConfigs.go",
+ "api_op_ListFunctionUrlConfigs.go",
+ "api_op_ListFunctions.go",
+ "api_op_ListFunctionsByCodeSigningConfig.go",
+ "api_op_ListLayerVersions.go",
+ "api_op_ListLayers.go",
+ "api_op_ListProvisionedConcurrencyConfigs.go",
+ "api_op_ListTags.go",
+ "api_op_ListVersionsByFunction.go",
+ "api_op_PublishLayerVersion.go",
+ "api_op_PublishVersion.go",
+ "api_op_PutFunctionCodeSigningConfig.go",
+ "api_op_PutFunctionConcurrency.go",
+ "api_op_PutFunctionEventInvokeConfig.go",
+ "api_op_PutFunctionRecursionConfig.go",
+ "api_op_PutProvisionedConcurrencyConfig.go",
+ "api_op_PutRuntimeManagementConfig.go",
+ "api_op_RemoveLayerVersionPermission.go",
+ "api_op_RemovePermission.go",
+ "api_op_TagResource.go",
+ "api_op_UntagResource.go",
+ "api_op_UpdateAlias.go",
+ "api_op_UpdateCodeSigningConfig.go",
+ "api_op_UpdateEventSourceMapping.go",
+ "api_op_UpdateFunctionCode.go",
+ "api_op_UpdateFunctionConfiguration.go",
+ "api_op_UpdateFunctionEventInvokeConfig.go",
+ "api_op_UpdateFunctionUrlConfig.go",
+ "auth.go",
+ "deserializers.go",
+ "doc.go",
+ "endpoints.go",
+ "endpoints_config_test.go",
+ "endpoints_test.go",
+ "eventstream.go",
+ "generated.json",
+ "internal/endpoints/endpoints.go",
+ "internal/endpoints/endpoints_test.go",
+ "options.go",
+ "protocol_test.go",
+ "serializers.go",
+ "snapshot_test.go",
+ "sra_operation_order_test.go",
+ "types/enums.go",
+ "types/errors.go",
+ "types/types.go",
+ "types/types_exported_test.go",
+ "validators.go"
+ ],
+ "go": "1.22",
+ "module": "github.com/aws/aws-sdk-go-v2/service/lambda",
+ "unstable": false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/go_module_metadata.go
new file mode 100644
index 00000000..448c7067
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package lambda
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.70.1"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/internal/endpoints/endpoints.go
new file mode 100644
index 00000000..958f515d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/internal/endpoints/endpoints.go
@@ -0,0 +1,749 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package endpoints
+
+import (
+ "github.com/aws/aws-sdk-go-v2/aws"
+ endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
+ "github.com/aws/smithy-go/logging"
+ "regexp"
+)
+
+// Options is the endpoint resolver configuration options
+type Options struct {
+ // Logger is a logging implementation that log events should be sent to.
+ Logger logging.Logger
+
+ // LogDeprecated indicates that deprecated endpoints should be logged to the
+ // provided logger.
+ LogDeprecated bool
+
+ // ResolvedRegion is used to override the region to be resolved, rather then the
+ // using the value passed to the ResolveEndpoint method. This value is used by the
+ // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
+ // name. You must not set this value directly in your application.
+ ResolvedRegion string
+
+ // DisableHTTPS informs the resolver to return an endpoint that does not use the
+ // HTTPS scheme.
+ DisableHTTPS bool
+
+ // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
+ UseFIPSEndpoint aws.FIPSEndpointState
+}
+
+func (o Options) GetResolvedRegion() string {
+ return o.ResolvedRegion
+}
+
+func (o Options) GetDisableHTTPS() bool {
+ return o.DisableHTTPS
+}
+
+func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
+ return o.UseDualStackEndpoint
+}
+
+func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
+ return o.UseFIPSEndpoint
+}
+
+func transformToSharedOptions(options Options) endpoints.Options {
+ return endpoints.Options{
+ Logger: options.Logger,
+ LogDeprecated: options.LogDeprecated,
+ ResolvedRegion: options.ResolvedRegion,
+ DisableHTTPS: options.DisableHTTPS,
+ UseDualStackEndpoint: options.UseDualStackEndpoint,
+ UseFIPSEndpoint: options.UseFIPSEndpoint,
+ }
+}
+
+// Resolver Lambda endpoint resolver
+type Resolver struct {
+ partitions endpoints.Partitions
+}
+
+// ResolveEndpoint resolves the service endpoint for the given region and options
+func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
+ if len(region) == 0 {
+ return endpoint, &aws.MissingRegionError{}
+ }
+
+ opt := transformToSharedOptions(options)
+ return r.partitions.ResolveEndpoint(region, opt)
+}
+
+// New returns a new Resolver
+func New() *Resolver {
+ return &Resolver{
+ partitions: defaultPartitions,
+ }
+}
+
+var partitionRegexp = struct {
+ Aws *regexp.Regexp
+ AwsCn *regexp.Regexp
+ AwsIso *regexp.Regexp
+ AwsIsoB *regexp.Regexp
+ AwsIsoE *regexp.Regexp
+ AwsIsoF *regexp.Regexp
+ AwsUsGov *regexp.Regexp
+}{
+
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"),
+ AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
+ AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
+ AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
+ AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
+}
+
+var defaultPartitions = endpoints.Partitions{
+ {
+ ID: "aws",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "lambda.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.Aws,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "af-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "af-south-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.af-south-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-east-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-east-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-northeast-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-northeast-2.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-northeast-3.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-south-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-south-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-south-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-south-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-south-2.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-southeast-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-southeast-2.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-3",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-3",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-southeast-3.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-4",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-4",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-southeast-4.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-5",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-5",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-southeast-5.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-7",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-7",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ap-southeast-7.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ca-central-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "ca-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ca-west-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.ca-west-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-central-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.eu-central-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-central-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-central-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.eu-central-2.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-north-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-north-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.eu-north-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-south-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.eu-south-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-south-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-south-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.eu-south-2.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-west-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.eu-west-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-west-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.eu-west-2.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-3",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-west-3",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.eu-west-3.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "lambda-fips.us-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-east-2",
+ }: endpoints.Endpoint{
+ Hostname: "lambda-fips.us-east-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "lambda-fips.us-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-west-2",
+ }: endpoints.Endpoint{
+ Hostname: "lambda-fips.us-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "il-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "il-central-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.il-central-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "me-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "me-central-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.me-central-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "me-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "me-south-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.me-south-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "mx-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "mx-central-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.mx-central-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "sa-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "sa-east-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.sa-east-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.us-east-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.us-east-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.us-east-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.us-east-2.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.us-west-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.us-west-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.us-west-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.us-west-2.api.aws",
+ },
+ },
+ },
+ {
+ ID: "aws-cn",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda-fips.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "lambda.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsCn,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "cn-north-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "cn-north-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.cn-north-1.api.amazonwebservices.com.cn",
+ },
+ endpoints.EndpointKey{
+ Region: "cn-northwest-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "cn-northwest-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.cn-northwest-1.api.amazonwebservices.com.cn",
+ },
+ },
+ },
+ {
+ ID: "aws-iso",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "lambda.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIso,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "us-iso-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-iso-west-1",
+ }: endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-iso-b",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "lambda.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoB,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "us-isob-east-1",
+ }: endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-iso-e",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "lambda.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoE,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-f",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "lambda.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoF,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "us-isof-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-isof-east-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.us-isof-east-1.api.aws.hci.ic.gov",
+ },
+ endpoints.EndpointKey{
+ Region: "us-isof-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-isof-south-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.us-isof-south-1.api.aws.hci.ic.gov",
+ },
+ },
+ },
+ {
+ ID: "aws-us-gov",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "lambda.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsUsGov,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "fips-us-gov-east-1",
+ }: endpoints.Endpoint{
+ Hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "fips-us-gov-west-1",
+ }: endpoints.Endpoint{
+ Hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.us-gov-east-1.api.aws",
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "lambda.us-gov-west-1.api.aws",
+ },
+ },
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/options.go
new file mode 100644
index 00000000..d3f4412b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/options.go
@@ -0,0 +1,232 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/metrics"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+)
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // The optional application specific identifier appended to the User-Agent header.
+ AppID string
+
+ // This endpoint will be given as input to an EndpointResolverV2. It is used for
+ // providing a custom base endpoint that is subject to modifications by the
+ // processing EndpointResolverV2.
+ BaseEndpoint *string
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // The configuration DefaultsMode that the SDK should use when constructing the
+ // clients initial default settings.
+ DefaultsMode aws.DefaultsMode
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ //
+ // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
+ // value for this field will likely prevent you from using any endpoint-related
+ // service features released after the introduction of EndpointResolverV2 and
+ // BaseEndpoint.
+ //
+ // To migrate an EndpointResolver implementation that uses a custom endpoint, set
+ // the client option BaseEndpoint instead.
+ EndpointResolver EndpointResolver
+
+ // Resolves the endpoint used for a particular service operation. This should be
+ // used over the deprecated EndpointResolver.
+ EndpointResolverV2 EndpointResolverV2
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The client meter provider.
+ MeterProvider metrics.MeterProvider
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client will call
+ // an operation that fails with a retryable error. A value of 0 is ignored, and
+ // will not be used to configure the API client created default retryer, or modify
+ // per operation call's retry max attempts.
+ //
+ // If specified in an operation call's functional options with a value that is
+ // different than the constructed client's Options, the Client's Retryer will be
+ // wrapped to use the operation's specific RetryMaxAttempts value.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry mode the API client will be created with, if
+ // Retryer option is not also specified.
+ //
+ // When creating a new API Clients this member will only be used if the Retryer
+ // Options member is nil. This value will be ignored if Retryer is not nil.
+ //
+ // Currently does not support per operation call overrides, may in the future.
+ RetryMode aws.RetryMode
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer. The kind of
+ // default retry created by the API client can be changed with the RetryMode
+ // option.
+ Retryer aws.Retryer
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
+ // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
+ // should not populate this structure programmatically, or rely on the values here
+ // within your applications.
+ RuntimeEnvironment aws.RuntimeEnvironment
+
+ // The client tracer provider.
+ TracerProvider tracing.TracerProvider
+
+ // The initial DefaultsMode used when the client options were constructed. If the
+ // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
+ // value was at that point in time.
+ //
+ // Currently does not support per operation call overrides, may in the future.
+ resolvedDefaultsMode aws.DefaultsMode
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+
+ // The auth scheme resolver which determines how to authenticate for each
+ // operation.
+ AuthSchemeResolver AuthSchemeResolver
+
+ // The list of auth schemes supported by the client.
+ AuthSchemes []smithyhttp.AuthScheme
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+
+ return to
+}
+
+func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver {
+ if schemeID == "aws.auth#sigv4" {
+ return getSigV4IdentityResolver(o)
+ }
+ if schemeID == "smithy.api#noAuth" {
+ return &smithyauth.AnonymousIdentityResolver{}
+ }
+ return nil
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for
+// this field will likely prevent you from using any endpoint-related service
+// features released after the introduction of EndpointResolverV2 and BaseEndpoint.
+//
+// To migrate an EndpointResolver implementation that uses a custom endpoint, set
+// the client option BaseEndpoint instead.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+// WithEndpointResolverV2 returns a functional option for setting the Client's
+// EndpointResolverV2 option.
+func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolverV2 = v
+ }
+}
+
+func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver {
+ if o.Credentials != nil {
+ return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials}
+ }
+ return nil
+}
+
+// WithSigV4SigningName applies an override to the authentication workflow to
+// use the given signing name for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing name from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningName(name string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+// WithSigV4SigningRegion applies an override to the authentication workflow to
+// use the given signing region for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing region from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningRegion(region string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+func ignoreAnonymousAuth(options *Options) {
+ if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) {
+ options.Credentials = nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/serializers.go
new file mode 100644
index 00000000..cfab3c89
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/serializers.go
@@ -0,0 +1,7206 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ smithyjson "github.com/aws/smithy-go/encoding/json"
+ "github.com/aws/smithy-go/middleware"
+ smithytime "github.com/aws/smithy-go/time"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "math"
+)
+
+type awsRestjson1_serializeOpAddLayerVersionPermission struct {
+}
+
+func (*awsRestjson1_serializeOpAddLayerVersionPermission) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpAddLayerVersionPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*AddLayerVersionPermissionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsAddLayerVersionPermissionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentAddLayerVersionPermissionInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsAddLayerVersionPermissionInput(v *AddLayerVersionPermissionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.LayerName == nil || len(*v.LayerName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")}
+ }
+ if v.LayerName != nil {
+ if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil {
+ return err
+ }
+ }
+
+ if v.RevisionId != nil {
+ encoder.SetQuery("RevisionId").String(*v.RevisionId)
+ }
+
+ if v.VersionNumber == nil {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member VersionNumber must not be empty")}
+ }
+ if v.VersionNumber != nil {
+ if err := encoder.SetURI("VersionNumber").Long(*v.VersionNumber); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentAddLayerVersionPermissionInput(v *AddLayerVersionPermissionInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Action != nil {
+ ok := object.Key("Action")
+ ok.String(*v.Action)
+ }
+
+ if v.OrganizationId != nil {
+ ok := object.Key("OrganizationId")
+ ok.String(*v.OrganizationId)
+ }
+
+ if v.Principal != nil {
+ ok := object.Key("Principal")
+ ok.String(*v.Principal)
+ }
+
+ if v.StatementId != nil {
+ ok := object.Key("StatementId")
+ ok.String(*v.StatementId)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpAddPermission struct {
+}
+
+func (*awsRestjson1_serializeOpAddPermission) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpAddPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*AddPermissionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/policy")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsAddPermissionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentAddPermissionInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsAddPermissionInput(v *AddPermissionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentAddPermissionInput(v *AddPermissionInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Action != nil {
+ ok := object.Key("Action")
+ ok.String(*v.Action)
+ }
+
+ if v.EventSourceToken != nil {
+ ok := object.Key("EventSourceToken")
+ ok.String(*v.EventSourceToken)
+ }
+
+ if len(v.FunctionUrlAuthType) > 0 {
+ ok := object.Key("FunctionUrlAuthType")
+ ok.String(string(v.FunctionUrlAuthType))
+ }
+
+ if v.Principal != nil {
+ ok := object.Key("Principal")
+ ok.String(*v.Principal)
+ }
+
+ if v.PrincipalOrgID != nil {
+ ok := object.Key("PrincipalOrgID")
+ ok.String(*v.PrincipalOrgID)
+ }
+
+ if v.RevisionId != nil {
+ ok := object.Key("RevisionId")
+ ok.String(*v.RevisionId)
+ }
+
+ if v.SourceAccount != nil {
+ ok := object.Key("SourceAccount")
+ ok.String(*v.SourceAccount)
+ }
+
+ if v.SourceArn != nil {
+ ok := object.Key("SourceArn")
+ ok.String(*v.SourceArn)
+ }
+
+ if v.StatementId != nil {
+ ok := object.Key("StatementId")
+ ok.String(*v.StatementId)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpCreateAlias struct {
+}
+
+func (*awsRestjson1_serializeOpCreateAlias) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpCreateAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateAliasInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/aliases")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsCreateAliasInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentCreateAliasInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsCreateAliasInput(v *CreateAliasInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentCreateAliasInput(v *CreateAliasInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Description != nil {
+ ok := object.Key("Description")
+ ok.String(*v.Description)
+ }
+
+ if v.FunctionVersion != nil {
+ ok := object.Key("FunctionVersion")
+ ok.String(*v.FunctionVersion)
+ }
+
+ if v.Name != nil {
+ ok := object.Key("Name")
+ ok.String(*v.Name)
+ }
+
+ if v.RoutingConfig != nil {
+ ok := object.Key("RoutingConfig")
+ if err := awsRestjson1_serializeDocumentAliasRoutingConfiguration(v.RoutingConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpCreateCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_serializeOpCreateCodeSigningConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpCreateCodeSigningConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateCodeSigningConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentCreateCodeSigningConfigInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsCreateCodeSigningConfigInput(v *CreateCodeSigningConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentCreateCodeSigningConfigInput(v *CreateCodeSigningConfigInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.AllowedPublishers != nil {
+ ok := object.Key("AllowedPublishers")
+ if err := awsRestjson1_serializeDocumentAllowedPublishers(v.AllowedPublishers, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.CodeSigningPolicies != nil {
+ ok := object.Key("CodeSigningPolicies")
+ if err := awsRestjson1_serializeDocumentCodeSigningPolicies(v.CodeSigningPolicies, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Description != nil {
+ ok := object.Key("Description")
+ ok.String(*v.Description)
+ }
+
+ if v.Tags != nil {
+ ok := object.Key("Tags")
+ if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpCreateEventSourceMapping struct {
+}
+
+func (*awsRestjson1_serializeOpCreateEventSourceMapping) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpCreateEventSourceMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateEventSourceMappingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/event-source-mappings")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentCreateEventSourceMappingInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsCreateEventSourceMappingInput(v *CreateEventSourceMappingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentCreateEventSourceMappingInput(v *CreateEventSourceMappingInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.AmazonManagedKafkaEventSourceConfig != nil {
+ ok := object.Key("AmazonManagedKafkaEventSourceConfig")
+ if err := awsRestjson1_serializeDocumentAmazonManagedKafkaEventSourceConfig(v.AmazonManagedKafkaEventSourceConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.BatchSize != nil {
+ ok := object.Key("BatchSize")
+ ok.Integer(*v.BatchSize)
+ }
+
+ if v.BisectBatchOnFunctionError != nil {
+ ok := object.Key("BisectBatchOnFunctionError")
+ ok.Boolean(*v.BisectBatchOnFunctionError)
+ }
+
+ if v.DestinationConfig != nil {
+ ok := object.Key("DestinationConfig")
+ if err := awsRestjson1_serializeDocumentDestinationConfig(v.DestinationConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.DocumentDBEventSourceConfig != nil {
+ ok := object.Key("DocumentDBEventSourceConfig")
+ if err := awsRestjson1_serializeDocumentDocumentDBEventSourceConfig(v.DocumentDBEventSourceConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Enabled != nil {
+ ok := object.Key("Enabled")
+ ok.Boolean(*v.Enabled)
+ }
+
+ if v.EventSourceArn != nil {
+ ok := object.Key("EventSourceArn")
+ ok.String(*v.EventSourceArn)
+ }
+
+ if v.FilterCriteria != nil {
+ ok := object.Key("FilterCriteria")
+ if err := awsRestjson1_serializeDocumentFilterCriteria(v.FilterCriteria, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.FunctionName != nil {
+ ok := object.Key("FunctionName")
+ ok.String(*v.FunctionName)
+ }
+
+ if v.FunctionResponseTypes != nil {
+ ok := object.Key("FunctionResponseTypes")
+ if err := awsRestjson1_serializeDocumentFunctionResponseTypeList(v.FunctionResponseTypes, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KMSKeyArn != nil {
+ ok := object.Key("KMSKeyArn")
+ ok.String(*v.KMSKeyArn)
+ }
+
+ if v.MaximumBatchingWindowInSeconds != nil {
+ ok := object.Key("MaximumBatchingWindowInSeconds")
+ ok.Integer(*v.MaximumBatchingWindowInSeconds)
+ }
+
+ if v.MaximumRecordAgeInSeconds != nil {
+ ok := object.Key("MaximumRecordAgeInSeconds")
+ ok.Integer(*v.MaximumRecordAgeInSeconds)
+ }
+
+ if v.MaximumRetryAttempts != nil {
+ ok := object.Key("MaximumRetryAttempts")
+ ok.Integer(*v.MaximumRetryAttempts)
+ }
+
+ if v.MetricsConfig != nil {
+ ok := object.Key("MetricsConfig")
+ if err := awsRestjson1_serializeDocumentEventSourceMappingMetricsConfig(v.MetricsConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.ParallelizationFactor != nil {
+ ok := object.Key("ParallelizationFactor")
+ ok.Integer(*v.ParallelizationFactor)
+ }
+
+ if v.ProvisionedPollerConfig != nil {
+ ok := object.Key("ProvisionedPollerConfig")
+ if err := awsRestjson1_serializeDocumentProvisionedPollerConfig(v.ProvisionedPollerConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Queues != nil {
+ ok := object.Key("Queues")
+ if err := awsRestjson1_serializeDocumentQueues(v.Queues, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.ScalingConfig != nil {
+ ok := object.Key("ScalingConfig")
+ if err := awsRestjson1_serializeDocumentScalingConfig(v.ScalingConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.SelfManagedEventSource != nil {
+ ok := object.Key("SelfManagedEventSource")
+ if err := awsRestjson1_serializeDocumentSelfManagedEventSource(v.SelfManagedEventSource, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.SelfManagedKafkaEventSourceConfig != nil {
+ ok := object.Key("SelfManagedKafkaEventSourceConfig")
+ if err := awsRestjson1_serializeDocumentSelfManagedKafkaEventSourceConfig(v.SelfManagedKafkaEventSourceConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.SourceAccessConfigurations != nil {
+ ok := object.Key("SourceAccessConfigurations")
+ if err := awsRestjson1_serializeDocumentSourceAccessConfigurations(v.SourceAccessConfigurations, ok); err != nil {
+ return err
+ }
+ }
+
+ if len(v.StartingPosition) > 0 {
+ ok := object.Key("StartingPosition")
+ ok.String(string(v.StartingPosition))
+ }
+
+ if v.StartingPositionTimestamp != nil {
+ ok := object.Key("StartingPositionTimestamp")
+ ok.Double(smithytime.FormatEpochSeconds(*v.StartingPositionTimestamp))
+ }
+
+ if v.Tags != nil {
+ ok := object.Key("Tags")
+ if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Topics != nil {
+ ok := object.Key("Topics")
+ if err := awsRestjson1_serializeDocumentTopics(v.Topics, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.TumblingWindowInSeconds != nil {
+ ok := object.Key("TumblingWindowInSeconds")
+ ok.Integer(*v.TumblingWindowInSeconds)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpCreateFunction struct {
+}
+
+func (*awsRestjson1_serializeOpCreateFunction) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpCreateFunction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateFunctionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentCreateFunctionInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsCreateFunctionInput(v *CreateFunctionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentCreateFunctionInput(v *CreateFunctionInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Architectures != nil {
+ ok := object.Key("Architectures")
+ if err := awsRestjson1_serializeDocumentArchitecturesList(v.Architectures, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Code != nil {
+ ok := object.Key("Code")
+ if err := awsRestjson1_serializeDocumentFunctionCode(v.Code, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.CodeSigningConfigArn != nil {
+ ok := object.Key("CodeSigningConfigArn")
+ ok.String(*v.CodeSigningConfigArn)
+ }
+
+ if v.DeadLetterConfig != nil {
+ ok := object.Key("DeadLetterConfig")
+ if err := awsRestjson1_serializeDocumentDeadLetterConfig(v.DeadLetterConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Description != nil {
+ ok := object.Key("Description")
+ ok.String(*v.Description)
+ }
+
+ if v.Environment != nil {
+ ok := object.Key("Environment")
+ if err := awsRestjson1_serializeDocumentEnvironment(v.Environment, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.EphemeralStorage != nil {
+ ok := object.Key("EphemeralStorage")
+ if err := awsRestjson1_serializeDocumentEphemeralStorage(v.EphemeralStorage, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.FileSystemConfigs != nil {
+ ok := object.Key("FileSystemConfigs")
+ if err := awsRestjson1_serializeDocumentFileSystemConfigList(v.FileSystemConfigs, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.FunctionName != nil {
+ ok := object.Key("FunctionName")
+ ok.String(*v.FunctionName)
+ }
+
+ if v.Handler != nil {
+ ok := object.Key("Handler")
+ ok.String(*v.Handler)
+ }
+
+ if v.ImageConfig != nil {
+ ok := object.Key("ImageConfig")
+ if err := awsRestjson1_serializeDocumentImageConfig(v.ImageConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KMSKeyArn != nil {
+ ok := object.Key("KMSKeyArn")
+ ok.String(*v.KMSKeyArn)
+ }
+
+ if v.Layers != nil {
+ ok := object.Key("Layers")
+ if err := awsRestjson1_serializeDocumentLayerList(v.Layers, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.LoggingConfig != nil {
+ ok := object.Key("LoggingConfig")
+ if err := awsRestjson1_serializeDocumentLoggingConfig(v.LoggingConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.MemorySize != nil {
+ ok := object.Key("MemorySize")
+ ok.Integer(*v.MemorySize)
+ }
+
+ if len(v.PackageType) > 0 {
+ ok := object.Key("PackageType")
+ ok.String(string(v.PackageType))
+ }
+
+ if v.Publish {
+ ok := object.Key("Publish")
+ ok.Boolean(v.Publish)
+ }
+
+ if v.Role != nil {
+ ok := object.Key("Role")
+ ok.String(*v.Role)
+ }
+
+ if len(v.Runtime) > 0 {
+ ok := object.Key("Runtime")
+ ok.String(string(v.Runtime))
+ }
+
+ if v.SnapStart != nil {
+ ok := object.Key("SnapStart")
+ if err := awsRestjson1_serializeDocumentSnapStart(v.SnapStart, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Tags != nil {
+ ok := object.Key("Tags")
+ if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Timeout != nil {
+ ok := object.Key("Timeout")
+ ok.Integer(*v.Timeout)
+ }
+
+ if v.TracingConfig != nil {
+ ok := object.Key("TracingConfig")
+ if err := awsRestjson1_serializeDocumentTracingConfig(v.TracingConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcConfig != nil {
+ ok := object.Key("VpcConfig")
+ if err := awsRestjson1_serializeDocumentVpcConfig(v.VpcConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpCreateFunctionUrlConfig struct {
+}
+
+func (*awsRestjson1_serializeOpCreateFunctionUrlConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpCreateFunctionUrlConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateFunctionUrlConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsCreateFunctionUrlConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentCreateFunctionUrlConfigInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsCreateFunctionUrlConfigInput(v *CreateFunctionUrlConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentCreateFunctionUrlConfigInput(v *CreateFunctionUrlConfigInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if len(v.AuthType) > 0 {
+ ok := object.Key("AuthType")
+ ok.String(string(v.AuthType))
+ }
+
+ if v.Cors != nil {
+ ok := object.Key("Cors")
+ if err := awsRestjson1_serializeDocumentCors(v.Cors, ok); err != nil {
+ return err
+ }
+ }
+
+ if len(v.InvokeMode) > 0 {
+ ok := object.Key("InvokeMode")
+ ok.String(string(v.InvokeMode))
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpDeleteAlias struct {
+}
+
+func (*awsRestjson1_serializeOpDeleteAlias) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpDeleteAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteAliasInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/aliases/{Name}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsDeleteAliasInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsDeleteAliasInput(v *DeleteAliasInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Name == nil || len(*v.Name) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
+ }
+ if v.Name != nil {
+ if err := encoder.SetURI("Name").String(*v.Name); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpDeleteCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_serializeOpDeleteCodeSigningConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpDeleteCodeSigningConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteCodeSigningConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs/{CodeSigningConfigArn}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsDeleteCodeSigningConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsDeleteCodeSigningConfigInput(v *DeleteCodeSigningConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.CodeSigningConfigArn == nil || len(*v.CodeSigningConfigArn) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member CodeSigningConfigArn must not be empty")}
+ }
+ if v.CodeSigningConfigArn != nil {
+ if err := encoder.SetURI("CodeSigningConfigArn").String(*v.CodeSigningConfigArn); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpDeleteEventSourceMapping struct {
+}
+
+func (*awsRestjson1_serializeOpDeleteEventSourceMapping) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpDeleteEventSourceMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteEventSourceMappingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/event-source-mappings/{UUID}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsDeleteEventSourceMappingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsDeleteEventSourceMappingInput(v *DeleteEventSourceMappingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.UUID == nil || len(*v.UUID) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member UUID must not be empty")}
+ }
+ if v.UUID != nil {
+ if err := encoder.SetURI("UUID").String(*v.UUID); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpDeleteFunction struct {
+}
+
+func (*awsRestjson1_serializeOpDeleteFunction) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpDeleteFunction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteFunctionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsDeleteFunctionInput(v *DeleteFunctionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpDeleteFunctionCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_serializeOpDeleteFunctionCodeSigningConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpDeleteFunctionCodeSigningConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteFunctionCodeSigningConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2020-06-30/functions/{FunctionName}/code-signing-config")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionCodeSigningConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsDeleteFunctionCodeSigningConfigInput(v *DeleteFunctionCodeSigningConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpDeleteFunctionConcurrency struct {
+}
+
+func (*awsRestjson1_serializeOpDeleteFunctionConcurrency) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpDeleteFunctionConcurrency) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteFunctionConcurrencyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2017-10-31/functions/{FunctionName}/concurrency")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionConcurrencyInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsDeleteFunctionConcurrencyInput(v *DeleteFunctionConcurrencyInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpDeleteFunctionEventInvokeConfig struct {
+}
+
+func (*awsRestjson1_serializeOpDeleteFunctionEventInvokeConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpDeleteFunctionEventInvokeConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteFunctionEventInvokeConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2019-09-25/functions/{FunctionName}/event-invoke-config")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionEventInvokeConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsDeleteFunctionEventInvokeConfigInput(v *DeleteFunctionEventInvokeConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpDeleteFunctionUrlConfig struct {
+}
+
+func (*awsRestjson1_serializeOpDeleteFunctionUrlConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpDeleteFunctionUrlConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteFunctionUrlConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionUrlConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsDeleteFunctionUrlConfigInput(v *DeleteFunctionUrlConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpDeleteLayerVersion struct {
+}
+
+func (*awsRestjson1_serializeOpDeleteLayerVersion) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpDeleteLayerVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteLayerVersionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions/{VersionNumber}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsDeleteLayerVersionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsDeleteLayerVersionInput(v *DeleteLayerVersionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.LayerName == nil || len(*v.LayerName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")}
+ }
+ if v.LayerName != nil {
+ if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil {
+ return err
+ }
+ }
+
+ if v.VersionNumber == nil {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member VersionNumber must not be empty")}
+ }
+ if v.VersionNumber != nil {
+ if err := encoder.SetURI("VersionNumber").Long(*v.VersionNumber); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpDeleteProvisionedConcurrencyConfig struct {
+}
+
+func (*awsRestjson1_serializeOpDeleteProvisionedConcurrencyConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpDeleteProvisionedConcurrencyConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteProvisionedConcurrencyConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2019-09-30/functions/{FunctionName}/provisioned-concurrency")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsDeleteProvisionedConcurrencyConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsDeleteProvisionedConcurrencyConfigInput(v *DeleteProvisionedConcurrencyConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetAccountSettings struct {
+}
+
+func (*awsRestjson1_serializeOpGetAccountSettings) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetAccountSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetAccountSettingsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2016-08-19/account-settings")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetAccountSettingsInput(v *GetAccountSettingsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetAlias struct {
+}
+
+func (*awsRestjson1_serializeOpGetAlias) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetAliasInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/aliases/{Name}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetAliasInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetAliasInput(v *GetAliasInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Name == nil || len(*v.Name) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
+ }
+ if v.Name != nil {
+ if err := encoder.SetURI("Name").String(*v.Name); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_serializeOpGetCodeSigningConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetCodeSigningConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetCodeSigningConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs/{CodeSigningConfigArn}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetCodeSigningConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetCodeSigningConfigInput(v *GetCodeSigningConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.CodeSigningConfigArn == nil || len(*v.CodeSigningConfigArn) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member CodeSigningConfigArn must not be empty")}
+ }
+ if v.CodeSigningConfigArn != nil {
+ if err := encoder.SetURI("CodeSigningConfigArn").String(*v.CodeSigningConfigArn); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetEventSourceMapping struct {
+}
+
+func (*awsRestjson1_serializeOpGetEventSourceMapping) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetEventSourceMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetEventSourceMappingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/event-source-mappings/{UUID}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetEventSourceMappingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetEventSourceMappingInput(v *GetEventSourceMappingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.UUID == nil || len(*v.UUID) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member UUID must not be empty")}
+ }
+ if v.UUID != nil {
+ if err := encoder.SetURI("UUID").String(*v.UUID); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetFunction struct {
+}
+
+func (*awsRestjson1_serializeOpGetFunction) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetFunction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetFunctionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetFunctionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetFunctionInput(v *GetFunctionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetFunctionCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_serializeOpGetFunctionCodeSigningConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetFunctionCodeSigningConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetFunctionCodeSigningConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2020-06-30/functions/{FunctionName}/code-signing-config")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetFunctionCodeSigningConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetFunctionCodeSigningConfigInput(v *GetFunctionCodeSigningConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetFunctionConcurrency struct {
+}
+
+func (*awsRestjson1_serializeOpGetFunctionConcurrency) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetFunctionConcurrency) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetFunctionConcurrencyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2019-09-30/functions/{FunctionName}/concurrency")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetFunctionConcurrencyInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetFunctionConcurrencyInput(v *GetFunctionConcurrencyInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetFunctionConfiguration struct {
+}
+
+func (*awsRestjson1_serializeOpGetFunctionConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetFunctionConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetFunctionConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/configuration")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetFunctionConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetFunctionConfigurationInput(v *GetFunctionConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetFunctionEventInvokeConfig struct {
+}
+
+func (*awsRestjson1_serializeOpGetFunctionEventInvokeConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetFunctionEventInvokeConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetFunctionEventInvokeConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2019-09-25/functions/{FunctionName}/event-invoke-config")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetFunctionEventInvokeConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetFunctionEventInvokeConfigInput(v *GetFunctionEventInvokeConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetFunctionRecursionConfig struct {
+}
+
+func (*awsRestjson1_serializeOpGetFunctionRecursionConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetFunctionRecursionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetFunctionRecursionConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2024-08-31/functions/{FunctionName}/recursion-config")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetFunctionRecursionConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetFunctionRecursionConfigInput(v *GetFunctionRecursionConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetFunctionUrlConfig struct {
+}
+
+func (*awsRestjson1_serializeOpGetFunctionUrlConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetFunctionUrlConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetFunctionUrlConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetFunctionUrlConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetFunctionUrlConfigInput(v *GetFunctionUrlConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetLayerVersion struct {
+}
+
+func (*awsRestjson1_serializeOpGetLayerVersion) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetLayerVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetLayerVersionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions/{VersionNumber}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetLayerVersionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetLayerVersionInput(v *GetLayerVersionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.LayerName == nil || len(*v.LayerName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")}
+ }
+ if v.LayerName != nil {
+ if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil {
+ return err
+ }
+ }
+
+ if v.VersionNumber == nil {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member VersionNumber must not be empty")}
+ }
+ if v.VersionNumber != nil {
+ if err := encoder.SetURI("VersionNumber").Long(*v.VersionNumber); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetLayerVersionByArn struct {
+}
+
+func (*awsRestjson1_serializeOpGetLayerVersionByArn) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetLayerVersionByArn) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetLayerVersionByArnInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers?find=LayerVersion")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetLayerVersionByArnInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetLayerVersionByArnInput(v *GetLayerVersionByArnInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Arn != nil {
+ encoder.SetQuery("Arn").String(*v.Arn)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetLayerVersionPolicy struct {
+}
+
+func (*awsRestjson1_serializeOpGetLayerVersionPolicy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetLayerVersionPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetLayerVersionPolicyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetLayerVersionPolicyInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetLayerVersionPolicyInput(v *GetLayerVersionPolicyInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.LayerName == nil || len(*v.LayerName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")}
+ }
+ if v.LayerName != nil {
+ if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil {
+ return err
+ }
+ }
+
+ if v.VersionNumber == nil {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member VersionNumber must not be empty")}
+ }
+ if v.VersionNumber != nil {
+ if err := encoder.SetURI("VersionNumber").Long(*v.VersionNumber); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetPolicy struct {
+}
+
+func (*awsRestjson1_serializeOpGetPolicy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetPolicyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/policy")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetPolicyInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetPolicyInput(v *GetPolicyInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetProvisionedConcurrencyConfig struct {
+}
+
+func (*awsRestjson1_serializeOpGetProvisionedConcurrencyConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetProvisionedConcurrencyConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetProvisionedConcurrencyConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2019-09-30/functions/{FunctionName}/provisioned-concurrency")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetProvisionedConcurrencyConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetProvisionedConcurrencyConfigInput(v *GetProvisionedConcurrencyConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpGetRuntimeManagementConfig struct {
+}
+
+func (*awsRestjson1_serializeOpGetRuntimeManagementConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpGetRuntimeManagementConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetRuntimeManagementConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2021-07-20/functions/{FunctionName}/runtime-management-config")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsGetRuntimeManagementConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsGetRuntimeManagementConfigInput(v *GetRuntimeManagementConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpInvoke struct {
+}
+
+func (*awsRestjson1_serializeOpInvoke) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpInvoke) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*InvokeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/invocations")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsInvokeInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
+ restEncoder.SetHeader("Content-Type").String("application/octet-stream")
+ }
+
+ if input.Payload != nil {
+ payload := bytes.NewReader(input.Payload)
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsInvokeInput(v *InvokeInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.ClientContext != nil {
+ locationName := "X-Amz-Client-Context"
+ encoder.SetHeader(locationName).String(*v.ClientContext)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if len(v.InvocationType) > 0 {
+ locationName := "X-Amz-Invocation-Type"
+ encoder.SetHeader(locationName).String(string(v.InvocationType))
+ }
+
+ if len(v.LogType) > 0 {
+ locationName := "X-Amz-Log-Type"
+ encoder.SetHeader(locationName).String(string(v.LogType))
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpInvokeAsync struct {
+}
+
+func (*awsRestjson1_serializeOpInvokeAsync) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpInvokeAsync) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*InvokeAsyncInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2014-11-13/functions/{FunctionName}/invoke-async")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsInvokeAsyncInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
+ restEncoder.SetHeader("Content-Type").String("application/octet-stream")
+ }
+
+ if input.InvokeArgs != nil {
+ payload := input.InvokeArgs
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsInvokeAsyncInput(v *InvokeAsyncInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpInvokeWithResponseStream struct {
+}
+
+func (*awsRestjson1_serializeOpInvokeWithResponseStream) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpInvokeWithResponseStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*InvokeWithResponseStreamInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2021-11-15/functions/{FunctionName}/response-streaming-invocations")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsInvokeWithResponseStreamInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
+ restEncoder.SetHeader("Content-Type").String("application/octet-stream")
+ }
+
+ if input.Payload != nil {
+ payload := bytes.NewReader(input.Payload)
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsInvokeWithResponseStreamInput(v *InvokeWithResponseStreamInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.ClientContext != nil {
+ locationName := "X-Amz-Client-Context"
+ encoder.SetHeader(locationName).String(*v.ClientContext)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if len(v.InvocationType) > 0 {
+ locationName := "X-Amz-Invocation-Type"
+ encoder.SetHeader(locationName).String(string(v.InvocationType))
+ }
+
+ if len(v.LogType) > 0 {
+ locationName := "X-Amz-Log-Type"
+ encoder.SetHeader(locationName).String(string(v.LogType))
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListAliases struct {
+}
+
+func (*awsRestjson1_serializeOpListAliases) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListAliases) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListAliasesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/aliases")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListAliasesInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListAliasesInput(v *ListAliasesInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.FunctionVersion != nil {
+ encoder.SetQuery("FunctionVersion").String(*v.FunctionVersion)
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("Marker").String(*v.Marker)
+ }
+
+ if v.MaxItems != nil {
+ encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListCodeSigningConfigs struct {
+}
+
+func (*awsRestjson1_serializeOpListCodeSigningConfigs) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListCodeSigningConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListCodeSigningConfigsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListCodeSigningConfigsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListCodeSigningConfigsInput(v *ListCodeSigningConfigsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("Marker").String(*v.Marker)
+ }
+
+ if v.MaxItems != nil {
+ encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListEventSourceMappings struct {
+}
+
+func (*awsRestjson1_serializeOpListEventSourceMappings) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListEventSourceMappings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListEventSourceMappingsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/event-source-mappings")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListEventSourceMappingsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListEventSourceMappingsInput(v *ListEventSourceMappingsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.EventSourceArn != nil {
+ encoder.SetQuery("EventSourceArn").String(*v.EventSourceArn)
+ }
+
+ if v.FunctionName != nil {
+ encoder.SetQuery("FunctionName").String(*v.FunctionName)
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("Marker").String(*v.Marker)
+ }
+
+ if v.MaxItems != nil {
+ encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListFunctionEventInvokeConfigs struct {
+}
+
+func (*awsRestjson1_serializeOpListFunctionEventInvokeConfigs) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListFunctionEventInvokeConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListFunctionEventInvokeConfigsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2019-09-25/functions/{FunctionName}/event-invoke-config/list")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListFunctionEventInvokeConfigsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListFunctionEventInvokeConfigsInput(v *ListFunctionEventInvokeConfigsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("Marker").String(*v.Marker)
+ }
+
+ if v.MaxItems != nil {
+ encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListFunctions struct {
+}
+
+func (*awsRestjson1_serializeOpListFunctions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListFunctions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListFunctionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListFunctionsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListFunctionsInput(v *ListFunctionsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if len(v.FunctionVersion) > 0 {
+ encoder.SetQuery("FunctionVersion").String(string(v.FunctionVersion))
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("Marker").String(*v.Marker)
+ }
+
+ if v.MasterRegion != nil {
+ encoder.SetQuery("MasterRegion").String(*v.MasterRegion)
+ }
+
+ if v.MaxItems != nil {
+ encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListFunctionsByCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_serializeOpListFunctionsByCodeSigningConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListFunctionsByCodeSigningConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListFunctionsByCodeSigningConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs/{CodeSigningConfigArn}/functions")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListFunctionsByCodeSigningConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListFunctionsByCodeSigningConfigInput(v *ListFunctionsByCodeSigningConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.CodeSigningConfigArn == nil || len(*v.CodeSigningConfigArn) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member CodeSigningConfigArn must not be empty")}
+ }
+ if v.CodeSigningConfigArn != nil {
+ if err := encoder.SetURI("CodeSigningConfigArn").String(*v.CodeSigningConfigArn); err != nil {
+ return err
+ }
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("Marker").String(*v.Marker)
+ }
+
+ if v.MaxItems != nil {
+ encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListFunctionUrlConfigs struct {
+}
+
+func (*awsRestjson1_serializeOpListFunctionUrlConfigs) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListFunctionUrlConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListFunctionUrlConfigsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/urls")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListFunctionUrlConfigsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListFunctionUrlConfigsInput(v *ListFunctionUrlConfigsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("Marker").String(*v.Marker)
+ }
+
+ if v.MaxItems != nil {
+ encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListLayers struct {
+}
+
+func (*awsRestjson1_serializeOpListLayers) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListLayers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListLayersInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListLayersInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListLayersInput(v *ListLayersInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if len(v.CompatibleArchitecture) > 0 {
+ encoder.SetQuery("CompatibleArchitecture").String(string(v.CompatibleArchitecture))
+ }
+
+ if len(v.CompatibleRuntime) > 0 {
+ encoder.SetQuery("CompatibleRuntime").String(string(v.CompatibleRuntime))
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("Marker").String(*v.Marker)
+ }
+
+ if v.MaxItems != nil {
+ encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListLayerVersions struct {
+}
+
+func (*awsRestjson1_serializeOpListLayerVersions) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListLayerVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListLayerVersionsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListLayerVersionsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListLayerVersionsInput(v *ListLayerVersionsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if len(v.CompatibleArchitecture) > 0 {
+ encoder.SetQuery("CompatibleArchitecture").String(string(v.CompatibleArchitecture))
+ }
+
+ if len(v.CompatibleRuntime) > 0 {
+ encoder.SetQuery("CompatibleRuntime").String(string(v.CompatibleRuntime))
+ }
+
+ if v.LayerName == nil || len(*v.LayerName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")}
+ }
+ if v.LayerName != nil {
+ if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil {
+ return err
+ }
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("Marker").String(*v.Marker)
+ }
+
+ if v.MaxItems != nil {
+ encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListProvisionedConcurrencyConfigs struct {
+}
+
+func (*awsRestjson1_serializeOpListProvisionedConcurrencyConfigs) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListProvisionedConcurrencyConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListProvisionedConcurrencyConfigsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2019-09-30/functions/{FunctionName}/provisioned-concurrency?List=ALL")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListProvisionedConcurrencyConfigsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListProvisionedConcurrencyConfigsInput(v *ListProvisionedConcurrencyConfigsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("Marker").String(*v.Marker)
+ }
+
+ if v.MaxItems != nil {
+ encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListTags struct {
+}
+
+func (*awsRestjson1_serializeOpListTags) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListTagsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2017-03-31/tags/{Resource}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListTagsInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListTagsInput(v *ListTagsInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Resource == nil || len(*v.Resource) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Resource must not be empty")}
+ }
+ if v.Resource != nil {
+ if err := encoder.SetURI("Resource").String(*v.Resource); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpListVersionsByFunction struct {
+}
+
+func (*awsRestjson1_serializeOpListVersionsByFunction) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpListVersionsByFunction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListVersionsByFunctionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/versions")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsListVersionsByFunctionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsListVersionsByFunctionInput(v *ListVersionsByFunctionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Marker != nil {
+ encoder.SetQuery("Marker").String(*v.Marker)
+ }
+
+ if v.MaxItems != nil {
+ encoder.SetQuery("MaxItems").Integer(*v.MaxItems)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpPublishLayerVersion struct {
+}
+
+func (*awsRestjson1_serializeOpPublishLayerVersion) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpPublishLayerVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PublishLayerVersionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsPublishLayerVersionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentPublishLayerVersionInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsPublishLayerVersionInput(v *PublishLayerVersionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.LayerName == nil || len(*v.LayerName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")}
+ }
+ if v.LayerName != nil {
+ if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentPublishLayerVersionInput(v *PublishLayerVersionInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CompatibleArchitectures != nil {
+ ok := object.Key("CompatibleArchitectures")
+ if err := awsRestjson1_serializeDocumentCompatibleArchitectures(v.CompatibleArchitectures, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.CompatibleRuntimes != nil {
+ ok := object.Key("CompatibleRuntimes")
+ if err := awsRestjson1_serializeDocumentCompatibleRuntimes(v.CompatibleRuntimes, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Content != nil {
+ ok := object.Key("Content")
+ if err := awsRestjson1_serializeDocumentLayerVersionContentInput(v.Content, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Description != nil {
+ ok := object.Key("Description")
+ ok.String(*v.Description)
+ }
+
+ if v.LicenseInfo != nil {
+ ok := object.Key("LicenseInfo")
+ ok.String(*v.LicenseInfo)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpPublishVersion struct {
+}
+
+func (*awsRestjson1_serializeOpPublishVersion) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpPublishVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PublishVersionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/versions")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsPublishVersionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentPublishVersionInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsPublishVersionInput(v *PublishVersionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentPublishVersionInput(v *PublishVersionInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CodeSha256 != nil {
+ ok := object.Key("CodeSha256")
+ ok.String(*v.CodeSha256)
+ }
+
+ if v.Description != nil {
+ ok := object.Key("Description")
+ ok.String(*v.Description)
+ }
+
+ if v.RevisionId != nil {
+ ok := object.Key("RevisionId")
+ ok.String(*v.RevisionId)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpPutFunctionCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_serializeOpPutFunctionCodeSigningConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpPutFunctionCodeSigningConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutFunctionCodeSigningConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2020-06-30/functions/{FunctionName}/code-signing-config")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsPutFunctionCodeSigningConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentPutFunctionCodeSigningConfigInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsPutFunctionCodeSigningConfigInput(v *PutFunctionCodeSigningConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentPutFunctionCodeSigningConfigInput(v *PutFunctionCodeSigningConfigInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CodeSigningConfigArn != nil {
+ ok := object.Key("CodeSigningConfigArn")
+ ok.String(*v.CodeSigningConfigArn)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpPutFunctionConcurrency struct {
+}
+
+func (*awsRestjson1_serializeOpPutFunctionConcurrency) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpPutFunctionConcurrency) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutFunctionConcurrencyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2017-10-31/functions/{FunctionName}/concurrency")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsPutFunctionConcurrencyInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentPutFunctionConcurrencyInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsPutFunctionConcurrencyInput(v *PutFunctionConcurrencyInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentPutFunctionConcurrencyInput(v *PutFunctionConcurrencyInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.ReservedConcurrentExecutions != nil {
+ ok := object.Key("ReservedConcurrentExecutions")
+ ok.Integer(*v.ReservedConcurrentExecutions)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpPutFunctionEventInvokeConfig struct {
+}
+
+func (*awsRestjson1_serializeOpPutFunctionEventInvokeConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpPutFunctionEventInvokeConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutFunctionEventInvokeConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2019-09-25/functions/{FunctionName}/event-invoke-config")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsPutFunctionEventInvokeConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentPutFunctionEventInvokeConfigInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsPutFunctionEventInvokeConfigInput(v *PutFunctionEventInvokeConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentPutFunctionEventInvokeConfigInput(v *PutFunctionEventInvokeConfigInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DestinationConfig != nil {
+ ok := object.Key("DestinationConfig")
+ if err := awsRestjson1_serializeDocumentDestinationConfig(v.DestinationConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.MaximumEventAgeInSeconds != nil {
+ ok := object.Key("MaximumEventAgeInSeconds")
+ ok.Integer(*v.MaximumEventAgeInSeconds)
+ }
+
+ if v.MaximumRetryAttempts != nil {
+ ok := object.Key("MaximumRetryAttempts")
+ ok.Integer(*v.MaximumRetryAttempts)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpPutFunctionRecursionConfig struct {
+}
+
+func (*awsRestjson1_serializeOpPutFunctionRecursionConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpPutFunctionRecursionConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutFunctionRecursionConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2024-08-31/functions/{FunctionName}/recursion-config")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsPutFunctionRecursionConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentPutFunctionRecursionConfigInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsPutFunctionRecursionConfigInput(v *PutFunctionRecursionConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentPutFunctionRecursionConfigInput(v *PutFunctionRecursionConfigInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if len(v.RecursiveLoop) > 0 {
+ ok := object.Key("RecursiveLoop")
+ ok.String(string(v.RecursiveLoop))
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpPutProvisionedConcurrencyConfig struct {
+}
+
+func (*awsRestjson1_serializeOpPutProvisionedConcurrencyConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpPutProvisionedConcurrencyConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutProvisionedConcurrencyConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2019-09-30/functions/{FunctionName}/provisioned-concurrency")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsPutProvisionedConcurrencyConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentPutProvisionedConcurrencyConfigInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsPutProvisionedConcurrencyConfigInput(v *PutProvisionedConcurrencyConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentPutProvisionedConcurrencyConfigInput(v *PutProvisionedConcurrencyConfigInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.ProvisionedConcurrentExecutions != nil {
+ ok := object.Key("ProvisionedConcurrentExecutions")
+ ok.Integer(*v.ProvisionedConcurrentExecutions)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpPutRuntimeManagementConfig struct {
+}
+
+func (*awsRestjson1_serializeOpPutRuntimeManagementConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpPutRuntimeManagementConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutRuntimeManagementConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2021-07-20/functions/{FunctionName}/runtime-management-config")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsPutRuntimeManagementConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentPutRuntimeManagementConfigInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsPutRuntimeManagementConfigInput(v *PutRuntimeManagementConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentPutRuntimeManagementConfigInput(v *PutRuntimeManagementConfigInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.RuntimeVersionArn != nil {
+ ok := object.Key("RuntimeVersionArn")
+ ok.String(*v.RuntimeVersionArn)
+ }
+
+ if len(v.UpdateRuntimeOn) > 0 {
+ ok := object.Key("UpdateRuntimeOn")
+ ok.String(string(v.UpdateRuntimeOn))
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpRemoveLayerVersionPermission struct {
+}
+
+func (*awsRestjson1_serializeOpRemoveLayerVersionPermission) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpRemoveLayerVersionPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*RemoveLayerVersionPermissionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy/{StatementId}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsRemoveLayerVersionPermissionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsRemoveLayerVersionPermissionInput(v *RemoveLayerVersionPermissionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.LayerName == nil || len(*v.LayerName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")}
+ }
+ if v.LayerName != nil {
+ if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil {
+ return err
+ }
+ }
+
+ if v.RevisionId != nil {
+ encoder.SetQuery("RevisionId").String(*v.RevisionId)
+ }
+
+ if v.StatementId == nil || len(*v.StatementId) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member StatementId must not be empty")}
+ }
+ if v.StatementId != nil {
+ if err := encoder.SetURI("StatementId").String(*v.StatementId); err != nil {
+ return err
+ }
+ }
+
+ if v.VersionNumber == nil {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member VersionNumber must not be empty")}
+ }
+ if v.VersionNumber != nil {
+ if err := encoder.SetURI("VersionNumber").Long(*v.VersionNumber); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpRemovePermission struct {
+}
+
+func (*awsRestjson1_serializeOpRemovePermission) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpRemovePermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*RemovePermissionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/policy/{StatementId}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsRemovePermissionInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsRemovePermissionInput(v *RemovePermissionInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ if v.RevisionId != nil {
+ encoder.SetQuery("RevisionId").String(*v.RevisionId)
+ }
+
+ if v.StatementId == nil || len(*v.StatementId) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member StatementId must not be empty")}
+ }
+ if v.StatementId != nil {
+ if err := encoder.SetURI("StatementId").String(*v.StatementId); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpTagResource struct {
+}
+
+func (*awsRestjson1_serializeOpTagResource) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*TagResourceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2017-03-31/tags/{Resource}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Resource == nil || len(*v.Resource) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Resource must not be empty")}
+ }
+ if v.Resource != nil {
+ if err := encoder.SetURI("Resource").String(*v.Resource); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Tags != nil {
+ ok := object.Key("Tags")
+ if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpUntagResource struct {
+}
+
+func (*awsRestjson1_serializeOpUntagResource) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UntagResourceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2017-03-31/tags/{Resource}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.Resource == nil || len(*v.Resource) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Resource must not be empty")}
+ }
+ if v.Resource != nil {
+ if err := encoder.SetURI("Resource").String(*v.Resource); err != nil {
+ return err
+ }
+ }
+
+ if v.TagKeys != nil {
+ for i := range v.TagKeys {
+ encoder.AddQuery("tagKeys").String(v.TagKeys[i])
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpUpdateAlias struct {
+}
+
+func (*awsRestjson1_serializeOpUpdateAlias) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpUpdateAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UpdateAliasInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/aliases/{Name}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsUpdateAliasInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentUpdateAliasInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsUpdateAliasInput(v *UpdateAliasInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Name == nil || len(*v.Name) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")}
+ }
+ if v.Name != nil {
+ if err := encoder.SetURI("Name").String(*v.Name); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentUpdateAliasInput(v *UpdateAliasInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Description != nil {
+ ok := object.Key("Description")
+ ok.String(*v.Description)
+ }
+
+ if v.FunctionVersion != nil {
+ ok := object.Key("FunctionVersion")
+ ok.String(*v.FunctionVersion)
+ }
+
+ if v.RevisionId != nil {
+ ok := object.Key("RevisionId")
+ ok.String(*v.RevisionId)
+ }
+
+ if v.RoutingConfig != nil {
+ ok := object.Key("RoutingConfig")
+ if err := awsRestjson1_serializeDocumentAliasRoutingConfiguration(v.RoutingConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpUpdateCodeSigningConfig struct {
+}
+
+func (*awsRestjson1_serializeOpUpdateCodeSigningConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpUpdateCodeSigningConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UpdateCodeSigningConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs/{CodeSigningConfigArn}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsUpdateCodeSigningConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentUpdateCodeSigningConfigInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsUpdateCodeSigningConfigInput(v *UpdateCodeSigningConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.CodeSigningConfigArn == nil || len(*v.CodeSigningConfigArn) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member CodeSigningConfigArn must not be empty")}
+ }
+ if v.CodeSigningConfigArn != nil {
+ if err := encoder.SetURI("CodeSigningConfigArn").String(*v.CodeSigningConfigArn); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentUpdateCodeSigningConfigInput(v *UpdateCodeSigningConfigInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.AllowedPublishers != nil {
+ ok := object.Key("AllowedPublishers")
+ if err := awsRestjson1_serializeDocumentAllowedPublishers(v.AllowedPublishers, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.CodeSigningPolicies != nil {
+ ok := object.Key("CodeSigningPolicies")
+ if err := awsRestjson1_serializeDocumentCodeSigningPolicies(v.CodeSigningPolicies, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Description != nil {
+ ok := object.Key("Description")
+ ok.String(*v.Description)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpUpdateEventSourceMapping struct {
+}
+
+func (*awsRestjson1_serializeOpUpdateEventSourceMapping) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpUpdateEventSourceMapping) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UpdateEventSourceMappingInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/event-source-mappings/{UUID}")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsUpdateEventSourceMappingInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentUpdateEventSourceMappingInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsUpdateEventSourceMappingInput(v *UpdateEventSourceMappingInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.UUID == nil || len(*v.UUID) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member UUID must not be empty")}
+ }
+ if v.UUID != nil {
+ if err := encoder.SetURI("UUID").String(*v.UUID); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentUpdateEventSourceMappingInput(v *UpdateEventSourceMappingInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.BatchSize != nil {
+ ok := object.Key("BatchSize")
+ ok.Integer(*v.BatchSize)
+ }
+
+ if v.BisectBatchOnFunctionError != nil {
+ ok := object.Key("BisectBatchOnFunctionError")
+ ok.Boolean(*v.BisectBatchOnFunctionError)
+ }
+
+ if v.DestinationConfig != nil {
+ ok := object.Key("DestinationConfig")
+ if err := awsRestjson1_serializeDocumentDestinationConfig(v.DestinationConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.DocumentDBEventSourceConfig != nil {
+ ok := object.Key("DocumentDBEventSourceConfig")
+ if err := awsRestjson1_serializeDocumentDocumentDBEventSourceConfig(v.DocumentDBEventSourceConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Enabled != nil {
+ ok := object.Key("Enabled")
+ ok.Boolean(*v.Enabled)
+ }
+
+ if v.FilterCriteria != nil {
+ ok := object.Key("FilterCriteria")
+ if err := awsRestjson1_serializeDocumentFilterCriteria(v.FilterCriteria, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.FunctionName != nil {
+ ok := object.Key("FunctionName")
+ ok.String(*v.FunctionName)
+ }
+
+ if v.FunctionResponseTypes != nil {
+ ok := object.Key("FunctionResponseTypes")
+ if err := awsRestjson1_serializeDocumentFunctionResponseTypeList(v.FunctionResponseTypes, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KMSKeyArn != nil {
+ ok := object.Key("KMSKeyArn")
+ ok.String(*v.KMSKeyArn)
+ }
+
+ if v.MaximumBatchingWindowInSeconds != nil {
+ ok := object.Key("MaximumBatchingWindowInSeconds")
+ ok.Integer(*v.MaximumBatchingWindowInSeconds)
+ }
+
+ if v.MaximumRecordAgeInSeconds != nil {
+ ok := object.Key("MaximumRecordAgeInSeconds")
+ ok.Integer(*v.MaximumRecordAgeInSeconds)
+ }
+
+ if v.MaximumRetryAttempts != nil {
+ ok := object.Key("MaximumRetryAttempts")
+ ok.Integer(*v.MaximumRetryAttempts)
+ }
+
+ if v.MetricsConfig != nil {
+ ok := object.Key("MetricsConfig")
+ if err := awsRestjson1_serializeDocumentEventSourceMappingMetricsConfig(v.MetricsConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.ParallelizationFactor != nil {
+ ok := object.Key("ParallelizationFactor")
+ ok.Integer(*v.ParallelizationFactor)
+ }
+
+ if v.ProvisionedPollerConfig != nil {
+ ok := object.Key("ProvisionedPollerConfig")
+ if err := awsRestjson1_serializeDocumentProvisionedPollerConfig(v.ProvisionedPollerConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.ScalingConfig != nil {
+ ok := object.Key("ScalingConfig")
+ if err := awsRestjson1_serializeDocumentScalingConfig(v.ScalingConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.SourceAccessConfigurations != nil {
+ ok := object.Key("SourceAccessConfigurations")
+ if err := awsRestjson1_serializeDocumentSourceAccessConfigurations(v.SourceAccessConfigurations, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.TumblingWindowInSeconds != nil {
+ ok := object.Key("TumblingWindowInSeconds")
+ ok.Integer(*v.TumblingWindowInSeconds)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpUpdateFunctionCode struct {
+}
+
+func (*awsRestjson1_serializeOpUpdateFunctionCode) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpUpdateFunctionCode) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UpdateFunctionCodeInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/code")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsUpdateFunctionCodeInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentUpdateFunctionCodeInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsUpdateFunctionCodeInput(v *UpdateFunctionCodeInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentUpdateFunctionCodeInput(v *UpdateFunctionCodeInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Architectures != nil {
+ ok := object.Key("Architectures")
+ if err := awsRestjson1_serializeDocumentArchitecturesList(v.Architectures, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun {
+ ok := object.Key("DryRun")
+ ok.Boolean(v.DryRun)
+ }
+
+ if v.ImageUri != nil {
+ ok := object.Key("ImageUri")
+ ok.String(*v.ImageUri)
+ }
+
+ if v.Publish {
+ ok := object.Key("Publish")
+ ok.Boolean(v.Publish)
+ }
+
+ if v.RevisionId != nil {
+ ok := object.Key("RevisionId")
+ ok.String(*v.RevisionId)
+ }
+
+ if v.S3Bucket != nil {
+ ok := object.Key("S3Bucket")
+ ok.String(*v.S3Bucket)
+ }
+
+ if v.S3Key != nil {
+ ok := object.Key("S3Key")
+ ok.String(*v.S3Key)
+ }
+
+ if v.S3ObjectVersion != nil {
+ ok := object.Key("S3ObjectVersion")
+ ok.String(*v.S3ObjectVersion)
+ }
+
+ if v.SourceKMSKeyArn != nil {
+ ok := object.Key("SourceKMSKeyArn")
+ ok.String(*v.SourceKMSKeyArn)
+ }
+
+ if v.ZipFile != nil {
+ ok := object.Key("ZipFile")
+ ok.Base64EncodeBytes(v.ZipFile)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpUpdateFunctionConfiguration struct {
+}
+
+func (*awsRestjson1_serializeOpUpdateFunctionConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpUpdateFunctionConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UpdateFunctionConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/configuration")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsUpdateFunctionConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentUpdateFunctionConfigurationInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsUpdateFunctionConfigurationInput(v *UpdateFunctionConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentUpdateFunctionConfigurationInput(v *UpdateFunctionConfigurationInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DeadLetterConfig != nil {
+ ok := object.Key("DeadLetterConfig")
+ if err := awsRestjson1_serializeDocumentDeadLetterConfig(v.DeadLetterConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Description != nil {
+ ok := object.Key("Description")
+ ok.String(*v.Description)
+ }
+
+ if v.Environment != nil {
+ ok := object.Key("Environment")
+ if err := awsRestjson1_serializeDocumentEnvironment(v.Environment, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.EphemeralStorage != nil {
+ ok := object.Key("EphemeralStorage")
+ if err := awsRestjson1_serializeDocumentEphemeralStorage(v.EphemeralStorage, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.FileSystemConfigs != nil {
+ ok := object.Key("FileSystemConfigs")
+ if err := awsRestjson1_serializeDocumentFileSystemConfigList(v.FileSystemConfigs, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Handler != nil {
+ ok := object.Key("Handler")
+ ok.String(*v.Handler)
+ }
+
+ if v.ImageConfig != nil {
+ ok := object.Key("ImageConfig")
+ if err := awsRestjson1_serializeDocumentImageConfig(v.ImageConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KMSKeyArn != nil {
+ ok := object.Key("KMSKeyArn")
+ ok.String(*v.KMSKeyArn)
+ }
+
+ if v.Layers != nil {
+ ok := object.Key("Layers")
+ if err := awsRestjson1_serializeDocumentLayerList(v.Layers, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.LoggingConfig != nil {
+ ok := object.Key("LoggingConfig")
+ if err := awsRestjson1_serializeDocumentLoggingConfig(v.LoggingConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.MemorySize != nil {
+ ok := object.Key("MemorySize")
+ ok.Integer(*v.MemorySize)
+ }
+
+ if v.RevisionId != nil {
+ ok := object.Key("RevisionId")
+ ok.String(*v.RevisionId)
+ }
+
+ if v.Role != nil {
+ ok := object.Key("Role")
+ ok.String(*v.Role)
+ }
+
+ if len(v.Runtime) > 0 {
+ ok := object.Key("Runtime")
+ ok.String(string(v.Runtime))
+ }
+
+ if v.SnapStart != nil {
+ ok := object.Key("SnapStart")
+ if err := awsRestjson1_serializeDocumentSnapStart(v.SnapStart, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.Timeout != nil {
+ ok := object.Key("Timeout")
+ ok.Integer(*v.Timeout)
+ }
+
+ if v.TracingConfig != nil {
+ ok := object.Key("TracingConfig")
+ if err := awsRestjson1_serializeDocumentTracingConfig(v.TracingConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.VpcConfig != nil {
+ ok := object.Key("VpcConfig")
+ if err := awsRestjson1_serializeDocumentVpcConfig(v.VpcConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpUpdateFunctionEventInvokeConfig struct {
+}
+
+func (*awsRestjson1_serializeOpUpdateFunctionEventInvokeConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpUpdateFunctionEventInvokeConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UpdateFunctionEventInvokeConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2019-09-25/functions/{FunctionName}/event-invoke-config")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsUpdateFunctionEventInvokeConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentUpdateFunctionEventInvokeConfigInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsUpdateFunctionEventInvokeConfigInput(v *UpdateFunctionEventInvokeConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentUpdateFunctionEventInvokeConfigInput(v *UpdateFunctionEventInvokeConfigInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DestinationConfig != nil {
+ ok := object.Key("DestinationConfig")
+ if err := awsRestjson1_serializeDocumentDestinationConfig(v.DestinationConfig, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.MaximumEventAgeInSeconds != nil {
+ ok := object.Key("MaximumEventAgeInSeconds")
+ ok.Integer(*v.MaximumEventAgeInSeconds)
+ }
+
+ if v.MaximumRetryAttempts != nil {
+ ok := object.Key("MaximumRetryAttempts")
+ ok.Integer(*v.MaximumRetryAttempts)
+ }
+
+ return nil
+}
+
+type awsRestjson1_serializeOpUpdateFunctionUrlConfig struct {
+}
+
+func (*awsRestjson1_serializeOpUpdateFunctionUrlConfig) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestjson1_serializeOpUpdateFunctionUrlConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UpdateFunctionUrlConfigInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "PUT"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestjson1_serializeOpHttpBindingsUpdateFunctionUrlConfigInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ restEncoder.SetHeader("Content-Type").String("application/json")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsRestjson1_serializeOpDocumentUpdateFunctionUrlConfigInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestjson1_serializeOpHttpBindingsUpdateFunctionUrlConfigInput(v *UpdateFunctionUrlConfigInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.FunctionName == nil || len(*v.FunctionName) == 0 {
+ return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")}
+ }
+ if v.FunctionName != nil {
+ if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil {
+ return err
+ }
+ }
+
+ if v.Qualifier != nil {
+ encoder.SetQuery("Qualifier").String(*v.Qualifier)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeOpDocumentUpdateFunctionUrlConfigInput(v *UpdateFunctionUrlConfigInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if len(v.AuthType) > 0 {
+ ok := object.Key("AuthType")
+ ok.String(string(v.AuthType))
+ }
+
+ if v.Cors != nil {
+ ok := object.Key("Cors")
+ if err := awsRestjson1_serializeDocumentCors(v.Cors, ok); err != nil {
+ return err
+ }
+ }
+
+ if len(v.InvokeMode) > 0 {
+ ok := object.Key("InvokeMode")
+ ok.String(string(v.InvokeMode))
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentAdditionalVersionWeights(v map[string]float64, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ for key := range v {
+ om := object.Key(key)
+ switch {
+ case math.IsNaN(v[key]):
+ om.String("NaN")
+
+ case math.IsInf(v[key], 1):
+ om.String("Infinity")
+
+ case math.IsInf(v[key], -1):
+ om.String("-Infinity")
+
+ default:
+ om.Double(v[key])
+
+ }
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentAliasRoutingConfiguration(v *types.AliasRoutingConfiguration, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.AdditionalVersionWeights != nil {
+ ok := object.Key("AdditionalVersionWeights")
+ if err := awsRestjson1_serializeDocumentAdditionalVersionWeights(v.AdditionalVersionWeights, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentAllowedPublishers(v *types.AllowedPublishers, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.SigningProfileVersionArns != nil {
+ ok := object.Key("SigningProfileVersionArns")
+ if err := awsRestjson1_serializeDocumentSigningProfileVersionArns(v.SigningProfileVersionArns, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentAllowMethodsList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentAllowOriginsList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentAmazonManagedKafkaEventSourceConfig(v *types.AmazonManagedKafkaEventSourceConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.ConsumerGroupId != nil {
+ ok := object.Key("ConsumerGroupId")
+ ok.String(*v.ConsumerGroupId)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentArchitecturesList(v []types.Architecture, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentCodeSigningPolicies(v *types.CodeSigningPolicies, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if len(v.UntrustedArtifactOnDeployment) > 0 {
+ ok := object.Key("UntrustedArtifactOnDeployment")
+ ok.String(string(v.UntrustedArtifactOnDeployment))
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentCompatibleArchitectures(v []types.Architecture, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentCompatibleRuntimes(v []types.Runtime, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentCors(v *types.Cors, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.AllowCredentials != nil {
+ ok := object.Key("AllowCredentials")
+ ok.Boolean(*v.AllowCredentials)
+ }
+
+ if v.AllowHeaders != nil {
+ ok := object.Key("AllowHeaders")
+ if err := awsRestjson1_serializeDocumentHeadersList(v.AllowHeaders, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.AllowMethods != nil {
+ ok := object.Key("AllowMethods")
+ if err := awsRestjson1_serializeDocumentAllowMethodsList(v.AllowMethods, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.AllowOrigins != nil {
+ ok := object.Key("AllowOrigins")
+ if err := awsRestjson1_serializeDocumentAllowOriginsList(v.AllowOrigins, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.ExposeHeaders != nil {
+ ok := object.Key("ExposeHeaders")
+ if err := awsRestjson1_serializeDocumentHeadersList(v.ExposeHeaders, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.MaxAge != nil {
+ ok := object.Key("MaxAge")
+ ok.Integer(*v.MaxAge)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentDeadLetterConfig(v *types.DeadLetterConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.TargetArn != nil {
+ ok := object.Key("TargetArn")
+ ok.String(*v.TargetArn)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentDestinationConfig(v *types.DestinationConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.OnFailure != nil {
+ ok := object.Key("OnFailure")
+ if err := awsRestjson1_serializeDocumentOnFailure(v.OnFailure, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.OnSuccess != nil {
+ ok := object.Key("OnSuccess")
+ if err := awsRestjson1_serializeDocumentOnSuccess(v.OnSuccess, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentDocumentDBEventSourceConfig(v *types.DocumentDBEventSourceConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CollectionName != nil {
+ ok := object.Key("CollectionName")
+ ok.String(*v.CollectionName)
+ }
+
+ if v.DatabaseName != nil {
+ ok := object.Key("DatabaseName")
+ ok.String(*v.DatabaseName)
+ }
+
+ if len(v.FullDocument) > 0 {
+ ok := object.Key("FullDocument")
+ ok.String(string(v.FullDocument))
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentEndpointLists(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentEndpoints(v map[string][]string, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ for key := range v {
+ om := object.Key(key)
+ if vv := v[key]; vv == nil {
+ continue
+ }
+ if err := awsRestjson1_serializeDocumentEndpointLists(v[key], om); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentEnvironment(v *types.Environment, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Variables != nil {
+ ok := object.Key("Variables")
+ if err := awsRestjson1_serializeDocumentEnvironmentVariables(v.Variables, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentEnvironmentVariables(v map[string]string, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ for key := range v {
+ om := object.Key(key)
+ om.String(v[key])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentEphemeralStorage(v *types.EphemeralStorage, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Size != nil {
+ ok := object.Key("Size")
+ ok.Integer(*v.Size)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentEventSourceMappingMetricList(v []types.EventSourceMappingMetric, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentEventSourceMappingMetricsConfig(v *types.EventSourceMappingMetricsConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Metrics != nil {
+ ok := object.Key("Metrics")
+ if err := awsRestjson1_serializeDocumentEventSourceMappingMetricList(v.Metrics, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentFileSystemConfig(v *types.FileSystemConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Arn != nil {
+ ok := object.Key("Arn")
+ ok.String(*v.Arn)
+ }
+
+ if v.LocalMountPath != nil {
+ ok := object.Key("LocalMountPath")
+ ok.String(*v.LocalMountPath)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentFileSystemConfigList(v []types.FileSystemConfig, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ if err := awsRestjson1_serializeDocumentFileSystemConfig(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Pattern != nil {
+ ok := object.Key("Pattern")
+ ok.String(*v.Pattern)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentFilterCriteria(v *types.FilterCriteria, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Filters != nil {
+ ok := object.Key("Filters")
+ if err := awsRestjson1_serializeDocumentFilterList(v.Filters, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentFilterList(v []types.Filter, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ if err := awsRestjson1_serializeDocumentFilter(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentFunctionCode(v *types.FunctionCode, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.ImageUri != nil {
+ ok := object.Key("ImageUri")
+ ok.String(*v.ImageUri)
+ }
+
+ if v.S3Bucket != nil {
+ ok := object.Key("S3Bucket")
+ ok.String(*v.S3Bucket)
+ }
+
+ if v.S3Key != nil {
+ ok := object.Key("S3Key")
+ ok.String(*v.S3Key)
+ }
+
+ if v.S3ObjectVersion != nil {
+ ok := object.Key("S3ObjectVersion")
+ ok.String(*v.S3ObjectVersion)
+ }
+
+ if v.SourceKMSKeyArn != nil {
+ ok := object.Key("SourceKMSKeyArn")
+ ok.String(*v.SourceKMSKeyArn)
+ }
+
+ if v.ZipFile != nil {
+ ok := object.Key("ZipFile")
+ ok.Base64EncodeBytes(v.ZipFile)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentFunctionResponseTypeList(v []types.FunctionResponseType, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentHeadersList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentImageConfig(v *types.ImageConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Command != nil {
+ ok := object.Key("Command")
+ if err := awsRestjson1_serializeDocumentStringList(v.Command, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.EntryPoint != nil {
+ ok := object.Key("EntryPoint")
+ if err := awsRestjson1_serializeDocumentStringList(v.EntryPoint, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.WorkingDirectory != nil {
+ ok := object.Key("WorkingDirectory")
+ ok.String(*v.WorkingDirectory)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentLayerList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentLayerVersionContentInput(v *types.LayerVersionContentInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.S3Bucket != nil {
+ ok := object.Key("S3Bucket")
+ ok.String(*v.S3Bucket)
+ }
+
+ if v.S3Key != nil {
+ ok := object.Key("S3Key")
+ ok.String(*v.S3Key)
+ }
+
+ if v.S3ObjectVersion != nil {
+ ok := object.Key("S3ObjectVersion")
+ ok.String(*v.S3ObjectVersion)
+ }
+
+ if v.ZipFile != nil {
+ ok := object.Key("ZipFile")
+ ok.Base64EncodeBytes(v.ZipFile)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentLoggingConfig(v *types.LoggingConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if len(v.ApplicationLogLevel) > 0 {
+ ok := object.Key("ApplicationLogLevel")
+ ok.String(string(v.ApplicationLogLevel))
+ }
+
+ if len(v.LogFormat) > 0 {
+ ok := object.Key("LogFormat")
+ ok.String(string(v.LogFormat))
+ }
+
+ if v.LogGroup != nil {
+ ok := object.Key("LogGroup")
+ ok.String(*v.LogGroup)
+ }
+
+ if len(v.SystemLogLevel) > 0 {
+ ok := object.Key("SystemLogLevel")
+ ok.String(string(v.SystemLogLevel))
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentOnFailure(v *types.OnFailure, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Destination != nil {
+ ok := object.Key("Destination")
+ ok.String(*v.Destination)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentOnSuccess(v *types.OnSuccess, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Destination != nil {
+ ok := object.Key("Destination")
+ ok.String(*v.Destination)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentProvisionedPollerConfig(v *types.ProvisionedPollerConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.MaximumPollers != nil {
+ ok := object.Key("MaximumPollers")
+ ok.Integer(*v.MaximumPollers)
+ }
+
+ if v.MinimumPollers != nil {
+ ok := object.Key("MinimumPollers")
+ ok.Integer(*v.MinimumPollers)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentQueues(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentScalingConfig(v *types.ScalingConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.MaximumConcurrency != nil {
+ ok := object.Key("MaximumConcurrency")
+ ok.Integer(*v.MaximumConcurrency)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentSecurityGroupIds(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentSelfManagedEventSource(v *types.SelfManagedEventSource, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Endpoints != nil {
+ ok := object.Key("Endpoints")
+ if err := awsRestjson1_serializeDocumentEndpoints(v.Endpoints, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentSelfManagedKafkaEventSourceConfig(v *types.SelfManagedKafkaEventSourceConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.ConsumerGroupId != nil {
+ ok := object.Key("ConsumerGroupId")
+ ok.String(*v.ConsumerGroupId)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentSigningProfileVersionArns(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentSnapStart(v *types.SnapStart, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if len(v.ApplyOn) > 0 {
+ ok := object.Key("ApplyOn")
+ ok.String(string(v.ApplyOn))
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentSourceAccessConfiguration(v *types.SourceAccessConfiguration, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if len(v.Type) > 0 {
+ ok := object.Key("Type")
+ ok.String(string(v.Type))
+ }
+
+ if v.URI != nil {
+ ok := object.Key("URI")
+ ok.String(*v.URI)
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentSourceAccessConfigurations(v []types.SourceAccessConfiguration, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ if err := awsRestjson1_serializeDocumentSourceAccessConfiguration(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentStringList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentSubnetIds(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentTags(v map[string]string, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ for key := range v {
+ om := object.Key(key)
+ om.String(v[key])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentTopics(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsRestjson1_serializeDocumentTracingConfig(v *types.TracingConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if len(v.Mode) > 0 {
+ ok := object.Key("Mode")
+ ok.String(string(v.Mode))
+ }
+
+ return nil
+}
+
+func awsRestjson1_serializeDocumentVpcConfig(v *types.VpcConfig, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Ipv6AllowedForDualStack != nil {
+ ok := object.Key("Ipv6AllowedForDualStack")
+ ok.Boolean(*v.Ipv6AllowedForDualStack)
+ }
+
+ if v.SecurityGroupIds != nil {
+ ok := object.Key("SecurityGroupIds")
+ if err := awsRestjson1_serializeDocumentSecurityGroupIds(v.SecurityGroupIds, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.SubnetIds != nil {
+ ok := object.Key("SubnetIds")
+ if err := awsRestjson1_serializeDocumentSubnetIds(v.SubnetIds, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/enums.go
new file mode 100644
index 00000000..32ca52c4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/enums.go
@@ -0,0 +1,769 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+type ApplicationLogLevel string
+
+// Enum values for ApplicationLogLevel
+const (
+ ApplicationLogLevelTrace ApplicationLogLevel = "TRACE"
+ ApplicationLogLevelDebug ApplicationLogLevel = "DEBUG"
+ ApplicationLogLevelInfo ApplicationLogLevel = "INFO"
+ ApplicationLogLevelWarn ApplicationLogLevel = "WARN"
+ ApplicationLogLevelError ApplicationLogLevel = "ERROR"
+ ApplicationLogLevelFatal ApplicationLogLevel = "FATAL"
+)
+
+// Values returns all known values for ApplicationLogLevel. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ApplicationLogLevel) Values() []ApplicationLogLevel {
+ return []ApplicationLogLevel{
+ "TRACE",
+ "DEBUG",
+ "INFO",
+ "WARN",
+ "ERROR",
+ "FATAL",
+ }
+}
+
+type Architecture string
+
+// Enum values for Architecture
+const (
+ ArchitectureX8664 Architecture = "x86_64"
+ ArchitectureArm64 Architecture = "arm64"
+)
+
+// Values returns all known values for Architecture. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (Architecture) Values() []Architecture {
+ return []Architecture{
+ "x86_64",
+ "arm64",
+ }
+}
+
+type CodeSigningPolicy string
+
+// Enum values for CodeSigningPolicy
+const (
+ CodeSigningPolicyWarn CodeSigningPolicy = "Warn"
+ CodeSigningPolicyEnforce CodeSigningPolicy = "Enforce"
+)
+
+// Values returns all known values for CodeSigningPolicy. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (CodeSigningPolicy) Values() []CodeSigningPolicy {
+ return []CodeSigningPolicy{
+ "Warn",
+ "Enforce",
+ }
+}
+
+type EndPointType string
+
+// Enum values for EndPointType
+const (
+ EndPointTypeKafkaBootstrapServers EndPointType = "KAFKA_BOOTSTRAP_SERVERS"
+)
+
+// Values returns all known values for EndPointType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (EndPointType) Values() []EndPointType {
+ return []EndPointType{
+ "KAFKA_BOOTSTRAP_SERVERS",
+ }
+}
+
+type EventSourceMappingMetric string
+
+// Enum values for EventSourceMappingMetric
+const (
+ EventSourceMappingMetricEventCount EventSourceMappingMetric = "EventCount"
+)
+
+// Values returns all known values for EventSourceMappingMetric. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (EventSourceMappingMetric) Values() []EventSourceMappingMetric {
+ return []EventSourceMappingMetric{
+ "EventCount",
+ }
+}
+
+type EventSourcePosition string
+
+// Enum values for EventSourcePosition
+const (
+ EventSourcePositionTrimHorizon EventSourcePosition = "TRIM_HORIZON"
+ EventSourcePositionLatest EventSourcePosition = "LATEST"
+ EventSourcePositionAtTimestamp EventSourcePosition = "AT_TIMESTAMP"
+)
+
+// Values returns all known values for EventSourcePosition. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (EventSourcePosition) Values() []EventSourcePosition {
+ return []EventSourcePosition{
+ "TRIM_HORIZON",
+ "LATEST",
+ "AT_TIMESTAMP",
+ }
+}
+
+type FullDocument string
+
+// Enum values for FullDocument
+const (
+ FullDocumentUpdateLookup FullDocument = "UpdateLookup"
+ FullDocumentDefault FullDocument = "Default"
+)
+
+// Values returns all known values for FullDocument. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (FullDocument) Values() []FullDocument {
+ return []FullDocument{
+ "UpdateLookup",
+ "Default",
+ }
+}
+
+type FunctionResponseType string
+
+// Enum values for FunctionResponseType
+const (
+ FunctionResponseTypeReportBatchItemFailures FunctionResponseType = "ReportBatchItemFailures"
+)
+
+// Values returns all known values for FunctionResponseType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (FunctionResponseType) Values() []FunctionResponseType {
+ return []FunctionResponseType{
+ "ReportBatchItemFailures",
+ }
+}
+
+type FunctionUrlAuthType string
+
+// Enum values for FunctionUrlAuthType
+const (
+ FunctionUrlAuthTypeNone FunctionUrlAuthType = "NONE"
+ FunctionUrlAuthTypeAwsIam FunctionUrlAuthType = "AWS_IAM"
+)
+
+// Values returns all known values for FunctionUrlAuthType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (FunctionUrlAuthType) Values() []FunctionUrlAuthType {
+ return []FunctionUrlAuthType{
+ "NONE",
+ "AWS_IAM",
+ }
+}
+
+type FunctionVersion string
+
+// Enum values for FunctionVersion
+const (
+ FunctionVersionAll FunctionVersion = "ALL"
+)
+
+// Values returns all known values for FunctionVersion. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (FunctionVersion) Values() []FunctionVersion {
+ return []FunctionVersion{
+ "ALL",
+ }
+}
+
+type InvocationType string
+
+// Enum values for InvocationType
+const (
+ InvocationTypeEvent InvocationType = "Event"
+ InvocationTypeRequestResponse InvocationType = "RequestResponse"
+ InvocationTypeDryRun InvocationType = "DryRun"
+)
+
+// Values returns all known values for InvocationType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (InvocationType) Values() []InvocationType {
+ return []InvocationType{
+ "Event",
+ "RequestResponse",
+ "DryRun",
+ }
+}
+
+type InvokeMode string
+
+// Enum values for InvokeMode
+const (
+ InvokeModeBuffered InvokeMode = "BUFFERED"
+ InvokeModeResponseStream InvokeMode = "RESPONSE_STREAM"
+)
+
+// Values returns all known values for InvokeMode. Note that this can be expanded
+// in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (InvokeMode) Values() []InvokeMode {
+ return []InvokeMode{
+ "BUFFERED",
+ "RESPONSE_STREAM",
+ }
+}
+
+type LastUpdateStatus string
+
+// Enum values for LastUpdateStatus
+const (
+ LastUpdateStatusSuccessful LastUpdateStatus = "Successful"
+ LastUpdateStatusFailed LastUpdateStatus = "Failed"
+ LastUpdateStatusInProgress LastUpdateStatus = "InProgress"
+)
+
+// Values returns all known values for LastUpdateStatus. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (LastUpdateStatus) Values() []LastUpdateStatus {
+ return []LastUpdateStatus{
+ "Successful",
+ "Failed",
+ "InProgress",
+ }
+}
+
+type LastUpdateStatusReasonCode string
+
+// Enum values for LastUpdateStatusReasonCode
+const (
+ LastUpdateStatusReasonCodeEniLimitExceeded LastUpdateStatusReasonCode = "EniLimitExceeded"
+ LastUpdateStatusReasonCodeInsufficientRolePermissions LastUpdateStatusReasonCode = "InsufficientRolePermissions"
+ LastUpdateStatusReasonCodeInvalidConfiguration LastUpdateStatusReasonCode = "InvalidConfiguration"
+ LastUpdateStatusReasonCodeInternalError LastUpdateStatusReasonCode = "InternalError"
+ LastUpdateStatusReasonCodeSubnetOutOfIPAddresses LastUpdateStatusReasonCode = "SubnetOutOfIPAddresses"
+ LastUpdateStatusReasonCodeInvalidSubnet LastUpdateStatusReasonCode = "InvalidSubnet"
+ LastUpdateStatusReasonCodeInvalidSecurityGroup LastUpdateStatusReasonCode = "InvalidSecurityGroup"
+ LastUpdateStatusReasonCodeImageDeleted LastUpdateStatusReasonCode = "ImageDeleted"
+ LastUpdateStatusReasonCodeImageAccessDenied LastUpdateStatusReasonCode = "ImageAccessDenied"
+ LastUpdateStatusReasonCodeInvalidImage LastUpdateStatusReasonCode = "InvalidImage"
+ LastUpdateStatusReasonCodeKMSKeyAccessDenied LastUpdateStatusReasonCode = "KMSKeyAccessDenied"
+ LastUpdateStatusReasonCodeKMSKeyNotFound LastUpdateStatusReasonCode = "KMSKeyNotFound"
+ LastUpdateStatusReasonCodeInvalidStateKMSKey LastUpdateStatusReasonCode = "InvalidStateKMSKey"
+ LastUpdateStatusReasonCodeDisabledKMSKey LastUpdateStatusReasonCode = "DisabledKMSKey"
+ LastUpdateStatusReasonCodeEFSIOError LastUpdateStatusReasonCode = "EFSIOError"
+ LastUpdateStatusReasonCodeEFSMountConnectivityError LastUpdateStatusReasonCode = "EFSMountConnectivityError"
+ LastUpdateStatusReasonCodeEFSMountFailure LastUpdateStatusReasonCode = "EFSMountFailure"
+ LastUpdateStatusReasonCodeEFSMountTimeout LastUpdateStatusReasonCode = "EFSMountTimeout"
+ LastUpdateStatusReasonCodeInvalidRuntime LastUpdateStatusReasonCode = "InvalidRuntime"
+ LastUpdateStatusReasonCodeInvalidZipFileException LastUpdateStatusReasonCode = "InvalidZipFileException"
+ LastUpdateStatusReasonCodeFunctionError LastUpdateStatusReasonCode = "FunctionError"
+)
+
+// Values returns all known values for LastUpdateStatusReasonCode. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (LastUpdateStatusReasonCode) Values() []LastUpdateStatusReasonCode {
+ return []LastUpdateStatusReasonCode{
+ "EniLimitExceeded",
+ "InsufficientRolePermissions",
+ "InvalidConfiguration",
+ "InternalError",
+ "SubnetOutOfIPAddresses",
+ "InvalidSubnet",
+ "InvalidSecurityGroup",
+ "ImageDeleted",
+ "ImageAccessDenied",
+ "InvalidImage",
+ "KMSKeyAccessDenied",
+ "KMSKeyNotFound",
+ "InvalidStateKMSKey",
+ "DisabledKMSKey",
+ "EFSIOError",
+ "EFSMountConnectivityError",
+ "EFSMountFailure",
+ "EFSMountTimeout",
+ "InvalidRuntime",
+ "InvalidZipFileException",
+ "FunctionError",
+ }
+}
+
+type LogFormat string
+
+// Enum values for LogFormat
+const (
+ LogFormatJson LogFormat = "JSON"
+ LogFormatText LogFormat = "Text"
+)
+
+// Values returns all known values for LogFormat. Note that this can be expanded
+// in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (LogFormat) Values() []LogFormat {
+ return []LogFormat{
+ "JSON",
+ "Text",
+ }
+}
+
+type LogType string
+
+// Enum values for LogType
+const (
+ LogTypeNone LogType = "None"
+ LogTypeTail LogType = "Tail"
+)
+
+// Values returns all known values for LogType. Note that this can be expanded in
+// the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (LogType) Values() []LogType {
+ return []LogType{
+ "None",
+ "Tail",
+ }
+}
+
+type PackageType string
+
+// Enum values for PackageType
+const (
+ PackageTypeZip PackageType = "Zip"
+ PackageTypeImage PackageType = "Image"
+)
+
+// Values returns all known values for PackageType. Note that this can be expanded
+// in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (PackageType) Values() []PackageType {
+ return []PackageType{
+ "Zip",
+ "Image",
+ }
+}
+
+type ProvisionedConcurrencyStatusEnum string
+
+// Enum values for ProvisionedConcurrencyStatusEnum
+const (
+ ProvisionedConcurrencyStatusEnumInProgress ProvisionedConcurrencyStatusEnum = "IN_PROGRESS"
+ ProvisionedConcurrencyStatusEnumReady ProvisionedConcurrencyStatusEnum = "READY"
+ ProvisionedConcurrencyStatusEnumFailed ProvisionedConcurrencyStatusEnum = "FAILED"
+)
+
+// Values returns all known values for ProvisionedConcurrencyStatusEnum. Note that
+// this can be expanded in the future, and so it is only as up to date as the
+// client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ProvisionedConcurrencyStatusEnum) Values() []ProvisionedConcurrencyStatusEnum {
+ return []ProvisionedConcurrencyStatusEnum{
+ "IN_PROGRESS",
+ "READY",
+ "FAILED",
+ }
+}
+
+type RecursiveLoop string
+
+// Enum values for RecursiveLoop
+const (
+ RecursiveLoopAllow RecursiveLoop = "Allow"
+ RecursiveLoopTerminate RecursiveLoop = "Terminate"
+)
+
+// Values returns all known values for RecursiveLoop. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (RecursiveLoop) Values() []RecursiveLoop {
+ return []RecursiveLoop{
+ "Allow",
+ "Terminate",
+ }
+}
+
+type ResponseStreamingInvocationType string
+
+// Enum values for ResponseStreamingInvocationType
+const (
+ ResponseStreamingInvocationTypeRequestResponse ResponseStreamingInvocationType = "RequestResponse"
+ ResponseStreamingInvocationTypeDryRun ResponseStreamingInvocationType = "DryRun"
+)
+
+// Values returns all known values for ResponseStreamingInvocationType. Note that
+// this can be expanded in the future, and so it is only as up to date as the
+// client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ResponseStreamingInvocationType) Values() []ResponseStreamingInvocationType {
+ return []ResponseStreamingInvocationType{
+ "RequestResponse",
+ "DryRun",
+ }
+}
+
+type Runtime string
+
+// Enum values for Runtime
+const (
+ RuntimeNodejs Runtime = "nodejs"
+ RuntimeNodejs43 Runtime = "nodejs4.3"
+ RuntimeNodejs610 Runtime = "nodejs6.10"
+ RuntimeNodejs810 Runtime = "nodejs8.10"
+ RuntimeNodejs10x Runtime = "nodejs10.x"
+ RuntimeNodejs12x Runtime = "nodejs12.x"
+ RuntimeNodejs14x Runtime = "nodejs14.x"
+ RuntimeNodejs16x Runtime = "nodejs16.x"
+ RuntimeJava8 Runtime = "java8"
+ RuntimeJava8al2 Runtime = "java8.al2"
+ RuntimeJava11 Runtime = "java11"
+ RuntimePython27 Runtime = "python2.7"
+ RuntimePython36 Runtime = "python3.6"
+ RuntimePython37 Runtime = "python3.7"
+ RuntimePython38 Runtime = "python3.8"
+ RuntimePython39 Runtime = "python3.9"
+ RuntimeDotnetcore10 Runtime = "dotnetcore1.0"
+ RuntimeDotnetcore20 Runtime = "dotnetcore2.0"
+ RuntimeDotnetcore21 Runtime = "dotnetcore2.1"
+ RuntimeDotnetcore31 Runtime = "dotnetcore3.1"
+ RuntimeDotnet6 Runtime = "dotnet6"
+ RuntimeDotnet8 Runtime = "dotnet8"
+ RuntimeNodejs43edge Runtime = "nodejs4.3-edge"
+ RuntimeGo1x Runtime = "go1.x"
+ RuntimeRuby25 Runtime = "ruby2.5"
+ RuntimeRuby27 Runtime = "ruby2.7"
+ RuntimeProvided Runtime = "provided"
+ RuntimeProvidedal2 Runtime = "provided.al2"
+ RuntimeNodejs18x Runtime = "nodejs18.x"
+ RuntimePython310 Runtime = "python3.10"
+ RuntimeJava17 Runtime = "java17"
+ RuntimeRuby32 Runtime = "ruby3.2"
+ RuntimeRuby33 Runtime = "ruby3.3"
+ RuntimePython311 Runtime = "python3.11"
+ RuntimeNodejs20x Runtime = "nodejs20.x"
+ RuntimeProvidedal2023 Runtime = "provided.al2023"
+ RuntimePython312 Runtime = "python3.12"
+ RuntimeJava21 Runtime = "java21"
+ RuntimePython313 Runtime = "python3.13"
+ RuntimeNodejs22x Runtime = "nodejs22.x"
+)
+
+// Values returns all known values for Runtime. Note that this can be expanded in
+// the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (Runtime) Values() []Runtime {
+ return []Runtime{
+ "nodejs",
+ "nodejs4.3",
+ "nodejs6.10",
+ "nodejs8.10",
+ "nodejs10.x",
+ "nodejs12.x",
+ "nodejs14.x",
+ "nodejs16.x",
+ "java8",
+ "java8.al2",
+ "java11",
+ "python2.7",
+ "python3.6",
+ "python3.7",
+ "python3.8",
+ "python3.9",
+ "dotnetcore1.0",
+ "dotnetcore2.0",
+ "dotnetcore2.1",
+ "dotnetcore3.1",
+ "dotnet6",
+ "dotnet8",
+ "nodejs4.3-edge",
+ "go1.x",
+ "ruby2.5",
+ "ruby2.7",
+ "provided",
+ "provided.al2",
+ "nodejs18.x",
+ "python3.10",
+ "java17",
+ "ruby3.2",
+ "ruby3.3",
+ "python3.11",
+ "nodejs20.x",
+ "provided.al2023",
+ "python3.12",
+ "java21",
+ "python3.13",
+ "nodejs22.x",
+ }
+}
+
+type SnapStartApplyOn string
+
+// Enum values for SnapStartApplyOn
+const (
+ SnapStartApplyOnPublishedVersions SnapStartApplyOn = "PublishedVersions"
+ SnapStartApplyOnNone SnapStartApplyOn = "None"
+)
+
+// Values returns all known values for SnapStartApplyOn. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (SnapStartApplyOn) Values() []SnapStartApplyOn {
+ return []SnapStartApplyOn{
+ "PublishedVersions",
+ "None",
+ }
+}
+
+type SnapStartOptimizationStatus string
+
+// Enum values for SnapStartOptimizationStatus
+const (
+ SnapStartOptimizationStatusOn SnapStartOptimizationStatus = "On"
+ SnapStartOptimizationStatusOff SnapStartOptimizationStatus = "Off"
+)
+
+// Values returns all known values for SnapStartOptimizationStatus. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (SnapStartOptimizationStatus) Values() []SnapStartOptimizationStatus {
+ return []SnapStartOptimizationStatus{
+ "On",
+ "Off",
+ }
+}
+
+type SourceAccessType string
+
+// Enum values for SourceAccessType
+const (
+ SourceAccessTypeBasicAuth SourceAccessType = "BASIC_AUTH"
+ SourceAccessTypeVpcSubnet SourceAccessType = "VPC_SUBNET"
+ SourceAccessTypeVpcSecurityGroup SourceAccessType = "VPC_SECURITY_GROUP"
+ SourceAccessTypeSaslScram512Auth SourceAccessType = "SASL_SCRAM_512_AUTH"
+ SourceAccessTypeSaslScram256Auth SourceAccessType = "SASL_SCRAM_256_AUTH"
+ SourceAccessTypeVirtualHost SourceAccessType = "VIRTUAL_HOST"
+ SourceAccessTypeClientCertificateTlsAuth SourceAccessType = "CLIENT_CERTIFICATE_TLS_AUTH"
+ SourceAccessTypeServerRootCaCertificate SourceAccessType = "SERVER_ROOT_CA_CERTIFICATE"
+)
+
+// Values returns all known values for SourceAccessType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (SourceAccessType) Values() []SourceAccessType {
+ return []SourceAccessType{
+ "BASIC_AUTH",
+ "VPC_SUBNET",
+ "VPC_SECURITY_GROUP",
+ "SASL_SCRAM_512_AUTH",
+ "SASL_SCRAM_256_AUTH",
+ "VIRTUAL_HOST",
+ "CLIENT_CERTIFICATE_TLS_AUTH",
+ "SERVER_ROOT_CA_CERTIFICATE",
+ }
+}
+
+type State string
+
+// Enum values for State
+const (
+ StatePending State = "Pending"
+ StateActive State = "Active"
+ StateInactive State = "Inactive"
+ StateFailed State = "Failed"
+)
+
+// Values returns all known values for State. Note that this can be expanded in
+// the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (State) Values() []State {
+ return []State{
+ "Pending",
+ "Active",
+ "Inactive",
+ "Failed",
+ }
+}
+
+type StateReasonCode string
+
+// Enum values for StateReasonCode
+const (
+ StateReasonCodeIdle StateReasonCode = "Idle"
+ StateReasonCodeCreating StateReasonCode = "Creating"
+ StateReasonCodeRestoring StateReasonCode = "Restoring"
+ StateReasonCodeEniLimitExceeded StateReasonCode = "EniLimitExceeded"
+ StateReasonCodeInsufficientRolePermissions StateReasonCode = "InsufficientRolePermissions"
+ StateReasonCodeInvalidConfiguration StateReasonCode = "InvalidConfiguration"
+ StateReasonCodeInternalError StateReasonCode = "InternalError"
+ StateReasonCodeSubnetOutOfIPAddresses StateReasonCode = "SubnetOutOfIPAddresses"
+ StateReasonCodeInvalidSubnet StateReasonCode = "InvalidSubnet"
+ StateReasonCodeInvalidSecurityGroup StateReasonCode = "InvalidSecurityGroup"
+ StateReasonCodeImageDeleted StateReasonCode = "ImageDeleted"
+ StateReasonCodeImageAccessDenied StateReasonCode = "ImageAccessDenied"
+ StateReasonCodeInvalidImage StateReasonCode = "InvalidImage"
+ StateReasonCodeKMSKeyAccessDenied StateReasonCode = "KMSKeyAccessDenied"
+ StateReasonCodeKMSKeyNotFound StateReasonCode = "KMSKeyNotFound"
+ StateReasonCodeInvalidStateKMSKey StateReasonCode = "InvalidStateKMSKey"
+ StateReasonCodeDisabledKMSKey StateReasonCode = "DisabledKMSKey"
+ StateReasonCodeEFSIOError StateReasonCode = "EFSIOError"
+ StateReasonCodeEFSMountConnectivityError StateReasonCode = "EFSMountConnectivityError"
+ StateReasonCodeEFSMountFailure StateReasonCode = "EFSMountFailure"
+ StateReasonCodeEFSMountTimeout StateReasonCode = "EFSMountTimeout"
+ StateReasonCodeInvalidRuntime StateReasonCode = "InvalidRuntime"
+ StateReasonCodeInvalidZipFileException StateReasonCode = "InvalidZipFileException"
+ StateReasonCodeFunctionError StateReasonCode = "FunctionError"
+)
+
+// Values returns all known values for StateReasonCode. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (StateReasonCode) Values() []StateReasonCode {
+ return []StateReasonCode{
+ "Idle",
+ "Creating",
+ "Restoring",
+ "EniLimitExceeded",
+ "InsufficientRolePermissions",
+ "InvalidConfiguration",
+ "InternalError",
+ "SubnetOutOfIPAddresses",
+ "InvalidSubnet",
+ "InvalidSecurityGroup",
+ "ImageDeleted",
+ "ImageAccessDenied",
+ "InvalidImage",
+ "KMSKeyAccessDenied",
+ "KMSKeyNotFound",
+ "InvalidStateKMSKey",
+ "DisabledKMSKey",
+ "EFSIOError",
+ "EFSMountConnectivityError",
+ "EFSMountFailure",
+ "EFSMountTimeout",
+ "InvalidRuntime",
+ "InvalidZipFileException",
+ "FunctionError",
+ }
+}
+
+type SystemLogLevel string
+
+// Enum values for SystemLogLevel
+const (
+ SystemLogLevelDebug SystemLogLevel = "DEBUG"
+ SystemLogLevelInfo SystemLogLevel = "INFO"
+ SystemLogLevelWarn SystemLogLevel = "WARN"
+)
+
+// Values returns all known values for SystemLogLevel. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (SystemLogLevel) Values() []SystemLogLevel {
+ return []SystemLogLevel{
+ "DEBUG",
+ "INFO",
+ "WARN",
+ }
+}
+
+type ThrottleReason string
+
+// Enum values for ThrottleReason
+const (
+ ThrottleReasonConcurrentInvocationLimitExceeded ThrottleReason = "ConcurrentInvocationLimitExceeded"
+ ThrottleReasonFunctionInvocationRateLimitExceeded ThrottleReason = "FunctionInvocationRateLimitExceeded"
+ ThrottleReasonReservedFunctionConcurrentInvocationLimitExceeded ThrottleReason = "ReservedFunctionConcurrentInvocationLimitExceeded"
+ ThrottleReasonReservedFunctionInvocationRateLimitExceeded ThrottleReason = "ReservedFunctionInvocationRateLimitExceeded"
+ ThrottleReasonCallerRateLimitExceeded ThrottleReason = "CallerRateLimitExceeded"
+ ThrottleReasonConcurrentSnapshotCreateLimitExceeded ThrottleReason = "ConcurrentSnapshotCreateLimitExceeded"
+)
+
+// Values returns all known values for ThrottleReason. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ThrottleReason) Values() []ThrottleReason {
+ return []ThrottleReason{
+ "ConcurrentInvocationLimitExceeded",
+ "FunctionInvocationRateLimitExceeded",
+ "ReservedFunctionConcurrentInvocationLimitExceeded",
+ "ReservedFunctionInvocationRateLimitExceeded",
+ "CallerRateLimitExceeded",
+ "ConcurrentSnapshotCreateLimitExceeded",
+ }
+}
+
+type TracingMode string
+
+// Enum values for TracingMode
+const (
+ TracingModeActive TracingMode = "Active"
+ TracingModePassThrough TracingMode = "PassThrough"
+)
+
+// Values returns all known values for TracingMode. Note that this can be expanded
+// in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (TracingMode) Values() []TracingMode {
+ return []TracingMode{
+ "Active",
+ "PassThrough",
+ }
+}
+
+type UpdateRuntimeOn string
+
+// Enum values for UpdateRuntimeOn
+const (
+ UpdateRuntimeOnAuto UpdateRuntimeOn = "Auto"
+ UpdateRuntimeOnManual UpdateRuntimeOn = "Manual"
+ UpdateRuntimeOnFunctionUpdate UpdateRuntimeOn = "FunctionUpdate"
+)
+
+// Values returns all known values for UpdateRuntimeOn. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (UpdateRuntimeOn) Values() []UpdateRuntimeOn {
+ return []UpdateRuntimeOn{
+ "Auto",
+ "Manual",
+ "FunctionUpdate",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/errors.go
new file mode 100644
index 00000000..92dd0d56
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/errors.go
@@ -0,0 +1,1127 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+)
+
+// The specified code signing configuration does not exist.
+type CodeSigningConfigNotFoundException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CodeSigningConfigNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CodeSigningConfigNotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CodeSigningConfigNotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CodeSigningConfigNotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CodeSigningConfigNotFoundException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// Your Amazon Web Services account has exceeded its maximum total code size. For
+// more information, see [Lambda quotas].
+//
+// [Lambda quotas]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
+type CodeStorageExceededException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CodeStorageExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CodeStorageExceededException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CodeStorageExceededException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CodeStorageExceededException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CodeStorageExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The code signature failed one or more of the validation checks for signature
+// mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda blocks
+// the deployment.
+type CodeVerificationFailedException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CodeVerificationFailedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CodeVerificationFailedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CodeVerificationFailedException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CodeVerificationFailedException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CodeVerificationFailedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Need additional permissions to configure VPC settings.
+type EC2AccessDeniedException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *EC2AccessDeniedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *EC2AccessDeniedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *EC2AccessDeniedException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "EC2AccessDeniedException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *EC2AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// Amazon EC2 throttled Lambda during Lambda function initialization using the
+// execution role provided for the function.
+type EC2ThrottledException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *EC2ThrottledException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *EC2ThrottledException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *EC2ThrottledException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "EC2ThrottledException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *EC2ThrottledException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// Lambda received an unexpected Amazon EC2 client exception while setting up for
+// the Lambda function.
+type EC2UnexpectedException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+ EC2ErrorCode *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *EC2UnexpectedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *EC2UnexpectedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *EC2UnexpectedException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "EC2UnexpectedException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *EC2UnexpectedException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// An error occurred when reading from or writing to a connected file system.
+type EFSIOException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *EFSIOException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *EFSIOException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *EFSIOException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "EFSIOException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *EFSIOException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The Lambda function couldn't make a network connection to the configured file
+// system.
+type EFSMountConnectivityException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *EFSMountConnectivityException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *EFSMountConnectivityException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *EFSMountConnectivityException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "EFSMountConnectivityException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *EFSMountConnectivityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The Lambda function couldn't mount the configured file system due to a
+// permission or configuration issue.
+type EFSMountFailureException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *EFSMountFailureException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *EFSMountFailureException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *EFSMountFailureException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "EFSMountFailureException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *EFSMountFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The Lambda function made a network connection to the configured file system,
+// but the mount operation timed out.
+type EFSMountTimeoutException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *EFSMountTimeoutException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *EFSMountTimeoutException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *EFSMountTimeoutException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "EFSMountTimeoutException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *EFSMountTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Lambda couldn't create an elastic network interface in the VPC, specified as
+// part of Lambda function configuration, because the limit for network interfaces
+// has been reached. For more information, see [Lambda quotas].
+//
+// [Lambda quotas]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
+type ENILimitReachedException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ENILimitReachedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ENILimitReachedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ENILimitReachedException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ENILimitReachedException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ENILimitReachedException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// The code signature failed the integrity check. If the integrity check fails,
+// then Lambda blocks deployment, even if the code signing policy is set to WARN.
+type InvalidCodeSignatureException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidCodeSignatureException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidCodeSignatureException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidCodeSignatureException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidCodeSignatureException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidCodeSignatureException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// One of the parameters in the request is not valid.
+type InvalidParameterValueException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidParameterValueException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidParameterValueException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidParameterValueException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidParameterValueException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidParameterValueException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request body could not be parsed as JSON.
+type InvalidRequestContentException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidRequestContentException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidRequestContentException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidRequestContentException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidRequestContentException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidRequestContentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The runtime or runtime version specified is not supported.
+type InvalidRuntimeException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidRuntimeException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidRuntimeException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidRuntimeException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidRuntimeException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidRuntimeException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// The security group ID provided in the Lambda function VPC configuration is not
+// valid.
+type InvalidSecurityGroupIDException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidSecurityGroupIDException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidSecurityGroupIDException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidSecurityGroupIDException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidSecurityGroupIDException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidSecurityGroupIDException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// The subnet ID provided in the Lambda function VPC configuration is not valid.
+type InvalidSubnetIDException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidSubnetIDException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidSubnetIDException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidSubnetIDException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidSubnetIDException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidSubnetIDException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// Lambda could not unzip the deployment package.
+type InvalidZipFileException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidZipFileException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidZipFileException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidZipFileException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidZipFileException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidZipFileException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// Lambda couldn't decrypt the environment variables because KMS access was
+// denied. Check the Lambda function's KMS permissions.
+type KMSAccessDeniedException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KMSAccessDeniedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KMSAccessDeniedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KMSAccessDeniedException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KMSAccessDeniedException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KMSAccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// Lambda couldn't decrypt the environment variables because the KMS key used is
+// disabled. Check the Lambda function's KMS key settings.
+type KMSDisabledException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KMSDisabledException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KMSDisabledException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KMSDisabledException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KMSDisabledException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KMSDisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// Lambda couldn't decrypt the environment variables because the state of the KMS
+// key used is not valid for Decrypt. Check the function's KMS key settings.
+type KMSInvalidStateException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KMSInvalidStateException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KMSInvalidStateException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KMSInvalidStateException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KMSInvalidStateException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KMSInvalidStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// Lambda couldn't decrypt the environment variables because the KMS key was not
+// found. Check the function's KMS key settings.
+type KMSNotFoundException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KMSNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KMSNotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KMSNotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KMSNotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KMSNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// The permissions policy for the resource is too large. For more information, see [Lambda quotas]
+// .
+//
+// [Lambda quotas]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
+type PolicyLengthExceededException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *PolicyLengthExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *PolicyLengthExceededException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *PolicyLengthExceededException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "PolicyLengthExceededException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *PolicyLengthExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The RevisionId provided does not match the latest RevisionId for the Lambda
+// function or alias.
+//
+// - For AddPermission and RemovePermission API operations: Call GetPolicy to
+// retrieve the latest RevisionId for your resource.
+//
+// - For all other API operations: Call GetFunction or GetAlias to retrieve the
+// latest RevisionId for your resource.
+type PreconditionFailedException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *PreconditionFailedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *PreconditionFailedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *PreconditionFailedException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "PreconditionFailedException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *PreconditionFailedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The specified configuration does not exist.
+type ProvisionedConcurrencyConfigNotFoundException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ProvisionedConcurrencyConfigNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ProvisionedConcurrencyConfigNotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ProvisionedConcurrencyConfigNotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ProvisionedConcurrencyConfigNotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ProvisionedConcurrencyConfigNotFoundException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// Lambda has detected your function being invoked in a recursive loop with other
+// Amazon Web Services resources and stopped your function's invocation.
+type RecursiveInvocationException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *RecursiveInvocationException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *RecursiveInvocationException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *RecursiveInvocationException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "RecursiveInvocationException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *RecursiveInvocationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request payload exceeded the Invoke request body JSON input quota. For more
+// information, see [Lambda quotas].
+//
+// [Lambda quotas]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
+type RequestTooLargeException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *RequestTooLargeException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *RequestTooLargeException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *RequestTooLargeException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "RequestTooLargeException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *RequestTooLargeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The resource already exists, or another operation is in progress.
+type ResourceConflictException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ResourceConflictException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ResourceConflictException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ResourceConflictException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ResourceConflictException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ResourceConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The operation conflicts with the resource's availability. For example, you
+// tried to update an event source mapping in the CREATING state, or you tried to
+// delete an event source mapping currently UPDATING.
+type ResourceInUseException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ResourceInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ResourceInUseException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ResourceInUseException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ResourceInUseException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ResourceInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The resource specified in the request does not exist.
+type ResourceNotFoundException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ResourceNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ResourceNotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ResourceNotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ResourceNotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The function is inactive and its VPC connection is no longer available. Wait
+// for the VPC connection to reestablish and try again.
+type ResourceNotReadyException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ResourceNotReadyException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ResourceNotReadyException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ResourceNotReadyException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ResourceNotReadyException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ResourceNotReadyException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// The Lambda service encountered an internal error.
+type ServiceException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ServiceException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ServiceException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ServiceException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ServiceException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ServiceException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// The afterRestore()[runtime hook] encountered an error. For more information, check the Amazon
+// CloudWatch logs.
+//
+// [runtime hook]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-runtime-hooks.html
+type SnapStartException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *SnapStartException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *SnapStartException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *SnapStartException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "SnapStartException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *SnapStartException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Lambda is initializing your function. You can invoke the function when the [function state]
+// becomes Active .
+//
+// [function state]: https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html
+type SnapStartNotReadyException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *SnapStartNotReadyException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *SnapStartNotReadyException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *SnapStartNotReadyException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "SnapStartNotReadyException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *SnapStartNotReadyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Lambda couldn't restore the snapshot within the timeout limit.
+type SnapStartTimeoutException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *SnapStartTimeoutException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *SnapStartTimeoutException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *SnapStartTimeoutException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "SnapStartTimeoutException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *SnapStartTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// Lambda couldn't set up VPC access for the Lambda function because one or more
+// configured subnets has no available IP addresses.
+type SubnetIPAddressLimitReachedException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *SubnetIPAddressLimitReachedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *SubnetIPAddressLimitReachedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *SubnetIPAddressLimitReachedException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "SubnetIPAddressLimitReachedException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *SubnetIPAddressLimitReachedException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultServer
+}
+
+// The request throughput limit was exceeded. For more information, see [Lambda quotas].
+//
+// [Lambda quotas]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests
+type TooManyRequestsException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ RetryAfterSeconds *string
+ Type *string
+ Reason ThrottleReason
+
+ noSmithyDocumentSerde
+}
+
+func (e *TooManyRequestsException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *TooManyRequestsException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *TooManyRequestsException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "TooManyRequestsException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The content type of the Invoke request body is not JSON.
+type UnsupportedMediaTypeException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ Type *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *UnsupportedMediaTypeException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *UnsupportedMediaTypeException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *UnsupportedMediaTypeException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "UnsupportedMediaTypeException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *UnsupportedMediaTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/types.go
new file mode 100644
index 00000000..42d31fe8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/types.go
@@ -0,0 +1,1439 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ smithydocument "github.com/aws/smithy-go/document"
+ "time"
+)
+
+// Limits that are related to concurrency and storage. All file and storage sizes
+// are in bytes.
+type AccountLimit struct {
+
+ // The maximum size of a function's deployment package and layers when they're
+ // extracted.
+ CodeSizeUnzipped int64
+
+ // The maximum size of a deployment package when it's uploaded directly to Lambda.
+ // Use Amazon S3 for larger files.
+ CodeSizeZipped int64
+
+ // The maximum number of simultaneous function executions.
+ ConcurrentExecutions int32
+
+ // The amount of storage space that you can use for all deployment packages and
+ // layer archives.
+ TotalCodeSize int64
+
+ // The maximum number of simultaneous function executions, minus the capacity
+ // that's reserved for individual functions with PutFunctionConcurrency.
+ UnreservedConcurrentExecutions *int32
+
+ noSmithyDocumentSerde
+}
+
+// The number of functions and amount of storage in use.
+type AccountUsage struct {
+
+ // The number of Lambda functions.
+ FunctionCount int64
+
+ // The amount of storage space, in bytes, that's being used by deployment packages
+ // and layer archives.
+ TotalCodeSize int64
+
+ noSmithyDocumentSerde
+}
+
+// Provides configuration information about a Lambda function [alias].
+//
+// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
+type AliasConfiguration struct {
+
+ // The Amazon Resource Name (ARN) of the alias.
+ AliasArn *string
+
+ // A description of the alias.
+ Description *string
+
+ // The function version that the alias invokes.
+ FunctionVersion *string
+
+ // The name of the alias.
+ Name *string
+
+ // A unique identifier that changes when you update the alias.
+ RevisionId *string
+
+ // The [routing configuration] of the alias.
+ //
+ // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html
+ RoutingConfig *AliasRoutingConfiguration
+
+ noSmithyDocumentSerde
+}
+
+// The [traffic-shifting] configuration of a Lambda function alias.
+//
+// [traffic-shifting]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html
+type AliasRoutingConfiguration struct {
+
+ // The second version, and the percentage of traffic that's routed to it.
+ AdditionalVersionWeights map[string]float64
+
+ noSmithyDocumentSerde
+}
+
+// List of signing profiles that can sign a code package.
+type AllowedPublishers struct {
+
+ // The Amazon Resource Name (ARN) for each of the signing profiles. A signing
+ // profile defines a trusted user who can sign a code package.
+ //
+ // This member is required.
+ SigningProfileVersionArns []string
+
+ noSmithyDocumentSerde
+}
+
+// Specific configuration settings for an Amazon Managed Streaming for Apache
+// Kafka (Amazon MSK) event source.
+type AmazonManagedKafkaEventSourceConfig struct {
+
+ // The identifier for the Kafka consumer group to join. The consumer group ID must
+ // be unique among all your Kafka event sources. After creating a Kafka event
+ // source mapping with the consumer group ID specified, you cannot update this
+ // value. For more information, see [Customizable consumer group ID].
+ //
+ // [Customizable consumer group ID]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id
+ ConsumerGroupId *string
+
+ noSmithyDocumentSerde
+}
+
+// Details about a [Code signing configuration].
+//
+// [Code signing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html
+type CodeSigningConfig struct {
+
+ // List of allowed publishers.
+ //
+ // This member is required.
+ AllowedPublishers *AllowedPublishers
+
+ // The Amazon Resource Name (ARN) of the Code signing configuration.
+ //
+ // This member is required.
+ CodeSigningConfigArn *string
+
+ // Unique identifer for the Code signing configuration.
+ //
+ // This member is required.
+ CodeSigningConfigId *string
+
+ // The code signing policy controls the validation failure action for signature
+ // mismatch or expiry.
+ //
+ // This member is required.
+ CodeSigningPolicies *CodeSigningPolicies
+
+ // The date and time that the Code signing configuration was last modified, in
+ // ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // This member is required.
+ LastModified *string
+
+ // Code signing configuration description.
+ Description *string
+
+ noSmithyDocumentSerde
+}
+
+// Code signing configuration [policies] specify the validation failure action for signature
+// mismatch or expiry.
+//
+// [policies]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html#config-codesigning-policies
+type CodeSigningPolicies struct {
+
+ // Code signing configuration policy for deployment validation failure. If you set
+ // the policy to Enforce , Lambda blocks the deployment request if signature
+ // validation checks fail. If you set the policy to Warn , Lambda allows the
+ // deployment and creates a CloudWatch log.
+ //
+ // Default value: Warn
+ UntrustedArtifactOnDeployment CodeSigningPolicy
+
+ noSmithyDocumentSerde
+}
+
+type Concurrency struct {
+
+ // The number of concurrent executions that are reserved for this function. For
+ // more information, see [Managing Lambda reserved concurrency].
+ //
+ // [Managing Lambda reserved concurrency]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html
+ ReservedConcurrentExecutions *int32
+
+ noSmithyDocumentSerde
+}
+
+// The [cross-origin resource sharing (CORS)] settings for your Lambda function URL. Use CORS to grant access to your
+// function URL from any origin. You can also use CORS to control access for
+// specific HTTP headers and methods in requests to your function URL.
+//
+// [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
+type Cors struct {
+
+ // Whether to allow cookies or other credentials in requests to your function URL.
+ // The default is false .
+ AllowCredentials *bool
+
+ // The HTTP headers that origins can include in requests to your function URL. For
+ // example: Date , Keep-Alive , X-Custom-Header .
+ AllowHeaders []string
+
+ // The HTTP methods that are allowed when calling your function URL. For example:
+ // GET , POST , DELETE , or the wildcard character ( * ).
+ AllowMethods []string
+
+ // The origins that can access your function URL. You can list any number of
+ // specific origins, separated by a comma. For example: https://www.example.com ,
+ // http://localhost:60905 .
+ //
+ // Alternatively, you can grant access to all origins using the wildcard character
+ // ( * ).
+ AllowOrigins []string
+
+ // The HTTP headers in your function response that you want to expose to origins
+ // that call your function URL. For example: Date , Keep-Alive , X-Custom-Header .
+ ExposeHeaders []string
+
+ // The maximum amount of time, in seconds, that web browsers can cache results of
+ // a preflight request. By default, this is set to 0 , which means that the browser
+ // doesn't cache results.
+ MaxAge *int32
+
+ noSmithyDocumentSerde
+}
+
+// The [dead-letter queue] for failed asynchronous invocations.
+//
+// [dead-letter queue]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq
+type DeadLetterConfig struct {
+
+ // The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.
+ TargetArn *string
+
+ noSmithyDocumentSerde
+}
+
+// A configuration object that specifies the destination of an event after Lambda
+// processes it.
+type DestinationConfig struct {
+
+ // The destination configuration for failed invocations.
+ OnFailure *OnFailure
+
+ // The destination configuration for successful invocations.
+ OnSuccess *OnSuccess
+
+ noSmithyDocumentSerde
+}
+
+// Specific configuration settings for a DocumentDB event source.
+type DocumentDBEventSourceConfig struct {
+
+ // The name of the collection to consume within the database. If you do not
+ // specify a collection, Lambda consumes all collections.
+ CollectionName *string
+
+ // The name of the database to consume within the DocumentDB cluster.
+ DatabaseName *string
+
+ // Determines what DocumentDB sends to your event stream during document update
+ // operations. If set to UpdateLookup, DocumentDB sends a delta describing the
+ // changes, along with a copy of the entire document. Otherwise, DocumentDB sends
+ // only a partial document that contains the changes.
+ FullDocument FullDocument
+
+ noSmithyDocumentSerde
+}
+
+// A function's environment variable settings. You can use environment variables
+// to adjust your function's behavior without updating code. An environment
+// variable is a pair of strings that are stored in a function's version-specific
+// configuration.
+type Environment struct {
+
+ // Environment variable key-value pairs. For more information, see [Using Lambda environment variables].
+ //
+ // [Using Lambda environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
+ Variables map[string]string
+
+ noSmithyDocumentSerde
+}
+
+// Error messages for environment variables that couldn't be applied.
+type EnvironmentError struct {
+
+ // The error code.
+ ErrorCode *string
+
+ // The error message.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// The results of an operation to update or read environment variables. If the
+// operation succeeds, the response contains the environment variables. If it
+// fails, the response contains details about the error.
+type EnvironmentResponse struct {
+
+ // Error messages for environment variables that couldn't be applied.
+ Error *EnvironmentError
+
+ // Environment variable key-value pairs. Omitted from CloudTrail logs.
+ Variables map[string]string
+
+ noSmithyDocumentSerde
+}
+
+// The size of the function's /tmp directory in MB. The default value is 512, but
+// can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)].
+//
+// [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
+type EphemeralStorage struct {
+
+ // The size of the function's /tmp directory.
+ //
+ // This member is required.
+ Size *int32
+
+ noSmithyDocumentSerde
+}
+
+// A mapping between an Amazon Web Services resource and a Lambda function. For
+// details, see CreateEventSourceMapping.
+type EventSourceMappingConfiguration struct {
+
+ // Specific configuration settings for an Amazon Managed Streaming for Apache
+ // Kafka (Amazon MSK) event source.
+ AmazonManagedKafkaEventSourceConfig *AmazonManagedKafkaEventSourceConfig
+
+ // The maximum number of records in each batch that Lambda pulls from your stream
+ // or queue and sends to your function. Lambda passes all of the records in the
+ // batch to the function in a single call, up to the payload limit for synchronous
+ // invocation (6 MB).
+ //
+ // Default value: Varies by service. For Amazon SQS, the default is 10. For all
+ // other services, the default is 100.
+ //
+ // Related setting: When you set BatchSize to a value greater than 10, you must
+ // set MaximumBatchingWindowInSeconds to at least 1.
+ BatchSize *int32
+
+ // (Kinesis and DynamoDB Streams only) If the function returns an error, split the
+ // batch in two and retry. The default value is false.
+ BisectBatchOnFunctionError *bool
+
+ // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event
+ // sources only) A configuration object that specifies the destination of an event
+ // after Lambda processes it.
+ DestinationConfig *DestinationConfig
+
+ // Specific configuration settings for a DocumentDB event source.
+ DocumentDBEventSourceConfig *DocumentDBEventSourceConfig
+
+ // The Amazon Resource Name (ARN) of the event source.
+ EventSourceArn *string
+
+ // The Amazon Resource Name (ARN) of the event source mapping.
+ EventSourceMappingArn *string
+
+ // An object that defines the filter criteria that determine whether Lambda should
+ // process an event. For more information, see [Lambda event filtering].
+ //
+ // If filter criteria is encrypted, this field shows up as null in the response of
+ // ListEventSourceMapping API calls. You can view this field in plaintext in the
+ // response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have
+ // kms:Decrypt permissions for the correct KMS key.
+ //
+ // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html
+ FilterCriteria *FilterCriteria
+
+ // An object that contains details about an error related to filter criteria
+ // encryption.
+ FilterCriteriaError *FilterCriteriaError
+
+ // The ARN of the Lambda function.
+ FunctionArn *string
+
+ // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type
+ // enums applied to the event source mapping.
+ FunctionResponseTypes []FunctionResponseType
+
+ // The ARN of the Key Management Service (KMS) customer managed key that Lambda
+ // uses to encrypt your function's [filter criteria].
+ //
+ // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics
+ KMSKeyArn *string
+
+ // The date that the event source mapping was last updated or that its state
+ // changed.
+ LastModified *time.Time
+
+ // The result of the last Lambda invocation of your function.
+ LastProcessingResult *string
+
+ // The maximum amount of time, in seconds, that Lambda spends gathering records
+ // before invoking the function. You can configure MaximumBatchingWindowInSeconds
+ // to any value from 0 seconds to 300 seconds in increments of seconds.
+ //
+ // For streams and Amazon SQS event sources, the default batching window is 0
+ // seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB
+ // event sources, the default batching window is 500 ms. Note that because you can
+ // only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot
+ // revert back to the 500 ms default batching window after you have changed it. To
+ // restore the default batching window, you must create a new event source mapping.
+ //
+ // Related setting: For streams and Amazon SQS event sources, when you set
+ // BatchSize to a value greater than 10, you must set
+ // MaximumBatchingWindowInSeconds to at least 1.
+ MaximumBatchingWindowInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records older than the specified
+ // age. The default value is -1, which sets the maximum age to infinite. When the
+ // value is set to infinite, Lambda never discards old records.
+ //
+ // The minimum valid value for maximum record age is 60s. Although values less
+ // than 60 and greater than -1 fall within the parameter's absolute range, they are
+ // not allowed
+ MaximumRecordAgeInSeconds *int32
+
+ // (Kinesis and DynamoDB Streams only) Discard records after the specified number
+ // of retries. The default value is -1, which sets the maximum number of retries to
+ // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records
+ // until the record expires in the event source.
+ MaximumRetryAttempts *int32
+
+ // The metrics configuration for your event source. For more information, see [Event source mapping metrics].
+ //
+ // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics
+ MetricsConfig *EventSourceMappingMetricsConfig
+
+ // (Kinesis and DynamoDB Streams only) The number of batches to process
+ // concurrently from each shard. The default value is 1.
+ ParallelizationFactor *int32
+
+ // (Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode
+ // configuration for the event source. For more information, see [Provisioned Mode].
+ //
+ // [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode
+ ProvisionedPollerConfig *ProvisionedPollerConfig
+
+ // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
+ Queues []string
+
+ // (Amazon SQS only) The scaling configuration for the event source. For more
+ // information, see [Configuring maximum concurrency for Amazon SQS event sources].
+ //
+ // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency
+ ScalingConfig *ScalingConfig
+
+ // The self-managed Apache Kafka cluster for your event source.
+ SelfManagedEventSource *SelfManagedEventSource
+
+ // Specific configuration settings for a self-managed Apache Kafka event source.
+ SelfManagedKafkaEventSourceConfig *SelfManagedKafkaEventSourceConfig
+
+ // An array of the authentication protocol, VPC components, or virtual host to
+ // secure and define your event source.
+ SourceAccessConfigurations []SourceAccessConfiguration
+
+ // The position in a stream from which to start reading. Required for Amazon
+ // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported
+ // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed
+ // Apache Kafka.
+ StartingPosition EventSourcePosition
+
+ // With StartingPosition set to AT_TIMESTAMP , the time from which to start
+ // reading. StartingPositionTimestamp cannot be in the future.
+ StartingPositionTimestamp *time.Time
+
+ // The state of the event source mapping. It can be one of the following: Creating
+ // , Enabling , Enabled , Disabling , Disabled , Updating , or Deleting .
+ State *string
+
+ // Indicates whether a user or Lambda made the last change to the event source
+ // mapping.
+ StateTransitionReason *string
+
+ // The name of the Kafka topic.
+ Topics []string
+
+ // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing
+ // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds
+ // indicates no tumbling window.
+ TumblingWindowInSeconds *int32
+
+ // The identifier of the event source mapping.
+ UUID *string
+
+ noSmithyDocumentSerde
+}
+
+// The metrics configuration for your event source. Use this configuration object
+// to define which metrics you want your event source mapping to produce.
+type EventSourceMappingMetricsConfig struct {
+
+ // The metrics you want your event source mapping to produce. Include EventCount
+ // to receive event source mapping metrics related to the number of events
+ // processed by your event source mapping. For more information about these
+ // metrics, see [Event source mapping metrics].
+ //
+ // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics
+ Metrics []EventSourceMappingMetric
+
+ noSmithyDocumentSerde
+}
+
+// Details about the connection between a Lambda function and an [Amazon EFS file system].
+//
+// [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html
+type FileSystemConfig struct {
+
+ // The Amazon Resource Name (ARN) of the Amazon EFS access point that provides
+ // access to the file system.
+ //
+ // This member is required.
+ Arn *string
+
+ // The path where the function can access the file system, starting with /mnt/ .
+ //
+ // This member is required.
+ LocalMountPath *string
+
+ noSmithyDocumentSerde
+}
+
+// A structure within a FilterCriteria object that defines an event filtering
+//
+// pattern.
+type Filter struct {
+
+ // A filter pattern. For more information on the syntax of a filter pattern, see [Filter rule syntax]
+ // .
+ //
+ // [Filter rule syntax]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-syntax
+ Pattern *string
+
+ noSmithyDocumentSerde
+}
+
+// An object that contains the filters for an event source.
+type FilterCriteria struct {
+
+ // A list of filters.
+ Filters []Filter
+
+ noSmithyDocumentSerde
+}
+
+// An object that contains details about an error related to filter criteria
+// encryption.
+type FilterCriteriaError struct {
+
+ // The KMS exception that resulted from filter criteria encryption or decryption.
+ ErrorCode *string
+
+ // The error message.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// The code for the Lambda function. You can either specify an object in Amazon
+// S3, upload a .zip file archive deployment package directly, or specify the URI
+// of a container image.
+type FunctionCode struct {
+
+ // URI of a [container image] in the Amazon ECR registry.
+ //
+ // [container image]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html
+ ImageUri *string
+
+ // An Amazon S3 bucket in the same Amazon Web Services Region as your function.
+ // The bucket can be in a different Amazon Web Services account.
+ S3Bucket *string
+
+ // The Amazon S3 key of the deployment package.
+ S3Key *string
+
+ // For versioned objects, the version of the deployment package object to use.
+ S3ObjectVersion *string
+
+ // The ARN of the Key Management Service (KMS) customer managed key that's used to
+ // encrypt your function's .zip deployment package. If you don't provide a customer
+ // managed key, Lambda uses an [Amazon Web Services owned key].
+ //
+ // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+ SourceKMSKeyArn *string
+
+ // The base64-encoded contents of the deployment package. Amazon Web Services SDK
+ // and CLI clients handle the encoding for you.
+ ZipFile []byte
+
+ noSmithyDocumentSerde
+}
+
+// Details about a function's deployment package.
+type FunctionCodeLocation struct {
+
+ // URI of a container image in the Amazon ECR registry.
+ ImageUri *string
+
+ // A presigned URL that you can use to download the deployment package.
+ Location *string
+
+ // The service that's hosting the file.
+ RepositoryType *string
+
+ // The resolved URI for the image.
+ ResolvedImageUri *string
+
+ // The ARN of the Key Management Service (KMS) customer managed key that's used to
+ // encrypt your function's .zip deployment package. If you don't provide a customer
+ // managed key, Lambda uses an [Amazon Web Services owned key].
+ //
+ // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+ SourceKMSKeyArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Details about a function's configuration.
+type FunctionConfiguration struct {
+
+ // The instruction set architecture that the function supports. Architecture is a
+ // string array with one of the valid values. The default architecture value is
+ // x86_64 .
+ Architectures []Architecture
+
+ // The SHA256 hash of the function's deployment package.
+ CodeSha256 *string
+
+ // The size of the function's deployment package, in bytes.
+ CodeSize int64
+
+ // The function's dead letter queue.
+ DeadLetterConfig *DeadLetterConfig
+
+ // The function's description.
+ Description *string
+
+ // The function's [environment variables]. Omitted from CloudTrail logs.
+ //
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html
+ Environment *EnvironmentResponse
+
+ // The size of the function's /tmp directory in MB. The default value is 512, but
+ // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)].
+ //
+ // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage
+ EphemeralStorage *EphemeralStorage
+
+ // Connection settings for an [Amazon EFS file system].
+ //
+ // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html
+ FileSystemConfigs []FileSystemConfig
+
+ // The function's Amazon Resource Name (ARN).
+ FunctionArn *string
+
+ // The name of the function.
+ FunctionName *string
+
+ // The function that Lambda calls to begin running your function.
+ Handler *string
+
+ // The function's image configuration values.
+ ImageConfigResponse *ImageConfigResponse
+
+ // The ARN of the Key Management Service (KMS) customer managed key that's used to
+ // encrypt the following resources:
+ //
+ // - The function's [environment variables].
+ //
+ // - The function's [Lambda SnapStart]snapshots.
+ //
+ // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment
+ // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda].
+ //
+ // - The optimized version of the container image that's used for function
+ // invocations. Note that this is not the same key that's used to protect your
+ // container image in the Amazon Elastic Container Registry (Amazon ECR). For more
+ // information, see [Function lifecycle].
+ //
+ // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key].
+ //
+ // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+ // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption
+ // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html
+ // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption
+ // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle
+ // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+ KMSKeyArn *string
+
+ // The date and time that the function was last updated, in [ISO-8601 format]
+ // (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ LastModified *string
+
+ // The status of the last update that was performed on the function. This is first
+ // set to Successful after function creation completes.
+ LastUpdateStatus LastUpdateStatus
+
+ // The reason for the last update that was performed on the function.
+ LastUpdateStatusReason *string
+
+ // The reason code for the last update that was performed on the function.
+ LastUpdateStatusReasonCode LastUpdateStatusReasonCode
+
+ // The function's [layers].
+ //
+ // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+ Layers []Layer
+
+ // The function's Amazon CloudWatch Logs configuration settings.
+ LoggingConfig *LoggingConfig
+
+ // For Lambda@Edge functions, the ARN of the main function.
+ MasterArn *string
+
+ // The amount of memory available to the function at runtime.
+ MemorySize *int32
+
+ // The type of deployment package. Set to Image for container image and set Zip
+ // for .zip file archive.
+ PackageType PackageType
+
+ // The latest updated revision of the function or alias.
+ RevisionId *string
+
+ // The function's execution role.
+ Role *string
+
+ // The identifier of the function's [runtime]. Runtime is required if the deployment
+ // package is a .zip file archive. Specifying a runtime results in an error if
+ // you're deploying a function using a container image.
+ //
+ // The following list includes deprecated runtimes. Lambda blocks creating new
+ // functions and updating existing functions shortly after each runtime is
+ // deprecated. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ Runtime Runtime
+
+ // The ARN of the runtime and any errors that occured.
+ RuntimeVersionConfig *RuntimeVersionConfig
+
+ // The ARN of the signing job.
+ SigningJobArn *string
+
+ // The ARN of the signing profile version.
+ SigningProfileVersionArn *string
+
+ // Set ApplyOn to PublishedVersions to create a snapshot of the initialized
+ // execution environment when you publish a function version. For more information,
+ // see [Improving startup performance with Lambda SnapStart].
+ //
+ // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
+ SnapStart *SnapStartResponse
+
+ // The current state of the function. When the state is Inactive , you can
+ // reactivate the function by invoking it.
+ State State
+
+ // The reason for the function's current state.
+ StateReason *string
+
+ // The reason code for the function's current state. When the code is Creating ,
+ // you can't invoke or modify the function.
+ StateReasonCode StateReasonCode
+
+ // The amount of time in seconds that Lambda allows a function to run before
+ // stopping it.
+ Timeout *int32
+
+ // The function's X-Ray tracing configuration.
+ TracingConfig *TracingConfigResponse
+
+ // The version of the Lambda function.
+ Version *string
+
+ // The function's networking configuration.
+ VpcConfig *VpcConfigResponse
+
+ noSmithyDocumentSerde
+}
+
+type FunctionEventInvokeConfig struct {
+
+ // A destination for events after they have been sent to a function for processing.
+ //
+ // Destinations
+ //
+ // - Function - The Amazon Resource Name (ARN) of a Lambda function.
+ //
+ // - Queue - The ARN of a standard SQS queue.
+ //
+ // - Bucket - The ARN of an Amazon S3 bucket.
+ //
+ // - Topic - The ARN of a standard SNS topic.
+ //
+ // - Event Bus - The ARN of an Amazon EventBridge event bus.
+ //
+ // S3 buckets are supported only for on-failure destinations. To retain records of
+ // successful invocations, use another destination type.
+ DestinationConfig *DestinationConfig
+
+ // The Amazon Resource Name (ARN) of the function.
+ FunctionArn *string
+
+ // The date and time that the configuration was last updated.
+ LastModified *time.Time
+
+ // The maximum age of a request that Lambda sends to a function for processing.
+ MaximumEventAgeInSeconds *int32
+
+ // The maximum number of times to retry when the function returns an error.
+ MaximumRetryAttempts *int32
+
+ noSmithyDocumentSerde
+}
+
+// Details about a Lambda function URL.
+type FunctionUrlConfig struct {
+
+ // The type of authentication that your function URL uses. Set to AWS_IAM if you
+ // want to restrict access to authenticated users only. Set to NONE if you want to
+ // bypass IAM authentication to create a public endpoint. For more information, see
+ // [Security and auth model for Lambda function URLs].
+ //
+ // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html
+ //
+ // This member is required.
+ AuthType FunctionUrlAuthType
+
+ // When the function URL was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ //
+ // This member is required.
+ CreationTime *string
+
+ // The Amazon Resource Name (ARN) of your function.
+ //
+ // This member is required.
+ FunctionArn *string
+
+ // The HTTP URL endpoint for your function.
+ //
+ // This member is required.
+ FunctionUrl *string
+
+ // When the function URL configuration was last updated, in [ISO-8601 format]
+ // (YYYY-MM-DDThh:mm:ss.sTZD).
+ //
+ // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime
+ //
+ // This member is required.
+ LastModifiedTime *string
+
+ // The [cross-origin resource sharing (CORS)] settings for your function URL.
+ //
+ // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
+ Cors *Cors
+
+ // Use one of the following options:
+ //
+ // - BUFFERED – This is the default option. Lambda invokes your function using
+ // the Invoke API operation. Invocation results are available when the payload is
+ // complete. The maximum payload size is 6 MB.
+ //
+ // - RESPONSE_STREAM – Your function streams payload results as they become
+ // available. Lambda invokes your function using the InvokeWithResponseStream API
+ // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase].
+ //
+ // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html
+ InvokeMode InvokeMode
+
+ noSmithyDocumentSerde
+}
+
+// Configuration values that override the container image Dockerfile settings. For
+// more information, see [Container image settings].
+//
+// [Container image settings]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms
+type ImageConfig struct {
+
+ // Specifies parameters that you want to pass in with ENTRYPOINT.
+ Command []string
+
+ // Specifies the entry point to their application, which is typically the location
+ // of the runtime executable.
+ EntryPoint []string
+
+ // Specifies the working directory.
+ WorkingDirectory *string
+
+ noSmithyDocumentSerde
+}
+
+// Error response to GetFunctionConfiguration .
+type ImageConfigError struct {
+
+ // Error code.
+ ErrorCode *string
+
+ // Error message.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// Response to a GetFunctionConfiguration request.
+type ImageConfigResponse struct {
+
+ // Error response to GetFunctionConfiguration .
+ Error *ImageConfigError
+
+ // Configuration values that override the container image Dockerfile.
+ ImageConfig *ImageConfig
+
+ noSmithyDocumentSerde
+}
+
+// A chunk of the streamed response payload.
+type InvokeResponseStreamUpdate struct {
+
+ // Data returned by your Lambda function.
+ Payload []byte
+
+ noSmithyDocumentSerde
+}
+
+// A response confirming that the event stream is complete.
+type InvokeWithResponseStreamCompleteEvent struct {
+
+ // An error code.
+ ErrorCode *string
+
+ // The details of any returned error.
+ ErrorDetails *string
+
+ // The last 4 KB of the execution log, which is base64-encoded.
+ LogResult *string
+
+ noSmithyDocumentSerde
+}
+
+// An object that includes a chunk of the response payload. When the stream has
+// ended, Lambda includes a InvokeComplete object.
+//
+// The following types satisfy this interface:
+//
+// InvokeWithResponseStreamResponseEventMemberInvokeComplete
+// InvokeWithResponseStreamResponseEventMemberPayloadChunk
+type InvokeWithResponseStreamResponseEvent interface {
+ isInvokeWithResponseStreamResponseEvent()
+}
+
+// An object that's returned when the stream has ended and all the payload chunks
+// have been returned.
+type InvokeWithResponseStreamResponseEventMemberInvokeComplete struct {
+ Value InvokeWithResponseStreamCompleteEvent
+
+ noSmithyDocumentSerde
+}
+
+func (*InvokeWithResponseStreamResponseEventMemberInvokeComplete) isInvokeWithResponseStreamResponseEvent() {
+}
+
+// A chunk of the streamed response payload.
+type InvokeWithResponseStreamResponseEventMemberPayloadChunk struct {
+ Value InvokeResponseStreamUpdate
+
+ noSmithyDocumentSerde
+}
+
+func (*InvokeWithResponseStreamResponseEventMemberPayloadChunk) isInvokeWithResponseStreamResponseEvent() {
+}
+
+// An [Lambda layer].
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+type Layer struct {
+
+ // The Amazon Resource Name (ARN) of the function layer.
+ Arn *string
+
+ // The size of the layer archive in bytes.
+ CodeSize int64
+
+ // The Amazon Resource Name (ARN) of a signing job.
+ SigningJobArn *string
+
+ // The Amazon Resource Name (ARN) for a signing profile version.
+ SigningProfileVersionArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Details about an [Lambda layer].
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+type LayersListItem struct {
+
+ // The newest version of the layer.
+ LatestMatchingVersion *LayerVersionsListItem
+
+ // The Amazon Resource Name (ARN) of the function layer.
+ LayerArn *string
+
+ // The name of the layer.
+ LayerName *string
+
+ noSmithyDocumentSerde
+}
+
+// A ZIP archive that contains the contents of an [Lambda layer]. You can specify either an
+// Amazon S3 location, or upload a layer archive directly.
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+type LayerVersionContentInput struct {
+
+ // The Amazon S3 bucket of the layer archive.
+ S3Bucket *string
+
+ // The Amazon S3 key of the layer archive.
+ S3Key *string
+
+ // For versioned objects, the version of the layer archive object to use.
+ S3ObjectVersion *string
+
+ // The base64-encoded contents of the layer archive. Amazon Web Services SDK and
+ // Amazon Web Services CLI clients handle the encoding for you.
+ ZipFile []byte
+
+ noSmithyDocumentSerde
+}
+
+// Details about a version of an [Lambda layer].
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+type LayerVersionContentOutput struct {
+
+ // The SHA-256 hash of the layer archive.
+ CodeSha256 *string
+
+ // The size of the layer archive in bytes.
+ CodeSize int64
+
+ // A link to the layer archive in Amazon S3 that is valid for 10 minutes.
+ Location *string
+
+ // The Amazon Resource Name (ARN) of a signing job.
+ SigningJobArn *string
+
+ // The Amazon Resource Name (ARN) for a signing profile version.
+ SigningProfileVersionArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Details about a version of an [Lambda layer].
+//
+// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
+type LayerVersionsListItem struct {
+
+ // A list of compatible [instruction set architectures].
+ //
+ // [instruction set architectures]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html
+ CompatibleArchitectures []Architecture
+
+ // The layer's compatible runtimes.
+ //
+ // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation].
+ //
+ // For a list of all currently supported runtimes, see [Supported runtimes].
+ //
+ // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels
+ // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
+ CompatibleRuntimes []Runtime
+
+ // The date that the version was created, in ISO 8601 format. For example,
+ // 2018-11-27T15:10:45.123+0000 .
+ CreatedDate *string
+
+ // The description of the version.
+ Description *string
+
+ // The ARN of the layer version.
+ LayerVersionArn *string
+
+ // The layer's open-source license.
+ LicenseInfo *string
+
+ // The version number.
+ Version int64
+
+ noSmithyDocumentSerde
+}
+
+// The function's Amazon CloudWatch Logs configuration settings.
+type LoggingConfig struct {
+
+ // Set this property to filter the application logs for your function that Lambda
+ // sends to CloudWatch. Lambda only sends application logs at the selected level of
+ // detail and lower, where TRACE is the highest level and FATAL is the lowest.
+ ApplicationLogLevel ApplicationLogLevel
+
+ // The format in which Lambda sends your function's application and system logs to
+ // CloudWatch. Select between plain text and structured JSON.
+ LogFormat LogFormat
+
+ // The name of the Amazon CloudWatch log group the function sends logs to. By
+ // default, Lambda functions send logs to a default log group named /aws/lambda/ .
+ // To use a different log group, enter an existing log group or enter a new log
+ // group name.
+ LogGroup *string
+
+ // Set this property to filter the system logs for your function that Lambda sends
+ // to CloudWatch. Lambda only sends system logs at the selected level of detail and
+ // lower, where DEBUG is the highest level and WARN is the lowest.
+ SystemLogLevel SystemLogLevel
+
+ noSmithyDocumentSerde
+}
+
+// A destination for events that failed processing.
+type OnFailure struct {
+
+ // The Amazon Resource Name (ARN) of the destination resource.
+ //
+ // To retain records of unsuccessful [asynchronous invocations], you can configure an Amazon SNS topic,
+ // Amazon SQS queue, Amazon S3 bucket, Lambda function, or Amazon EventBridge event
+ // bus as the destination.
+ //
+ // To retain records of failed invocations from [Kinesis], [DynamoDB], [self-managed Kafka] or [Amazon MSK], you can configure an
+ // Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.
+ //
+ // [Amazon MSK]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-onfailure-destination
+ // [Kinesis]: https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html
+ // [asynchronous invocations]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations
+ // [DynamoDB]: https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html
+ // [self-managed Kafka]: https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-onfailure-destination
+ Destination *string
+
+ noSmithyDocumentSerde
+}
+
+// A destination for events that were processed successfully.
+//
+// To retain records of successful [asynchronous invocations], you can configure an Amazon SNS topic, Amazon
+// SQS queue, Lambda function, or Amazon EventBridge event bus as the destination.
+//
+// [asynchronous invocations]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations
+type OnSuccess struct {
+
+ // The Amazon Resource Name (ARN) of the destination resource.
+ Destination *string
+
+ noSmithyDocumentSerde
+}
+
+// Details about the provisioned concurrency configuration for a function alias or
+// version.
+type ProvisionedConcurrencyConfigListItem struct {
+
+ // The amount of provisioned concurrency allocated. When a weighted alias is used
+ // during linear and canary deployments, this value fluctuates depending on the
+ // amount of concurrency that is provisioned for the function versions.
+ AllocatedProvisionedConcurrentExecutions *int32
+
+ // The amount of provisioned concurrency available.
+ AvailableProvisionedConcurrentExecutions *int32
+
+ // The Amazon Resource Name (ARN) of the alias or version.
+ FunctionArn *string
+
+ // The date and time that a user last updated the configuration, in [ISO 8601 format].
+ //
+ // [ISO 8601 format]: https://www.iso.org/iso-8601-date-and-time-format.html
+ LastModified *string
+
+ // The amount of provisioned concurrency requested.
+ RequestedProvisionedConcurrentExecutions *int32
+
+ // The status of the allocation process.
+ Status ProvisionedConcurrencyStatusEnum
+
+ // For failed allocations, the reason that provisioned concurrency could not be
+ // allocated.
+ StatusReason *string
+
+ noSmithyDocumentSerde
+}
+
+// The [Provisioned Mode] configuration for the event source. Use Provisioned Mode to customize the
+// minimum and maximum number of event pollers for your event source. An event
+// poller is a compute unit that provides approximately 5 MBps of throughput.
+//
+// [Provisioned Mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode
+type ProvisionedPollerConfig struct {
+
+ // The maximum number of event pollers this event source can scale up to.
+ MaximumPollers *int32
+
+ // The minimum number of event pollers this event source can scale down to.
+ MinimumPollers *int32
+
+ noSmithyDocumentSerde
+}
+
+// The ARN of the runtime and any errors that occured.
+type RuntimeVersionConfig struct {
+
+ // Error response when Lambda is unable to retrieve the runtime version for a
+ // function.
+ Error *RuntimeVersionError
+
+ // The ARN of the runtime version you want the function to use.
+ RuntimeVersionArn *string
+
+ noSmithyDocumentSerde
+}
+
+// Any error returned when the runtime version information for the function could
+// not be retrieved.
+type RuntimeVersionError struct {
+
+ // The error code.
+ ErrorCode *string
+
+ // The error message.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// (Amazon SQS only) The scaling configuration for the event source. To remove the
+// configuration, pass an empty value.
+type ScalingConfig struct {
+
+ // Limits the number of concurrent instances that the Amazon SQS event source can
+ // invoke.
+ MaximumConcurrency *int32
+
+ noSmithyDocumentSerde
+}
+
+// The self-managed Apache Kafka cluster for your event source.
+type SelfManagedEventSource struct {
+
+ // The list of bootstrap servers for your Kafka brokers in the following format:
+ // "KAFKA_BOOTSTRAP_SERVERS": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"] .
+ Endpoints map[string][]string
+
+ noSmithyDocumentSerde
+}
+
+// Specific configuration settings for a self-managed Apache Kafka event source.
+type SelfManagedKafkaEventSourceConfig struct {
+
+ // The identifier for the Kafka consumer group to join. The consumer group ID must
+ // be unique among all your Kafka event sources. After creating a Kafka event
+ // source mapping with the consumer group ID specified, you cannot update this
+ // value. For more information, see [Customizable consumer group ID].
+ //
+ // [Customizable consumer group ID]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id
+ ConsumerGroupId *string
+
+ noSmithyDocumentSerde
+}
+
+// The function's [Lambda SnapStart] setting. Set ApplyOn to PublishedVersions to create a snapshot
+// of the initialized execution environment when you publish a function version.
+//
+// [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
+type SnapStart struct {
+
+ // Set to PublishedVersions to create a snapshot of the initialized execution
+ // environment when you publish a function version.
+ ApplyOn SnapStartApplyOn
+
+ noSmithyDocumentSerde
+}
+
+// The function's [SnapStart] setting.
+//
+// [SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
+type SnapStartResponse struct {
+
+ // When set to PublishedVersions , Lambda creates a snapshot of the execution
+ // environment when you publish a function version.
+ ApplyOn SnapStartApplyOn
+
+ // When you provide a [qualified Amazon Resource Name (ARN)], this response element indicates whether SnapStart is
+ // activated for the specified function version.
+ //
+ // [qualified Amazon Resource Name (ARN)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html#versioning-versions-using
+ OptimizationStatus SnapStartOptimizationStatus
+
+ noSmithyDocumentSerde
+}
+
+// To secure and define access to your event source, you can specify the
+// authentication protocol, VPC components, or virtual host.
+type SourceAccessConfiguration struct {
+
+ // The type of authentication protocol, VPC components, or virtual host for your
+ // event source. For example: "Type":"SASL_SCRAM_512_AUTH" .
+ //
+ // - BASIC_AUTH – (Amazon MQ) The Secrets Manager secret that stores your broker
+ // credentials.
+ //
+ // - BASIC_AUTH – (Self-managed Apache Kafka) The Secrets Manager ARN of your
+ // secret key used for SASL/PLAIN authentication of your Apache Kafka brokers.
+ //
+ // - VPC_SUBNET – (Self-managed Apache Kafka) The subnets associated with your
+ // VPC. Lambda connects to these subnets to fetch data from your self-managed
+ // Apache Kafka cluster.
+ //
+ // - VPC_SECURITY_GROUP – (Self-managed Apache Kafka) The VPC security group used
+ // to manage access to your self-managed Apache Kafka brokers.
+ //
+ // - SASL_SCRAM_256_AUTH – (Self-managed Apache Kafka) The Secrets Manager ARN of
+ // your secret key used for SASL SCRAM-256 authentication of your self-managed
+ // Apache Kafka brokers.
+ //
+ // - SASL_SCRAM_512_AUTH – (Amazon MSK, Self-managed Apache Kafka) The Secrets
+ // Manager ARN of your secret key used for SASL SCRAM-512 authentication of your
+ // self-managed Apache Kafka brokers.
+ //
+ // - VIRTUAL_HOST –- (RabbitMQ) The name of the virtual host in your RabbitMQ
+ // broker. Lambda uses this RabbitMQ host as the event source. This property cannot
+ // be specified in an UpdateEventSourceMapping API call.
+ //
+ // - CLIENT_CERTIFICATE_TLS_AUTH – (Amazon MSK, self-managed Apache Kafka) The
+ // Secrets Manager ARN of your secret key containing the certificate chain (X.509
+ // PEM), private key (PKCS#8 PEM), and private key password (optional) used for
+ // mutual TLS authentication of your MSK/Apache Kafka brokers.
+ //
+ // - SERVER_ROOT_CA_CERTIFICATE – (Self-managed Apache Kafka) The Secrets Manager
+ // ARN of your secret key containing the root CA certificate (X.509 PEM) used for
+ // TLS encryption of your Apache Kafka brokers.
+ Type SourceAccessType
+
+ // The value for your chosen configuration in Type . For example: "URI":
+ // "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName" .
+ URI *string
+
+ noSmithyDocumentSerde
+}
+
+// An object that contains details about an error related to retrieving tags.
+type TagsError struct {
+
+ // The error code.
+ //
+ // This member is required.
+ ErrorCode *string
+
+ // The error message.
+ //
+ // This member is required.
+ Message *string
+
+ noSmithyDocumentSerde
+}
+
+// The function's [X-Ray] tracing configuration. To sample and record incoming requests,
+// set Mode to Active .
+//
+// [X-Ray]: https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html
+type TracingConfig struct {
+
+ // The tracing mode.
+ Mode TracingMode
+
+ noSmithyDocumentSerde
+}
+
+// The function's X-Ray tracing configuration.
+type TracingConfigResponse struct {
+
+ // The tracing mode.
+ Mode TracingMode
+
+ noSmithyDocumentSerde
+}
+
+// The VPC security groups and subnets that are attached to a Lambda function. For
+// more information, see [Configuring a Lambda function to access resources in a VPC].
+//
+// [Configuring a Lambda function to access resources in a VPC]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
+type VpcConfig struct {
+
+ // Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack
+ // subnets.
+ Ipv6AllowedForDualStack *bool
+
+ // A list of VPC security group IDs.
+ SecurityGroupIds []string
+
+ // A list of VPC subnet IDs.
+ SubnetIds []string
+
+ noSmithyDocumentSerde
+}
+
+// The VPC security groups and subnets that are attached to a Lambda function.
+type VpcConfigResponse struct {
+
+ // Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack
+ // subnets.
+ Ipv6AllowedForDualStack *bool
+
+ // A list of VPC security group IDs.
+ SecurityGroupIds []string
+
+ // A list of VPC subnet IDs.
+ SubnetIds []string
+
+ // The ID of the VPC.
+ VpcId *string
+
+ noSmithyDocumentSerde
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
+
+// UnknownUnionMember is returned when a union member is returned over the wire,
+// but has an unknown tag.
+type UnknownUnionMember struct {
+ Tag string
+ Value []byte
+
+ noSmithyDocumentSerde
+}
+
+func (*UnknownUnionMember) isInvokeWithResponseStreamResponseEvent() {}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/validators.go
new file mode 100644
index 00000000..c4c103d7
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/validators.go
@@ -0,0 +1,2661 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package lambda
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/service/lambda/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type validateOpAddLayerVersionPermission struct {
+}
+
+func (*validateOpAddLayerVersionPermission) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpAddLayerVersionPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*AddLayerVersionPermissionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpAddLayerVersionPermissionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpAddPermission struct {
+}
+
+func (*validateOpAddPermission) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpAddPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*AddPermissionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpAddPermissionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateAlias struct {
+}
+
+func (*validateOpCreateAlias) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateAliasInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateAliasInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateCodeSigningConfig struct {
+}
+
+func (*validateOpCreateCodeSigningConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateCodeSigningConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateCodeSigningConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateEventSourceMapping struct {
+}
+
+func (*validateOpCreateEventSourceMapping) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateEventSourceMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateEventSourceMappingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateEventSourceMappingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateFunction struct {
+}
+
+func (*validateOpCreateFunction) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateFunctionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateFunctionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateFunctionUrlConfig struct {
+}
+
+func (*validateOpCreateFunctionUrlConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateFunctionUrlConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateFunctionUrlConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteAlias struct {
+}
+
+func (*validateOpDeleteAlias) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteAliasInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteAliasInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteCodeSigningConfig struct {
+}
+
+func (*validateOpDeleteCodeSigningConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteCodeSigningConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteCodeSigningConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteEventSourceMapping struct {
+}
+
+func (*validateOpDeleteEventSourceMapping) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteEventSourceMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteEventSourceMappingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteEventSourceMappingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteFunctionCodeSigningConfig struct {
+}
+
+func (*validateOpDeleteFunctionCodeSigningConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteFunctionCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteFunctionCodeSigningConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteFunctionCodeSigningConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteFunctionConcurrency struct {
+}
+
+func (*validateOpDeleteFunctionConcurrency) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteFunctionConcurrency) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteFunctionConcurrencyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteFunctionConcurrencyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteFunctionEventInvokeConfig struct {
+}
+
+func (*validateOpDeleteFunctionEventInvokeConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteFunctionEventInvokeConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteFunctionEventInvokeConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteFunctionEventInvokeConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteFunction struct {
+}
+
+func (*validateOpDeleteFunction) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteFunctionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteFunctionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteFunctionUrlConfig struct {
+}
+
+func (*validateOpDeleteFunctionUrlConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteFunctionUrlConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteFunctionUrlConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteLayerVersion struct {
+}
+
+func (*validateOpDeleteLayerVersion) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteLayerVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteLayerVersionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteLayerVersionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteProvisionedConcurrencyConfig struct {
+}
+
+func (*validateOpDeleteProvisionedConcurrencyConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteProvisionedConcurrencyConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteProvisionedConcurrencyConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteProvisionedConcurrencyConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetAlias struct {
+}
+
+func (*validateOpGetAlias) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetAliasInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetAliasInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetCodeSigningConfig struct {
+}
+
+func (*validateOpGetCodeSigningConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetCodeSigningConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetCodeSigningConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetEventSourceMapping struct {
+}
+
+func (*validateOpGetEventSourceMapping) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetEventSourceMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetEventSourceMappingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetEventSourceMappingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetFunctionCodeSigningConfig struct {
+}
+
+func (*validateOpGetFunctionCodeSigningConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetFunctionCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetFunctionCodeSigningConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetFunctionCodeSigningConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetFunctionConcurrency struct {
+}
+
+func (*validateOpGetFunctionConcurrency) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetFunctionConcurrency) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetFunctionConcurrencyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetFunctionConcurrencyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetFunctionConfiguration struct {
+}
+
+func (*validateOpGetFunctionConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetFunctionConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetFunctionConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetFunctionConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetFunctionEventInvokeConfig struct {
+}
+
+func (*validateOpGetFunctionEventInvokeConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetFunctionEventInvokeConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetFunctionEventInvokeConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetFunctionEventInvokeConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetFunction struct {
+}
+
+func (*validateOpGetFunction) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetFunctionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetFunctionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetFunctionRecursionConfig struct {
+}
+
+func (*validateOpGetFunctionRecursionConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetFunctionRecursionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetFunctionRecursionConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetFunctionRecursionConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetFunctionUrlConfig struct {
+}
+
+func (*validateOpGetFunctionUrlConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetFunctionUrlConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetFunctionUrlConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetLayerVersionByArn struct {
+}
+
+func (*validateOpGetLayerVersionByArn) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetLayerVersionByArn) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetLayerVersionByArnInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetLayerVersionByArnInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetLayerVersion struct {
+}
+
+func (*validateOpGetLayerVersion) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetLayerVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetLayerVersionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetLayerVersionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetLayerVersionPolicy struct {
+}
+
+func (*validateOpGetLayerVersionPolicy) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetLayerVersionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetLayerVersionPolicyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetLayerVersionPolicyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetPolicy struct {
+}
+
+func (*validateOpGetPolicy) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetPolicyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetPolicyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetProvisionedConcurrencyConfig struct {
+}
+
+func (*validateOpGetProvisionedConcurrencyConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetProvisionedConcurrencyConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetProvisionedConcurrencyConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetProvisionedConcurrencyConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetRuntimeManagementConfig struct {
+}
+
+func (*validateOpGetRuntimeManagementConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetRuntimeManagementConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetRuntimeManagementConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetRuntimeManagementConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpInvokeAsync struct {
+}
+
+func (*validateOpInvokeAsync) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpInvokeAsync) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*InvokeAsyncInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpInvokeAsyncInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpInvoke struct {
+}
+
+func (*validateOpInvoke) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpInvoke) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*InvokeInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpInvokeInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpInvokeWithResponseStream struct {
+}
+
+func (*validateOpInvokeWithResponseStream) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpInvokeWithResponseStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*InvokeWithResponseStreamInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpInvokeWithResponseStreamInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListAliases struct {
+}
+
+func (*validateOpListAliases) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListAliases) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListAliasesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListAliasesInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListFunctionEventInvokeConfigs struct {
+}
+
+func (*validateOpListFunctionEventInvokeConfigs) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListFunctionEventInvokeConfigs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListFunctionEventInvokeConfigsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListFunctionEventInvokeConfigsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListFunctionsByCodeSigningConfig struct {
+}
+
+func (*validateOpListFunctionsByCodeSigningConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListFunctionsByCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListFunctionsByCodeSigningConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListFunctionsByCodeSigningConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListFunctionUrlConfigs struct {
+}
+
+func (*validateOpListFunctionUrlConfigs) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListFunctionUrlConfigs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListFunctionUrlConfigsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListFunctionUrlConfigsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListLayerVersions struct {
+}
+
+func (*validateOpListLayerVersions) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListLayerVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListLayerVersionsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListLayerVersionsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListProvisionedConcurrencyConfigs struct {
+}
+
+func (*validateOpListProvisionedConcurrencyConfigs) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListProvisionedConcurrencyConfigs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListProvisionedConcurrencyConfigsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListProvisionedConcurrencyConfigsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListTags struct {
+}
+
+func (*validateOpListTags) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListTagsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListTagsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListVersionsByFunction struct {
+}
+
+func (*validateOpListVersionsByFunction) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListVersionsByFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListVersionsByFunctionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListVersionsByFunctionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPublishLayerVersion struct {
+}
+
+func (*validateOpPublishLayerVersion) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPublishLayerVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PublishLayerVersionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPublishLayerVersionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPublishVersion struct {
+}
+
+func (*validateOpPublishVersion) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPublishVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PublishVersionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPublishVersionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutFunctionCodeSigningConfig struct {
+}
+
+func (*validateOpPutFunctionCodeSigningConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutFunctionCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutFunctionCodeSigningConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutFunctionCodeSigningConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutFunctionConcurrency struct {
+}
+
+func (*validateOpPutFunctionConcurrency) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutFunctionConcurrency) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutFunctionConcurrencyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutFunctionConcurrencyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutFunctionEventInvokeConfig struct {
+}
+
+func (*validateOpPutFunctionEventInvokeConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutFunctionEventInvokeConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutFunctionEventInvokeConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutFunctionEventInvokeConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutFunctionRecursionConfig struct {
+}
+
+func (*validateOpPutFunctionRecursionConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutFunctionRecursionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutFunctionRecursionConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutFunctionRecursionConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutProvisionedConcurrencyConfig struct {
+}
+
+func (*validateOpPutProvisionedConcurrencyConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutProvisionedConcurrencyConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutProvisionedConcurrencyConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutProvisionedConcurrencyConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutRuntimeManagementConfig struct {
+}
+
+func (*validateOpPutRuntimeManagementConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutRuntimeManagementConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutRuntimeManagementConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutRuntimeManagementConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpRemoveLayerVersionPermission struct {
+}
+
+func (*validateOpRemoveLayerVersionPermission) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpRemoveLayerVersionPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*RemoveLayerVersionPermissionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpRemoveLayerVersionPermissionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpRemovePermission struct {
+}
+
+func (*validateOpRemovePermission) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpRemovePermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*RemovePermissionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpRemovePermissionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpTagResource struct {
+}
+
+func (*validateOpTagResource) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*TagResourceInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpTagResourceInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUntagResource struct {
+}
+
+func (*validateOpUntagResource) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UntagResourceInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUntagResourceInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdateAlias struct {
+}
+
+func (*validateOpUpdateAlias) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdateAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdateAliasInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdateAliasInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdateCodeSigningConfig struct {
+}
+
+func (*validateOpUpdateCodeSigningConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdateCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdateCodeSigningConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdateCodeSigningConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdateEventSourceMapping struct {
+}
+
+func (*validateOpUpdateEventSourceMapping) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdateEventSourceMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdateEventSourceMappingInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdateEventSourceMappingInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdateFunctionCode struct {
+}
+
+func (*validateOpUpdateFunctionCode) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdateFunctionCode) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdateFunctionCodeInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdateFunctionCodeInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdateFunctionConfiguration struct {
+}
+
+func (*validateOpUpdateFunctionConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdateFunctionConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdateFunctionConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdateFunctionConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdateFunctionEventInvokeConfig struct {
+}
+
+func (*validateOpUpdateFunctionEventInvokeConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdateFunctionEventInvokeConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdateFunctionEventInvokeConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdateFunctionEventInvokeConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdateFunctionUrlConfig struct {
+}
+
+func (*validateOpUpdateFunctionUrlConfig) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdateFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdateFunctionUrlConfigInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdateFunctionUrlConfigInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+func addOpAddLayerVersionPermissionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpAddLayerVersionPermission{}, middleware.After)
+}
+
+func addOpAddPermissionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpAddPermission{}, middleware.After)
+}
+
+func addOpCreateAliasValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateAlias{}, middleware.After)
+}
+
+func addOpCreateCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateCodeSigningConfig{}, middleware.After)
+}
+
+func addOpCreateEventSourceMappingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateEventSourceMapping{}, middleware.After)
+}
+
+func addOpCreateFunctionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateFunction{}, middleware.After)
+}
+
+func addOpCreateFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateFunctionUrlConfig{}, middleware.After)
+}
+
+func addOpDeleteAliasValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteAlias{}, middleware.After)
+}
+
+func addOpDeleteCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteCodeSigningConfig{}, middleware.After)
+}
+
+func addOpDeleteEventSourceMappingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteEventSourceMapping{}, middleware.After)
+}
+
+func addOpDeleteFunctionCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteFunctionCodeSigningConfig{}, middleware.After)
+}
+
+func addOpDeleteFunctionConcurrencyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteFunctionConcurrency{}, middleware.After)
+}
+
+func addOpDeleteFunctionEventInvokeConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteFunctionEventInvokeConfig{}, middleware.After)
+}
+
+func addOpDeleteFunctionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteFunction{}, middleware.After)
+}
+
+func addOpDeleteFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteFunctionUrlConfig{}, middleware.After)
+}
+
+func addOpDeleteLayerVersionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteLayerVersion{}, middleware.After)
+}
+
+func addOpDeleteProvisionedConcurrencyConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteProvisionedConcurrencyConfig{}, middleware.After)
+}
+
+func addOpGetAliasValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetAlias{}, middleware.After)
+}
+
+func addOpGetCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetCodeSigningConfig{}, middleware.After)
+}
+
+func addOpGetEventSourceMappingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetEventSourceMapping{}, middleware.After)
+}
+
+func addOpGetFunctionCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetFunctionCodeSigningConfig{}, middleware.After)
+}
+
+func addOpGetFunctionConcurrencyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetFunctionConcurrency{}, middleware.After)
+}
+
+func addOpGetFunctionConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetFunctionConfiguration{}, middleware.After)
+}
+
+func addOpGetFunctionEventInvokeConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetFunctionEventInvokeConfig{}, middleware.After)
+}
+
+func addOpGetFunctionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetFunction{}, middleware.After)
+}
+
+func addOpGetFunctionRecursionConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetFunctionRecursionConfig{}, middleware.After)
+}
+
+func addOpGetFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetFunctionUrlConfig{}, middleware.After)
+}
+
+func addOpGetLayerVersionByArnValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetLayerVersionByArn{}, middleware.After)
+}
+
+func addOpGetLayerVersionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetLayerVersion{}, middleware.After)
+}
+
+func addOpGetLayerVersionPolicyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetLayerVersionPolicy{}, middleware.After)
+}
+
+func addOpGetPolicyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetPolicy{}, middleware.After)
+}
+
+func addOpGetProvisionedConcurrencyConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetProvisionedConcurrencyConfig{}, middleware.After)
+}
+
+func addOpGetRuntimeManagementConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetRuntimeManagementConfig{}, middleware.After)
+}
+
+func addOpInvokeAsyncValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpInvokeAsync{}, middleware.After)
+}
+
+func addOpInvokeValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpInvoke{}, middleware.After)
+}
+
+func addOpInvokeWithResponseStreamValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpInvokeWithResponseStream{}, middleware.After)
+}
+
+func addOpListAliasesValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListAliases{}, middleware.After)
+}
+
+func addOpListFunctionEventInvokeConfigsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListFunctionEventInvokeConfigs{}, middleware.After)
+}
+
+func addOpListFunctionsByCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListFunctionsByCodeSigningConfig{}, middleware.After)
+}
+
+func addOpListFunctionUrlConfigsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListFunctionUrlConfigs{}, middleware.After)
+}
+
+func addOpListLayerVersionsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListLayerVersions{}, middleware.After)
+}
+
+func addOpListProvisionedConcurrencyConfigsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListProvisionedConcurrencyConfigs{}, middleware.After)
+}
+
+func addOpListTagsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListTags{}, middleware.After)
+}
+
+func addOpListVersionsByFunctionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListVersionsByFunction{}, middleware.After)
+}
+
+func addOpPublishLayerVersionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPublishLayerVersion{}, middleware.After)
+}
+
+func addOpPublishVersionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPublishVersion{}, middleware.After)
+}
+
+func addOpPutFunctionCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutFunctionCodeSigningConfig{}, middleware.After)
+}
+
+func addOpPutFunctionConcurrencyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutFunctionConcurrency{}, middleware.After)
+}
+
+func addOpPutFunctionEventInvokeConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutFunctionEventInvokeConfig{}, middleware.After)
+}
+
+func addOpPutFunctionRecursionConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutFunctionRecursionConfig{}, middleware.After)
+}
+
+func addOpPutProvisionedConcurrencyConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutProvisionedConcurrencyConfig{}, middleware.After)
+}
+
+func addOpPutRuntimeManagementConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutRuntimeManagementConfig{}, middleware.After)
+}
+
+func addOpRemoveLayerVersionPermissionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpRemoveLayerVersionPermission{}, middleware.After)
+}
+
+func addOpRemovePermissionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpRemovePermission{}, middleware.After)
+}
+
+func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpTagResource{}, middleware.After)
+}
+
+func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After)
+}
+
+func addOpUpdateAliasValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdateAlias{}, middleware.After)
+}
+
+func addOpUpdateCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdateCodeSigningConfig{}, middleware.After)
+}
+
+func addOpUpdateEventSourceMappingValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdateEventSourceMapping{}, middleware.After)
+}
+
+func addOpUpdateFunctionCodeValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdateFunctionCode{}, middleware.After)
+}
+
+func addOpUpdateFunctionConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdateFunctionConfiguration{}, middleware.After)
+}
+
+func addOpUpdateFunctionEventInvokeConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdateFunctionEventInvokeConfig{}, middleware.After)
+}
+
+func addOpUpdateFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdateFunctionUrlConfig{}, middleware.After)
+}
+
+func validateAllowedPublishers(v *types.AllowedPublishers) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AllowedPublishers"}
+ if v.SigningProfileVersionArns == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("SigningProfileVersionArns"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateEphemeralStorage(v *types.EphemeralStorage) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "EphemeralStorage"}
+ if v.Size == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Size"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateFileSystemConfig(v *types.FileSystemConfig) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "FileSystemConfig"}
+ if v.Arn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Arn"))
+ }
+ if v.LocalMountPath == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LocalMountPath"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateFileSystemConfigList(v []types.FileSystemConfig) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "FileSystemConfigList"}
+ for i := range v {
+ if err := validateFileSystemConfig(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpAddLayerVersionPermissionInput(v *AddLayerVersionPermissionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AddLayerVersionPermissionInput"}
+ if v.LayerName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LayerName"))
+ }
+ if v.VersionNumber == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("VersionNumber"))
+ }
+ if v.StatementId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("StatementId"))
+ }
+ if v.Action == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Action"))
+ }
+ if v.Principal == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Principal"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpAddPermissionInput(v *AddPermissionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AddPermissionInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.StatementId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("StatementId"))
+ }
+ if v.Action == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Action"))
+ }
+ if v.Principal == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Principal"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateAliasInput(v *CreateAliasInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateAliasInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.Name == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Name"))
+ }
+ if v.FunctionVersion == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionVersion"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateCodeSigningConfigInput(v *CreateCodeSigningConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateCodeSigningConfigInput"}
+ if v.AllowedPublishers == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AllowedPublishers"))
+ } else if v.AllowedPublishers != nil {
+ if err := validateAllowedPublishers(v.AllowedPublishers); err != nil {
+ invalidParams.AddNested("AllowedPublishers", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateEventSourceMappingInput(v *CreateEventSourceMappingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateEventSourceMappingInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateFunctionInput(v *CreateFunctionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateFunctionInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.Role == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Role"))
+ }
+ if v.Code == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Code"))
+ }
+ if v.FileSystemConfigs != nil {
+ if err := validateFileSystemConfigList(v.FileSystemConfigs); err != nil {
+ invalidParams.AddNested("FileSystemConfigs", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.EphemeralStorage != nil {
+ if err := validateEphemeralStorage(v.EphemeralStorage); err != nil {
+ invalidParams.AddNested("EphemeralStorage", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateFunctionUrlConfigInput(v *CreateFunctionUrlConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateFunctionUrlConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if len(v.AuthType) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("AuthType"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteAliasInput(v *DeleteAliasInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteAliasInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.Name == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Name"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteCodeSigningConfigInput(v *DeleteCodeSigningConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteCodeSigningConfigInput"}
+ if v.CodeSigningConfigArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CodeSigningConfigArn"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteEventSourceMappingInput(v *DeleteEventSourceMappingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteEventSourceMappingInput"}
+ if v.UUID == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("UUID"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteFunctionCodeSigningConfigInput(v *DeleteFunctionCodeSigningConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionCodeSigningConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteFunctionConcurrencyInput(v *DeleteFunctionConcurrencyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionConcurrencyInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteFunctionEventInvokeConfigInput(v *DeleteFunctionEventInvokeConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionEventInvokeConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteFunctionInput(v *DeleteFunctionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteFunctionUrlConfigInput(v *DeleteFunctionUrlConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionUrlConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteLayerVersionInput(v *DeleteLayerVersionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteLayerVersionInput"}
+ if v.LayerName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LayerName"))
+ }
+ if v.VersionNumber == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("VersionNumber"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteProvisionedConcurrencyConfigInput(v *DeleteProvisionedConcurrencyConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteProvisionedConcurrencyConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.Qualifier == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Qualifier"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetAliasInput(v *GetAliasInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetAliasInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.Name == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Name"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetCodeSigningConfigInput(v *GetCodeSigningConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetCodeSigningConfigInput"}
+ if v.CodeSigningConfigArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CodeSigningConfigArn"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetEventSourceMappingInput(v *GetEventSourceMappingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetEventSourceMappingInput"}
+ if v.UUID == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("UUID"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetFunctionCodeSigningConfigInput(v *GetFunctionCodeSigningConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetFunctionCodeSigningConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetFunctionConcurrencyInput(v *GetFunctionConcurrencyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetFunctionConcurrencyInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetFunctionConfigurationInput(v *GetFunctionConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetFunctionConfigurationInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetFunctionEventInvokeConfigInput(v *GetFunctionEventInvokeConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetFunctionEventInvokeConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetFunctionInput(v *GetFunctionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetFunctionInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetFunctionRecursionConfigInput(v *GetFunctionRecursionConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetFunctionRecursionConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetFunctionUrlConfigInput(v *GetFunctionUrlConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetFunctionUrlConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetLayerVersionByArnInput(v *GetLayerVersionByArnInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetLayerVersionByArnInput"}
+ if v.Arn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Arn"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetLayerVersionInput(v *GetLayerVersionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetLayerVersionInput"}
+ if v.LayerName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LayerName"))
+ }
+ if v.VersionNumber == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("VersionNumber"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetLayerVersionPolicyInput(v *GetLayerVersionPolicyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetLayerVersionPolicyInput"}
+ if v.LayerName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LayerName"))
+ }
+ if v.VersionNumber == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("VersionNumber"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetPolicyInput(v *GetPolicyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetPolicyInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetProvisionedConcurrencyConfigInput(v *GetProvisionedConcurrencyConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetProvisionedConcurrencyConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.Qualifier == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Qualifier"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetRuntimeManagementConfigInput(v *GetRuntimeManagementConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetRuntimeManagementConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpInvokeAsyncInput(v *InvokeAsyncInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "InvokeAsyncInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.InvokeArgs == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("InvokeArgs"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpInvokeInput(v *InvokeInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "InvokeInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpInvokeWithResponseStreamInput(v *InvokeWithResponseStreamInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "InvokeWithResponseStreamInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListAliasesInput(v *ListAliasesInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListAliasesInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListFunctionEventInvokeConfigsInput(v *ListFunctionEventInvokeConfigsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListFunctionEventInvokeConfigsInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListFunctionsByCodeSigningConfigInput(v *ListFunctionsByCodeSigningConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListFunctionsByCodeSigningConfigInput"}
+ if v.CodeSigningConfigArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CodeSigningConfigArn"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListFunctionUrlConfigsInput(v *ListFunctionUrlConfigsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListFunctionUrlConfigsInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListLayerVersionsInput(v *ListLayerVersionsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListLayerVersionsInput"}
+ if v.LayerName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LayerName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListProvisionedConcurrencyConfigsInput(v *ListProvisionedConcurrencyConfigsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListProvisionedConcurrencyConfigsInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListTagsInput(v *ListTagsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListTagsInput"}
+ if v.Resource == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Resource"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListVersionsByFunctionInput(v *ListVersionsByFunctionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListVersionsByFunctionInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPublishLayerVersionInput(v *PublishLayerVersionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PublishLayerVersionInput"}
+ if v.LayerName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LayerName"))
+ }
+ if v.Content == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Content"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPublishVersionInput(v *PublishVersionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PublishVersionInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutFunctionCodeSigningConfigInput(v *PutFunctionCodeSigningConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutFunctionCodeSigningConfigInput"}
+ if v.CodeSigningConfigArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CodeSigningConfigArn"))
+ }
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutFunctionConcurrencyInput(v *PutFunctionConcurrencyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutFunctionConcurrencyInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.ReservedConcurrentExecutions == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ReservedConcurrentExecutions"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutFunctionEventInvokeConfigInput(v *PutFunctionEventInvokeConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutFunctionEventInvokeConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutFunctionRecursionConfigInput(v *PutFunctionRecursionConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutFunctionRecursionConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if len(v.RecursiveLoop) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("RecursiveLoop"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutProvisionedConcurrencyConfigInput(v *PutProvisionedConcurrencyConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutProvisionedConcurrencyConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.Qualifier == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Qualifier"))
+ }
+ if v.ProvisionedConcurrentExecutions == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ProvisionedConcurrentExecutions"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutRuntimeManagementConfigInput(v *PutRuntimeManagementConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutRuntimeManagementConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if len(v.UpdateRuntimeOn) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("UpdateRuntimeOn"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpRemoveLayerVersionPermissionInput(v *RemoveLayerVersionPermissionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RemoveLayerVersionPermissionInput"}
+ if v.LayerName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("LayerName"))
+ }
+ if v.VersionNumber == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("VersionNumber"))
+ }
+ if v.StatementId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("StatementId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpRemovePermissionInput(v *RemovePermissionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RemovePermissionInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.StatementId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("StatementId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpTagResourceInput(v *TagResourceInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"}
+ if v.Resource == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Resource"))
+ }
+ if v.Tags == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Tags"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUntagResourceInput(v *UntagResourceInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"}
+ if v.Resource == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Resource"))
+ }
+ if v.TagKeys == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TagKeys"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdateAliasInput(v *UpdateAliasInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdateAliasInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.Name == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Name"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdateCodeSigningConfigInput(v *UpdateCodeSigningConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdateCodeSigningConfigInput"}
+ if v.CodeSigningConfigArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CodeSigningConfigArn"))
+ }
+ if v.AllowedPublishers != nil {
+ if err := validateAllowedPublishers(v.AllowedPublishers); err != nil {
+ invalidParams.AddNested("AllowedPublishers", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdateEventSourceMappingInput(v *UpdateEventSourceMappingInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdateEventSourceMappingInput"}
+ if v.UUID == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("UUID"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdateFunctionCodeInput(v *UpdateFunctionCodeInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdateFunctionCodeInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdateFunctionConfigurationInput(v *UpdateFunctionConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdateFunctionConfigurationInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if v.FileSystemConfigs != nil {
+ if err := validateFileSystemConfigList(v.FileSystemConfigs); err != nil {
+ invalidParams.AddNested("FileSystemConfigs", err.(smithy.InvalidParamsError))
+ }
+ }
+ if v.EphemeralStorage != nil {
+ if err := validateEphemeralStorage(v.EphemeralStorage); err != nil {
+ invalidParams.AddNested("EphemeralStorage", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdateFunctionEventInvokeConfigInput(v *UpdateFunctionEventInvokeConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdateFunctionEventInvokeConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdateFunctionUrlConfigInput(v *UpdateFunctionUrlConfigInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdateFunctionUrlConfigInput"}
+ if v.FunctionName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("FunctionName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md
index f42ea826..c6d20fe5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md
@@ -1,3 +1,78 @@
+# v1.75.0 (2025-01-29)
+
+* **Feature**: Change the type of MpuObjectSize in CompleteMultipartUploadRequest from int to long.
+
+# v1.74.1 (2025-01-24)
+
+* **Bug Fix**: Enable request checksum validation mode by default
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.74.0 (2025-01-22)
+
+* **Feature**: Add a client config option to disable logging when output checksum validation is skipped due to an unsupported algorithm.
+
+# v1.73.2 (2025-01-17)
+
+* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.73.1 (2025-01-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.73.0 (2025-01-15)
+
+* **Feature**: S3 client behavior is updated to always calculate a checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). The checksum algorithm used by default now becomes CRC32. Checksum behavior can be configured using `when_supported` and `when_required` options - in code using RequestChecksumCalculation, in shared config using request_checksum_calculation, or as env variable using AWS_REQUEST_CHECKSUM_CALCULATION. The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if the SDK has not implemented the specified checksum algorithm then this validation is skipped. Checksum validation behavior can be configured using `when_supported` and `when_required` options - in code using ResponseChecksumValidation, in shared config using response_checksum_validation, or as env variable using AWS_RESPONSE_CHECKSUM_VALIDATION.
+* **Feature**: This change enhances integrity protections for new SDK requests to S3. S3 SDKs now support the CRC64NVME checksum algorithm, full object checksums for multipart S3 objects, and new default integrity protections for S3 requests.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.72.3 (2025-01-14)
+
+* **Bug Fix**: Fix issue where waiters were not failing on unmatched errors as they should. This may have breaking behavioral changes for users in fringe cases. See [this announcement](https://github.com/aws/aws-sdk-go-v2/discussions/2954) for more information.
+
+# v1.72.2 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.72.1 (2025-01-08)
+
+* No change notes available for this release.
+
+# v1.72.0 (2025-01-03)
+
+* **Feature**: This change is only for updating the model regexp of CopySource which is not for validation but only for documentation and user guide change.
+
+# v1.71.1 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.71.0 (2024-12-03.2)
+
+* **Feature**: Amazon S3 Metadata stores object metadata in read-only, fully managed Apache Iceberg metadata tables that you can query. You can create metadata table configurations for S3 general purpose buckets.
+
+# v1.70.0 (2024-12-02)
+
+* **Feature**: Amazon S3 introduces support for AWS Dedicated Local Zones
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.69.0 (2024-11-25)
+
+* **Feature**: Amazon Simple Storage Service / Features: Add support for ETag based conditional writes in PutObject and CompleteMultiPartUpload APIs to prevent unintended object modifications.
+
+# v1.68.0 (2024-11-21)
+
+* **Feature**: Add support for conditional deletes for the S3 DeleteObject and DeleteObjects APIs. Add support for write offset bytes option used to append to objects with the S3 PutObject API.
+
+# v1.67.1 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.67.0 (2024-11-14)
+
+* **Feature**: This release updates the ListBuckets API Reference documentation in support of the new 10,000 general purpose bucket default quota on all AWS accounts. To increase your bucket quota from 10,000 to up to 1 million buckets, simply request a quota increase via Service Quotas.
+
# v1.66.3 (2024-11-06)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go
index 08e43279..562e4935 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go
@@ -449,15 +449,17 @@ func setResolvedDefaultsMode(o *Options) {
// NewFromConfig returns a new client from the provided config.
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
opts := Options{
- Region: cfg.Region,
- DefaultsMode: cfg.DefaultsMode,
- RuntimeEnvironment: cfg.RuntimeEnvironment,
- HTTPClient: cfg.HTTPClient,
- Credentials: cfg.Credentials,
- APIOptions: cfg.APIOptions,
- Logger: cfg.Logger,
- ClientLogMode: cfg.ClientLogMode,
- AppID: cfg.AppID,
+ Region: cfg.Region,
+ DefaultsMode: cfg.DefaultsMode,
+ RuntimeEnvironment: cfg.RuntimeEnvironment,
+ HTTPClient: cfg.HTTPClient,
+ Credentials: cfg.Credentials,
+ APIOptions: cfg.APIOptions,
+ Logger: cfg.Logger,
+ ClientLogMode: cfg.ClientLogMode,
+ AppID: cfg.AppID,
+ RequestChecksumCalculation: cfg.RequestChecksumCalculation,
+ ResponseChecksumValidation: cfg.ResponseChecksumValidation,
}
resolveAWSRetryerProvider(cfg, &opts)
resolveAWSRetryMaxAttempts(cfg, &opts)
@@ -718,7 +720,7 @@ func addRetry(stack *middleware.Stack, o Options) error {
m.LogAttempts = o.ClientLogMode.IsRetries()
m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/s3")
})
- if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
+ if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil {
return err
}
if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
@@ -845,6 +847,30 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error {
return nil
}
+func addRequestChecksumMetricsTracking(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ return stack.Build.Insert(&internalChecksum.RequestChecksumMetricsTracking{
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
+ UserAgent: ua,
+ }, "UserAgent", middleware.Before)
+}
+
+func addResponseChecksumMetricsTracking(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ return stack.Build.Insert(&internalChecksum.ResponseChecksumMetricsTracking{
+ ResponseChecksumValidation: options.ResponseChecksumValidation,
+ UserAgent: ua,
+ }, "UserAgent", middleware.Before)
+}
+
func resolveTracerProvider(options *Options) {
if options.TracerProvider == nil {
options.TracerProvider = &tracing.NopTracerProvider{}
@@ -890,6 +916,41 @@ func GetComputedInputChecksumsMetadata(m middleware.Metadata) (ComputedInputChec
}
+func addInputChecksumMiddleware(stack *middleware.Stack, options internalChecksum.InputMiddlewareOptions) (err error) {
+ err = stack.Initialize.Add(&internalChecksum.SetupInputContext{
+ GetAlgorithm: options.GetAlgorithm,
+ RequireChecksum: options.RequireChecksum,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
+ }, middleware.Before)
+ if err != nil {
+ return err
+ }
+
+ stack.Build.Remove("ContentChecksum")
+
+ inputChecksum := &internalChecksum.ComputeInputPayloadChecksum{
+ EnableTrailingChecksum: options.EnableTrailingChecksum,
+ EnableComputePayloadHash: options.EnableComputeSHA256PayloadHash,
+ EnableDecodedContentLengthHeader: options.EnableDecodedContentLengthHeader,
+ }
+ if err := stack.Finalize.Insert(inputChecksum, "ResolveEndpointV2", middleware.After); err != nil {
+ return err
+ }
+
+ if options.EnableTrailingChecksum {
+ trailerMiddleware := &internalChecksum.AddInputChecksumTrailer{
+ EnableTrailingChecksum: inputChecksum.EnableTrailingChecksum,
+ EnableComputePayloadHash: inputChecksum.EnableComputePayloadHash,
+ EnableDecodedContentLengthHeader: inputChecksum.EnableDecodedContentLengthHeader,
+ }
+ if err := stack.Finalize.Insert(trailerMiddleware, inputChecksum.ID(), middleware.After); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
// ChecksumValidationMetadata contains metadata such as the checksum algorithm
// used for data integrity validation.
type ChecksumValidationMetadata struct {
@@ -1148,6 +1209,10 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op
return nil
}
+func withNoDefaultChecksumAPIOption(options *Options) {
+ options.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired
+}
+
func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
LogRequest: o.ClientLogMode.IsRequest(),
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go
index ec55f51c..467a4647 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_AbortMultipartUpload.go
@@ -11,6 +11,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
)
// This operation aborts a multipart upload. After a multipart upload is aborted,
@@ -28,15 +29,16 @@ import (
// progress, you can't delete the bucket until all the in-progress multipart
// uploads are aborted or completed. To delete these in-progress multipart uploads,
// use the ListMultipartUploads operation to list the in-progress multipart
-// uploads in the bucket and use the AbortMultupartUpload operation to abort all
+// uploads in the bucket and use the AbortMultipartUpload operation to abort all
// the in-progress multipart uploads.
//
// - Directory buckets - For directory buckets, you must make requests for this
// API operation to the Zonal endpoint. These endpoints support
// virtual-hosted-style requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
-// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the
-// Amazon S3 User Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information
+// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions
//
@@ -56,7 +58,7 @@ import (
// expires. For more information about authorization, see [CreateSession]CreateSession .
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following operations are related to AbortMultipartUpload :
//
@@ -72,11 +74,12 @@ import (
//
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
// [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
// [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
// [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
func (c *Client) AbortMultipartUpload(ctx context.Context, params *AbortMultipartUploadInput, optFns ...func(*Options)) (*AbortMultipartUploadOutput, error) {
if params == nil {
@@ -99,11 +102,12 @@ type AbortMultipartUploadInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -147,6 +151,16 @@ type AbortMultipartUploadInput struct {
// status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
+ // If present, this header aborts an in progress multipart upload only if it was
+ // initiated on the provided timestamp. If the initiated timestamp of the multipart
+ // upload does not match the provided value, the operation returns a 412
+ // Precondition Failed error. If the initiated timestamp matches or if the
+ // multipart upload doesn’t exist, the operation returns a 204 Success (No Content)
+ // response.
+ //
+ // This functionality is only supported for directory buckets.
+ IfMatchInitiatedTime *time.Time
+
// Confirms that the requester knows that they will be charged for the request.
// Bucket owners need not specify this parameter in their requests. If either the
// source or destination S3 bucket has Requester Pays enabled, the requester will
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go
index 84279309..45305ea4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CompleteMultipartUpload.go
@@ -54,9 +54,10 @@ import (
// Directory buckets - For directory buckets, you must make requests for this API
// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
// requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
-// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User
-// Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about
+// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions
// - General purpose bucket permissions - For information about permissions
@@ -116,7 +117,7 @@ import (
// - HTTP Status Code: 404 Not Found
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following operations are related to CompleteMultipartUpload :
//
@@ -132,15 +133,16 @@ import (
//
// [Uploading Objects Using Multipart Upload]: https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html
// [Amazon S3 Error Best Practices]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html
-// [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
// [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [additional checksum value]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
-// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
// [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
-// [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
+// [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
+// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
+// [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
//
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
func (c *Client) CompleteMultipartUpload(ctx context.Context, params *CompleteMultipartUploadInput, optFns ...func(*Options)) (*CompleteMultipartUploadOutput, error) {
@@ -164,11 +166,12 @@ type CompleteMultipartUploadInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -209,7 +212,7 @@ type CompleteMultipartUploadInput struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity]
+ // Base64 encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity]
// in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -217,15 +220,23 @@ type CompleteMultipartUploadInput struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see
- // [Checking object integrity]in the Amazon S3 User Guide.
+ // Base64 encoded, 32-bit CRC-32C checksum of the object. For more information,
+ // see [Checking object integrity]in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32C *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 160-bit SHA-1 digest of the object. For more information, see [Checking object integrity]
+ // Base64 encoded, 64-bit CRC-64NVME checksum of the object. The CRC-64NVME
+ // checksum is always a full object checksum. For more information, see [Checking object integrity in the Amazon S3 User Guide].
+ //
+ // [Checking object integrity in the Amazon S3 User Guide]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // This header can be used as a data integrity check to verify that the data
+ // received is the same data that was originally sent. This header specifies the
+ // Base64 encoded, 160-bit SHA-1 digest of the object. For more information, see [Checking object integrity]
// in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -233,17 +244,45 @@ type CompleteMultipartUploadInput struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 256-bit SHA-256 digest of the object. For more information, see [Checking object integrity]
+ // Base64 encoded, 256-bit SHA-256 digest of the object. For more information, see [Checking object integrity]
// in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA256 *string
+ // This header specifies the checksum type of the object, which determines how
+ // part-level checksums are combined to create an object-level checksum for
+ // multipart objects. You can use this header as a data integrity check to verify
+ // that the checksum type that is received is the same checksum that was specified.
+ // If the checksum type doesn’t match the checksum type that was specified for the
+ // object during the CreateMultipartUpload request, it’ll result in a BadDigest
+ // error. For more information, see Checking object integrity in the Amazon S3 User
+ // Guide.
+ ChecksumType types.ChecksumType
+
// The account ID of the expected bucket owner. If the account ID that you provide
// does not match the actual owner of the bucket, the request fails with the HTTP
// status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
+ // Uploads the object only if the ETag (entity tag) value provided during the
+ // WRITE operation matches the ETag of the object in S3. If the ETag values do not
+ // match, the operation returns a 412 Precondition Failed error.
+ //
+ // If a conflicting operation occurs during the upload S3 returns a 409
+ // ConditionalRequestConflict response. On a 409 failure you should fetch the
+ // object's ETag, re-initiate the multipart upload with CreateMultipartUpload , and
+ // re-upload each part.
+ //
+ // Expects the ETag value as a string.
+ //
+ // For more information about conditional requests, see [RFC 7232], or [Conditional requests] in the Amazon S3
+ // User Guide.
+ //
+ // [Conditional requests]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
+ // [RFC 7232]: https://tools.ietf.org/html/rfc7232
+ IfMatch *string
+
// Uploads the object only if the object key name does not already exist in the
// bucket specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.
//
@@ -260,6 +299,11 @@ type CompleteMultipartUploadInput struct {
// [RFC 7232]: https://tools.ietf.org/html/rfc7232
IfNoneMatch *string
+ // The expected total object size of the multipart upload request. If there’s a
+ // mismatch between the specified object size value and the actual object size
+ // value, it results in an HTTP 400 InvalidRequest error.
+ MpuObjectSize *int64
+
// The container for the multipart upload request information.
MultipartUpload *types.CompletedMultipartUpload
@@ -325,50 +369,67 @@ type CompleteMultipartUploadOutput struct {
// encryption with Key Management Service (KMS) keys (SSE-KMS).
BucketKeyEnabled *bool
- // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only
+ // be present if the checksum was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumCRC32 *string
- // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 32-bit CRC-32C checksum of the object. This checksum is
+ // only present if the checksum was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumCRC32C *string
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. When you use the API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // This header can be used as a data integrity check to verify that the data
+ // received is the same data that was originally sent. This header specifies the
+ // Base64 encoded, 64-bit CRC-64NVME checksum of the object. The CRC-64NVME
+ // checksum is always a full object checksum. For more information, see [Checking object integrity in the Amazon S3 User Guide].
+ //
+ // [Checking object integrity in the Amazon S3 User Guide]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be
+ // present if the object was uploaded with the object. When you use the API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumSHA1 *string
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be
+ // present if the object was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumSHA256 *string
+ // The checksum type, which determines how part-level checksums are combined to
+ // create an object-level checksum for multipart objects. You can use this header
+ // as a data integrity check to verify that the checksum type that is received is
+ // the same checksum type that was specified during the CreateMultipartUpload
+ // request. For more information, see [Checking object integrity in the Amazon S3 User Guide].
+ //
+ // [Checking object integrity in the Amazon S3 User Guide]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType types.ChecksumType
+
// Entity tag that identifies the newly created object's data. Objects with
// different object data will have different entity tags. The entity tag is an
// opaque string. The entity tag may or may not be an MD5 digest of the object
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go
index c5db2dad..d4329b7e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CopyObject.go
@@ -31,9 +31,10 @@ import (
// - Directory buckets - For directory buckets, you must make requests for this
// API operation to the Zonal endpoint. These endpoints support
// virtual-hosted-style requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
-// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the
-// Amazon S3 User Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information
+// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// - VPC endpoints don't support cross-Region requests (including copies). If
// you're using VPC endpoints, your source and destination buckets should be in the
@@ -135,7 +136,7 @@ import (
// billed to the copy source account. For pricing information, see [Amazon S3 pricing].
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following operations are related to CopyObject :
//
@@ -148,11 +149,12 @@ import (
// [Copy Object Using the REST Multipart Upload API]: https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html
// [REST Authentication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
// [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [Enable or disable a Region for standalone accounts]: https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-regions.html#manage-acct-regions-enable-standalone
// [Transfer Acceleration]: https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html
// [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
// [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [Amazon S3 pricing]: http://aws.amazon.com/s3/pricing/
func (c *Client) CopyObject(ctx context.Context, params *CopyObjectInput, optFns ...func(*Options)) (*CopyObjectOutput, error) {
if params == nil {
@@ -175,11 +177,18 @@ type CopyObjectInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ //
+ // Copying objects across different Amazon Web Services Regions isn't supported
+ // when the source or destination bucket is in Amazon Web Services Local Zones. The
+ // source and destination buckets must have the same parent Amazon Web Services
+ // Region. Otherwise, you get an HTTP 400 Bad Request error with the error code
+ // InvalidRequest .
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -824,7 +833,9 @@ type CopyObjectOutput struct {
// If the object expiration is configured, the response includes this header.
//
- // This functionality is not supported for directory buckets.
+ // Object expiration information is not returned in directory buckets and this
+ // header returns the value " NotImplemented " in all responses for directory
+ // buckets.
Expiration *string
// If present, indicates that the requester was successfully charged for the
@@ -848,7 +859,7 @@ type CopyObjectOutput struct {
SSECustomerKeyMD5 *string
// If present, indicates the Amazon Web Services KMS Encryption Context to use for
- // object encryption. The value of this header is a base64-encoded UTF-8 string
+ // object encryption. The value of this header is a Base64 encoded UTF-8 string
// holding JSON with the encryption context key-value pairs.
SSEKMSEncryptionContext *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go
index 0dc07711..6b4283e9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucket.go
@@ -36,9 +36,10 @@ import (
// - Directory buckets - For directory buckets, you must make requests for this
// API operation to the Regional endpoint. These endpoints support path-style
// requests in the format
-// https://s3express-control.region_code.amazonaws.com/bucket-name .
-// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in
-// the Amazon S3 User Guide.
+// https://s3express-control.region-code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information about
+// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more
+// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions
//
@@ -104,7 +105,7 @@ import (
// supported S3 features for directory buckets, see [Features of S3 Express One Zone]in the Amazon S3 User Guide.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// s3express-control.region.amazonaws.com .
+// s3express-control.region-code.amazonaws.com .
//
// The following operations are related to CreateBucket :
//
@@ -113,18 +114,19 @@ import (
// [DeleteBucket]
//
// [Creating, configuring, and working with Amazon S3 buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
-// [DeleteBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html
// [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
+// [DeleteBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html
// [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html
// [Virtual hosting of buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
//
// [DeletePublicAccessBlock]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html
// [Directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html
// [Features of S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-one-zone.html#s3-express-features
+// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
// [Controlling ownership of objects and disabling ACLs for your bucket]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
// [Blocking public access to your Amazon S3 storage]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html
-// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
func (c *Client) CreateBucket(ctx context.Context, params *CreateBucketInput, optFns ...func(*Options)) (*CreateBucketOutput, error) {
if params == nil {
params = &CreateBucketInput{}
@@ -149,12 +151,12 @@ type CreateBucketInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use path-style requests in the format
- // https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // https://s3express-control.region-code.amazonaws.com/bucket-name .
// Virtual-hosted-style requests aren't supported. Directory bucket names must be
- // unique in the chosen Availability Zone. Bucket names must also follow the format
- // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
- // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User
- // Guide
+ // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must
+ // also follow the format bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide
//
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
// [Bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataTableConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataTableConfiguration.go
new file mode 100644
index 00000000..20237417
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateBucketMetadataTableConfiguration.go
@@ -0,0 +1,290 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ internalChecksum "github.com/aws/aws-sdk-go-v2/service/internal/checksum"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a metadata table configuration for a general purpose bucket. For more
+// information, see [Accelerating data discovery with S3 Metadata]in the Amazon S3 User Guide.
+//
+// Permissions To use this operation, you must have the following permissions. For
+// more information, see [Setting up permissions for configuring metadata tables]in the Amazon S3 User Guide.
+//
+// If you also want to integrate your table bucket with Amazon Web Services
+// analytics services so that you can query your metadata table, you need
+// additional permissions. For more information, see [Integrating Amazon S3 Tables with Amazon Web Services analytics services]in the Amazon S3 User Guide.
+//
+// - s3:CreateBucketMetadataTableConfiguration
+//
+// - s3tables:CreateNamespace
+//
+// - s3tables:GetTable
+//
+// - s3tables:CreateTable
+//
+// - s3tables:PutTablePolicy
+//
+// The following operations are related to CreateBucketMetadataTableConfiguration :
+//
+// [DeleteBucketMetadataTableConfiguration]
+//
+// [GetBucketMetadataTableConfiguration]
+//
+// [Setting up permissions for configuring metadata tables]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html
+// [GetBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetadataTableConfiguration.html
+// [DeleteBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataTableConfiguration.html
+// [Accelerating data discovery with S3 Metadata]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html
+// [Integrating Amazon S3 Tables with Amazon Web Services analytics services]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-integrating-aws.html
+func (c *Client) CreateBucketMetadataTableConfiguration(ctx context.Context, params *CreateBucketMetadataTableConfigurationInput, optFns ...func(*Options)) (*CreateBucketMetadataTableConfigurationOutput, error) {
+ if params == nil {
+ params = &CreateBucketMetadataTableConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateBucketMetadataTableConfiguration", params, optFns, c.addOperationCreateBucketMetadataTableConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateBucketMetadataTableConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateBucketMetadataTableConfigurationInput struct {
+
+ // The general purpose bucket that you want to create the metadata table
+ // configuration in.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The contents of your metadata table configuration.
+ //
+ // This member is required.
+ MetadataTableConfiguration *types.MetadataTableConfiguration
+
+ // The checksum algorithm to use with your metadata table configuration.
+ ChecksumAlgorithm types.ChecksumAlgorithm
+
+ // The Content-MD5 header for the metadata table configuration.
+ ContentMD5 *string
+
+ // The expected owner of the general purpose bucket that contains your metadata
+ // table configuration.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+func (in *CreateBucketMetadataTableConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
+type CreateBucketMetadataTableConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateBucketMetadataTableConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestxml_serializeOpCreateBucketMetadataTableConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateBucketMetadataTableConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateBucketMetadataTableConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addIsExpressUserAgent(stack); err != nil {
+ return err
+ }
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateBucketMetadataTableConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateBucketMetadataTableConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addCreateBucketMetadataTableConfigurationInputChecksumMiddlewares(stack, options); err != nil {
+ return err
+ }
+ if err = addCreateBucketMetadataTableConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = s3cust.AddExpressDefaultChecksumMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (v *CreateBucketMetadataTableConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
+func newServiceMetadataMiddleware_opCreateBucketMetadataTableConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateBucketMetadataTableConfiguration",
+ }
+}
+
+// getCreateBucketMetadataTableConfigurationRequestAlgorithmMember gets the
+// request checksum algorithm value provided as input.
+func getCreateBucketMetadataTableConfigurationRequestAlgorithmMember(input interface{}) (string, bool) {
+ in := input.(*CreateBucketMetadataTableConfigurationInput)
+ if len(in.ChecksumAlgorithm) == 0 {
+ return "", false
+ }
+ return string(in.ChecksumAlgorithm), true
+}
+
+func addCreateBucketMetadataTableConfigurationInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ GetAlgorithm: getCreateBucketMetadataTableConfigurationRequestAlgorithmMember,
+ RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
+ EnableTrailingChecksum: false,
+ EnableComputeSHA256PayloadHash: true,
+ EnableDecodedContentLengthHeader: true,
+ })
+}
+
+// getCreateBucketMetadataTableConfigurationBucketMember returns a pointer to
+// string denoting a provided bucket member valueand a boolean indicating if the
+// input has a modeled bucket name,
+func getCreateBucketMetadataTableConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*CreateBucketMetadataTableConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addCreateBucketMetadataTableConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getCreateBucketMetadataTableConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go
index 7a9fe783..cce92824 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateMultipartUpload.go
@@ -38,9 +38,10 @@ import (
// - Directory buckets - For directory buckets, you must make requests for this
// API operation to the Zonal endpoint. These endpoints support
// virtual-hosted-style requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
-// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the
-// Amazon S3 User Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information
+// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Request signing For request signing, multipart upload is just a series of
// regular requests. You initiate a multipart upload, send one or more requests to
@@ -187,7 +188,7 @@ import (
// of the destination bucket.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following operations are related to CreateMultipartUpload :
//
@@ -204,7 +205,6 @@ import (
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
// [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
// [Protecting Data Using Server-Side Encryption with KMS keys]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [Specifying the Signature Version in Request Authentication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
// [Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config
// [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
@@ -212,11 +212,13 @@ import (
// [Multipart upload API and permissions]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions
// [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
// [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [Authenticating Requests (Amazon Web Services Signature Version 4)]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
// [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
// [Multipart Upload Overview]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html
// [Protecting data using server-side encryption with Amazon Web Services KMS]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html
// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
//
// [Specifying server-side encryption with KMS for new object uploads]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
// [Protecting data using server-side encryption with customer-provided encryption keys (SSE-C)]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html
@@ -243,11 +245,12 @@ type CreateMultipartUploadInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -329,6 +332,12 @@ type CreateMultipartUploadInput struct {
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumAlgorithm types.ChecksumAlgorithm
+ // Indicates the checksum type that you want Amazon S3 to use to calculate the
+ // object’s checksum value. For more information, see [Checking object integrity in the Amazon S3 User Guide].
+ //
+ // [Checking object integrity in the Amazon S3 User Guide]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType types.ChecksumType
+
// Specifies presentational information for the object.
ContentDisposition *string
@@ -629,7 +638,7 @@ type CreateMultipartUploadInput struct {
SSECustomerKeyMD5 *string
// Specifies the Amazon Web Services KMS Encryption Context to use for object
- // encryption. The value of this header is a Base64-encoded string of a UTF-8
+ // encryption. The value of this header is a Base64 encoded string of a UTF-8
// encoded JSON, which contains the encryption context as key-value pairs.
//
// Directory buckets - You can optionally provide an explicit encryption context
@@ -776,6 +785,12 @@ type CreateMultipartUploadOutput struct {
// The algorithm that was used to create a checksum of the object.
ChecksumAlgorithm types.ChecksumAlgorithm
+ // Indicates the checksum type that you want Amazon S3 to use to calculate the
+ // object’s checksum value. For more information, see [Checking object integrity in the Amazon S3 User Guide].
+ //
+ // [Checking object integrity in the Amazon S3 User Guide]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType types.ChecksumType
+
// Object key for which the multipart upload was initiated.
Key *string
@@ -800,7 +815,7 @@ type CreateMultipartUploadOutput struct {
SSECustomerKeyMD5 *string
// If present, indicates the Amazon Web Services KMS Encryption Context to use for
- // object encryption. The value of this header is a Base64-encoded string of a
+ // object encryption. The value of this header is a Base64 encoded string of a
// UTF-8 encoded JSON, which contains the encryption context as key-value pairs.
SSEKMSEncryptionContext *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go
index e8bf98e1..1b6452b3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_CreateSession.go
@@ -47,8 +47,10 @@ import (
//
// - You must make requests for this API operation to the Zonal endpoint. These
// endpoints support virtual-hosted-style requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests
-// are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style
+// requests are not supported. For more information about endpoints in Availability
+// Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about endpoints
+// in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// - CopyObject API operation - Unlike other Zonal endpoint API operations, the
// CopyObject API operation doesn't use the temporary security credentials
@@ -119,16 +121,16 @@ import (
// CreateSession request.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// [Specifying server-side encryption with KMS for new object uploads]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
// [Performance guidelines and design patterns]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-optimizing-performance-guidelines-design-patterns.html#s3-express-optimizing-performance-session-authentication
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
// [S3 Express One Zone APIs]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-APIs.html
// [HeadBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html
// [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
// [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
// [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
@@ -136,6 +138,7 @@ import (
// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
// [x-amz-create-session-mode]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html#API_CreateSession_RequestParameters
// [Zonal endpoint (object-level) API operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-differences.html#s3-express-differences-api-operations
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
func (c *Client) CreateSession(ctx context.Context, params *CreateSessionInput, optFns ...func(*Options)) (*CreateSessionOutput, error) {
if params == nil {
params = &CreateSessionInput{}
@@ -176,7 +179,7 @@ type CreateSessionInput struct {
// Specifies the Amazon Web Services KMS Encryption Context as an additional
// encryption context to use for object encryption. The value of this header is a
- // Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption
+ // Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption
// context as key-value pairs. This value is stored as object metadata and
// automatically gets passed on to Amazon Web Services KMS for future GetObject
// operations on this object.
@@ -248,7 +251,7 @@ type CreateSessionOutput struct {
BucketKeyEnabled *bool
// If present, indicates the Amazon Web Services KMS Encryption Context to use for
- // object encryption. The value of this header is a Base64-encoded string of a
+ // object encryption. The value of this header is a Base64 encoded string of a
// UTF-8 encoded JSON, which contains the encryption context as key-value pairs.
// This value is stored as object metadata and automatically gets passed on to
// Amazon Web Services KMS for future GetObject operations on this object.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go
index cda4c6ed..8e34c67c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucket.go
@@ -23,9 +23,10 @@ import (
// - Directory buckets - For directory buckets, you must make requests for this
// API operation to the Regional endpoint. These endpoints support path-style
// requests in the format
-// https://s3express-control.region_code.amazonaws.com/bucket-name .
-// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in
-// the Amazon S3 User Guide.
+// https://s3express-control.region-code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information about
+// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more
+// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions
//
@@ -40,7 +41,7 @@ import (
// Amazon S3 User Guide.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// s3express-control.region.amazonaws.com .
+// s3express-control.region-code.amazonaws.com .
//
// The following operations are related to DeleteBucket :
//
@@ -49,8 +50,9 @@ import (
// [DeleteObject]
//
// [DeleteObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
func (c *Client) DeleteBucket(ctx context.Context, params *DeleteBucketInput, optFns ...func(*Options)) (*DeleteBucketOutput, error) {
if params == nil {
@@ -73,12 +75,12 @@ type DeleteBucketInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use path-style requests in the format
- // https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // https://s3express-control.region-code.amazonaws.com/bucket-name .
// Virtual-hosted-style requests aren't supported. Directory bucket names must be
- // unique in the chosen Availability Zone. Bucket names must also follow the format
- // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
- // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User
- // Guide
+ // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must
+ // also follow the format bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide
//
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go
index 98437e81..ebeba229 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Deletes an analytics configuration for the bucket (specified by the analytics
// configuration ID).
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go
index f0cd1be5..e1014475 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketCors.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Deletes the cors configuration information set for the bucket.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go
index f9116221..c1a1b810 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketEncryption.go
@@ -38,7 +38,7 @@ import (
// directory bucket policies and permissions, see [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]in the Amazon S3 User Guide.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// s3express-control.region.amazonaws.com .
+// s3express-control.region-code.amazonaws.com .
//
// The following operations are related to DeleteBucketEncryption :
//
@@ -75,12 +75,12 @@ type DeleteBucketEncryptionInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use path-style requests in the format
- // https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // https://s3express-control.region-code.amazonaws.com/bucket-name .
// Virtual-hosted-style requests aren't supported. Directory bucket names must be
- // unique in the chosen Availability Zone. Bucket names must also follow the format
- // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
- // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User
- // Guide
+ // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must
+ // also follow the format bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide
//
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go
index 3bc32aca..3fd1f17c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Deletes the S3 Intelligent-Tiering configuration from the specified bucket.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go
index ffb5e0d4..68fbe69d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketInventoryConfiguration.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Deletes an inventory configuration (identified by the inventory ID) from the
// bucket.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go
index 10c8ddbf..7eb820b4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketLifecycle.go
@@ -13,20 +13,44 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
-//
// Deletes the lifecycle configuration from the specified bucket. Amazon S3
// removes all the lifecycle configuration rules in the lifecycle subresource
// associated with the bucket. Your objects never expire, and Amazon S3 no longer
// automatically deletes any objects on the basis of rules contained in the deleted
// lifecycle configuration.
//
-// To use this operation, you must have permission to perform the
-// s3:PutLifecycleConfiguration action. By default, the bucket owner has this
-// permission and the bucket owner can grant this permission to others.
+// Permissions
+// - General purpose bucket permissions - By default, all Amazon S3 resources
+// are private, including buckets, objects, and related subresources (for example,
+// lifecycle configuration and website configuration). Only the resource owner
+// (that is, the Amazon Web Services account that created it) can access the
+// resource. The resource owner can optionally grant access permissions to others
+// by writing an access policy. For this operation, a user must have the
+// s3:PutLifecycleConfiguration permission.
+//
+// For more information about permissions, see [Managing Access Permissions to Your Amazon S3 Resources].
+//
+// - Directory bucket permissions - You must have the
+// s3express:PutLifecycleConfiguration permission in an IAM identity-based policy
+// to use this operation. Cross-account access to this API operation isn't
+// supported. The resource owner can optionally grant access permissions to others
+// by creating a role or user for them as long as they are within the same account
+// as the owner and resource.
+//
+// For more information about directory bucket policies and permissions, see [Authorizing Regional endpoint APIs with IAM]in
+//
+// the Amazon S3 User Guide.
//
-// There is usually some time lag before lifecycle configuration deletion is fully
-// propagated to all the Amazon S3 systems.
+// Directory buckets - For directory buckets, you must make requests for this API
+//
+// operation to the Regional endpoint. These endpoints support path-style requests
+// in the format https://s3express-control.region-code.amazonaws.com/bucket-name
+// . Virtual-hosted-style requests aren't supported. For more information about
+// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more
+// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
+//
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// s3express-control.region.amazonaws.com .
//
// For more information about the object expiration, see [Elements to Describe Lifecycle Actions].
//
@@ -39,6 +63,11 @@ import (
// [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html
// [Elements to Describe Lifecycle Actions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions
// [GetBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html
+// [Authorizing Regional endpoint APIs with IAM]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
+// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
+//
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
func (c *Client) DeleteBucketLifecycle(ctx context.Context, params *DeleteBucketLifecycleInput, optFns ...func(*Options)) (*DeleteBucketLifecycleOutput, error) {
if params == nil {
params = &DeleteBucketLifecycleInput{}
@@ -64,6 +93,9 @@ type DeleteBucketLifecycleInput struct {
// The account ID of the expected bucket owner. If the account ID that you provide
// does not match the actual owner of the bucket, the request fails with the HTTP
// status code 403 Forbidden (access denied).
+ //
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
ExpectedBucketOwner *string
noSmithyDocumentSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataTableConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataTableConfiguration.go
new file mode 100644
index 00000000..ff44efe0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetadataTableConfiguration.go
@@ -0,0 +1,234 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a metadata table configuration from a general purpose bucket. For more
+//
+// information, see [Accelerating data discovery with S3 Metadata]in the Amazon S3 User Guide.
+//
+// Permissions To use this operation, you must have the
+// s3:DeleteBucketMetadataTableConfiguration permission. For more information, see [Setting up permissions for configuring metadata tables]
+// in the Amazon S3 User Guide.
+//
+// The following operations are related to DeleteBucketMetadataTableConfiguration :
+//
+// [CreateBucketMetadataTableConfiguration]
+//
+// [GetBucketMetadataTableConfiguration]
+//
+// [Setting up permissions for configuring metadata tables]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html
+// [GetBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetadataTableConfiguration.html
+// [CreateBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataTableConfiguration.html
+// [Accelerating data discovery with S3 Metadata]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html
+func (c *Client) DeleteBucketMetadataTableConfiguration(ctx context.Context, params *DeleteBucketMetadataTableConfigurationInput, optFns ...func(*Options)) (*DeleteBucketMetadataTableConfigurationOutput, error) {
+ if params == nil {
+ params = &DeleteBucketMetadataTableConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteBucketMetadataTableConfiguration", params, optFns, c.addOperationDeleteBucketMetadataTableConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteBucketMetadataTableConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteBucketMetadataTableConfigurationInput struct {
+
+ // The general purpose bucket that you want to remove the metadata table
+ // configuration from.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The expected bucket owner of the general purpose bucket that you want to
+ // remove the metadata table configuration from.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+func (in *DeleteBucketMetadataTableConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
+type DeleteBucketMetadataTableConfigurationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteBucketMetadataTableConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteBucketMetadataTableConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteBucketMetadataTableConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBucketMetadataTableConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addIsExpressUserAgent(stack); err != nil {
+ return err
+ }
+ if err = addOpDeleteBucketMetadataTableConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBucketMetadataTableConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addDeleteBucketMetadataTableConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (v *DeleteBucketMetadataTableConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
+func newServiceMetadataMiddleware_opDeleteBucketMetadataTableConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteBucketMetadataTableConfiguration",
+ }
+}
+
+// getDeleteBucketMetadataTableConfigurationBucketMember returns a pointer to
+// string denoting a provided bucket member valueand a boolean indicating if the
+// input has a modeled bucket name,
+func getDeleteBucketMetadataTableConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*DeleteBucketMetadataTableConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addDeleteBucketMetadataTableConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getDeleteBucketMetadataTableConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go
index 92dbe8e4..86ab9573 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketMetricsConfiguration.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Deletes a metrics configuration for the Amazon CloudWatch request metrics
// (specified by the metrics configuration ID) from the bucket. Note that this
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go
index 1b8259d9..da46b921 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketOwnershipControls.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you
// must have the s3:PutBucketOwnershipControls permission. For more information
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go
index f0fb41be..8e1d89b7 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketPolicy.go
@@ -17,9 +17,10 @@ import (
//
// Directory buckets - For directory buckets, you must make requests for this API
// operation to the Regional endpoint. These endpoints support path-style requests
-// in the format https://s3express-control.region_code.amazonaws.com/bucket-name .
-// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in
-// the Amazon S3 User Guide.
+// in the format https://s3express-control.region-code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information about
+// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more
+// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions If you are using an identity other than the root user of the Amazon
// Web Services account that owns the bucket, the calling identity must both have
@@ -51,7 +52,7 @@ import (
// policies and permissions, see [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]in the Amazon S3 User Guide.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// s3express-control.region.amazonaws.com .
+// s3express-control.region-code.amazonaws.com .
//
// # The following operations are related to DeleteBucketPolicy
//
@@ -60,9 +61,10 @@ import (
// [DeleteObject]
//
// [DeleteObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [Using Bucket Policies and User Policies]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html
// [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
func (c *Client) DeleteBucketPolicy(ctx context.Context, params *DeleteBucketPolicyInput, optFns ...func(*Options)) (*DeleteBucketPolicyOutput, error) {
if params == nil {
@@ -85,12 +87,12 @@ type DeleteBucketPolicyInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use path-style requests in the format
- // https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // https://s3express-control.region-code.amazonaws.com/bucket-name .
// Virtual-hosted-style requests aren't supported. Directory bucket names must be
- // unique in the chosen Availability Zone. Bucket names must also follow the format
- // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
- // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User
- // Guide
+ // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must
+ // also follow the format bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide
//
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go
index 3967f00f..d2c8b032 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketReplication.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Deletes the replication configuration from the bucket.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go
index 2b9d9c41..22f0656e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketTagging.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Deletes the tags from the bucket.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go
index 080d7f74..46aded0b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteBucketWebsite.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// This action removes the website configuration for a bucket. Amazon S3 returns a
// 200 OK response upon successfully deleting a website configuration on the
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go
index 7d6e7446..fa0031a5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObject.go
@@ -11,32 +11,60 @@ import (
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
)
// Removes an object from a bucket. The behavior depends on the bucket's
-// versioning state. For more information, see [Best practices to consider before deleting an object].
+// versioning state:
+//
+// - If bucket versioning is not enabled, the operation permanently deletes the
+// object.
+//
+// - If bucket versioning is enabled, the operation inserts a delete marker,
+// which becomes the current version of the object. To permanently delete an object
+// in a versioned bucket, you must include the object’s versionId in the request.
+// For more information about versioning-enabled buckets, see [Deleting object versions from a versioning-enabled bucket].
+//
+// - If bucket versioning is suspended, the operation removes the object that
+// has a null versionId , if there is one, and inserts a delete marker that
+// becomes the current version of the object. If there isn't an object with a null
+// versionId , and all versions of the object have a versionId , Amazon S3 does
+// not remove the object and only inserts a delete marker. To permanently delete an
+// object that has a versionId , you must include the object’s versionId in the
+// request. For more information about versioning-suspended buckets, see [Deleting objects from versioning-suspended buckets].
+//
+// - Directory buckets - S3 Versioning isn't enabled and supported for directory
+// buckets. For this API operation, only the null value of the version ID is
+// supported by directory buckets. You can only specify null to the versionId
+// query parameter in the request.
+//
+// - Directory buckets - For directory buckets, you must make requests for this
+// API operation to the Zonal endpoint. These endpoints support
+// virtual-hosted-style requests in the format
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information
+// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// To remove a specific version, you must use the versionId query parameter. Using
// this query parameter permanently deletes the version. If the object deleted is a
// delete marker, Amazon S3 sets the response header x-amz-delete-marker to true.
+//
// If the object you want to delete is in a bucket where the bucket versioning
-// configuration is MFA delete enabled, you must include the x-amz-mfa request
+// configuration is MFA Delete enabled, you must include the x-amz-mfa request
// header in the DELETE versionId request. Requests that include x-amz-mfa must
-// use HTTPS. For more information about MFA delete and to see example requests,
-// see [Using MFA delete]and [Sample request] in the Amazon S3 User Guide.
+// use HTTPS. For more information about MFA Delete, see [Using MFA Delete]in the Amazon S3 User
+// Guide. To see sample requests that use versioning, see [Sample Request].
//
-// - S3 Versioning isn't enabled and supported for directory buckets. For this
-// API operation, only the null value of the version ID is supported by directory
-// buckets. You can only specify null to the versionId query parameter in the
-// request.
+// Directory buckets - MFA delete is not supported by directory buckets.
//
-// - For directory buckets, you must make requests for this API operation to the
-// Zonal endpoint. These endpoints support virtual-hosted-style requests in the
-// format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
-// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the
-// Amazon S3 User Guide.
+// You can delete objects by explicitly calling DELETE Object or calling ([PutBucketLifecycle] ) to
+// enable Amazon S3 to remove them for you. If you want to block users or accounts
+// from removing or deleting objects from your bucket, you must deny them the
+// s3:DeleteObject , s3:DeleteObjectVersion , and s3:PutLifeCycleConfiguration
+// actions.
//
-// - MFA delete is not supported by directory buckets.
+// Directory buckets - S3 Lifecycle is not supported by directory buckets.
//
// Permissions
//
@@ -46,31 +74,37 @@ import (
// - s3:DeleteObject - To delete an object from a bucket, you must always have
// the s3:DeleteObject permission.
//
-// You can also use PutBucketLifecycleto delete objects in Amazon S3.
-//
// - s3:DeleteObjectVersion - To delete a specific version of an object from a
// versioning-enabled bucket, you must have the s3:DeleteObjectVersion permission.
//
-// - If you want to block users or accounts from removing or deleting objects
-// from your bucket, you must deny them the s3:DeleteObject ,
-// s3:DeleteObjectVersion , and s3:PutLifeCycleConfiguration permissions.
-//
-// - Directory buckets permissions - To grant access to this API operation on a
-// directory bucket, we recommend that you use the CreateSessionAPI operation for
-// session-based authorization.
+// - Directory bucket permissions - To grant access to this API operation on a
+// directory bucket, we recommend that you use the [CreateSession]CreateSession API operation
+// for session-based authorization. Specifically, you grant the
+// s3express:CreateSession permission to the directory bucket in a bucket policy
+// or an IAM identity-based policy. Then, you make the CreateSession API call on
+// the bucket to obtain a session token. With the session token in your request
+// header, you can make API requests to this operation. After the session token
+// expires, you make another CreateSession API call to generate a new session
+// token for use. Amazon Web Services CLI or SDKs create session and refresh the
+// session token automatically to avoid service interruptions when a session
+// expires. For more information about authorization, see [CreateSession]CreateSession .
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following action is related to DeleteObject :
//
// [PutObject]
//
-// [Best practices to consider before deleting an object]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjects.html#DeletingObjects-best-practices
-// [Using MFA delete]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html
-// [Sample request]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Sample Request]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete
+// [Deleting objects from versioning-suspended buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectsfromVersioningSuspendedBuckets.html
// [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
+// [PutBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html
+// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
+// [Deleting object versions from a versioning-enabled bucket]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
+// [Using MFA Delete]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html
func (c *Client) DeleteObject(ctx context.Context, params *DeleteObjectInput, optFns ...func(*Options)) (*DeleteObjectOutput, error) {
if params == nil {
params = &DeleteObjectInput{}
@@ -92,11 +126,12 @@ type DeleteObjectInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -142,6 +177,38 @@ type DeleteObjectInput struct {
// status code 403 Forbidden (access denied).
ExpectedBucketOwner *string
+ // The If-Match header field makes the request method conditional on ETags. If the
+ // ETag value does not match, the operation returns a 412 Precondition Failed
+ // error. If the ETag matches or if the object doesn't exist, the operation will
+ // return a 204 Success (No Content) response .
+ //
+ // For more information about conditional requests, see [RFC 7232].
+ //
+ // This functionality is only supported for directory buckets.
+ //
+ // [RFC 7232]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232
+ IfMatch *string
+
+ // If present, the object is deleted only if its modification times matches the
+ // provided Timestamp . If the Timestamp values do not match, the operation
+ // returns a 412 Precondition Failed error. If the Timestamp matches or if the
+ // object doesn’t exist, the operation returns a 204 Success (No Content) response.
+ //
+ // This functionality is only supported for directory buckets.
+ IfMatchLastModifiedTime *time.Time
+
+ // If present, the object is deleted only if its size matches the provided size in
+ // bytes. If the Size value does not match, the operation returns a 412
+ // Precondition Failed error. If the Size matches or if the object doesn’t exist,
+ // the operation returns a 204 Success (No Content) response.
+ //
+ // This functionality is only supported for directory buckets.
+ //
+ // You can use the If-Match , x-amz-if-match-last-modified-time and
+ // x-amz-if-match-size conditional headers in conjunction with each-other or
+ // individually.
+ IfMatchSize *int64
+
// The concatenation of the authentication device's serial number, a space, and
// the value that is displayed on your authentication device. Required to
// permanently delete a versioned object if versioning is configured with MFA
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go
index c0f65ea1..54bfd7d7 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjectTagging.go
@@ -12,7 +12,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Removes the entire tag set from the specified object. For more information
// about managing object tags, see [Object Tagging].
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go
index d08261e5..4eacd739 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeleteObjects.go
@@ -33,9 +33,10 @@ import (
// - Directory buckets - For directory buckets, you must make requests for this
// API operation to the Zonal endpoint. These endpoints support
// virtual-hosted-style requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
-// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the
-// Amazon S3 User Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information
+// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// The operation supports two modes for the response: verbose and quiet. By
// default, the operation uses verbose mode in which the response includes the
@@ -89,7 +90,7 @@ import (
// Multi-Object Delete requests.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following operations are related to DeleteObjects :
//
@@ -106,9 +107,10 @@ import (
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
// [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
// [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
// [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [MFA Delete]: https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete
// [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
func (c *Client) DeleteObjects(ctx context.Context, params *DeleteObjectsInput, optFns ...func(*Options)) (*DeleteObjectsOutput, error) {
@@ -132,11 +134,12 @@ type DeleteObjectsInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -186,21 +189,22 @@ type DeleteObjectsInput struct {
// For the x-amz-checksum-algorithm header, replace algorithm with the
// supported algorithm from the following list:
//
- // - CRC32
+ // - CRC-32
//
- // - CRC32C
+ // - CRC-32C
//
- // - SHA1
+ // - CRC-64NVME
//
- // - SHA256
+ // - SHA-1
+ //
+ // - SHA-256
//
// For more information, see [Checking object integrity] in the Amazon S3 User Guide.
//
// If the individual checksum value you provide through x-amz-checksum-algorithm
// doesn't match the checksum algorithm you set through
- // x-amz-sdk-checksum-algorithm , Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter and uses the checksum algorithm that matches the provided value in
- // x-amz-checksum-algorithm .
+ // x-amz-sdk-checksum-algorithm , Amazon S3 fails the request with a BadDigest
+ // error.
//
// If you provide an individual checksum, Amazon S3 ignores any provided
// ChecksumAlgorithm parameter.
@@ -344,6 +348,9 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpDeleteObjectsValidationMiddleware(stack); err != nil {
return err
}
@@ -424,9 +431,10 @@ func getDeleteObjectsRequestAlgorithmMember(input interface{}) (string, bool) {
}
func addDeleteObjectsInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getDeleteObjectsRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go
index 415bffd3..7205bb88 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_DeletePublicAccessBlock.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use
// this operation, you must have the s3:PutBucketPublicAccessBlock permission. For
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go
index 449e43d2..8d33fa67 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAccelerateConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// This implementation of the GET action uses the accelerate subresource to return
// the Transfer Acceleration state of a bucket, which is either Enabled or
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go
index 31de039a..8ae6505d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAcl.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// This implementation of the GET action uses the acl subresource to return the
// access control list (ACL) of a bucket. To use GET to return the ACL of the
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go
index c7cb46d2..a0e8ac7c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketAnalyticsConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// This implementation of the GET action returns an analytics configuration
// (identified by the analytics configuration ID) from the bucket.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go
index b3d7b702..ee1d6b91 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketCors.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns the Cross-Origin Resource Sharing (CORS) configuration information set
// for the bucket.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go
index 26f78cd2..a7dda520 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketEncryption.go
@@ -40,7 +40,7 @@ import (
// directory bucket policies and permissions, see [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]in the Amazon S3 User Guide.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// s3express-control.region.amazonaws.com .
+// s3express-control.region-code.amazonaws.com .
//
// The following operations are related to GetBucketEncryption :
//
@@ -77,12 +77,12 @@ type GetBucketEncryptionInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use path-style requests in the format
- // https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // https://s3express-control.region-code.amazonaws.com/bucket-name .
// Virtual-hosted-style requests aren't supported. Directory bucket names must be
- // unique in the chosen Availability Zone. Bucket names must also follow the format
- // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
- // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User
- // Guide
+ // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must
+ // also follow the format bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide
//
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go
index 3cffe943..ccf065ee 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Gets the S3 Intelligent-Tiering configuration from the specified bucket.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go
index 3acc99a3..8d61953c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketInventoryConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns an inventory configuration (identified by the inventory configuration
// ID) from the bucket.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go
index d717617e..e21bb044 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLifecycleConfiguration.go
@@ -14,26 +14,53 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// Returns the lifecycle configuration information set on the bucket. For
+// information about lifecycle configuration, see [Object Lifecycle Management].
//
// Bucket lifecycle configuration now supports specifying a lifecycle rule using
// an object key name prefix, one or more object tags, object size, or any
-// combination of these. Accordingly, this section describes the latest API. The
-// previous version of the API supported filtering based only on an object key name
-// prefix, which is supported for backward compatibility. For the related API
-// description, see [GetBucketLifecycle]. Accordingly, this section describes the latest API. The
-// response describes the new filter element that you can use to specify a filter
-// to select a subset of objects to which the rule applies. If you are using a
-// previous version of the lifecycle configuration, it still works. For the earlier
-// action,
+// combination of these. Accordingly, this section describes the latest API, which
+// is compatible with the new functionality. The previous version of the API
+// supported filtering based only on an object key name prefix, which is supported
+// for general purpose buckets for backward compatibility. For the related API
+// description, see [GetBucketLifecycle].
//
-// Returns the lifecycle configuration information set on the bucket. For
-// information about lifecycle configuration, see [Object Lifecycle Management].
+// Lifecyle configurations for directory buckets only support expiring objects and
+// cancelling multipart uploads. Expiring of versioned objects, transitions and tag
+// filters are not supported.
+//
+// Permissions
+// - General purpose bucket permissions - By default, all Amazon S3 resources
+// are private, including buckets, objects, and related subresources (for example,
+// lifecycle configuration and website configuration). Only the resource owner
+// (that is, the Amazon Web Services account that created it) can access the
+// resource. The resource owner can optionally grant access permissions to others
+// by writing an access policy. For this operation, a user must have the
+// s3:GetLifecycleConfiguration permission.
+//
+// For more information about permissions, see [Managing Access Permissions to Your Amazon S3 Resources].
+//
+// - Directory bucket permissions - You must have the
+// s3express:GetLifecycleConfiguration permission in an IAM identity-based policy
+// to use this operation. Cross-account access to this API operation isn't
+// supported. The resource owner can optionally grant access permissions to others
+// by creating a role or user for them as long as they are within the same account
+// as the owner and resource.
//
-// To use this operation, you must have permission to perform the
-// s3:GetLifecycleConfiguration action. The bucket owner has this permission, by
-// default. The bucket owner can grant this permission to others. For more
-// information about permissions, see [Permissions Related to Bucket Subresource Operations]and [Managing Access Permissions to Your Amazon S3 Resources].
+// For more information about directory bucket policies and permissions, see [Authorizing Regional endpoint APIs with IAM]in
+//
+// the Amazon S3 User Guide.
+//
+// Directory buckets - For directory buckets, you must make requests for this API
+//
+// operation to the Regional endpoint. These endpoints support path-style requests
+// in the format https://s3express-control.region-code.amazonaws.com/bucket-name
+// . Virtual-hosted-style requests aren't supported. For more information about
+// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more
+// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
+//
+// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
+// s3express-control.region.amazonaws.com .
//
// GetBucketLifecycleConfiguration has the following special error:
//
@@ -55,10 +82,13 @@ import (
//
// [GetBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html
// [Object Lifecycle Management]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html
-// [Permissions Related to Bucket Subresource Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
+// [Authorizing Regional endpoint APIs with IAM]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
// [PutBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
// [DeleteBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html
+//
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
func (c *Client) GetBucketLifecycleConfiguration(ctx context.Context, params *GetBucketLifecycleConfigurationInput, optFns ...func(*Options)) (*GetBucketLifecycleConfigurationOutput, error) {
if params == nil {
params = &GetBucketLifecycleConfigurationInput{}
@@ -84,6 +114,9 @@ type GetBucketLifecycleConfigurationInput struct {
// The account ID of the expected bucket owner. If the account ID that you provide
// does not match the actual owner of the bucket, the request fails with the HTTP
// status code 403 Forbidden (access denied).
+ //
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
ExpectedBucketOwner *string
noSmithyDocumentSerde
@@ -103,6 +136,9 @@ type GetBucketLifecycleConfigurationOutput struct {
// Indicates which default minimum object size behavior is applied to the
// lifecycle configuration.
//
+ // This parameter applies to general purpose buckets only. It isn't supported for
+ // directory bucket lifecycle configurations.
+ //
// - all_storage_classes_128K - Objects smaller than 128 KB will not transition
// to any storage class by default.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go
index 2fe54dd0..973f3959 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLocation.go
@@ -20,7 +20,7 @@ import (
"io"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns the Region the bucket resides in. You set the bucket's Region using the
// LocationConstraint request parameter in a CreateBucket request. For more
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go
index a5030140..b774266d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketLogging.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns the logging status of a bucket and the permissions users have to view
// and modify that status.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataTableConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataTableConfiguration.go
new file mode 100644
index 00000000..e3b17f1a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetadataTableConfiguration.go
@@ -0,0 +1,239 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package s3
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations"
+ "github.com/aws/aws-sdk-go-v2/service/s3/types"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Retrieves the metadata table configuration for a general purpose bucket. For
+//
+// more information, see [Accelerating data discovery with S3 Metadata]in the Amazon S3 User Guide.
+//
+// Permissions To use this operation, you must have the
+// s3:GetBucketMetadataTableConfiguration permission. For more information, see [Setting up permissions for configuring metadata tables]
+// in the Amazon S3 User Guide.
+//
+// The following operations are related to GetBucketMetadataTableConfiguration :
+//
+// [CreateBucketMetadataTableConfiguration]
+//
+// [DeleteBucketMetadataTableConfiguration]
+//
+// [Setting up permissions for configuring metadata tables]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html
+// [CreateBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataTableConfiguration.html
+// [DeleteBucketMetadataTableConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataTableConfiguration.html
+// [Accelerating data discovery with S3 Metadata]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html
+func (c *Client) GetBucketMetadataTableConfiguration(ctx context.Context, params *GetBucketMetadataTableConfigurationInput, optFns ...func(*Options)) (*GetBucketMetadataTableConfigurationOutput, error) {
+ if params == nil {
+ params = &GetBucketMetadataTableConfigurationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetBucketMetadataTableConfiguration", params, optFns, c.addOperationGetBucketMetadataTableConfigurationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetBucketMetadataTableConfigurationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetBucketMetadataTableConfigurationInput struct {
+
+ // The general purpose bucket that contains the metadata table configuration that
+ // you want to retrieve.
+ //
+ // This member is required.
+ Bucket *string
+
+ // The expected owner of the general purpose bucket that you want to retrieve the
+ // metadata table configuration from.
+ ExpectedBucketOwner *string
+
+ noSmithyDocumentSerde
+}
+
+func (in *GetBucketMetadataTableConfigurationInput) bindEndpointParams(p *EndpointParameters) {
+
+ p.Bucket = in.Bucket
+ p.UseS3ExpressControlEndpoint = ptr.Bool(true)
+}
+
+type GetBucketMetadataTableConfigurationOutput struct {
+
+ // The metadata table configuration for the general purpose bucket.
+ GetBucketMetadataTableConfigurationResult *types.GetBucketMetadataTableConfigurationResult
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetBucketMetadataTableConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsRestxml_serializeOpGetBucketMetadataTableConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetBucketMetadataTableConfiguration{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetBucketMetadataTableConfiguration"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addPutBucketContextMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addIsExpressUserAgent(stack); err != nil {
+ return err
+ }
+ if err = addOpGetBucketMetadataTableConfigurationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketMetadataTableConfiguration(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addMetadataRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addGetBucketMetadataTableConfigurationUpdateEndpoint(stack, options); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = v4.AddContentSHA256HeaderMiddleware(stack); err != nil {
+ return err
+ }
+ if err = disableAcceptEncodingGzip(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSerializeImmutableHostnameBucketMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (v *GetBucketMetadataTableConfigurationInput) bucket() (string, bool) {
+ if v.Bucket == nil {
+ return "", false
+ }
+ return *v.Bucket, true
+}
+
+func newServiceMetadataMiddleware_opGetBucketMetadataTableConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetBucketMetadataTableConfiguration",
+ }
+}
+
+// getGetBucketMetadataTableConfigurationBucketMember returns a pointer to string
+// denoting a provided bucket member valueand a boolean indicating if the input has
+// a modeled bucket name,
+func getGetBucketMetadataTableConfigurationBucketMember(input interface{}) (*string, bool) {
+ in := input.(*GetBucketMetadataTableConfigurationInput)
+ if in.Bucket == nil {
+ return nil, false
+ }
+ return in.Bucket, true
+}
+func addGetBucketMetadataTableConfigurationUpdateEndpoint(stack *middleware.Stack, options Options) error {
+ return s3cust.UpdateEndpoint(stack, s3cust.UpdateEndpointOptions{
+ Accessor: s3cust.UpdateEndpointParameterAccessor{
+ GetBucketFromInput: getGetBucketMetadataTableConfigurationBucketMember,
+ },
+ UsePathStyle: options.UsePathStyle,
+ UseAccelerate: options.UseAccelerate,
+ SupportsAccelerate: true,
+ TargetS3ObjectLambda: false,
+ EndpointResolver: options.EndpointResolver,
+ EndpointResolverOptions: options.EndpointOptions,
+ UseARNRegion: options.UseARNRegion,
+ DisableMultiRegionAccessPoints: options.DisableMultiRegionAccessPoints,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go
index fa83bd27..a83b7262 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketMetricsConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Gets a metrics configuration (specified by the metrics configuration ID) from
// the bucket. Note that this doesn't include the daily storage metrics.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go
index 822da223..8f744ba3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketNotificationConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns the notification configuration of a bucket.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go
index f97d7a45..ac69a473 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketOwnershipControls.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you
// must have the s3:GetBucketOwnershipControls permission. For more information
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go
index ca0e446e..0c0a39e7 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicy.go
@@ -17,9 +17,10 @@ import (
//
// Directory buckets - For directory buckets, you must make requests for this API
// operation to the Regional endpoint. These endpoints support path-style requests
-// in the format https://s3express-control.region_code.amazonaws.com/bucket-name .
-// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in
-// the Amazon S3 User Guide.
+// in the format https://s3express-control.region-code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information about
+// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more
+// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions If you are using an identity other than the root user of the Amazon
// Web Services account that owns the bucket, the calling identity must both have
@@ -56,7 +57,7 @@ import (
// Directory bucket example bucket policies - See [Example bucket policies for S3 Express One Zone] in the Amazon S3 User Guide.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// s3express-control.region.amazonaws.com .
+// s3express-control.region-code.amazonaws.com .
//
// The following action is related to GetBucketPolicy :
//
@@ -64,9 +65,10 @@ import (
//
// [Bucket policy examples]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html
// [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [Using Bucket Policies and User Policies]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html
// [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
func (c *Client) GetBucketPolicy(ctx context.Context, params *GetBucketPolicyInput, optFns ...func(*Options)) (*GetBucketPolicyOutput, error) {
if params == nil {
@@ -89,12 +91,12 @@ type GetBucketPolicyInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use path-style requests in the format
- // https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // https://s3express-control.region-code.amazonaws.com/bucket-name .
// Virtual-hosted-style requests aren't supported. Directory bucket names must be
- // unique in the chosen Availability Zone. Bucket names must also follow the format
- // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
- // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User
- // Guide
+ // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must
+ // also follow the format bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide
//
// Access points - When you use this API operation with an access point, provide
// the alias of the access point in place of the bucket name.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go
index c8ed794e..a5cac1be 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketPolicyStatus.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Retrieves the policy status for an Amazon S3 bucket, indicating whether the
// bucket is public. In order to use this operation, you must have the
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go
index 65877d11..fac6ec2d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketReplication.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns the replication configuration of a bucket.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go
index daddf29b..3398dfc5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketRequestPayment.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns the request payment configuration of a bucket. To use this version of
// the operation, you must be the bucket owner. For more information, see [Requester Pays Buckets].
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go
index f4020a99..6ff16896 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketTagging.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns the tag set associated with the bucket.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go
index 98ddae58..919cf688 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketVersioning.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns the versioning state of a bucket.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go
index d4cb0fe4..3758b878 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetBucketWebsite.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns the website configuration for a bucket. To host website on Amazon S3,
// you can configure a bucket as website by adding a website configuration. For
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go
index 0a9785d2..7d0786c9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObject.go
@@ -36,9 +36,10 @@ import (
// /photos/2006/February/sample.jpg . Also, when you make requests to this API
// operation, your requests are sent to the Zonal endpoint. These endpoints support
// virtual-hosted-style requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
-// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User
-// Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about
+// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions
// - General purpose bucket permissions - You must have the required permissions
@@ -143,7 +144,7 @@ import (
// unsigned (anonymous) request.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following operations are related to GetObject :
//
@@ -152,13 +153,14 @@ import (
// [GetObjectAcl]
//
// [RestoreObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
// [ListBuckets]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html
// [HTTP Host Header Bucket Specification]: https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket
// [Restoring Archived Objects]: https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html
// [GetObjectAcl]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
// [Specifying permissions in a policy]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
//
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
func (c *Client) GetObject(ctx context.Context, params *GetObjectInput, optFns ...func(*Options)) (*GetObjectOutput, error) {
@@ -182,11 +184,12 @@ type GetObjectInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -446,34 +449,49 @@ type GetObjectOutput struct {
// Specifies caching behavior along the request/reply chain.
CacheControl *string
- // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be
- // present if it was uploaded with the object. For more information, see [Checking object integrity]in the
- // Amazon S3 User Guide.
+ // The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only
+ // present if the object was uploaded with the object. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32 *string
- // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be
- // present if it was uploaded with the object. For more information, see [Checking object integrity]in the
- // Amazon S3 User Guide.
+ // The Base64 encoded, 32-bit CRC-32C checksum of the object. This will only be
+ // present if the object was uploaded with the object. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32C *string
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. For more information, see [Checking object integrity]in the
- // Amazon S3 User Guide.
+ // The Base64 encoded, 64-bit CRC-64NVME checksum of the object. For more
+ // information, see [Checking object integrity in the Amazon S3 User Guide].
+ //
+ // [Checking object integrity in the Amazon S3 User Guide]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be
+ // present if the object was uploaded with the object. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA1 *string
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. For more information, see [Checking object integrity]in the
- // Amazon S3 User Guide.
+ // The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be
+ // present if the object was uploaded with the object. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA256 *string
+ // The checksum type, which determines how part-level checksums are combined to
+ // create an object-level checksum for multipart objects. You can use this header
+ // response to verify that the checksum type that is received is the same checksum
+ // type that was specified in the CreateMultipartUpload request. For more
+ // information, see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType types.ChecksumType
+
// Specifies presentational information for the object.
ContentDisposition *string
@@ -515,7 +533,9 @@ type GetObjectOutput struct {
// key-value pairs providing object expiration information. The value of the
// rule-id is URL-encoded.
//
- // This functionality is not supported for directory buckets.
+ // Object expiration information is not returned in directory buckets and this
+ // header returns the value " NotImplemented " in all responses for directory
+ // buckets.
//
// [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html
Expiration *string
@@ -715,6 +735,9 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addResponseChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpGetObjectValidationMiddleware(stack); err != nil {
return err
}
@@ -791,13 +814,20 @@ func getGetObjectRequestValidationModeMember(input interface{}) (string, bool) {
return string(in.ChecksumMode), true
}
+func setGetObjectRequestValidationModeMember(input interface{}, mode string) {
+ in := input.(*GetObjectInput)
+ in.ChecksumMode = types.ChecksumMode(mode)
+}
+
func addGetObjectOutputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
return internalChecksum.AddOutputMiddleware(stack, internalChecksum.OutputMiddlewareOptions{
GetValidationMode: getGetObjectRequestValidationModeMember,
- ValidationAlgorithms: []string{"CRC32", "CRC32C", "SHA256", "SHA1"},
+ SetValidationMode: setGetObjectRequestValidationModeMember,
+ ResponseChecksumValidation: options.ResponseChecksumValidation,
+ ValidationAlgorithms: []string{"CRC64NVME", "CRC32", "CRC32C", "SHA256", "SHA1"},
IgnoreMultipartValidation: true,
- LogValidationSkipped: true,
- LogMultipartValidationSkipped: true,
+ LogValidationSkipped: !options.DisableLogOutputChecksumValidationSkipped,
+ LogMultipartValidationSkipped: !options.DisableLogOutputChecksumValidationSkipped,
})
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go
index 8b1c8e3b..fde39a96 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAcl.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns the access control list (ACL) of an object. To use this operation, you
// must have s3:GetObjectAcl permissions or READ_ACP access to the object. For
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go
index 17a17b0d..ee210cc9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectAttributes.go
@@ -24,9 +24,10 @@ import (
// Directory buckets - For directory buckets, you must make requests for this API
// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
// requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
-// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User
-// Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about
+// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions
//
@@ -126,7 +127,7 @@ import (
// For more information about conditional requests, see [RFC 7232].
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following actions are related to GetObjectAttributes :
//
@@ -150,17 +151,18 @@ import (
// [GetObjectLegalHold]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
// [Server-Side Encryption (Using Customer-Provided Encryption Keys)]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
// [GetObjectTagging]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
// [Specifying Permissions in a Policy]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html
// [RFC 7232]: https://tools.ietf.org/html/rfc7232
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [HeadObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html
// [GetObjectLockConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html
// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
// [GetObjectAcl]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
// [GetObjectRetention]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html
// [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
func (c *Client) GetObjectAttributes(ctx context.Context, params *GetObjectAttributesInput, optFns ...func(*Options)) (*GetObjectAttributesOutput, error) {
if params == nil {
params = &GetObjectAttributesInput{}
@@ -182,11 +184,12 @@ type GetObjectAttributesInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -303,7 +306,7 @@ type GetObjectAttributesOutput struct {
// of a resource found at a URL.
ETag *string
- // The creation date of the object.
+ // Date and time when the object was last modified.
LastModified *time.Time
// A collection of parts associated with a multipart upload.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go
index 5d31b314..f341d2ad 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLegalHold.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Gets an object's current legal hold status. For more information, see [Locking Objects].
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go
index 685bc2e6..7b34287c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectLockConfiguration.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Gets the Object Lock configuration for a bucket. The rule specified in the
// Object Lock configuration will be applied by default to every new object placed
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go
index d7aa3633..7a72820e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectRetention.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Retrieves an object's retention settings. For more information, see [Locking Objects].
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go
index 485861e6..805d16c2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTagging.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns the tag-set of an object. You send the GET request against the tagging
// subresource associated with the object.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go
index 608e0eef..dc314d66 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetObjectTorrent.go
@@ -14,7 +14,7 @@ import (
"io"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns torrent files from a bucket. BitTorrent can save you bandwidth when
// you're distributing large files.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go
index d80905d5..bd760d74 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_GetPublicAccessBlock.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use
// this operation, you must have the s3:GetBucketPublicAccessBlock permission. For
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go
index af7524a5..a26cefd0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadBucket.go
@@ -57,18 +57,21 @@ import (
// User Guide.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// You must make requests for this API operation to the Zonal endpoint. These
// endpoints support virtual-hosted-style requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests
-// are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style
+// requests are not supported. For more information about endpoints in Availability
+// Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about endpoints in
+// Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
// [REST Authentication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
// [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [Managing access permissions to your Amazon S3 resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
func (c *Client) HeadBucket(ctx context.Context, params *HeadBucketInput, optFns ...func(*Options)) (*HeadBucketOutput, error) {
if params == nil {
params = &HeadBucketInput{}
@@ -90,11 +93,12 @@ type HeadBucketInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -153,8 +157,9 @@ type HeadBucketOutput struct {
// The name of the location where the bucket will be created.
//
- // For directory buckets, the AZ ID of the Availability Zone where the bucket is
- // created. An example AZ ID value is usw2-az1 .
+ // For directory buckets, the Zone ID of the Availability Zone or the Local Zone
+ // where the bucket is created. An example Zone ID value for an Availability Zone
+ // is usw2-az1 .
//
// This functionality is only supported by directory buckets.
BucketLocationName *string
@@ -460,6 +465,9 @@ func bucketExistsStateRetryable(ctx context.Context, input *HeadBucketInput, out
}
}
+ if err != nil {
+ return false, err
+ }
return true, nil
}
@@ -629,6 +637,9 @@ func bucketNotExistsStateRetryable(ctx context.Context, input *HeadBucketInput,
}
}
+ if err != nil {
+ return false, err
+ }
return true, nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go
index 198d05f1..e943c2b6 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_HeadObject.go
@@ -105,7 +105,7 @@ import (
// - If the specified version is a delete marker, the response returns a 405
// Method Not Allowed error and the Last-Modified: timestamp response header.
//
-// - Directory buckets - Delete marker is not supported by directory buckets.
+// - Directory buckets - Delete marker is not supported for directory buckets.
//
// - Directory buckets - S3 Versioning isn't enabled and supported for directory
// buckets. For this API operation, only the null value of the version ID is
@@ -113,13 +113,14 @@ import (
// query parameter in the request.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// For directory buckets, you must make requests for this API operation to the
// Zonal endpoint. These endpoints support virtual-hosted-style requests in the
-// format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
-// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon
-// S3 User Guide.
+// format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name
+// . Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about
+// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// The following actions are related to HeadObject :
//
@@ -128,12 +129,13 @@ import (
// [GetObjectAttributes]
//
// [Server-Side Encryption (Using Customer-Provided Encryption Keys)]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [GetObjectAttributes]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html
// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
// [Actions, resources, and condition keys for Amazon S3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html
// [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
// [Common Request Headers]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
//
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
func (c *Client) HeadObject(ctx context.Context, params *HeadObjectInput, optFns ...func(*Options)) (*HeadObjectOutput, error) {
@@ -157,11 +159,12 @@ type HeadObjectInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -378,50 +381,65 @@ type HeadObjectOutput struct {
// Specifies caching behavior along the request/reply chain.
CacheControl *string
- // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only
+ // be present if the checksum was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumCRC32 *string
- // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 32-bit CRC-32C checksum of the object. This checksum is
+ // only present if the checksum was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumCRC32C *string
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. When you use the API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 64-bit CRC-64NVME checksum of the object. For more
+ // information, see [Checking object integrity in the Amazon S3 User Guide].
+ //
+ // [Checking object integrity in the Amazon S3 User Guide]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be
+ // present if the object was uploaded with the object. When you use the API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumSHA1 *string
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be
+ // present if the object was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumSHA256 *string
+ // The checksum type, which determines how part-level checksums are combined to
+ // create an object-level checksum for multipart objects. You can use this header
+ // response to verify that the checksum type that is received is the same checksum
+ // type that was specified in CreateMultipartUpload request. For more information,
+ // see [Checking object integrity in the Amazon S3 User Guide].
+ //
+ // [Checking object integrity in the Amazon S3 User Guide]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType types.ChecksumType
+
// Specifies presentational information for the object.
ContentDisposition *string
@@ -454,7 +472,9 @@ type HeadObjectOutput struct {
// key-value pairs providing object expiration information. The value of the
// rule-id is URL-encoded.
//
- // This functionality is not supported for directory buckets.
+ // Object expiration information is not returned in directory buckets and this
+ // header returns the value " NotImplemented " in all responses for directory
+ // buckets.
//
// [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html
Expiration *string
@@ -920,6 +940,9 @@ func objectExistsStateRetryable(ctx context.Context, input *HeadObjectInput, out
}
}
+ if err != nil {
+ return false, err
+ }
return true, nil
}
@@ -1089,6 +1112,9 @@ func objectNotExistsStateRetryable(ctx context.Context, input *HeadObjectInput,
}
}
+ if err != nil {
+ return false, err
+ }
return true, nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go
index c78d9e49..dd35f119 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketAnalyticsConfigurations.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Lists the analytics configurations for the bucket. You can have up to 1,000
// analytics configurations per bucket.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go
index f139a43d..3f6d19a3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Lists the S3 Intelligent-Tiering configuration from the specified bucket.
//
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go
index 449bae06..5a675d2a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketInventoryConfigurations.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns a list of inventory configurations for the bucket. You can have up to
// 1,000 analytics configurations per bucket.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go
index 4d34f6e9..e6484f4b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBucketMetricsConfigurations.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Lists the metrics configurations for the bucket. The metrics configurations are
// only for the request metrics of the bucket and do not provide information on
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go
index 22ea9f0c..d8754082 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListBuckets.go
@@ -13,13 +13,22 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns a list of all buckets owned by the authenticated sender of the request.
-// To use this operation, you must have the s3:ListAllMyBuckets permission.
+// To grant IAM permission to use this operation, you must add the
+// s3:ListAllMyBuckets policy action.
//
// For information about Amazon S3 buckets, see [Creating, configuring, and working with Amazon S3 buckets].
//
+// We strongly recommend using only paginated ListBuckets requests. Unpaginated
+// ListBuckets requests are only supported for Amazon Web Services accounts set to
+// the default general purpose bucket quota of 10,000. If you have an approved
+// general purpose bucket quota above 10,000, you must send paginated ListBuckets
+// requests to list your account’s buckets. All unpaginated ListBuckets requests
+// will be rejected for Amazon Web Services accounts with a general purpose bucket
+// quota greater than 10,000.
+//
// [Creating, configuring, and working with Amazon S3 buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html
func (c *Client) ListBuckets(ctx context.Context, params *ListBucketsInput, optFns ...func(*Options)) (*ListBucketsOutput, error) {
if params == nil {
@@ -59,6 +68,11 @@ type ListBucketsInput struct {
// Length Constraints: Minimum length of 0. Maximum length of 1024.
//
// Required: No.
+ //
+ // If you specify the bucket-region , prefix , or continuation-token query
+ // parameters without using max-buckets to set the maximum number of buckets
+ // returned in the response, Amazon S3 applies a default page size of 10,000 and
+ // provides a continuation token if there are more buckets.
ContinuationToken *string
// Maximum number of buckets to be returned in response. When the number is more
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go
index e375413d..ca9ccb58 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListDirectoryBuckets.go
@@ -20,9 +20,10 @@ import (
//
// Directory buckets - For directory buckets, you must make requests for this API
// operation to the Regional endpoint. These endpoints support path-style requests
-// in the format https://s3express-control.region_code.amazonaws.com/bucket-name .
-// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in
-// the Amazon S3 User Guide.
+// in the format https://s3express-control.region-code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information about
+// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more
+// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions You must have the s3express:ListAllMyDirectoryBuckets permission in
// an IAM identity-based policy instead of a bucket policy. Cross-account access to
@@ -33,8 +34,12 @@ import (
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
// s3express-control.region.amazonaws.com .
//
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// The BucketRegion response element is not part of the ListDirectoryBuckets
+// Response Syntax.
+//
// [Directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
func (c *Client) ListDirectoryBuckets(ctx context.Context, params *ListDirectoryBucketsInput, optFns ...func(*Options)) (*ListDirectoryBucketsOutput, error) {
if params == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go
index 0a4bfe33..1c2ecf1d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListMultipartUploads.go
@@ -21,7 +21,7 @@ import (
// you can't delete the bucket until all the in-progress multipart uploads are
// aborted or completed. To delete these in-progress multipart uploads, use the
// ListMultipartUploads operation to list the in-progress multipart uploads in the
-// bucket and use the AbortMultupartUpload operation to abort all the in-progress
+// bucket and use the AbortMultipartUpload operation to abort all the in-progress
// multipart uploads.
//
// The ListMultipartUploads operation returns a maximum of 1,000 multipart uploads
@@ -46,9 +46,10 @@ import (
// Directory buckets - For directory buckets, you must make requests for this API
// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
// requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
-// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User
-// Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about
+// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions
//
@@ -84,7 +85,7 @@ import (
// uploads aren't sorted lexicographically based on the object keys.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following operations are related to ListMultipartUploads :
//
@@ -102,10 +103,11 @@ import (
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
// [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
// [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
// [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
// [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
func (c *Client) ListMultipartUploads(ctx context.Context, params *ListMultipartUploadsInput, optFns ...func(*Options)) (*ListMultipartUploadsOutput, error) {
if params == nil {
@@ -128,11 +130,12 @@ type ListMultipartUploadsInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go
index 72324c49..32898706 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectVersions.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns metadata about all versions of the objects in a bucket. You can also
// use request parameters as selection criteria to return metadata about a subset
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go
index 3aba10ed..de91cd3b 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjects.go
@@ -13,7 +13,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Returns some or all (up to 1,000) of the objects in a bucket. You can use the
// request parameters as selection criteria to return a subset of the objects in a
@@ -63,11 +63,12 @@ type ListObjectsInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go
index fa5a2eef..6ba1083d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListObjectsV2.go
@@ -17,10 +17,8 @@ import (
// You can use the request parameters as selection criteria to return a subset of
// the objects in a bucket. A 200 OK response can contain valid or invalid XML.
// Make sure to design your application to parse the contents of the response and
-// handle it appropriately.
-//
-// For more information about listing objects, see [Listing object keys programmatically] in the Amazon S3 User Guide.
-// To get a list of your buckets, see [ListBuckets].
+// handle it appropriately. For more information about listing objects, see [Listing object keys programmatically]in the
+// Amazon S3 User Guide. To get a list of your buckets, see [ListBuckets].
//
// - General purpose bucket - For general purpose buckets, ListObjectsV2 doesn't
// return prefixes that are related only to in-progress multipart uploads.
@@ -31,9 +29,10 @@ import (
// - Directory buckets - For directory buckets, you must make requests for this
// API operation to the Zonal endpoint. These endpoints support
// virtual-hosted-style requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
-// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the
-// Amazon S3 User Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information
+// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions
//
@@ -64,7 +63,7 @@ import (
// objects in lexicographical order.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// This section describes the latest revision of this action. We recommend that
// you use this revised API operation for application development. For backward
@@ -82,13 +81,14 @@ import (
// [ListObjects]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html
// [Permissions Related to Bucket Subresource Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
// [Listing object keys programmatically]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [ListBuckets]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html
// [PutObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
// [GetObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
// [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
func (c *Client) ListObjectsV2(ctx context.Context, params *ListObjectsV2Input, optFns ...func(*Options)) (*ListObjectsV2Output, error) {
if params == nil {
params = &ListObjectsV2Input{}
@@ -108,11 +108,12 @@ type ListObjectsV2Input struct {
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go
index 54af4816..575ab00a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_ListParts.go
@@ -33,9 +33,10 @@ import (
// Directory buckets - For directory buckets, you must make requests for this API
// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
// requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
-// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User
-// Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about
+// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions
// - General purpose bucket permissions - For information about permissions
@@ -60,7 +61,7 @@ import (
// expires. For more information about authorization, see [CreateSession]CreateSession .
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following operations are related to ListParts :
//
@@ -79,12 +80,13 @@ import (
// [Uploading Objects Using Multipart Upload]: https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html
// [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
// [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [GetObjectAttributes]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html
// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
// [Multipart Upload and Permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
// [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
// [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
//
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
func (c *Client) ListParts(ctx context.Context, params *ListPartsInput, optFns ...func(*Options)) (*ListPartsOutput, error) {
@@ -108,11 +110,12 @@ type ListPartsInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -242,6 +245,15 @@ type ListPartsOutput struct {
// The algorithm that was used to create a checksum of the object.
ChecksumAlgorithm types.ChecksumAlgorithm
+ // The checksum type, which determines how part-level checksums are combined to
+ // create an object-level checksum for multipart objects. You can use this header
+ // response to verify that the checksum type that is received is the same checksum
+ // type that was specified in CreateMultipartUpload request. For more information,
+ // see [Checking object integrity in the Amazon S3 User Guide].
+ //
+ // [Checking object integrity in the Amazon S3 User Guide]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType types.ChecksumType
+
// Container element that identifies who initiated the multipart upload. If the
// initiator is an Amazon Web Services account, this element provides the same
// information as the Owner element. If the initiator is an IAM User, this element
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go
index c400607c..1de5853d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAccelerateConfiguration.go
@@ -15,7 +15,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer
// Acceleration is a bucket-level feature that enables you to perform faster data
@@ -185,6 +185,9 @@ func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack *
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketAccelerateConfigurationValidationMiddleware(stack); err != nil {
return err
}
@@ -262,9 +265,10 @@ func getPutBucketAccelerateConfigurationRequestAlgorithmMember(input interface{}
}
func addPutBucketAccelerateConfigurationInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketAccelerateConfigurationRequestAlgorithmMember,
RequireChecksum: false,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go
index 9562fafb..ee3def34 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAcl.go
@@ -15,7 +15,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Sets the permissions on an existing bucket using access control lists (ACL).
// For more information, see [Using ACLs]. To set the ACL of a bucket, you must have the
@@ -209,7 +209,7 @@ type PutBucketAclInput struct {
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. This header must be used as
+ // The Base64 encoded 128-bit MD5 digest of the data. This header must be used as
// a message integrity check to verify that the request body was not corrupted in
// transit. For more information, go to [RFC 1864.]
//
@@ -329,6 +329,9 @@ func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, op
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketAclValidationMiddleware(stack); err != nil {
return err
}
@@ -409,9 +412,10 @@ func getPutBucketAclRequestAlgorithmMember(input interface{}) (string, bool) {
}
func addPutBucketAclInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketAclRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go
index 99846ef4..ff457d60 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketAnalyticsConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Sets an analytics configuration for the bucket (specified by the analytics
// configuration ID). You can have up to 1,000 analytics configurations per bucket.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go
index a08c41c1..a07483a5 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketCors.go
@@ -15,7 +15,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Sets the cors configuration for your bucket. If the configuration exists,
// Amazon S3 replaces it.
@@ -106,7 +106,7 @@ type PutBucketCorsInput struct {
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. This header must be used as
+ // The Base64 encoded 128-bit MD5 digest of the data. This header must be used as
// a message integrity check to verify that the request body was not corrupted in
// transit. For more information, go to [RFC 1864.]
//
@@ -207,6 +207,9 @@ func (c *Client) addOperationPutBucketCorsMiddlewares(stack *middleware.Stack, o
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketCorsValidationMiddleware(stack); err != nil {
return err
}
@@ -287,9 +290,10 @@ func getPutBucketCorsRequestAlgorithmMember(input interface{}) (string, bool) {
}
func addPutBucketCorsInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketCorsRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go
index d994a02e..e22c5db4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketEncryption.go
@@ -20,9 +20,10 @@ import (
//
// Directory buckets - For directory buckets, you must make requests for this API
// operation to the Regional endpoint. These endpoints support path-style requests
-// in the format https://s3express-control.region_code.amazonaws.com/bucket-name .
-// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in
-// the Amazon S3 User Guide.
+// in the format https://s3express-control.region-code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information about
+// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more
+// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// By default, all buckets have a default encryption configuration that uses
// server-side encryption with Amazon S3 managed keys (SSE-S3).
@@ -97,7 +98,7 @@ import (
// policies and KMS key policies for the target KMS key.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// s3express-control.region.amazonaws.com .
+// s3express-control.region-code.amazonaws.com .
//
// The following operations are related to PutBucketEncryption :
//
@@ -106,13 +107,13 @@ import (
// [DeleteBucketEncryption]
//
// [Specifying server-side encryption with KMS for new object uploads]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [KMS customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
// [Amazon S3 Bucket Default Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
// [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
// [Permissions Related to Bucket Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
// [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
// [Authenticating Requests (Amazon Web Services Signature Version 4)]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
@@ -123,6 +124,7 @@ import (
// [default bucket encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
// [the import jobs]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
// [the Copy operation in Batch Operations]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
func (c *Client) PutBucketEncryption(ctx context.Context, params *PutBucketEncryptionInput, optFns ...func(*Options)) (*PutBucketEncryptionOutput, error) {
if params == nil {
params = &PutBucketEncryptionInput{}
@@ -145,12 +147,12 @@ type PutBucketEncryptionInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use path-style requests in the format
- // https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // https://s3express-control.region-code.amazonaws.com/bucket-name .
// Virtual-hosted-style requests aren't supported. Directory bucket names must be
- // unique in the chosen Availability Zone. Bucket names must also follow the format
- // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
- // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User
- // Guide
+ // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must
+ // also follow the format bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide
//
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
//
@@ -178,7 +180,7 @@ type PutBucketEncryptionInput struct {
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the server-side encryption
+ // The Base64 encoded 128-bit MD5 digest of the server-side encryption
// configuration.
//
// For requests made using the Amazon Web Services Command Line Interface (CLI) or
@@ -282,6 +284,9 @@ func (c *Client) addOperationPutBucketEncryptionMiddlewares(stack *middleware.St
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketEncryptionValidationMiddleware(stack); err != nil {
return err
}
@@ -362,9 +367,10 @@ func getPutBucketEncryptionRequestAlgorithmMember(input interface{}) (string, bo
}
func addPutBucketEncryptionInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketEncryptionRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go
index b061daac..6a11a094 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can
// have up to 1,000 S3 Intelligent-Tiering configurations per bucket.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go
index 87ec6030..d4ea335a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketInventoryConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// This implementation of the PUT action adds an inventory configuration
// (identified by the inventory ID) to the bucket. You can have up to 1,000
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go
index 4ab7b63b..3a4b7ae9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLifecycleConfiguration.go
@@ -15,25 +15,34 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
-//
// Creates a new lifecycle configuration for the bucket or replaces an existing
// lifecycle configuration. Keep in mind that this will overwrite an existing
// lifecycle configuration, so if you want to retain any configuration details,
// they must be included in the new lifecycle configuration. For information about
// lifecycle configuration, see [Managing your storage lifecycle].
//
-// Rules You specify the lifecycle configuration in your request body. The
-// lifecycle configuration is specified as XML consisting of one or more rules. An
-// Amazon S3 Lifecycle configuration can have up to 1,000 rules. This limit is not
-// adjustable.
+// Bucket lifecycle configuration now supports specifying a lifecycle rule using
+// an object key name prefix, one or more object tags, object size, or any
+// combination of these. Accordingly, this section describes the latest API. The
+// previous version of the API supported filtering based only on an object key name
+// prefix, which is supported for backward compatibility. For the related API
+// description, see [PutBucketLifecycle].
+//
+// Rules Permissions HTTP Host header syntax You specify the lifecycle
+// configuration in your request body. The lifecycle configuration is specified as
+// XML consisting of one or more rules. An Amazon S3 Lifecycle configuration can
+// have up to 1,000 rules. This limit is not adjustable.
//
// Bucket lifecycle configuration supports specifying a lifecycle rule using an
// object key name prefix, one or more object tags, object size, or any combination
// of these. Accordingly, this section describes the latest API. The previous
// version of the API supported filtering based only on an object key name prefix,
-// which is supported for backward compatibility. For the related API description,
-// see [PutBucketLifecycle].
+// which is supported for backward compatibility for general purpose buckets. For
+// the related API description, see [PutBucketLifecycle].
+//
+// Lifecyle configurations for directory buckets only support expiring objects and
+// cancelling multipart uploads. Expiring of versioned objects,transitions and tag
+// filters are not supported.
//
// A lifecycle rule consists of the following:
//
@@ -52,42 +61,67 @@ import (
//
// For more information, see [Object Lifecycle Management] and [Lifecycle Configuration Elements].
//
-// Permissions By default, all Amazon S3 resources are private, including buckets,
-// objects, and related subresources (for example, lifecycle configuration and
-// website configuration). Only the resource owner (that is, the Amazon Web
-// Services account that created it) can access the resource. The resource owner
-// can optionally grant access permissions to others by writing an access policy.
-// For this operation, a user must get the s3:PutLifecycleConfiguration permission.
+// - General purpose bucket permissions - By default, all Amazon S3 resources
+// are private, including buckets, objects, and related subresources (for example,
+// lifecycle configuration and website configuration). Only the resource owner
+// (that is, the Amazon Web Services account that created it) can access the
+// resource. The resource owner can optionally grant access permissions to others
+// by writing an access policy. For this operation, a user must have the
+// s3:PutLifecycleConfiguration permission.
//
// You can also explicitly deny permissions. An explicit deny also supersedes any
-// other permissions. If you want to block users or accounts from removing or
-// deleting objects from your bucket, you must deny them permissions for the
-// following actions:
//
-// - s3:DeleteObject
+// other permissions. If you want to block users or accounts from removing or
+// deleting objects from your bucket, you must deny them permissions for the
+// following actions:
//
-// - s3:DeleteObjectVersion
+// - s3:DeleteObject
//
-// - s3:PutLifecycleConfiguration
+// - s3:DeleteObjectVersion
+//
+// - s3:PutLifecycleConfiguration
//
// For more information about permissions, see [Managing Access Permissions to Your Amazon S3 Resources].
//
-// The following operations are related to PutBucketLifecycleConfiguration :
+// - Directory bucket permissions - You must have the
+// s3express:PutLifecycleConfiguration permission in an IAM identity-based policy
+// to use this operation. Cross-account access to this API operation isn't
+// supported. The resource owner can optionally grant access permissions to others
+// by creating a role or user for them as long as they are within the same account
+// as the owner and resource.
+//
+// For more information about directory bucket policies and permissions, see [Authorizing Regional endpoint APIs with IAM]in
+//
+// the Amazon S3 User Guide.
+//
+// Directory buckets - For directory buckets, you must make requests for this API
+//
+// operation to the Regional endpoint. These endpoints support path-style requests
+// in the format https://s3express-control.region-code.amazonaws.com/bucket-name
+// . Virtual-hosted-style requests aren't supported. For more information about
+// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more
+// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
-// [Examples of Lifecycle Configuration]
+// Directory buckets - The HTTP Host header syntax is
+// s3express-control.region.amazonaws.com .
+//
+// The following operations are related to PutBucketLifecycleConfiguration :
//
// [GetBucketLifecycleConfiguration]
//
// [DeleteBucketLifecycle]
//
-// [Examples of Lifecycle Configuration]: https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html
// [Object Lifecycle Management]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html
// [Lifecycle Configuration Elements]: https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html
// [GetBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html
+// [Authorizing Regional endpoint APIs with IAM]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
// [PutBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html
// [Managing Access Permissions to Your Amazon S3 Resources]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
// [DeleteBucketLifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html
// [Managing your storage lifecycle]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html
+//
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
func (c *Client) PutBucketLifecycleConfiguration(ctx context.Context, params *PutBucketLifecycleConfigurationInput, optFns ...func(*Options)) (*PutBucketLifecycleConfigurationOutput, error) {
if params == nil {
params = &PutBucketLifecycleConfigurationInput{}
@@ -126,6 +160,9 @@ type PutBucketLifecycleConfigurationInput struct {
// The account ID of the expected bucket owner. If the account ID that you provide
// does not match the actual owner of the bucket, the request fails with the HTTP
// status code 403 Forbidden (access denied).
+ //
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
ExpectedBucketOwner *string
// Container for lifecycle rules. You can add as many as 1,000 rules.
@@ -134,6 +171,9 @@ type PutBucketLifecycleConfigurationInput struct {
// Indicates which default minimum object size behavior is applied to the
// lifecycle configuration.
//
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
+ //
// - all_storage_classes_128K - Objects smaller than 128 KB will not transition
// to any storage class by default.
//
@@ -161,6 +201,9 @@ type PutBucketLifecycleConfigurationOutput struct {
// Indicates which default minimum object size behavior is applied to the
// lifecycle configuration.
//
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
+ //
// - all_storage_classes_128K - Objects smaller than 128 KB will not transition
// to any storage class by default.
//
@@ -250,6 +293,9 @@ func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *m
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketLifecycleConfigurationValidationMiddleware(stack); err != nil {
return err
}
@@ -330,9 +376,10 @@ func getPutBucketLifecycleConfigurationRequestAlgorithmMember(input interface{})
}
func addPutBucketLifecycleConfigurationInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketLifecycleConfigurationRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go
index 10e04be1..e5e3938f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketLogging.go
@@ -15,7 +15,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Set the logging parameters for a bucket and to specify permissions for who can
// view and modify the logging parameters. All logs are saved to buckets in the
@@ -214,6 +214,9 @@ func (c *Client) addOperationPutBucketLoggingMiddlewares(stack *middleware.Stack
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketLoggingValidationMiddleware(stack); err != nil {
return err
}
@@ -294,9 +297,10 @@ func getPutBucketLoggingRequestAlgorithmMember(input interface{}) (string, bool)
}
func addPutBucketLoggingInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketLoggingRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go
index fcf7930a..0cd04f45 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketMetricsConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Sets a metrics configuration (specified by the metrics configuration ID) for
// the bucket. You can have up to 1,000 metrics configurations per bucket. If
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go
index 6c08e313..cbc39609 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketNotificationConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Enables notifications of specified events for a bucket. For more information
// about event notifications, see [Configuring Event Notifications].
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go
index 6d5517e8..dadf5d35 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketOwnershipControls.go
@@ -15,7 +15,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this
// operation, you must have the s3:PutBucketOwnershipControls permission. For more
@@ -156,6 +156,9 @@ func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(stack *middle
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketOwnershipControlsValidationMiddleware(stack); err != nil {
return err
}
@@ -226,9 +229,10 @@ func newServiceMetadataMiddleware_opPutBucketOwnershipControls(region string) *a
}
func addPutBucketOwnershipControlsInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: nil,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go
index b7e93b2c..978b85e9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketPolicy.go
@@ -19,9 +19,10 @@ import (
//
// Directory buckets - For directory buckets, you must make requests for this API
// operation to the Regional endpoint. These endpoints support path-style requests
-// in the format https://s3express-control.region_code.amazonaws.com/bucket-name .
-// Virtual-hosted-style requests aren't supported. For more information, see [Regional and Zonal endpoints]in
-// the Amazon S3 User Guide.
+// in the format https://s3express-control.region-code.amazonaws.com/bucket-name .
+// Virtual-hosted-style requests aren't supported. For more information about
+// endpoints in Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more
+// information about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions If you are using an identity other than the root user of the Amazon
// Web Services account that owns the bucket, the calling identity must both have
@@ -58,7 +59,7 @@ import (
// Directory bucket example bucket policies - See [Example bucket policies for S3 Express One Zone] in the Amazon S3 User Guide.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// s3express-control.region.amazonaws.com .
+// s3express-control.region-code.amazonaws.com .
//
// The following operations are related to PutBucketPolicy :
//
@@ -68,10 +69,11 @@ import (
//
// [Bucket policy examples]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html
// [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [DeleteBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html
// [Using Bucket Policies and User Policies]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html
// [CreateBucket]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
func (c *Client) PutBucketPolicy(ctx context.Context, params *PutBucketPolicyInput, optFns ...func(*Options)) (*PutBucketPolicyOutput, error) {
if params == nil {
@@ -94,12 +96,12 @@ type PutBucketPolicyInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use path-style requests in the format
- // https://s3express-control.region_code.amazonaws.com/bucket-name .
+ // https://s3express-control.region-code.amazonaws.com/bucket-name .
// Virtual-hosted-style requests aren't supported. Directory bucket names must be
- // unique in the chosen Availability Zone. Bucket names must also follow the format
- // bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3
- // ). For information about bucket naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User
- // Guide
+ // unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must
+ // also follow the format bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide
//
// [Directory bucket naming rules]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
//
@@ -123,21 +125,22 @@ type PutBucketPolicyInput struct {
// For the x-amz-checksum-algorithm header, replace algorithm with the
// supported algorithm from the following list:
//
- // - CRC32
+ // - CRC-32
//
- // - CRC32C
+ // - CRC-32C
//
- // - SHA1
+ // - CRC-64NVME
//
- // - SHA256
+ // - SHA-1
+ //
+ // - SHA-256
//
// For more information, see [Checking object integrity] in the Amazon S3 User Guide.
//
// If the individual checksum value you provide through x-amz-checksum-algorithm
// doesn't match the checksum algorithm you set through
- // x-amz-sdk-checksum-algorithm , Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter and uses the checksum algorithm that matches the provided value in
- // x-amz-checksum-algorithm .
+ // x-amz-sdk-checksum-algorithm , Amazon S3 fails the request with a BadDigest
+ // error.
//
// For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the
// default checksum algorithm that's used for performance.
@@ -254,6 +257,9 @@ func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack,
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketPolicyValidationMiddleware(stack); err != nil {
return err
}
@@ -334,9 +340,10 @@ func getPutBucketPolicyRequestAlgorithmMember(input interface{}) (string, bool)
}
func addPutBucketPolicyInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketPolicyRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go
index 1b67f7ec..3c6c8f00 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketReplication.go
@@ -15,7 +15,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Creates a replication configuration or replaces an existing one. For more
// information, see [Replication]in the Amazon S3 User Guide.
@@ -121,7 +121,7 @@ type PutBucketReplicationInput struct {
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. You must use this header as
+ // The Base64 encoded 128-bit MD5 digest of the data. You must use this header as
// a message integrity check to verify that the request body was not corrupted in
// transit. For more information, see [RFC 1864].
//
@@ -225,6 +225,9 @@ func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.S
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketReplicationValidationMiddleware(stack); err != nil {
return err
}
@@ -305,9 +308,10 @@ func getPutBucketReplicationRequestAlgorithmMember(input interface{}) (string, b
}
func addPutBucketReplicationInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketReplicationRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go
index fb9ffd47..b57a29f4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketRequestPayment.go
@@ -15,7 +15,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Sets the request payment configuration for a bucket. By default, the bucket
// owner pays for downloads from the bucket. This configuration parameter enables
@@ -71,7 +71,7 @@ type PutBucketRequestPaymentInput struct {
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. You must use this header as
+ // The Base64 encoded 128-bit MD5 digest of the data. You must use this header as
// a message integrity check to verify that the request body was not corrupted in
// transit. For more information, see [RFC 1864].
//
@@ -172,6 +172,9 @@ func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(stack *middlewar
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketRequestPaymentValidationMiddleware(stack); err != nil {
return err
}
@@ -252,9 +255,10 @@ func getPutBucketRequestPaymentRequestAlgorithmMember(input interface{}) (string
}
func addPutBucketRequestPaymentInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketRequestPaymentRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go
index 7bd67f9b..e38139d9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketTagging.go
@@ -15,7 +15,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Sets the tags for a bucket.
//
@@ -103,7 +103,7 @@ type PutBucketTaggingInput struct {
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. You must use this header as
+ // The Base64 encoded 128-bit MD5 digest of the data. You must use this header as
// a message integrity check to verify that the request body was not corrupted in
// transit. For more information, see [RFC 1864].
//
@@ -204,6 +204,9 @@ func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketTaggingValidationMiddleware(stack); err != nil {
return err
}
@@ -284,9 +287,10 @@ func getPutBucketTaggingRequestAlgorithmMember(input interface{}) (string, bool)
}
func addPutBucketTaggingInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketTaggingRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go
index 04cbcf08..82f1c172 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketVersioning.go
@@ -15,11 +15,13 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// When you enable versioning on a bucket for the first time, it might take a
-// short amount of time for the change to be fully propagated. We recommend that
-// you wait for 15 minutes after enabling versioning before issuing write
+// short amount of time for the change to be fully propagated. While this change is
+// propagating, you might encounter intermittent HTTP 404 NoSuchKey errors for
+// requests to objects created or updated after enabling versioning. We recommend
+// that you wait for 15 minutes after enabling versioning before issuing write
// operations ( PUT or DELETE ) on objects in the bucket.
//
// Sets the versioning state of an existing bucket.
@@ -101,7 +103,7 @@ type PutBucketVersioningInput struct {
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumAlgorithm types.ChecksumAlgorithm
- // >The base64-encoded 128-bit MD5 digest of the data. You must use this header as
+ // >The Base64 encoded 128-bit MD5 digest of the data. You must use this header as
// a message integrity check to verify that the request body was not corrupted in
// transit. For more information, see [RFC 1864].
//
@@ -206,6 +208,9 @@ func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.St
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketVersioningValidationMiddleware(stack); err != nil {
return err
}
@@ -286,9 +291,10 @@ func getPutBucketVersioningRequestAlgorithmMember(input interface{}) (string, bo
}
func addPutBucketVersioningInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketVersioningRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go
index ebcb87f4..73822e36 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutBucketWebsite.go
@@ -15,7 +15,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Sets the configuration of the website that is specified in the website
// subresource. To configure a bucket as a website, you can add this subresource on
@@ -126,7 +126,7 @@ type PutBucketWebsiteInput struct {
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. You must use this header as
+ // The Base64 encoded 128-bit MD5 digest of the data. You must use this header as
// a message integrity check to verify that the request body was not corrupted in
// transit. For more information, see [RFC 1864].
//
@@ -227,6 +227,9 @@ func (c *Client) addOperationPutBucketWebsiteMiddlewares(stack *middleware.Stack
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutBucketWebsiteValidationMiddleware(stack); err != nil {
return err
}
@@ -307,9 +310,10 @@ func getPutBucketWebsiteRequestAlgorithmMember(input interface{}) (string, bool)
}
func addPutBucketWebsiteInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutBucketWebsiteRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go
index 60e0e419..36e4fee4 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObject.go
@@ -31,9 +31,10 @@ import (
// - Directory buckets - For directory buckets, you must make requests for this
// API operation to the Zonal endpoint. These endpoints support
// virtual-hosted-style requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name .
-// Path-style requests are not supported. For more information, see [Regional and Zonal endpoints]in the
-// Amazon S3 User Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information
+// about endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Amazon S3 is a distributed system. If it receives multiple write requests for
// the same object simultaneously, it overwrites all but the last object written.
@@ -99,7 +100,7 @@ import (
// buckets.
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// For more information about related Amazon S3 APIs, see the following:
//
@@ -109,10 +110,11 @@ import (
//
// [Amazon S3 Object Lock]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html
// [DeleteObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [Adding Objects to Versioning-Enabled Buckets]: https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html
// [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
// [CreateSession]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [GetBucketVersioning]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html
func (c *Client) PutObject(ctx context.Context, params *PutObjectInput, optFns ...func(*Options)) (*PutObjectOutput, error) {
if params == nil {
@@ -135,11 +137,12 @@ type PutObjectInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -240,21 +243,22 @@ type PutObjectInput struct {
// For the x-amz-checksum-algorithm header, replace algorithm with the
// supported algorithm from the following list:
//
- // - CRC32
+ // - CRC-32
//
- // - CRC32C
+ // - CRC-32C
//
- // - SHA1
+ // - CRC-64NVME
//
- // - SHA256
+ // - SHA-1
+ //
+ // - SHA-256
//
// For more information, see [Checking object integrity] in the Amazon S3 User Guide.
//
// If the individual checksum value you provide through x-amz-checksum-algorithm
// doesn't match the checksum algorithm you set through
- // x-amz-sdk-checksum-algorithm , Amazon S3 ignores any provided ChecksumAlgorithm
- // parameter and uses the checksum algorithm that matches the provided value in
- // x-amz-checksum-algorithm .
+ // x-amz-sdk-checksum-algorithm , Amazon S3 fails the request with a BadDigest
+ // error.
//
// The Content-MD5 or x-amz-sdk-checksum-algorithm header is required for any
// request to upload an object with a retention period configured using Amazon S3
@@ -269,7 +273,7 @@ type PutObjectInput struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity]
+ // Base64 encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity]
// in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -277,15 +281,23 @@ type PutObjectInput struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see
- // [Checking object integrity]in the Amazon S3 User Guide.
+ // Base64 encoded, 32-bit CRC-32C checksum of the object. For more information,
+ // see [Checking object integrity]in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32C *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 160-bit SHA-1 digest of the object. For more information, see [Checking object integrity]
+ // Base64 encoded, 64-bit CRC-64NVME checksum of the object. The CRC-64NVME
+ // checksum is always a full object checksum. For more information, see [Checking object integrity in the Amazon S3 User Guide].
+ //
+ // [Checking object integrity in the Amazon S3 User Guide]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // This header can be used as a data integrity check to verify that the data
+ // received is the same data that was originally sent. This header specifies the
+ // Base64 encoded, 160-bit SHA-1 digest of the object. For more information, see [Checking object integrity]
// in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -293,7 +305,7 @@ type PutObjectInput struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 256-bit SHA-256 digest of the object. For more information, see [Checking object integrity]
+ // Base64 encoded, 256-bit SHA-256 digest of the object. For more information, see [Checking object integrity]
// in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -320,7 +332,7 @@ type PutObjectInput struct {
// [https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length
ContentLength *int64
- // The base64-encoded 128-bit MD5 digest of the message (without the headers)
+ // The Base64 encoded 128-bit MD5 digest of the message (without the headers)
// according to RFC 1864. This header can be used as a message integrity check to
// verify that the data is the same data that was originally sent. Although it is
// optional, we recommend using the Content-MD5 mechanism as an end-to-end
@@ -381,6 +393,23 @@ type PutObjectInput struct {
// - This functionality is not supported for Amazon S3 on Outposts.
GrantWriteACP *string
+ // Uploads the object only if the ETag (entity tag) value provided during the
+ // WRITE operation matches the ETag of the object in S3. If the ETag values do not
+ // match, the operation returns a 412 Precondition Failed error.
+ //
+ // If a conflicting operation occurs during the upload S3 returns a 409
+ // ConditionalRequestConflict response. On a 409 failure you should fetch the
+ // object's ETag and retry the upload.
+ //
+ // Expects the ETag value as a string.
+ //
+ // For more information about conditional requests, see [RFC 7232], or [Conditional requests] in the Amazon S3
+ // User Guide.
+ //
+ // [Conditional requests]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
+ // [RFC 7232]: https://tools.ietf.org/html/rfc7232
+ IfMatch *string
+
// Uploads the object only if the object key name does not already exist in the
// bucket specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.
//
@@ -454,7 +483,7 @@ type PutObjectInput struct {
// Specifies the Amazon Web Services KMS Encryption Context as an additional
// encryption context to use for object encryption. The value of this header is a
- // Base64-encoded string of a UTF-8 encoded JSON, which contains the encryption
+ // Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption
// context as key-value pairs. This value is stored as object metadata and
// automatically gets passed on to Amazon Web Services KMS for future GetObject
// operations on this object.
@@ -593,6 +622,14 @@ type PutObjectInput struct {
// [Object Key and Metadata]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
WebsiteRedirectLocation *string
+ // Specifies the offset for appending data to existing objects in bytes. The
+ // offset must be equal to the size of the existing object being appended to. If no
+ // object exists, setting this header to 0 will create a new object.
+ //
+ // This functionality is only supported for objects in the Amazon S3 Express One
+ // Zone storage class in directory buckets.
+ WriteOffsetBytes *int64
+
noSmithyDocumentSerde
}
@@ -609,50 +646,69 @@ type PutObjectOutput struct {
// encryption with Key Management Service (KMS) keys (SSE-KMS).
BucketKeyEnabled *bool
- // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only
+ // be present if the checksum was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumCRC32 *string
- // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 32-bit CRC-32C checksum of the object. This checksum is
+ // only present if the checksum was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumCRC32C *string
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. When you use the API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 64-bit CRC-64NVME checksum of the object. This header is
+ // present if the object was uploaded with the CRC-64NVME checksum algorithm, or
+ // if it was uploaded without a checksum (and Amazon S3 added the default checksum,
+ // CRC-64NVME , to the uploaded object). For more information about how checksums
+ // are calculated with multipart uploads, see [Checking object integrity in the Amazon S3 User Guide].
+ //
+ // [Checking object integrity in the Amazon S3 User Guide]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be
+ // present if the object was uploaded with the object. When you use the API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumSHA1 *string
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be
+ // present if the object was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumSHA256 *string
+ // This header specifies the checksum type of the object, which determines how
+ // part-level checksums are combined to create an object-level checksum for
+ // multipart objects. For PutObject uploads, the checksum type is always
+ // FULL_OBJECT . You can use this header as a data integrity check to verify that
+ // the checksum type that is received is the same checksum that was specified. For
+ // more information, see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType types.ChecksumType
+
// Entity tag for the uploaded object.
//
// General purpose buckets - To ensure that data is not corrupted traversing the
@@ -669,7 +725,9 @@ type PutObjectOutput struct {
// rule-id key-value pairs that provide information about object expiration. The
// value of the rule-id is URL-encoded.
//
- // This functionality is not supported for directory buckets.
+ // Object expiration information is not returned in directory buckets and this
+ // header returns the value " NotImplemented " in all responses for directory
+ // buckets.
//
// [PutBucketLifecycleConfiguration]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html
Expiration *string
@@ -695,7 +753,7 @@ type PutObjectOutput struct {
SSECustomerKeyMD5 *string
// If present, indicates the Amazon Web Services KMS Encryption Context to use for
- // object encryption. The value of this header is a Base64-encoded string of a
+ // object encryption. The value of this header is a Base64 encoded string of a
// UTF-8 encoded JSON, which contains the encryption context as key-value pairs.
// This value is stored as object metadata and automatically gets passed on to
// Amazon Web Services KMS for future GetObject operations on this object.
@@ -708,6 +766,13 @@ type PutObjectOutput struct {
// S3.
ServerSideEncryption types.ServerSideEncryption
+ // The size of the object in bytes. This value is only be present if you append
+ // to an object.
+ //
+ // This functionality is only supported for objects in the Amazon S3 Express One
+ // Zone storage class in directory buckets.
+ Size *int64
+
// Version ID of the object.
//
// If you enable versioning for a bucket, Amazon S3 automatically generates a
@@ -799,6 +864,9 @@ func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, optio
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutObjectValidationMiddleware(stack); err != nil {
return err
}
@@ -882,9 +950,10 @@ func getPutObjectRequestAlgorithmMember(input interface{}) (string, bool) {
}
func addPutObjectInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutObjectRequestAlgorithmMember,
RequireChecksum: false,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: true,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
@@ -928,6 +997,8 @@ func (c *PresignClient) PresignPutObject(ctx context.Context, params *PutObjectI
}
clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+ clientOptFns = append(options.ClientOptions, withNoDefaultChecksumAPIOption)
+
result, _, err := c.client.invokeOperation(ctx, "PutObject", params, clientOptFns,
c.client.addOperationPutObjectMiddlewares,
presignConverter(options).convertToPresignMiddleware,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go
index 48138402..ee2653ad 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectAcl.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Uses the acl subresource to set the access control list (ACL) permissions for a
// new or existing object in an S3 bucket. You must have the WRITE_ACP permission
@@ -228,7 +228,7 @@ type PutObjectAclInput struct {
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumAlgorithm types.ChecksumAlgorithm
- // The base64-encoded 128-bit MD5 digest of the data. This header must be used as
+ // The Base64 encoded 128-bit MD5 digest of the data. This header must be used as
// a message integrity check to verify that the request body was not corrupted in
// transit. For more information, go to [RFC 1864.>]
//
@@ -381,6 +381,9 @@ func (c *Client) addOperationPutObjectAclMiddlewares(stack *middleware.Stack, op
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutObjectAclValidationMiddleware(stack); err != nil {
return err
}
@@ -461,9 +464,10 @@ func getPutObjectAclRequestAlgorithmMember(input interface{}) (string, bool) {
}
func addPutObjectAclInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutObjectAclRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go
index 22737391..4e04474e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLegalHold.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Applies a legal hold configuration to the specified object. For more
// information, see [Locking Objects].
@@ -196,6 +196,9 @@ func (c *Client) addOperationPutObjectLegalHoldMiddlewares(stack *middleware.Sta
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutObjectLegalHoldValidationMiddleware(stack); err != nil {
return err
}
@@ -276,9 +279,10 @@ func getPutObjectLegalHoldRequestAlgorithmMember(input interface{}) (string, boo
}
func addPutObjectLegalHoldInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutObjectLegalHoldRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go
index 3b0501d8..3209220c 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectLockConfiguration.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Places an Object Lock configuration on the specified bucket. The rule specified
// in the Object Lock configuration will be applied by default to every new object
@@ -187,6 +187,9 @@ func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(stack *middle
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutObjectLockConfigurationValidationMiddleware(stack); err != nil {
return err
}
@@ -267,9 +270,10 @@ func getPutObjectLockConfigurationRequestAlgorithmMember(input interface{}) (str
}
func addPutObjectLockConfigurationInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutObjectLockConfigurationRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go
index 6bb5682f..1971fd20 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectRetention.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Places an Object Retention configuration on an object. For more information,
// see [Locking Objects]. Users or accounts require the s3:PutObjectRetention permission in order
@@ -203,6 +203,9 @@ func (c *Client) addOperationPutObjectRetentionMiddlewares(stack *middleware.Sta
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutObjectRetentionValidationMiddleware(stack); err != nil {
return err
}
@@ -283,9 +286,10 @@ func getPutObjectRetentionRequestAlgorithmMember(input interface{}) (string, boo
}
func addPutObjectRetentionInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutObjectRetentionRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go
index 1f637c93..3c1907e1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutObjectTagging.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Sets the supplied tag-set to an object that already exists in a bucket. A tag
// is a key-value pair. For more information, see [Object Tagging].
@@ -239,6 +239,9 @@ func (c *Client) addOperationPutObjectTaggingMiddlewares(stack *middleware.Stack
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutObjectTaggingValidationMiddleware(stack); err != nil {
return err
}
@@ -319,9 +322,10 @@ func getPutObjectTaggingRequestAlgorithmMember(input interface{}) (string, bool)
}
func addPutObjectTaggingInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutObjectTaggingRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go
index 7878fb78..7be6f639 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_PutPublicAccessBlock.go
@@ -15,7 +15,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Creates or modifies the PublicAccessBlock configuration for an Amazon S3
// bucket. To use this operation, you must have the s3:PutBucketPublicAccessBlock
@@ -190,6 +190,9 @@ func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.S
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpPutPublicAccessBlockValidationMiddleware(stack); err != nil {
return err
}
@@ -270,9 +273,10 @@ func getPutPublicAccessBlockRequestAlgorithmMember(input interface{}) (string, b
}
func addPutPublicAccessBlockInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getPutPublicAccessBlockRequestAlgorithmMember,
RequireChecksum: true,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go
index cadb89ac..5e14a69a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_RestoreObject.go
@@ -14,7 +14,7 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// # Restores an archived copy of an object back into Amazon S3
//
@@ -341,6 +341,9 @@ func (c *Client) addOperationRestoreObjectMiddlewares(stack *middleware.Stack, o
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpRestoreObjectValidationMiddleware(stack); err != nil {
return err
}
@@ -418,9 +421,10 @@ func getRestoreObjectRequestAlgorithmMember(input interface{}) (string, bool) {
}
func addRestoreObjectInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getRestoreObjectRequestAlgorithmMember,
RequireChecksum: false,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: false,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go
index 8497b468..b22b0dd0 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_SelectObjectContent.go
@@ -14,7 +14,7 @@ import (
"sync"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// This action filters the contents of an Amazon S3 object based on a simple
// structured query language (SQL) statement. In the request, along with the SQL
@@ -117,6 +117,9 @@ func (c *Client) SelectObjectContent(ctx context.Context, params *SelectObjectCo
return out, nil
}
+// Learn Amazon S3 Select is no longer available to new customers. Existing
+// customers of Amazon S3 Select can continue to use the feature as usual. [Learn more]
+//
// Request to filter the contents of an Amazon S3 object based on a simple
// Structured Query Language (SQL) statement. In the request, along with the SQL
// expression, you must specify a data serialization format (JSON or CSV) of the
@@ -124,6 +127,7 @@ func (c *Client) SelectObjectContent(ctx context.Context, params *SelectObjectCo
// records that match the specified SQL expression. You must also specify the data
// serialization format for the response. For more information, see [S3Select API Documentation].
//
+// [Learn more]: http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/
// [S3Select API Documentation]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html
type SelectObjectContentInput struct {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go
index 62ee5938..2efa8a73 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPart.go
@@ -46,9 +46,10 @@ import (
// Directory buckets - For directory buckets, you must make requests for this API
// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
// requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
-// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User
-// Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about
+// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Permissions
// - General purpose bucket permissions - To perform a multipart upload with
@@ -142,7 +143,7 @@ import (
// - SOAP Fault Code Prefix: Client
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following operations are related to UploadPart :
//
@@ -158,15 +159,16 @@ import (
//
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
// [Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature Version 4)]: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
// [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
// [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [Using Server-Side Encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
// [Multipart upload limits]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html
// [AbortMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
// [Multipart Upload Overview]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html
// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
//
// [Protecting data using server-side encryption with KMS]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html
// [Multipart upload and permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
@@ -193,11 +195,12 @@ type UploadPartInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
@@ -263,7 +266,7 @@ type UploadPartInput struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity]
+ // Base64 encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity]
// in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -271,15 +274,23 @@ type UploadPartInput struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see
- // [Checking object integrity]in the Amazon S3 User Guide.
+ // Base64 encoded, 32-bit CRC-32C checksum of the object. For more information,
+ // see [Checking object integrity]in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32C *string
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 160-bit SHA-1 digest of the object. For more information, see [Checking object integrity]
+ // Base64 encoded, 64-bit CRC-64NVME checksum of the part. For more information,
+ // see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // This header can be used as a data integrity check to verify that the data
+ // received is the same data that was originally sent. This header specifies the
+ // Base64 encoded, 160-bit SHA-1 digest of the object. For more information, see [Checking object integrity]
// in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -287,7 +298,7 @@ type UploadPartInput struct {
// This header can be used as a data integrity check to verify that the data
// received is the same data that was originally sent. This header specifies the
- // base64-encoded, 256-bit SHA-256 digest of the object. For more information, see [Checking object integrity]
+ // Base64 encoded, 256-bit SHA-256 digest of the object. For more information, see [Checking object integrity]
// in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -297,7 +308,7 @@ type UploadPartInput struct {
// cannot be determined automatically.
ContentLength *int64
- // The base64-encoded 128-bit MD5 digest of the part data. This parameter is
+ // The Base64 encoded 128-bit MD5 digest of the part data. This parameter is
// auto-populated when using the command from the CLI. This parameter is required
// if object lock parameters are specified.
//
@@ -359,45 +370,53 @@ type UploadPartOutput struct {
// encryption with Key Management Service (KMS) keys (SSE-KMS).
BucketKeyEnabled *bool
- // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only
+ // be present if the checksum was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumCRC32 *string
- // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 32-bit CRC-32C checksum of the object. This checksum is
+ // only present if the checksum was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumCRC32C *string
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. When you use the API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // This header can be used as a data integrity check to verify that the data
+ // received is the same data that was originally sent. This header specifies the
+ // Base64 encoded, 64-bit CRC-64NVME checksum of the part. For more information,
+ // see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be
+ // present if the object was uploaded with the object. When you use the API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumSHA1 *string
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be
+ // present if the object was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
@@ -509,6 +528,9 @@ func (c *Client) addOperationUploadPartMiddlewares(stack *middleware.Stack, opti
if err = addIsExpressUserAgent(stack); err != nil {
return err
}
+ if err = addRequestChecksumMetricsTracking(stack, options); err != nil {
+ return err
+ }
if err = addOpUploadPartValidationMiddleware(stack); err != nil {
return err
}
@@ -592,9 +614,10 @@ func getUploadPartRequestAlgorithmMember(input interface{}) (string, bool) {
}
func addUploadPartInputChecksumMiddlewares(stack *middleware.Stack, options Options) error {
- return internalChecksum.AddInputMiddleware(stack, internalChecksum.InputMiddlewareOptions{
+ return addInputChecksumMiddleware(stack, internalChecksum.InputMiddlewareOptions{
GetAlgorithm: getUploadPartRequestAlgorithmMember,
RequireChecksum: false,
+ RequestChecksumCalculation: options.RequestChecksumCalculation,
EnableTrailingChecksum: true,
EnableComputeSHA256PayloadHash: true,
EnableDecodedContentLengthHeader: true,
@@ -639,6 +662,8 @@ func (c *PresignClient) PresignUploadPart(ctx context.Context, params *UploadPar
}
clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
+ clientOptFns = append(options.ClientOptions, withNoDefaultChecksumAPIOption)
+
result, _, err := c.client.invokeOperation(ctx, "UploadPart", params, clientOptFns,
c.client.addOperationUploadPartMiddlewares,
presignConverter(options).convertToPresignMiddleware,
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go
index a0b4e5ef..10cc2e74 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_UploadPartCopy.go
@@ -37,9 +37,10 @@ import (
// Directory buckets - For directory buckets, you must make requests for this API
// operation to the Zonal endpoint. These endpoints support virtual-hosted-style
// requests in the format
-// https://bucket_name.s3express-az_id.region.amazonaws.com/key-name . Path-style
-// requests are not supported. For more information, see [Regional and Zonal endpoints]in the Amazon S3 User
-// Guide.
+// https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name .
+// Path-style requests are not supported. For more information about endpoints in
+// Availability Zones, see [Regional and Zonal endpoints for directory buckets in Availability Zones]in the Amazon S3 User Guide. For more information about
+// endpoints in Local Zones, see [Available Local Zone for directory buckets]in the Amazon S3 User Guide.
//
// Authentication and authorization All UploadPartCopy requests must be
// authenticated and signed by using IAM credentials (access key ID and secret
@@ -100,33 +101,28 @@ import (
// For example policies, see [Example bucket policies for S3 Express One Zone]and [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone]in the Amazon S3 User Guide.
//
// Encryption
-// - General purpose buckets -
//
-// For information about using server-side encryption with customer-provided
+// - General purpose buckets - For information about using server-side
+// encryption with customer-provided encryption keys with the UploadPartCopy
+// operation, see [CopyObject]and [UploadPart].
//
-// encryption keys with the UploadPartCopy operation, see [CopyObject]and [UploadPart].
-//
-// - Directory buckets - For directory buckets, there are only two supported
-// options for server-side encryption: server-side encryption with Amazon S3
-// managed keys (SSE-S3) ( AES256 ) and server-side encryption with KMS keys
-// (SSE-KMS) ( aws:kms ). For more information, see [Protecting data with server-side encryption]in the Amazon S3 User Guide.
+// - Directory buckets - For directory buckets, there are only two supported
+// options for server-side encryption: server-side encryption with Amazon S3
+// managed keys (SSE-S3) ( AES256 ) and server-side encryption with KMS keys
+// (SSE-KMS) ( aws:kms ). For more information, see [Protecting data with server-side encryption]in the Amazon S3 User Guide.
//
// For directory buckets, when you perform a CreateMultipartUpload operation and an
//
-// UploadPartCopy operation,
-//
-// the request headers you provide in the CreateMultipartUpload request must match
-//
-// the default encryption configuration of the destination bucket.
+// UploadPartCopy operation, the request headers you provide in the
+// CreateMultipartUpload request must match the default encryption configuration
+// of the destination bucket.
//
// S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from
//
-// general purpose buckets
-//
-// to directory buckets, from directory buckets to general purpose buckets, or
-//
-// between directory buckets, through [UploadPartCopy]. In this case, Amazon S3 makes a call to
-// KMS every time a copy request is made for a KMS-encrypted object.
+// general purpose buckets to directory buckets, from directory buckets to general
+// purpose buckets, or between directory buckets, through [UploadPartCopy]. In this case, Amazon
+// S3 makes a call to KMS every time a copy request is made for a KMS-encrypted
+// object.
//
// Special errors
//
@@ -145,7 +141,7 @@ import (
// - HTTP Status Code: 400 Bad Request
//
// HTTP Host header syntax Directory buckets - The HTTP Host header syntax is
-// Bucket_name.s3express-az_id.region.amazonaws.com .
+// Bucket-name.s3express-zone-id.region-code.amazonaws.com .
//
// The following operations are related to UploadPartCopy :
//
@@ -164,11 +160,12 @@ import (
// [Uploading Objects Using Multipart Upload]: https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html
// [ListParts]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
// [UploadPart]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
-// [Regional and Zonal endpoints]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
// [Protecting data using server-side encryption with KMS]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html
+// [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
// [Multipart upload and permissions]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
// [Multipart upload API and permissions]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions
// [CompleteMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
+// [Available Local Zone for directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html
// [CreateMultipartUpload]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
// [Multipart upload limits]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html
// [Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
@@ -176,11 +173,11 @@ import (
// [REST Authentication]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
// [Example bucket policies for S3 Express One Zone]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
// [Operations on Objects]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html
+// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
// [ListMultipartUploads]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
+// [Regional and Zonal endpoints for directory buckets in Availability Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
//
-// [CopyObject]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
// [UploadPartCopy]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
-// [Protecting data with server-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
func (c *Client) UploadPartCopy(ctx context.Context, params *UploadPartCopyInput, optFns ...func(*Options)) (*UploadPartCopyOutput, error) {
if params == nil {
params = &UploadPartCopyInput{}
@@ -202,11 +199,18 @@ type UploadPartCopyInput struct {
//
// Directory buckets - When you use this operation with a directory bucket, you
// must use virtual-hosted-style requests in the format
- // Bucket_name.s3express-az_id.region.amazonaws.com . Path-style requests are not
- // supported. Directory bucket names must be unique in the chosen Availability
- // Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for
- // example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket
- // naming restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ // Bucket-name.s3express-zone-id.region-code.amazonaws.com . Path-style requests
+ // are not supported. Directory bucket names must be unique in the chosen Zone
+ // (Availability Zone or Local Zone). Bucket names must follow the format
+ // bucket-base-name--zone-id--x-s3 (for example,
+ // DOC-EXAMPLE-BUCKET--usw2-az1--x-s3 ). For information about bucket naming
+ // restrictions, see [Directory bucket naming rules]in the Amazon S3 User Guide.
+ //
+ // Copying objects across different Amazon Web Services Regions isn't supported
+ // when the source or destination bucket is in Amazon Web Services Local Zones. The
+ // source and destination buckets must have the same parent Amazon Web Services
+ // Region. Otherwise, you get an HTTP 400 Bad Request error with the error code
+ // InvalidRequest .
//
// Access points - When you use this action with an access point, you must provide
// the alias of the access point in place of the bucket name or specify the access
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go
index a72c98bf..9bce6f8a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_op_WriteGetObjectResponse.go
@@ -18,7 +18,7 @@ import (
"time"
)
-// This operation is not supported by directory buckets.
+// This operation is not supported for directory buckets.
//
// Passes transformed objects to a GetObject operation when using Object Lambda
// access points. For information about Object Lambda access points, see [Transforming objects with Object Lambda access points]in the
@@ -108,12 +108,12 @@ type WriteGetObjectResponseInput struct {
CacheControl *string
// This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This specifies the
- // base64-encoded, 32-bit CRC-32 checksum of the object returned by the Object
- // Lambda function. This may not match the checksum for the object stored in Amazon
- // S3. Amazon S3 will perform validation of the checksum values only when the
- // original GetObject request required checksum validation. For more information
- // about checksums, see [Checking object integrity]in the Amazon S3 User Guide.
+ // received is the same data that was originally sent. This specifies the Base64
+ // encoded, 32-bit CRC-32 checksum of the object returned by the Object Lambda
+ // function. This may not match the checksum for the object stored in Amazon S3.
+ // Amazon S3 will perform validation of the checksum values only when the original
+ // GetObject request required checksum validation. For more information about
+ // checksums, see [Checking object integrity]in the Amazon S3 User Guide.
//
// Only one checksum header can be specified at a time. If you supply multiple
// checksum headers, this request will fail.
@@ -122,12 +122,12 @@ type WriteGetObjectResponseInput struct {
ChecksumCRC32 *string
// This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This specifies the
- // base64-encoded, 32-bit CRC-32C checksum of the object returned by the Object
- // Lambda function. This may not match the checksum for the object stored in Amazon
- // S3. Amazon S3 will perform validation of the checksum values only when the
- // original GetObject request required checksum validation. For more information
- // about checksums, see [Checking object integrity]in the Amazon S3 User Guide.
+ // received is the same data that was originally sent. This specifies the Base64
+ // encoded, 32-bit CRC-32C checksum of the object returned by the Object Lambda
+ // function. This may not match the checksum for the object stored in Amazon S3.
+ // Amazon S3 will perform validation of the checksum values only when the original
+ // GetObject request required checksum validation. For more information about
+ // checksums, see [Checking object integrity]in the Amazon S3 User Guide.
//
// Only one checksum header can be specified at a time. If you supply multiple
// checksum headers, this request will fail.
@@ -136,8 +136,16 @@ type WriteGetObjectResponseInput struct {
ChecksumCRC32C *string
// This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This specifies the
- // base64-encoded, 160-bit SHA-1 digest of the object returned by the Object Lambda
+ // received is the same data that was originally sent. This header specifies the
+ // Base64 encoded, 64-bit CRC-64NVME checksum of the part. For more information,
+ // see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // This header can be used as a data integrity check to verify that the data
+ // received is the same data that was originally sent. This specifies the Base64
+ // encoded, 160-bit SHA-1 digest of the object returned by the Object Lambda
// function. This may not match the checksum for the object stored in Amazon S3.
// Amazon S3 will perform validation of the checksum values only when the original
// GetObject request required checksum validation. For more information about
@@ -150,12 +158,12 @@ type WriteGetObjectResponseInput struct {
ChecksumSHA1 *string
// This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This specifies the
- // base64-encoded, 256-bit SHA-256 digest of the object returned by the Object
- // Lambda function. This may not match the checksum for the object stored in Amazon
- // S3. Amazon S3 will perform validation of the checksum values only when the
- // original GetObject request required checksum validation. For more information
- // about checksums, see [Checking object integrity]in the Amazon S3 User Guide.
+ // received is the same data that was originally sent. This specifies the Base64
+ // encoded, 256-bit SHA-256 digest of the object returned by the Object Lambda
+ // function. This may not match the checksum for the object stored in Amazon S3.
+ // Amazon S3 will perform validation of the checksum values only when the original
+ // GetObject request required checksum validation. For more information about
+ // checksums, see [Checking object integrity]in the Amazon S3 User Guide.
//
// Only one checksum header can be specified at a time. If you supply multiple
// checksum headers, this request will fail.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go
index 47db0f33..877e4231 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/deserializers.go
@@ -341,6 +341,19 @@ func awsRestxml_deserializeOpDocumentCompleteMultipartUploadOutput(v **CompleteM
sv.ChecksumCRC32C = ptr.String(xtv)
}
+ case strings.EqualFold("ChecksumCRC64NVME", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ChecksumCRC64NVME = ptr.String(xtv)
+ }
+
case strings.EqualFold("ChecksumSHA1", t.Name.Local):
val, err := decoder.Value()
if err != nil {
@@ -367,6 +380,19 @@ func awsRestxml_deserializeOpDocumentCompleteMultipartUploadOutput(v **CompleteM
sv.ChecksumSHA256 = ptr.String(xtv)
}
+ case strings.EqualFold("ChecksumType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ChecksumType = types.ChecksumType(xtv)
+ }
+
case strings.EqualFold("ETag", t.Name.Local):
val, err := decoder.Value()
if err != nil {
@@ -731,6 +757,86 @@ func awsRestxml_deserializeOpHttpBindingsCreateBucketOutput(v *CreateBucketOutpu
return nil
}
+type awsRestxml_deserializeOpCreateBucketMetadataTableConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpCreateBucketMetadataTableConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpCreateBucketMetadataTableConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorCreateBucketMetadataTableConfiguration(response, &metadata)
+ }
+ output := &CreateBucketMetadataTableConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorCreateBucketMetadataTableConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsRestxml_deserializeOpCreateMultipartUpload struct {
}
@@ -871,6 +977,11 @@ func awsRestxml_deserializeOpHttpBindingsCreateMultipartUploadOutput(v *CreateMu
v.ChecksumAlgorithm = types.ChecksumAlgorithm(headerValues[0])
}
+ if headerValues := response.Header.Values("x-amz-checksum-type"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ChecksumType = types.ChecksumType(headerValues[0])
+ }
+
if headerValues := response.Header.Values("x-amz-request-charged"); len(headerValues) != 0 {
headerValues[0] = strings.TrimSpace(headerValues[0])
v.RequestCharged = types.RequestCharged(headerValues[0])
@@ -1721,6 +1832,86 @@ func awsRestxml_deserializeOpErrorDeleteBucketLifecycle(response *smithyhttp.Res
}
}
+type awsRestxml_deserializeOpDeleteBucketMetadataTableConfiguration struct {
+}
+
+func (*awsRestxml_deserializeOpDeleteBucketMetadataTableConfiguration) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpDeleteBucketMetadataTableConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorDeleteBucketMetadataTableConfiguration(response, &metadata)
+ }
+ output := &DeleteBucketMetadataTableConfigurationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorDeleteBucketMetadataTableConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsRestxml_deserializeOpDeleteBucketMetricsConfiguration struct {
}
@@ -4140,14 +4331,14 @@ func awsRestxml_deserializeOpDocumentGetBucketLoggingOutput(v **GetBucketLogging
return nil
}
-type awsRestxml_deserializeOpGetBucketMetricsConfiguration struct {
+type awsRestxml_deserializeOpGetBucketMetadataTableConfiguration struct {
}
-func (*awsRestxml_deserializeOpGetBucketMetricsConfiguration) ID() string {
+func (*awsRestxml_deserializeOpGetBucketMetadataTableConfiguration) ID() string {
return "OperationDeserializer"
}
-func (m *awsRestxml_deserializeOpGetBucketMetricsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsRestxml_deserializeOpGetBucketMetadataTableConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -4165,9 +4356,9 @@ func (m *awsRestxml_deserializeOpGetBucketMetricsConfiguration) HandleDeserializ
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestxml_deserializeOpErrorGetBucketMetricsConfiguration(response, &metadata)
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketMetadataTableConfiguration(response, &metadata)
}
- output := &GetBucketMetricsConfigurationOutput{}
+ output := &GetBucketMetadataTableConfigurationOutput{}
out.Result = output
var buff [1024]byte
@@ -4188,7 +4379,7 @@ func (m *awsRestxml_deserializeOpGetBucketMetricsConfiguration) HandleDeserializ
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- err = awsRestxml_deserializeDocumentMetricsConfiguration(&output.MetricsConfiguration, decoder)
+ err = awsRestxml_deserializeDocumentGetBucketMetadataTableConfigurationResult(&output.GetBucketMetadataTableConfigurationResult, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -4202,7 +4393,7 @@ func (m *awsRestxml_deserializeOpGetBucketMetricsConfiguration) HandleDeserializ
return out, metadata, err
}
-func awsRestxml_deserializeOpErrorGetBucketMetricsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsRestxml_deserializeOpErrorGetBucketMetadataTableConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -4242,13 +4433,13 @@ func awsRestxml_deserializeOpErrorGetBucketMetricsConfiguration(response *smithy
}
}
-func awsRestxml_deserializeOpDocumentGetBucketMetricsConfigurationOutput(v **GetBucketMetricsConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+func awsRestxml_deserializeOpDocumentGetBucketMetadataTableConfigurationOutput(v **GetBucketMetadataTableConfigurationOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *GetBucketMetricsConfigurationOutput
+ var sv *GetBucketMetadataTableConfigurationOutput
if *v == nil {
- sv = &GetBucketMetricsConfigurationOutput{}
+ sv = &GetBucketMetadataTableConfigurationOutput{}
} else {
sv = *v
}
@@ -4264,9 +4455,9 @@ func awsRestxml_deserializeOpDocumentGetBucketMetricsConfigurationOutput(v **Get
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
- case strings.EqualFold("MetricsConfiguration", t.Name.Local):
+ case strings.EqualFold("GetBucketMetadataTableConfigurationResult", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsRestxml_deserializeDocumentMetricsConfiguration(&sv.MetricsConfiguration, nodeDecoder); err != nil {
+ if err := awsRestxml_deserializeDocumentGetBucketMetadataTableConfigurationResult(&sv.GetBucketMetadataTableConfigurationResult, nodeDecoder); err != nil {
return err
}
@@ -4284,14 +4475,14 @@ func awsRestxml_deserializeOpDocumentGetBucketMetricsConfigurationOutput(v **Get
return nil
}
-type awsRestxml_deserializeOpGetBucketNotificationConfiguration struct {
+type awsRestxml_deserializeOpGetBucketMetricsConfiguration struct {
}
-func (*awsRestxml_deserializeOpGetBucketNotificationConfiguration) ID() string {
+func (*awsRestxml_deserializeOpGetBucketMetricsConfiguration) ID() string {
return "OperationDeserializer"
}
-func (m *awsRestxml_deserializeOpGetBucketNotificationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsRestxml_deserializeOpGetBucketMetricsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -4309,9 +4500,9 @@ func (m *awsRestxml_deserializeOpGetBucketNotificationConfiguration) HandleDeser
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestxml_deserializeOpErrorGetBucketNotificationConfiguration(response, &metadata)
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketMetricsConfiguration(response, &metadata)
}
- output := &GetBucketNotificationConfigurationOutput{}
+ output := &GetBucketMetricsConfigurationOutput{}
out.Result = output
var buff [1024]byte
@@ -4332,7 +4523,7 @@ func (m *awsRestxml_deserializeOpGetBucketNotificationConfiguration) HandleDeser
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- err = awsRestxml_deserializeOpDocumentGetBucketNotificationConfigurationOutput(&output, decoder)
+ err = awsRestxml_deserializeDocumentMetricsConfiguration(&output.MetricsConfiguration, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -4346,7 +4537,7 @@ func (m *awsRestxml_deserializeOpGetBucketNotificationConfiguration) HandleDeser
return out, metadata, err
}
-func awsRestxml_deserializeOpErrorGetBucketNotificationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsRestxml_deserializeOpErrorGetBucketMetricsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -4386,13 +4577,13 @@ func awsRestxml_deserializeOpErrorGetBucketNotificationConfiguration(response *s
}
}
-func awsRestxml_deserializeOpDocumentGetBucketNotificationConfigurationOutput(v **GetBucketNotificationConfigurationOutput, decoder smithyxml.NodeDecoder) error {
+func awsRestxml_deserializeOpDocumentGetBucketMetricsConfigurationOutput(v **GetBucketMetricsConfigurationOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *GetBucketNotificationConfigurationOutput
+ var sv *GetBucketMetricsConfigurationOutput
if *v == nil {
- sv = &GetBucketNotificationConfigurationOutput{}
+ sv = &GetBucketMetricsConfigurationOutput{}
} else {
sv = *v
}
@@ -4408,27 +4599,9 @@ func awsRestxml_deserializeOpDocumentGetBucketNotificationConfigurationOutput(v
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
- case strings.EqualFold("EventBridgeConfiguration", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsRestxml_deserializeDocumentEventBridgeConfiguration(&sv.EventBridgeConfiguration, nodeDecoder); err != nil {
- return err
- }
-
- case strings.EqualFold("CloudFunctionConfiguration", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsRestxml_deserializeDocumentLambdaFunctionConfigurationListUnwrapped(&sv.LambdaFunctionConfigurations, nodeDecoder); err != nil {
- return err
- }
-
- case strings.EqualFold("QueueConfiguration", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsRestxml_deserializeDocumentQueueConfigurationListUnwrapped(&sv.QueueConfigurations, nodeDecoder); err != nil {
- return err
- }
-
- case strings.EqualFold("TopicConfiguration", t.Name.Local):
+ case strings.EqualFold("MetricsConfiguration", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsRestxml_deserializeDocumentTopicConfigurationListUnwrapped(&sv.TopicConfigurations, nodeDecoder); err != nil {
+ if err := awsRestxml_deserializeDocumentMetricsConfiguration(&sv.MetricsConfiguration, nodeDecoder); err != nil {
return err
}
@@ -4446,14 +4619,14 @@ func awsRestxml_deserializeOpDocumentGetBucketNotificationConfigurationOutput(v
return nil
}
-type awsRestxml_deserializeOpGetBucketOwnershipControls struct {
+type awsRestxml_deserializeOpGetBucketNotificationConfiguration struct {
}
-func (*awsRestxml_deserializeOpGetBucketOwnershipControls) ID() string {
+func (*awsRestxml_deserializeOpGetBucketNotificationConfiguration) ID() string {
return "OperationDeserializer"
}
-func (m *awsRestxml_deserializeOpGetBucketOwnershipControls) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+func (m *awsRestxml_deserializeOpGetBucketNotificationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) {
out, metadata, err = next.HandleDeserialize(ctx, in)
@@ -4471,9 +4644,9 @@ func (m *awsRestxml_deserializeOpGetBucketOwnershipControls) HandleDeserialize(c
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsRestxml_deserializeOpErrorGetBucketOwnershipControls(response, &metadata)
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketNotificationConfiguration(response, &metadata)
}
- output := &GetBucketOwnershipControlsOutput{}
+ output := &GetBucketNotificationConfigurationOutput{}
out.Result = output
var buff [1024]byte
@@ -4494,7 +4667,7 @@ func (m *awsRestxml_deserializeOpGetBucketOwnershipControls) HandleDeserialize(c
}
decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
- err = awsRestxml_deserializeDocumentOwnershipControls(&output.OwnershipControls, decoder)
+ err = awsRestxml_deserializeOpDocumentGetBucketNotificationConfigurationOutput(&output, decoder)
if err != nil {
var snapshot bytes.Buffer
io.Copy(&snapshot, ringBuffer)
@@ -4508,7 +4681,7 @@ func (m *awsRestxml_deserializeOpGetBucketOwnershipControls) HandleDeserialize(c
return out, metadata, err
}
-func awsRestxml_deserializeOpErrorGetBucketOwnershipControls(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+func awsRestxml_deserializeOpErrorGetBucketNotificationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error {
var errorBuffer bytes.Buffer
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
@@ -4548,13 +4721,13 @@ func awsRestxml_deserializeOpErrorGetBucketOwnershipControls(response *smithyhtt
}
}
-func awsRestxml_deserializeOpDocumentGetBucketOwnershipControlsOutput(v **GetBucketOwnershipControlsOutput, decoder smithyxml.NodeDecoder) error {
+func awsRestxml_deserializeOpDocumentGetBucketNotificationConfigurationOutput(v **GetBucketNotificationConfigurationOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *GetBucketOwnershipControlsOutput
+ var sv *GetBucketNotificationConfigurationOutput
if *v == nil {
- sv = &GetBucketOwnershipControlsOutput{}
+ sv = &GetBucketNotificationConfigurationOutput{}
} else {
sv = *v
}
@@ -4570,17 +4743,179 @@ func awsRestxml_deserializeOpDocumentGetBucketOwnershipControlsOutput(v **GetBuc
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
- case strings.EqualFold("OwnershipControls", t.Name.Local):
+ case strings.EqualFold("EventBridgeConfiguration", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsRestxml_deserializeDocumentOwnershipControls(&sv.OwnershipControls, nodeDecoder); err != nil {
+ if err := awsRestxml_deserializeDocumentEventBridgeConfiguration(&sv.EventBridgeConfiguration, nodeDecoder); err != nil {
return err
}
- default:
- // Do nothing and ignore the unexpected tag element
- err = decoder.Decoder.Skip()
- if err != nil {
- return err
+ case strings.EqualFold("CloudFunctionConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentLambdaFunctionConfigurationListUnwrapped(&sv.LambdaFunctionConfigurations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("QueueConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentQueueConfigurationListUnwrapped(&sv.QueueConfigurations, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("TopicConfiguration", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTopicConfigurationListUnwrapped(&sv.TopicConfigurations, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+type awsRestxml_deserializeOpGetBucketOwnershipControls struct {
+}
+
+func (*awsRestxml_deserializeOpGetBucketOwnershipControls) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsRestxml_deserializeOpGetBucketOwnershipControls) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsRestxml_deserializeOpErrorGetBucketOwnershipControls(response, &metadata)
+ }
+ output := &GetBucketOwnershipControlsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ err = awsRestxml_deserializeDocumentOwnershipControls(&output.OwnershipControls, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ span.End()
+ return out, metadata, err
+}
+
+func awsRestxml_deserializeOpErrorGetBucketOwnershipControls(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := s3shared.GetErrorResponseComponents(errorBody, s3shared.ErrorResponseDeserializerOptions{
+ UseStatusCode: true, StatusCode: response.StatusCode,
+ })
+ if err != nil {
+ return err
+ }
+ if hostID := errorComponents.HostID; len(hostID) != 0 {
+ s3shared.SetHostIDMetadata(metadata, hostID)
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsRestxml_deserializeOpDocumentGetBucketOwnershipControlsOutput(v **GetBucketOwnershipControlsOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *GetBucketOwnershipControlsOutput
+ if *v == nil {
+ sv = &GetBucketOwnershipControlsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("OwnershipControls", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentOwnershipControls(&sv.OwnershipControls, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
}
}
@@ -5723,6 +6058,11 @@ func awsRestxml_deserializeOpHttpBindingsGetObjectOutput(v *GetObjectOutput, res
v.ChecksumCRC32C = ptr.String(headerValues[0])
}
+ if headerValues := response.Header.Values("x-amz-checksum-crc64nvme"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ChecksumCRC64NVME = ptr.String(headerValues[0])
+ }
+
if headerValues := response.Header.Values("x-amz-checksum-sha1"); len(headerValues) != 0 {
headerValues[0] = strings.TrimSpace(headerValues[0])
v.ChecksumSHA1 = ptr.String(headerValues[0])
@@ -5733,6 +6073,11 @@ func awsRestxml_deserializeOpHttpBindingsGetObjectOutput(v *GetObjectOutput, res
v.ChecksumSHA256 = ptr.String(headerValues[0])
}
+ if headerValues := response.Header.Values("x-amz-checksum-type"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ChecksumType = types.ChecksumType(headerValues[0])
+ }
+
if headerValues := response.Header.Values("Content-Disposition"); len(headerValues) != 0 {
headerValues[0] = strings.TrimSpace(headerValues[0])
v.ContentDisposition = ptr.String(headerValues[0])
@@ -7407,6 +7752,11 @@ func awsRestxml_deserializeOpHttpBindingsHeadObjectOutput(v *HeadObjectOutput, r
v.ChecksumCRC32C = ptr.String(headerValues[0])
}
+ if headerValues := response.Header.Values("x-amz-checksum-crc64nvme"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ChecksumCRC64NVME = ptr.String(headerValues[0])
+ }
+
if headerValues := response.Header.Values("x-amz-checksum-sha1"); len(headerValues) != 0 {
headerValues[0] = strings.TrimSpace(headerValues[0])
v.ChecksumSHA1 = ptr.String(headerValues[0])
@@ -7417,6 +7767,11 @@ func awsRestxml_deserializeOpHttpBindingsHeadObjectOutput(v *HeadObjectOutput, r
v.ChecksumSHA256 = ptr.String(headerValues[0])
}
+ if headerValues := response.Header.Values("x-amz-checksum-type"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ChecksumType = types.ChecksumType(headerValues[0])
+ }
+
if headerValues := response.Header.Values("Content-Disposition"); len(headerValues) != 0 {
headerValues[0] = strings.TrimSpace(headerValues[0])
v.ContentDisposition = ptr.String(headerValues[0])
@@ -10052,6 +10407,19 @@ func awsRestxml_deserializeOpDocumentListPartsOutput(v **ListPartsOutput, decode
sv.ChecksumAlgorithm = types.ChecksumAlgorithm(xtv)
}
+ case strings.EqualFold("ChecksumType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ChecksumType = types.ChecksumType(xtv)
+ }
+
case strings.EqualFold("Initiator", t.Name.Local):
nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
if err := awsRestxml_deserializeDocumentInitiator(&sv.Initiator, nodeDecoder); err != nil {
@@ -11703,6 +12071,18 @@ func awsRestxml_deserializeOpErrorPutObject(response *smithyhttp.Response, metad
}
errorBody.Seek(0, io.SeekStart)
switch {
+ case strings.EqualFold("EncryptionTypeMismatch", errorCode):
+ return awsRestxml_deserializeErrorEncryptionTypeMismatch(response, errorBody)
+
+ case strings.EqualFold("InvalidRequest", errorCode):
+ return awsRestxml_deserializeErrorInvalidRequest(response, errorBody)
+
+ case strings.EqualFold("InvalidWriteOffset", errorCode):
+ return awsRestxml_deserializeErrorInvalidWriteOffset(response, errorBody)
+
+ case strings.EqualFold("TooManyParts", errorCode):
+ return awsRestxml_deserializeErrorTooManyParts(response, errorBody)
+
default:
genericError := &smithy.GenericAPIError{
Code: errorCode,
@@ -11737,6 +12117,11 @@ func awsRestxml_deserializeOpHttpBindingsPutObjectOutput(v *PutObjectOutput, res
v.ChecksumCRC32C = ptr.String(headerValues[0])
}
+ if headerValues := response.Header.Values("x-amz-checksum-crc64nvme"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ChecksumCRC64NVME = ptr.String(headerValues[0])
+ }
+
if headerValues := response.Header.Values("x-amz-checksum-sha1"); len(headerValues) != 0 {
headerValues[0] = strings.TrimSpace(headerValues[0])
v.ChecksumSHA1 = ptr.String(headerValues[0])
@@ -11747,6 +12132,11 @@ func awsRestxml_deserializeOpHttpBindingsPutObjectOutput(v *PutObjectOutput, res
v.ChecksumSHA256 = ptr.String(headerValues[0])
}
+ if headerValues := response.Header.Values("x-amz-checksum-type"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ChecksumType = types.ChecksumType(headerValues[0])
+ }
+
if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 {
headerValues[0] = strings.TrimSpace(headerValues[0])
v.ETag = ptr.String(headerValues[0])
@@ -11767,6 +12157,15 @@ func awsRestxml_deserializeOpHttpBindingsPutObjectOutput(v *PutObjectOutput, res
v.ServerSideEncryption = types.ServerSideEncryption(headerValues[0])
}
+ if headerValues := response.Header.Values("x-amz-object-size"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ vv, err := strconv.ParseInt(headerValues[0], 0, 64)
+ if err != nil {
+ return err
+ }
+ v.Size = ptr.Int64(vv)
+ }
+
if headerValues := response.Header.Values("x-amz-server-side-encryption-customer-algorithm"); len(headerValues) != 0 {
headerValues[0] = strings.TrimSpace(headerValues[0])
v.SSECustomerAlgorithm = ptr.String(headerValues[0])
@@ -12615,6 +13014,11 @@ func awsRestxml_deserializeOpHttpBindingsUploadPartOutput(v *UploadPartOutput, r
v.ChecksumCRC32C = ptr.String(headerValues[0])
}
+ if headerValues := response.Header.Values("x-amz-checksum-crc64nvme"); len(headerValues) != 0 {
+ headerValues[0] = strings.TrimSpace(headerValues[0])
+ v.ChecksumCRC64NVME = ptr.String(headerValues[0])
+ }
+
if headerValues := response.Header.Values("x-amz-checksum-sha1"); len(headerValues) != 0 {
headerValues[0] = strings.TrimSpace(headerValues[0])
v.ChecksumSHA1 = ptr.String(headerValues[0])
@@ -13451,6 +13855,11 @@ func awsRestxml_deserializeErrorBucketAlreadyOwnedByYou(response *smithyhttp.Res
return output
}
+func awsRestxml_deserializeErrorEncryptionTypeMismatch(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.EncryptionTypeMismatch{}
+ return output
+}
+
func awsRestxml_deserializeErrorInvalidObjectState(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.InvalidObjectState{}
var buff [1024]byte
@@ -13484,6 +13893,16 @@ func awsRestxml_deserializeErrorInvalidObjectState(response *smithyhttp.Response
return output
}
+func awsRestxml_deserializeErrorInvalidRequest(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidRequest{}
+ return output
+}
+
+func awsRestxml_deserializeErrorInvalidWriteOffset(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.InvalidWriteOffset{}
+ return output
+}
+
func awsRestxml_deserializeErrorNoSuchBucket(response *smithyhttp.Response, errorBody *bytes.Reader) error {
output := &types.NoSuchBucket{}
return output
@@ -13514,6 +13933,11 @@ func awsRestxml_deserializeErrorObjectNotInActiveTierError(response *smithyhttp.
return output
}
+func awsRestxml_deserializeErrorTooManyParts(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ output := &types.TooManyParts{}
+ return output
+}
+
func awsRestxml_deserializeDocumentAbortIncompleteMultipartUpload(v **types.AbortIncompleteMultipartUpload, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -14508,6 +14932,19 @@ func awsRestxml_deserializeDocumentChecksum(v **types.Checksum, decoder smithyxm
sv.ChecksumCRC32C = ptr.String(xtv)
}
+ case strings.EqualFold("ChecksumCRC64NVME", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ChecksumCRC64NVME = ptr.String(xtv)
+ }
+
case strings.EqualFold("ChecksumSHA1", t.Name.Local):
val, err := decoder.Value()
if err != nil {
@@ -14534,6 +14971,19 @@ func awsRestxml_deserializeDocumentChecksum(v **types.Checksum, decoder smithyxm
sv.ChecksumSHA256 = ptr.String(xtv)
}
+ case strings.EqualFold("ChecksumType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ChecksumType = types.ChecksumType(xtv)
+ }
+
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
@@ -14855,7 +15305,7 @@ func awsRestxml_deserializeDocumentCopyObjectResult(v **types.CopyObjectResult,
sv.ChecksumCRC32C = ptr.String(xtv)
}
- case strings.EqualFold("ChecksumSHA1", t.Name.Local):
+ case strings.EqualFold("ChecksumCRC64NVME", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
@@ -14865,10 +15315,10 @@ func awsRestxml_deserializeDocumentCopyObjectResult(v **types.CopyObjectResult,
}
{
xtv := string(val)
- sv.ChecksumSHA1 = ptr.String(xtv)
+ sv.ChecksumCRC64NVME = ptr.String(xtv)
}
- case strings.EqualFold("ChecksumSHA256", t.Name.Local):
+ case strings.EqualFold("ChecksumSHA1", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
@@ -14878,10 +15328,10 @@ func awsRestxml_deserializeDocumentCopyObjectResult(v **types.CopyObjectResult,
}
{
xtv := string(val)
- sv.ChecksumSHA256 = ptr.String(xtv)
+ sv.ChecksumSHA1 = ptr.String(xtv)
}
- case strings.EqualFold("ETag", t.Name.Local):
+ case strings.EqualFold("ChecksumSHA256", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
@@ -14891,10 +15341,10 @@ func awsRestxml_deserializeDocumentCopyObjectResult(v **types.CopyObjectResult,
}
{
xtv := string(val)
- sv.ETag = ptr.String(xtv)
+ sv.ChecksumSHA256 = ptr.String(xtv)
}
- case strings.EqualFold("LastModified", t.Name.Local):
+ case strings.EqualFold("ChecksumType", t.Name.Local):
val, err := decoder.Value()
if err != nil {
return err
@@ -14904,7 +15354,33 @@ func awsRestxml_deserializeDocumentCopyObjectResult(v **types.CopyObjectResult,
}
{
xtv := string(val)
- t, err := smithytime.ParseDateTime(xtv)
+ sv.ChecksumType = types.ChecksumType(xtv)
+ }
+
+ case strings.EqualFold("ETag", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ETag = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("LastModified", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ t, err := smithytime.ParseDateTime(xtv)
if err != nil {
return err
}
@@ -14973,6 +15449,19 @@ func awsRestxml_deserializeDocumentCopyPartResult(v **types.CopyPartResult, deco
sv.ChecksumCRC32C = ptr.String(xtv)
}
+ case strings.EqualFold("ChecksumCRC64NVME", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ChecksumCRC64NVME = ptr.String(xtv)
+ }
+
case strings.EqualFold("ChecksumSHA1", t.Name.Local):
val, err := decoder.Value()
if err != nil {
@@ -15809,6 +16298,42 @@ func awsRestxml_deserializeDocumentEncryptionConfiguration(v **types.EncryptionC
return nil
}
+func awsRestxml_deserializeDocumentEncryptionTypeMismatch(v **types.EncryptionTypeMismatch, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.EncryptionTypeMismatch
+ if *v == nil {
+ sv = &types.EncryptionTypeMismatch{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsRestxml_deserializeDocumentError(v **types.Error, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -15897,6 +16422,68 @@ func awsRestxml_deserializeDocumentError(v **types.Error, decoder smithyxml.Node
return nil
}
+func awsRestxml_deserializeDocumentErrorDetails(v **types.ErrorDetails, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.ErrorDetails
+ if *v == nil {
+ sv = &types.ErrorDetails{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("ErrorCode", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ErrorCode = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("ErrorMessage", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ErrorMessage = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsRestxml_deserializeDocumentErrorDocument(v **types.ErrorDocument, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -16389,6 +16976,67 @@ func awsRestxml_deserializeDocumentFilterRuleListUnwrapped(v *[]types.FilterRule
*v = sv
return nil
}
+func awsRestxml_deserializeDocumentGetBucketMetadataTableConfigurationResult(v **types.GetBucketMetadataTableConfigurationResult, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.GetBucketMetadataTableConfigurationResult
+ if *v == nil {
+ sv = &types.GetBucketMetadataTableConfigurationResult{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Error", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentErrorDetails(&sv.Error, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("MetadataTableConfigurationResult", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentMetadataTableConfigurationResult(&sv.MetadataTableConfigurationResult, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Status", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Status = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsRestxml_deserializeDocumentGetObjectAttributesParts(v **types.GetObjectAttributesParts, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -17063,31 +17711,129 @@ func awsRestxml_deserializeDocumentIntelligentTieringFilter(v **types.Intelligen
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
- case strings.EqualFold("And", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsRestxml_deserializeDocumentIntelligentTieringAndOperator(&sv.And, nodeDecoder); err != nil {
- return err
- }
-
- case strings.EqualFold("Prefix", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.Prefix = ptr.String(xtv)
- }
-
- case strings.EqualFold("Tag", t.Name.Local):
- nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
- if err := awsRestxml_deserializeDocumentTag(&sv.Tag, nodeDecoder); err != nil {
- return err
- }
-
+ case strings.EqualFold("And", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentIntelligentTieringAndOperator(&sv.And, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("Prefix", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.Prefix = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("Tag", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentTag(&sv.Tag, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInvalidObjectState(v **types.InvalidObjectState, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InvalidObjectState
+ if *v == nil {
+ sv = &types.InvalidObjectState{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("AccessTier", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.AccessTier = types.IntelligentTieringAccessTier(xtv)
+ }
+
+ case strings.EqualFold("StorageClass", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.StorageClass = types.StorageClass(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
+func awsRestxml_deserializeDocumentInvalidRequest(v **types.InvalidRequest, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.InvalidRequest
+ if *v == nil {
+ sv = &types.InvalidRequest{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
@@ -17102,13 +17848,13 @@ func awsRestxml_deserializeDocumentIntelligentTieringFilter(v **types.Intelligen
return nil
}
-func awsRestxml_deserializeDocumentInvalidObjectState(v **types.InvalidObjectState, decoder smithyxml.NodeDecoder) error {
+func awsRestxml_deserializeDocumentInvalidWriteOffset(v **types.InvalidWriteOffset, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
}
- var sv *types.InvalidObjectState
+ var sv *types.InvalidWriteOffset
if *v == nil {
- sv = &types.InvalidObjectState{}
+ sv = &types.InvalidWriteOffset{}
} else {
sv = *v
}
@@ -17124,32 +17870,6 @@ func awsRestxml_deserializeDocumentInvalidObjectState(v **types.InvalidObjectSta
originalDecoder := decoder
decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
switch {
- case strings.EqualFold("AccessTier", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.AccessTier = types.IntelligentTieringAccessTier(xtv)
- }
-
- case strings.EqualFold("StorageClass", t.Name.Local):
- val, err := decoder.Value()
- if err != nil {
- return err
- }
- if val == nil {
- break
- }
- {
- xtv := string(val)
- sv.StorageClass = types.StorageClass(xtv)
- }
-
default:
// Do nothing and ignore the unexpected tag element
err = decoder.Decoder.Skip()
@@ -18361,6 +19081,48 @@ func awsRestxml_deserializeDocumentLoggingEnabled(v **types.LoggingEnabled, deco
return nil
}
+func awsRestxml_deserializeDocumentMetadataTableConfigurationResult(v **types.MetadataTableConfigurationResult, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.MetadataTableConfigurationResult
+ if *v == nil {
+ sv = &types.MetadataTableConfigurationResult{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("S3TablesDestinationResult", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsRestxml_deserializeDocumentS3TablesDestinationResult(&sv.S3TablesDestinationResult, nodeDecoder); err != nil {
+ return err
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsRestxml_deserializeDocumentMetrics(v **types.Metrics, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -18729,6 +19491,19 @@ func awsRestxml_deserializeDocumentMultipartUpload(v **types.MultipartUpload, de
sv.ChecksumAlgorithm = types.ChecksumAlgorithm(xtv)
}
+ case strings.EqualFold("ChecksumType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ChecksumType = types.ChecksumType(xtv)
+ }
+
case strings.EqualFold("Initiated", t.Name.Local):
val, err := decoder.Value()
if err != nil {
@@ -19314,6 +20089,19 @@ func awsRestxml_deserializeDocumentObject(v **types.Object, decoder smithyxml.No
return err
}
+ case strings.EqualFold("ChecksumType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ChecksumType = types.ChecksumType(xtv)
+ }
+
case strings.EqualFold("ETag", t.Name.Local):
val, err := decoder.Value()
if err != nil {
@@ -19813,6 +20601,19 @@ func awsRestxml_deserializeDocumentObjectPart(v **types.ObjectPart, decoder smit
sv.ChecksumCRC32C = ptr.String(xtv)
}
+ case strings.EqualFold("ChecksumCRC64NVME", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ChecksumCRC64NVME = ptr.String(xtv)
+ }
+
case strings.EqualFold("ChecksumSHA1", t.Name.Local):
val, err := decoder.Value()
if err != nil {
@@ -19915,6 +20716,19 @@ func awsRestxml_deserializeDocumentObjectVersion(v **types.ObjectVersion, decode
return err
}
+ case strings.EqualFold("ChecksumType", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ChecksumType = types.ChecksumType(xtv)
+ }
+
case strings.EqualFold("ETag", t.Name.Local):
val, err := decoder.Value()
if err != nil {
@@ -20380,6 +21194,19 @@ func awsRestxml_deserializeDocumentPart(v **types.Part, decoder smithyxml.NodeDe
sv.ChecksumCRC32C = ptr.String(xtv)
}
+ case strings.EqualFold("ChecksumCRC64NVME", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.ChecksumCRC64NVME = ptr.String(xtv)
+ }
+
case strings.EqualFold("ChecksumSHA1", t.Name.Local):
val, err := decoder.Value()
if err != nil {
@@ -21871,6 +22698,94 @@ func awsRestxml_deserializeDocumentS3KeyFilter(v **types.S3KeyFilter, decoder sm
return nil
}
+func awsRestxml_deserializeDocumentS3TablesDestinationResult(v **types.S3TablesDestinationResult, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.S3TablesDestinationResult
+ if *v == nil {
+ sv = &types.S3TablesDestinationResult{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("TableArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TableArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("TableBucketArn", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TableBucketArn = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("TableName", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TableName = ptr.String(xtv)
+ }
+
+ case strings.EqualFold("TableNamespace", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.TableNamespace = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsRestxml_deserializeDocumentServerSideEncryptionByDefault(v **types.ServerSideEncryptionByDefault, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
@@ -22943,6 +23858,42 @@ func awsRestxml_deserializeDocumentTieringListUnwrapped(v *[]types.Tiering, deco
*v = sv
return nil
}
+func awsRestxml_deserializeDocumentTooManyParts(v **types.TooManyParts, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *types.TooManyParts
+ if *v == nil {
+ sv = &types.TooManyParts{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsRestxml_deserializeDocumentTopicConfiguration(v **types.TopicConfiguration, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go
index 6ff0cc6e..1a4af282 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go
@@ -993,13 +993,389 @@ func (r *resolver) ResolveEndpoint(
}
}
}
+ if exprVal := rulesfn.SubString(_Bucket, 6, 19, true); exprVal != nil {
+ _s3expressAvailabilityZoneId := *exprVal
+ _ = _s3expressAvailabilityZoneId
+ if exprVal := rulesfn.SubString(_Bucket, 19, 21, true); exprVal != nil {
+ _s3expressAvailabilityZoneDelim := *exprVal
+ _ = _s3expressAvailabilityZoneDelim
+ if _s3expressAvailabilityZoneDelim == "--" {
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-fips-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ if exprVal := rulesfn.SubString(_Bucket, 6, 20, true); exprVal != nil {
+ _s3expressAvailabilityZoneId := *exprVal
+ _ = _s3expressAvailabilityZoneId
+ if exprVal := rulesfn.SubString(_Bucket, 20, 22, true); exprVal != nil {
+ _s3expressAvailabilityZoneDelim := *exprVal
+ _ = _s3expressAvailabilityZoneDelim
+ if _s3expressAvailabilityZoneDelim == "--" {
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-fips-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ if exprVal := rulesfn.SubString(_Bucket, 6, 26, true); exprVal != nil {
+ _s3expressAvailabilityZoneId := *exprVal
+ _ = _s3expressAvailabilityZoneId
+ if exprVal := rulesfn.SubString(_Bucket, 26, 28, true); exprVal != nil {
+ _s3expressAvailabilityZoneDelim := *exprVal
+ _ = _s3expressAvailabilityZoneDelim
+ if _s3expressAvailabilityZoneDelim == "--" {
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-fips-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "aws.auth#sigv4",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
return endpoint, fmt.Errorf("endpoint rule error, %s", "Unrecognized S3Express bucket name format.")
}
}
- if exprVal := rulesfn.SubString(_Bucket, 6, 14, true); exprVal != nil {
+ if exprVal := rulesfn.SubString(_Bucket, 6, 14, true); exprVal != nil {
+ _s3expressAvailabilityZoneId := *exprVal
+ _ = _s3expressAvailabilityZoneId
+ if exprVal := rulesfn.SubString(_Bucket, 14, 16, true); exprVal != nil {
+ _s3expressAvailabilityZoneDelim := *exprVal
+ _ = _s3expressAvailabilityZoneDelim
+ if _s3expressAvailabilityZoneDelim == "--" {
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-fips-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ if exprVal := rulesfn.SubString(_Bucket, 6, 15, true); exprVal != nil {
_s3expressAvailabilityZoneId := *exprVal
_ = _s3expressAvailabilityZoneId
- if exprVal := rulesfn.SubString(_Bucket, 14, 16, true); exprVal != nil {
+ if exprVal := rulesfn.SubString(_Bucket, 15, 17, true); exprVal != nil {
_s3expressAvailabilityZoneDelim := *exprVal
_ = _s3expressAvailabilityZoneDelim
if _s3expressAvailabilityZoneDelim == "--" {
@@ -1090,10 +1466,198 @@ func (r *resolver) ResolveEndpoint(
}
}
}
- if exprVal := rulesfn.SubString(_Bucket, 6, 15, true); exprVal != nil {
+ if exprVal := rulesfn.SubString(_Bucket, 6, 19, true); exprVal != nil {
_s3expressAvailabilityZoneId := *exprVal
_ = _s3expressAvailabilityZoneId
- if exprVal := rulesfn.SubString(_Bucket, 15, 17, true); exprVal != nil {
+ if exprVal := rulesfn.SubString(_Bucket, 19, 21, true); exprVal != nil {
+ _s3expressAvailabilityZoneDelim := *exprVal
+ _ = _s3expressAvailabilityZoneDelim
+ if _s3expressAvailabilityZoneDelim == "--" {
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-fips-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ if exprVal := rulesfn.SubString(_Bucket, 6, 20, true); exprVal != nil {
+ _s3expressAvailabilityZoneId := *exprVal
+ _ = _s3expressAvailabilityZoneId
+ if exprVal := rulesfn.SubString(_Bucket, 20, 22, true); exprVal != nil {
+ _s3expressAvailabilityZoneDelim := *exprVal
+ _ = _s3expressAvailabilityZoneDelim
+ if _s3expressAvailabilityZoneDelim == "--" {
+ if _UseFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-fips-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://")
+ out.WriteString(_Bucket)
+ out.WriteString(".s3express-")
+ out.WriteString(_s3expressAvailabilityZoneId)
+ out.WriteString(".")
+ out.WriteString(_Region)
+ out.WriteString(".amazonaws.com")
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ Properties: func() smithy.Properties {
+ var out smithy.Properties
+ out.Set("backend", "S3Express")
+ smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
+ {
+ SchemeID: "sigv4-s3express",
+ SignerProperties: func() smithy.Properties {
+ var sp smithy.Properties
+ smithyhttp.SetDisableDoubleEncoding(&sp, true)
+
+ smithyhttp.SetSigV4SigningName(&sp, "s3express")
+ smithyhttp.SetSigV4ASigningName(&sp, "s3express")
+
+ smithyhttp.SetSigV4SigningRegion(&sp, _Region)
+ return sp
+ }(),
+ },
+ })
+ return out
+ }(),
+ }, nil
+ }
+ }
+ }
+ if exprVal := rulesfn.SubString(_Bucket, 6, 26, true); exprVal != nil {
+ _s3expressAvailabilityZoneId := *exprVal
+ _ = _s3expressAvailabilityZoneId
+ if exprVal := rulesfn.SubString(_Bucket, 26, 28, true); exprVal != nil {
_s3expressAvailabilityZoneDelim := *exprVal
_ = _s3expressAvailabilityZoneDelim
if _s3expressAvailabilityZoneDelim == "--" {
@@ -3755,8 +4319,8 @@ func (r *resolver) ResolveEndpoint(
return endpoint, fmt.Errorf("endpoint rule error, %s", "S3 Outposts does not support S3 Accelerate")
}
if exprVal := _bucketArn.ResourceId.Get(4); exprVal != nil {
- _var_275 := *exprVal
- _ = _var_275
+ _var_287 := *exprVal
+ _ = _var_287
return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Arn: Outpost Access Point ARN contains sub resources")
}
if exprVal := _bucketArn.ResourceId.Get(1); exprVal != nil {
@@ -3999,8 +4563,8 @@ func (r *resolver) ResolveEndpoint(
}
if _ForcePathStyle == true {
if exprVal := awsrulesfn.ParseARN(_Bucket); exprVal != nil {
- _var_288 := *exprVal
- _ = _var_288
+ _var_300 := *exprVal
+ _ = _var_300
return endpoint, fmt.Errorf("endpoint rule error, %s", "Path-style addressing cannot be used with ARN buckets")
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json
index 6e392285..d865ac68 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/generated.json
@@ -18,6 +18,7 @@
"api_op_CompleteMultipartUpload.go",
"api_op_CopyObject.go",
"api_op_CreateBucket.go",
+ "api_op_CreateBucketMetadataTableConfiguration.go",
"api_op_CreateMultipartUpload.go",
"api_op_CreateSession.go",
"api_op_DeleteBucket.go",
@@ -27,6 +28,7 @@
"api_op_DeleteBucketIntelligentTieringConfiguration.go",
"api_op_DeleteBucketInventoryConfiguration.go",
"api_op_DeleteBucketLifecycle.go",
+ "api_op_DeleteBucketMetadataTableConfiguration.go",
"api_op_DeleteBucketMetricsConfiguration.go",
"api_op_DeleteBucketOwnershipControls.go",
"api_op_DeleteBucketPolicy.go",
@@ -47,6 +49,7 @@
"api_op_GetBucketLifecycleConfiguration.go",
"api_op_GetBucketLocation.go",
"api_op_GetBucketLogging.go",
+ "api_op_GetBucketMetadataTableConfiguration.go",
"api_op_GetBucketMetricsConfiguration.go",
"api_op_GetBucketNotificationConfiguration.go",
"api_op_GetBucketOwnershipControls.go",
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go
index b9199534..32cbb2d2 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go
@@ -3,4 +3,4 @@
package s3
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.66.3"
+const goModuleVersion = "1.75.0"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go
index c887fa35..8b5f10fd 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go
@@ -261,6 +261,15 @@ var defaultPartitions = endpoints.Partitions{
}: {
Hostname: "s3.dualstack.ap-southeast-5.amazonaws.com",
},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-7",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-7",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.ap-southeast-7.amazonaws.com",
+ },
endpoints.EndpointKey{
Region: "aws-global",
}: endpoints.Endpoint{
@@ -469,6 +478,15 @@ var defaultPartitions = endpoints.Partitions{
}: {
Hostname: "s3.dualstack.me-south-1.amazonaws.com",
},
+ endpoints.EndpointKey{
+ Region: "mx-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "mx-central-1",
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "s3.dualstack.mx-central-1.amazonaws.com",
+ },
endpoints.EndpointKey{
Region: "s3-external-1",
}: endpoints.Endpoint{
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go
index 8c67e4c6..6f29b807 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go
@@ -52,6 +52,10 @@ type Options struct {
// clients initial default settings.
DefaultsMode aws.DefaultsMode
+ // Disables logging when the client skips output checksum validation due to lack
+ // of algorithm support.
+ DisableLogOutputChecksumValidationSkipped bool
+
// Allows you to disable S3 Multi-Region access points feature.
DisableMultiRegionAccessPoints bool
@@ -92,6 +96,12 @@ type Options struct {
// The region to send requests to. (Required)
Region string
+ // Indicates how user opt-in/out request checksum calculation
+ RequestChecksumCalculation aws.RequestChecksumCalculation
+
+ // Indicates how user opt-in/out response checksum validation
+ ResponseChecksumValidation aws.ResponseChecksumValidation
+
// RetryMaxAttempts specifies the maximum number attempts an API client will call
// an operation that fails with a retryable error. A value of 0 is ignored, and
// will not be used to configure the API client created default retryer, or modify
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go
index a55233c5..c37fab1e 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/serializers.go
@@ -83,6 +83,11 @@ func awsRestxml_serializeOpHttpBindingsAbortMultipartUploadInput(v *AbortMultipa
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
}
+ if v.IfMatchInitiatedTime != nil {
+ locationName := "X-Amz-If-Match-Initiated-Time"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.IfMatchInitiatedTime))
+ }
+
if v.Key == nil || len(*v.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
@@ -197,6 +202,11 @@ func awsRestxml_serializeOpHttpBindingsCompleteMultipartUploadInput(v *CompleteM
encoder.SetHeader(locationName).String(*v.ChecksumCRC32C)
}
+ if v.ChecksumCRC64NVME != nil {
+ locationName := "X-Amz-Checksum-Crc64nvme"
+ encoder.SetHeader(locationName).String(*v.ChecksumCRC64NVME)
+ }
+
if v.ChecksumSHA1 != nil {
locationName := "X-Amz-Checksum-Sha1"
encoder.SetHeader(locationName).String(*v.ChecksumSHA1)
@@ -207,11 +217,21 @@ func awsRestxml_serializeOpHttpBindingsCompleteMultipartUploadInput(v *CompleteM
encoder.SetHeader(locationName).String(*v.ChecksumSHA256)
}
+ if len(v.ChecksumType) > 0 {
+ locationName := "X-Amz-Checksum-Type"
+ encoder.SetHeader(locationName).String(string(v.ChecksumType))
+ }
+
if v.ExpectedBucketOwner != nil {
locationName := "X-Amz-Expected-Bucket-Owner"
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
}
+ if v.IfMatch != nil {
+ locationName := "If-Match"
+ encoder.SetHeader(locationName).String(*v.IfMatch)
+ }
+
if v.IfNoneMatch != nil {
locationName := "If-None-Match"
encoder.SetHeader(locationName).String(*v.IfNoneMatch)
@@ -226,6 +246,11 @@ func awsRestxml_serializeOpHttpBindingsCompleteMultipartUploadInput(v *CompleteM
}
}
+ if v.MpuObjectSize != nil {
+ locationName := "X-Amz-Mp-Object-Size"
+ encoder.SetHeader(locationName).Long(*v.MpuObjectSize)
+ }
+
if len(v.RequestPayer) > 0 {
locationName := "X-Amz-Request-Payer"
encoder.SetHeader(locationName).String(string(v.RequestPayer))
@@ -647,6 +672,107 @@ func awsRestxml_serializeOpHttpBindingsCreateBucketInput(v *CreateBucketInput, e
return nil
}
+type awsRestxml_serializeOpCreateBucketMetadataTableConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpCreateBucketMetadataTableConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpCreateBucketMetadataTableConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateBucketMetadataTableConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/?metadataTable")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "POST"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsCreateBucketMetadataTableConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if input.MetadataTableConfiguration != nil {
+ if !restEncoder.HasHeader("Content-Type") {
+ ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true)
+ restEncoder.SetHeader("Content-Type").String("application/xml")
+ }
+
+ xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))
+ payloadRootAttr := []smithyxml.Attr{}
+ payloadRoot := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "MetadataTableConfiguration",
+ },
+ Attr: payloadRootAttr,
+ }
+ payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://s3.amazonaws.com/doc/2006-03-01/"))
+ if err := awsRestxml_serializeDocumentMetadataTableConfiguration(input.MetadataTableConfiguration, xmlEncoder.RootElement(payloadRoot)); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ payload := bytes.NewReader(xmlEncoder.Bytes())
+ if request, err = request.SetStream(payload); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsCreateBucketMetadataTableConfigurationInput(v *CreateBucketMetadataTableConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if len(v.ChecksumAlgorithm) > 0 {
+ locationName := "X-Amz-Sdk-Checksum-Algorithm"
+ encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
+ }
+
+ if v.ContentMD5 != nil {
+ locationName := "Content-Md5"
+ encoder.SetHeader(locationName).String(*v.ContentMD5)
+ }
+
+ if v.ExpectedBucketOwner != nil {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
type awsRestxml_serializeOpCreateMultipartUpload struct {
}
@@ -726,6 +852,11 @@ func awsRestxml_serializeOpHttpBindingsCreateMultipartUploadInput(v *CreateMulti
encoder.SetHeader(locationName).String(string(v.ChecksumAlgorithm))
}
+ if len(v.ChecksumType) > 0 {
+ locationName := "X-Amz-Checksum-Type"
+ encoder.SetHeader(locationName).String(string(v.ChecksumType))
+ }
+
if v.ContentDisposition != nil {
locationName := "Content-Disposition"
encoder.SetHeader(locationName).String(*v.ContentDisposition)
@@ -1423,6 +1554,73 @@ func awsRestxml_serializeOpHttpBindingsDeleteBucketLifecycleInput(v *DeleteBucke
return nil
}
+type awsRestxml_serializeOpDeleteBucketMetadataTableConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpDeleteBucketMetadataTableConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpDeleteBucketMetadataTableConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteBucketMetadataTableConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/?metadataTable")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "DELETE"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsDeleteBucketMetadataTableConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsDeleteBucketMetadataTableConfigurationInput(v *DeleteBucketMetadataTableConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.ExpectedBucketOwner != nil {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
type awsRestxml_serializeOpDeleteBucketMetricsConfiguration struct {
}
@@ -1898,6 +2096,21 @@ func awsRestxml_serializeOpHttpBindingsDeleteObjectInput(v *DeleteObjectInput, e
encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
}
+ if v.IfMatch != nil {
+ locationName := "If-Match"
+ encoder.SetHeader(locationName).String(*v.IfMatch)
+ }
+
+ if v.IfMatchLastModifiedTime != nil {
+ locationName := "X-Amz-If-Match-Last-Modified-Time"
+ encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.IfMatchLastModifiedTime))
+ }
+
+ if v.IfMatchSize != nil {
+ locationName := "X-Amz-If-Match-Size"
+ encoder.SetHeader(locationName).Long(*v.IfMatchSize)
+ }
+
if v.Key == nil || len(*v.Key) == 0 {
return &smithy.SerializationError{Err: fmt.Errorf("input member Key must not be empty")}
}
@@ -2864,6 +3077,73 @@ func awsRestxml_serializeOpHttpBindingsGetBucketLoggingInput(v *GetBucketLogging
return nil
}
+type awsRestxml_serializeOpGetBucketMetadataTableConfiguration struct {
+}
+
+func (*awsRestxml_serializeOpGetBucketMetadataTableConfiguration) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsRestxml_serializeOpGetBucketMetadataTableConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetBucketMetadataTableConfigurationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ opPath, opQuery := httpbinding.SplitURI("/?metadataTable")
+ request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
+ request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
+ request.Method = "GET"
+ var restEncoder *httpbinding.Encoder
+ if request.URL.RawPath == "" {
+ restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ } else {
+ request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath)
+ restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header)
+ }
+
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if err := awsRestxml_serializeOpHttpBindingsGetBucketMetadataTableConfigurationInput(input, restEncoder); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = restEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsRestxml_serializeOpHttpBindingsGetBucketMetadataTableConfigurationInput(v *GetBucketMetadataTableConfigurationInput, encoder *httpbinding.Encoder) error {
+ if v == nil {
+ return fmt.Errorf("unsupported serialization of nil %T", v)
+ }
+
+ if v.ExpectedBucketOwner != nil {
+ locationName := "X-Amz-Expected-Bucket-Owner"
+ encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner)
+ }
+
+ return nil
+}
+
type awsRestxml_serializeOpGetBucketMetricsConfiguration struct {
}
@@ -7481,6 +7761,11 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder
encoder.SetHeader(locationName).String(*v.ChecksumCRC32C)
}
+ if v.ChecksumCRC64NVME != nil {
+ locationName := "X-Amz-Checksum-Crc64nvme"
+ encoder.SetHeader(locationName).String(*v.ChecksumCRC64NVME)
+ }
+
if v.ChecksumSHA1 != nil {
locationName := "X-Amz-Checksum-Sha1"
encoder.SetHeader(locationName).String(*v.ChecksumSHA1)
@@ -7551,6 +7836,11 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder
encoder.SetHeader(locationName).String(*v.GrantWriteACP)
}
+ if v.IfMatch != nil {
+ locationName := "If-Match"
+ encoder.SetHeader(locationName).String(*v.IfMatch)
+ }
+
if v.IfNoneMatch != nil {
locationName := "If-None-Match"
encoder.SetHeader(locationName).String(*v.IfNoneMatch)
@@ -7637,6 +7927,11 @@ func awsRestxml_serializeOpHttpBindingsPutObjectInput(v *PutObjectInput, encoder
encoder.SetHeader(locationName).String(*v.WebsiteRedirectLocation)
}
+ if v.WriteOffsetBytes != nil {
+ locationName := "X-Amz-Write-Offset-Bytes"
+ encoder.SetHeader(locationName).Long(*v.WriteOffsetBytes)
+ }
+
return nil
}
@@ -8751,6 +9046,11 @@ func awsRestxml_serializeOpHttpBindingsUploadPartInput(v *UploadPartInput, encod
encoder.SetHeader(locationName).String(*v.ChecksumCRC32C)
}
+ if v.ChecksumCRC64NVME != nil {
+ locationName := "X-Amz-Checksum-Crc64nvme"
+ encoder.SetHeader(locationName).String(*v.ChecksumCRC64NVME)
+ }
+
if v.ChecksumSHA1 != nil {
locationName := "X-Amz-Checksum-Sha1"
encoder.SetHeader(locationName).String(*v.ChecksumSHA1)
@@ -9066,6 +9366,11 @@ func awsRestxml_serializeOpHttpBindingsWriteGetObjectResponseInput(v *WriteGetOb
encoder.SetHeader(locationName).String(*v.ChecksumCRC32C)
}
+ if v.ChecksumCRC64NVME != nil {
+ locationName := "X-Amz-Fwd-Header-X-Amz-Checksum-Crc64nvme"
+ encoder.SetHeader(locationName).String(*v.ChecksumCRC64NVME)
+ }
+
if v.ChecksumSHA1 != nil {
locationName := "X-Amz-Fwd-Header-X-Amz-Checksum-Sha1"
encoder.SetHeader(locationName).String(*v.ChecksumSHA1)
@@ -9649,6 +9954,17 @@ func awsRestxml_serializeDocumentCompletedPart(v *types.CompletedPart, value smi
el := value.MemberElement(root)
el.String(*v.ChecksumCRC32C)
}
+ if v.ChecksumCRC64NVME != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ChecksumCRC64NVME",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.ChecksumCRC64NVME)
+ }
if v.ChecksumSHA1 != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
@@ -11427,6 +11743,24 @@ func awsRestxml_serializeDocumentMetadataEntry(v *types.MetadataEntry, value smi
return nil
}
+func awsRestxml_serializeDocumentMetadataTableConfiguration(v *types.MetadataTableConfiguration, value smithyxml.Value) error {
+ defer value.Close()
+ if v.S3TablesDestination != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "S3TablesDestination",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ if err := awsRestxml_serializeDocumentS3TablesDestination(v.S3TablesDestination, el); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
func awsRestxml_serializeDocumentMetrics(v *types.Metrics, value smithyxml.Value) error {
defer value.Close()
if v.EventThreshold != nil {
@@ -11740,6 +12074,17 @@ func awsRestxml_serializeDocumentNotificationConfigurationFilter(v *types.Notifi
func awsRestxml_serializeDocumentObjectIdentifier(v *types.ObjectIdentifier, value smithyxml.Value) error {
defer value.Close()
+ if v.ETag != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "ETag",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.ETag)
+ }
if v.Key != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
@@ -11751,6 +12096,28 @@ func awsRestxml_serializeDocumentObjectIdentifier(v *types.ObjectIdentifier, val
el := value.MemberElement(root)
el.String(*v.Key)
}
+ if v.LastModifiedTime != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "LastModifiedTime",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(smithytime.FormatHTTPDate(*v.LastModifiedTime))
+ }
+ if v.Size != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "Size",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.Long(*v.Size)
+ }
if v.VersionId != nil {
rootAttr := []smithyxml.Attr{}
root := smithyxml.StartElement{
@@ -12802,6 +13169,33 @@ func awsRestxml_serializeDocumentS3Location(v *types.S3Location, value smithyxml
return nil
}
+func awsRestxml_serializeDocumentS3TablesDestination(v *types.S3TablesDestination, value smithyxml.Value) error {
+ defer value.Close()
+ if v.TableBucketArn != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "TableBucketArn",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.TableBucketArn)
+ }
+ if v.TableName != nil {
+ rootAttr := []smithyxml.Attr{}
+ root := smithyxml.StartElement{
+ Name: smithyxml.Name{
+ Local: "TableName",
+ },
+ Attr: rootAttr,
+ }
+ el := value.MemberElement(root)
+ el.String(*v.TableName)
+ }
+ return nil
+}
+
func awsRestxml_serializeDocumentScanRange(v *types.ScanRange, value smithyxml.Value) error {
defer value.Close()
if v.End != nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go
index 223aaba9..4af937c6 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/enums.go
@@ -212,10 +212,11 @@ type ChecksumAlgorithm string
// Enum values for ChecksumAlgorithm
const (
- ChecksumAlgorithmCrc32 ChecksumAlgorithm = "CRC32"
- ChecksumAlgorithmCrc32c ChecksumAlgorithm = "CRC32C"
- ChecksumAlgorithmSha1 ChecksumAlgorithm = "SHA1"
- ChecksumAlgorithmSha256 ChecksumAlgorithm = "SHA256"
+ ChecksumAlgorithmCrc32 ChecksumAlgorithm = "CRC32"
+ ChecksumAlgorithmCrc32c ChecksumAlgorithm = "CRC32C"
+ ChecksumAlgorithmSha1 ChecksumAlgorithm = "SHA1"
+ ChecksumAlgorithmSha256 ChecksumAlgorithm = "SHA256"
+ ChecksumAlgorithmCrc64nvme ChecksumAlgorithm = "CRC64NVME"
)
// Values returns all known values for ChecksumAlgorithm. Note that this can be
@@ -228,6 +229,7 @@ func (ChecksumAlgorithm) Values() []ChecksumAlgorithm {
"CRC32C",
"SHA1",
"SHA256",
+ "CRC64NVME",
}
}
@@ -248,6 +250,25 @@ func (ChecksumMode) Values() []ChecksumMode {
}
}
+type ChecksumType string
+
+// Enum values for ChecksumType
+const (
+ ChecksumTypeComposite ChecksumType = "COMPOSITE"
+ ChecksumTypeFullObject ChecksumType = "FULL_OBJECT"
+)
+
+// Values returns all known values for ChecksumType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ChecksumType) Values() []ChecksumType {
+ return []ChecksumType{
+ "COMPOSITE",
+ "FULL_OBJECT",
+ }
+}
+
type CompressionType string
// Enum values for CompressionType
@@ -274,6 +295,7 @@ type DataRedundancy string
// Enum values for DataRedundancy
const (
DataRedundancySingleAvailabilityZone DataRedundancy = "SingleAvailabilityZone"
+ DataRedundancySingleLocalZone DataRedundancy = "SingleLocalZone"
)
// Values returns all known values for DataRedundancy. Note that this can be
@@ -283,6 +305,7 @@ const (
func (DataRedundancy) Values() []DataRedundancy {
return []DataRedundancy{
"SingleAvailabilityZone",
+ "SingleLocalZone",
}
}
@@ -656,6 +679,7 @@ type LocationType string
// Enum values for LocationType
const (
LocationTypeAvailabilityZone LocationType = "AvailabilityZone"
+ LocationTypeLocalZone LocationType = "LocalZone"
)
// Values returns all known values for LocationType. Note that this can be
@@ -665,6 +689,7 @@ const (
func (LocationType) Values() []LocationType {
return []LocationType{
"AvailabilityZone",
+ "LocalZone",
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go
index a01b922f..1070573a 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/errors.go
@@ -64,6 +64,35 @@ func (e *BucketAlreadyOwnedByYou) ErrorCode() string {
}
func (e *BucketAlreadyOwnedByYou) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+// The existing object was created with a different encryption type. Subsequent
+//
+// write requests must include the appropriate encryption parameters in the request
+// or while creating the session.
+type EncryptionTypeMismatch struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *EncryptionTypeMismatch) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *EncryptionTypeMismatch) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *EncryptionTypeMismatch) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "EncryptionTypeMismatch"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *EncryptionTypeMismatch) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
// Object is archived and inaccessible until restored.
//
// If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval
@@ -103,6 +132,69 @@ func (e *InvalidObjectState) ErrorCode() string {
}
func (e *InvalidObjectState) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+// You may receive this error in multiple cases. Depending on the reason for the
+// error, you may receive one of the messages below:
+//
+// - Cannot specify both a write offset value and user-defined object metadata
+// for existing objects.
+//
+// - Checksum Type mismatch occurred, expected checksum Type: sha1, actual
+// checksum Type: crc32c.
+//
+// - Request body cannot be empty when 'write offset' is specified.
+type InvalidRequest struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidRequest) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidRequest) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidRequest) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidRequest"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidRequest) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The write offset value that you specified does not match the current object
+//
+// size.
+type InvalidWriteOffset struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidWriteOffset) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidWriteOffset) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidWriteOffset) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidWriteOffset"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidWriteOffset) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
// The specified bucket does not exist.
type NoSuchBucket struct {
Message *string
@@ -259,3 +351,32 @@ func (e *ObjectNotInActiveTierError) ErrorCode() string {
return *e.ErrorCodeOverride
}
func (e *ObjectNotInActiveTierError) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// You have attempted to add more parts than the maximum of 10000 that are
+//
+// allowed for this object. You can use the CopyObject operation to copy this
+// object to another and then add more data to the newly copied object.
+type TooManyParts struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *TooManyParts) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *TooManyParts) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *TooManyParts) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "TooManyParts"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *TooManyParts) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go
index dec61a6f..97c15893 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/types/types.go
@@ -202,7 +202,8 @@ type Bucket struct {
// [Directory buckets]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html
type BucketInfo struct {
- // The number of Availability Zone that's used for redundancy for the bucket.
+ // The number of Zone (Availability Zone or Local Zone) that's used for redundancy
+ // for the bucket.
DataRedundancy DataRedundancy
// The type of bucket.
@@ -241,50 +242,65 @@ type BucketLoggingStatus struct {
// Contains all the possible checksum or digest values for an object.
type Checksum struct {
- // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only
+ // be present if the checksum was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumCRC32 *string
- // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 32-bit CRC-32C checksum of the object. This checksum is
+ // only present if the checksum was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumCRC32C *string
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. When you use the API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 64-bit CRC-64NVME checksum of the object. This checksum is
+ // present if the object was uploaded with the CRC-64NVME checksum algorithm, or
+ // if the object was uploaded without a checksum (and Amazon S3 added the default
+ // checksum, CRC-64NVME , to the uploaded object). For more information, see [Checking object integrity] in
+ // the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be
+ // present if the object was uploaded with the object. When you use the API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumSHA1 *string
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
+ // The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be
+ // present if the object was uploaded with the object. When you use an API
+ // operation on an object that was uploaded using multipart uploads, this value may
+ // not be a direct checksum value of the full object. Instead, it's a calculation
+ // based on the checksum values of each individual part. For more information about
+ // how checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
// Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
ChecksumSHA256 *string
+ // The checksum type that is used to calculate the object’s checksum value. For
+ // more information, see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType ChecksumType
+
noSmithyDocumentSerde
}
@@ -316,48 +332,40 @@ type CompletedMultipartUpload struct {
// Details of the parts that were uploaded.
type CompletedPart struct {
- // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // The Base64 encoded, 32-bit CRC-32 checksum of the part. This checksum is
+ // present if the multipart upload request was created with the CRC-32 checksum
+ // algorithm. For more information, see [Checking object integrity]in the Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32 *string
- // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // The Base64 encoded, 32-bit CRC-32C checksum of the part. This checksum is
+ // present if the multipart upload request was created with the CRC-32C checksum
+ // algorithm. For more information, see [Checking object integrity]in the Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32C *string
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. When you use the API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // The Base64 encoded, 64-bit CRC-64NVME checksum of the part. This checksum is
+ // present if the multipart upload request was created with the CRC-64NVME
+ // checksum algorithm to the uploaded object). For more information, see [Checking object integrity]in the
+ // Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // The Base64 encoded, 160-bit SHA-1 checksum of the part. This checksum is
+ // present if the multipart upload request was created with the SHA-1 checksum
+ // algorithm. For more information, see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA1 *string
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // The Base64 encoded, 256-bit SHA-256 checksum of the part. This checksum is
+ // present if the multipart upload request was created with the SHA-256 checksum
+ // algorithm. For more information, see [Checking object integrity]in the Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA256 *string
// Entity tag returned when the part was uploaded.
@@ -417,34 +425,49 @@ type ContinuationEvent struct {
// Container for all response elements.
type CopyObjectResult struct {
- // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be
- // present if it was uploaded with the object. For more information, see [Checking object integrity]in the
- // Amazon S3 User Guide.
+ // The Base64 encoded, 32-bit CRC-32 checksum of the object. This checksum is only
+ // present if the object was uploaded with the object. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32 *string
- // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be
- // present if it was uploaded with the object. For more information, see [Checking object integrity]in the
- // Amazon S3 User Guide.
+ // The Base64 encoded, 32-bit CRC-32C checksum of the object. This will only be
+ // present if the object was uploaded with the object. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32C *string
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. For more information, see [Checking object integrity]in the
- // Amazon S3 User Guide.
+ // The Base64 encoded, 64-bit CRC-64NVME checksum of the object. This checksum is
+ // present if the object being copied was uploaded with the CRC-64NVME checksum
+ // algorithm, or if the object was uploaded without a checksum (and Amazon S3 added
+ // the default checksum, CRC-64NVME , to the uploaded object). For more
+ // information, see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // The Base64 encoded, 160-bit SHA-1 digest of the object. This will only be
+ // present if the object was uploaded with the object. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA1 *string
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. For more information, see [Checking object integrity]in the
- // Amazon S3 User Guide.
+ // The Base64 encoded, 256-bit SHA-256 digest of the object. This will only be
+ // present if the object was uploaded with the object. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA256 *string
+ // The checksum type that is used to calculate the object’s checksum value. For
+ // more information, see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType ChecksumType
+
// Returns the ETag of the new object. The ETag reflects only changes to the
// contents of an object, not its metadata.
ETag *string
@@ -458,48 +481,44 @@ type CopyObjectResult struct {
// Container for all response elements.
type CopyPartResult struct {
- // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // This header can be used as a data integrity check to verify that the data
+ // received is the same data that was originally sent. This header specifies the
+ // Base64 encoded, 32-bit CRC-32 checksum of the part. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32 *string
- // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // This header can be used as a data integrity check to verify that the data
+ // received is the same data that was originally sent. This header specifies the
+ // Base64 encoded, 32-bit CRC-32C checksum of the part. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32C *string
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. When you use the API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // The Base64 encoded, 64-bit CRC-64NVME checksum of the part. This checksum is
+ // present if the multipart upload request was created with the CRC-64NVME
+ // checksum algorithm to the uploaded object). For more information, see [Checking object integrity]in the
+ // Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // This header can be used as a data integrity check to verify that the data
+ // received is the same data that was originally sent. This header specifies the
+ // Base64 encoded, 160-bit SHA-1 checksum of the part. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA1 *string
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // This header can be used as a data integrity check to verify that the data
+ // received is the same data that was originally sent. This header specifies the
+ // Base64 encoded, 256-bit SHA-256 checksum of the part. For more information, see [Checking object integrity]
+ // in the Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA256 *string
// Entity tag of the object.
@@ -570,9 +589,15 @@ type CreateBucketConfiguration struct {
// Specifies the location where the bucket will be created.
//
- // For directory buckets, the location type is Availability Zone.
+ // Directory buckets - The location type is Availability Zone or Local Zone. When
+ // the location type is Local Zone, your Local Zone must be in opt-in status.
+ // Otherwise, you get an HTTP 400 Bad Request error with the error code Access
+ // denied . To learn more about opt-in Local Zones, see [Opt-in Dedicated Local Zones]in the Amazon S3 User
+ // Guide.
//
// This functionality is only supported by directory buckets.
+ //
+ // [Opt-in Dedicated Local Zones]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/opt-in-directory-bucket-lz.html
Location *LocationInfo
// Specifies the Region where the bucket will be created. You might choose a
@@ -1689,6 +1714,87 @@ type Error struct {
noSmithyDocumentSerde
}
+// If the CreateBucketMetadataTableConfiguration request succeeds, but S3
+//
+// Metadata was unable to create the table, this structure contains the error code
+// and error message.
+type ErrorDetails struct {
+
+ // If the CreateBucketMetadataTableConfiguration request succeeds, but S3
+ // Metadata was unable to create the table, this structure contains the error code.
+ // The possible error codes and error messages are as follows:
+ //
+ // - AccessDeniedCreatingResources - You don't have sufficient permissions to
+ // create the required resources. Make sure that you have
+ // s3tables:CreateNamespace , s3tables:CreateTable , s3tables:GetTable and
+ // s3tables:PutTablePolicy permissions, and then try again. To create a new
+ // metadata table, you must delete the metadata configuration for this bucket, and
+ // then create a new metadata configuration.
+ //
+ // - AccessDeniedWritingToTable - Unable to write to the metadata table because
+ // of missing resource permissions. To fix the resource policy, Amazon S3 needs to
+ // create a new metadata table. To create a new metadata table, you must delete the
+ // metadata configuration for this bucket, and then create a new metadata
+ // configuration.
+ //
+ // - DestinationTableNotFound - The destination table doesn't exist. To create a
+ // new metadata table, you must delete the metadata configuration for this bucket,
+ // and then create a new metadata configuration.
+ //
+ // - ServerInternalError - An internal error has occurred. To create a new
+ // metadata table, you must delete the metadata configuration for this bucket, and
+ // then create a new metadata configuration.
+ //
+ // - TableAlreadyExists - The table that you specified already exists in the
+ // table bucket's namespace. Specify a different table name. To create a new
+ // metadata table, you must delete the metadata configuration for this bucket, and
+ // then create a new metadata configuration.
+ //
+ // - TableBucketNotFound - The table bucket that you specified doesn't exist in
+ // this Amazon Web Services Region and account. Create or choose a different table
+ // bucket. To create a new metadata table, you must delete the metadata
+ // configuration for this bucket, and then create a new metadata configuration.
+ ErrorCode *string
+
+ // If the CreateBucketMetadataTableConfiguration request succeeds, but S3
+ // Metadata was unable to create the table, this structure contains the error
+ // message. The possible error codes and error messages are as follows:
+ //
+ // - AccessDeniedCreatingResources - You don't have sufficient permissions to
+ // create the required resources. Make sure that you have
+ // s3tables:CreateNamespace , s3tables:CreateTable , s3tables:GetTable and
+ // s3tables:PutTablePolicy permissions, and then try again. To create a new
+ // metadata table, you must delete the metadata configuration for this bucket, and
+ // then create a new metadata configuration.
+ //
+ // - AccessDeniedWritingToTable - Unable to write to the metadata table because
+ // of missing resource permissions. To fix the resource policy, Amazon S3 needs to
+ // create a new metadata table. To create a new metadata table, you must delete the
+ // metadata configuration for this bucket, and then create a new metadata
+ // configuration.
+ //
+ // - DestinationTableNotFound - The destination table doesn't exist. To create a
+ // new metadata table, you must delete the metadata configuration for this bucket,
+ // and then create a new metadata configuration.
+ //
+ // - ServerInternalError - An internal error has occurred. To create a new
+ // metadata table, you must delete the metadata configuration for this bucket, and
+ // then create a new metadata configuration.
+ //
+ // - TableAlreadyExists - The table that you specified already exists in the
+ // table bucket's namespace. Specify a different table name. To create a new
+ // metadata table, you must delete the metadata configuration for this bucket, and
+ // then create a new metadata configuration.
+ //
+ // - TableBucketNotFound - The table bucket that you specified doesn't exist in
+ // this Amazon Web Services Region and account. Create or choose a different table
+ // bucket. To create a new metadata table, you must delete the metadata
+ // configuration for this bucket, and then create a new metadata configuration.
+ ErrorMessage *string
+
+ noSmithyDocumentSerde
+}
+
// The error information.
type ErrorDocument struct {
@@ -1751,6 +1857,36 @@ type FilterRule struct {
noSmithyDocumentSerde
}
+// The metadata table configuration for a general purpose bucket.
+type GetBucketMetadataTableConfigurationResult struct {
+
+ // The metadata table configuration for a general purpose bucket.
+ //
+ // This member is required.
+ MetadataTableConfigurationResult *MetadataTableConfigurationResult
+
+ // The status of the metadata table. The status values are:
+ //
+ // - CREATING - The metadata table is in the process of being created in the
+ // specified table bucket.
+ //
+ // - ACTIVE - The metadata table has been created successfully and records are
+ // being delivered to the table.
+ //
+ // - FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is
+ // unable to deliver records. See ErrorDetails for details.
+ //
+ // This member is required.
+ Status *string
+
+ // If the CreateBucketMetadataTableConfiguration request succeeds, but S3
+ // Metadata was unable to create the table, this structure contains the error code
+ // and error message.
+ Error *ErrorDetails
+
+ noSmithyDocumentSerde
+}
+
// A collection of parts associated with a multipart upload.
type GetObjectAttributesParts struct {
@@ -2168,6 +2304,9 @@ type LifecycleExpiration struct {
// Indicates at what date the object is to be moved or deleted. The date value
// must conform to the ISO 8601 format. The time is always midnight UTC.
+ //
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
Date *time.Time
// Indicates the lifetime, in days, of the objects that are subject to the rule.
@@ -2178,6 +2317,9 @@ type LifecycleExpiration struct {
// versions. If set to true, the delete marker will be expired; if set to false the
// policy takes no action. This cannot be specified with Days or Date in a
// Lifecycle Expiration Policy.
+ //
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
ExpiredObjectDeleteMarker *bool
noSmithyDocumentSerde
@@ -2210,6 +2352,8 @@ type LifecycleRule struct {
// The Filter is used to identify objects that a Lifecycle Rule applies to. A
// Filter must have exactly one of Prefix , Tag , or And specified. Filter is
// required if the LifecycleRule does not contain a Prefix element.
+ //
+ // Tag filters are not supported for directory buckets.
Filter *LifecycleRuleFilter
// Unique identifier for the rule. The value cannot be longer than 255 characters.
@@ -2220,13 +2364,19 @@ type LifecycleRule struct {
// configuration action on a bucket that has versioning enabled (or suspended) to
// request that Amazon S3 delete noncurrent object versions at a specific period in
// the object's lifetime.
+ //
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
NoncurrentVersionExpiration *NoncurrentVersionExpiration
- // Specifies the transition rule for the lifecycle rule that describes when
+ // Specifies the transition rule for the lifecycle rule that describes when
// noncurrent objects transition to a specific storage class. If your bucket is
// versioning-enabled (or versioning is suspended), you can set this action to
// request that Amazon S3 transition noncurrent object versions to a specific
// storage class at a set period in the object's lifetime.
+ //
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
NoncurrentVersionTransitions []NoncurrentVersionTransition
// Prefix identifying one or more objects to which the rule applies. This is no
@@ -2241,6 +2391,9 @@ type LifecycleRule struct {
Prefix *string
// Specifies when an Amazon S3 object transitions to a specified storage class.
+ //
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
Transitions []Transition
noSmithyDocumentSerde
@@ -2293,6 +2446,9 @@ type LifecycleRuleFilter struct {
Prefix *string
// This tag must exist in the object's tag set in order for the rule to apply.
+ //
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
Tag *Tag
noSmithyDocumentSerde
@@ -2300,8 +2456,8 @@ type LifecycleRuleFilter struct {
// Specifies the location where the bucket will be created.
//
-// For directory buckets, the location type is Availability Zone. For more
-// information about directory buckets, see [Directory buckets]in the Amazon S3 User Guide.
+// For directory buckets, the location type is Availability Zone or Local Zone.
+// For more information about directory buckets, see [Directory buckets]in the Amazon S3 User Guide.
//
// This functionality is only supported by directory buckets.
//
@@ -2310,9 +2466,9 @@ type LocationInfo struct {
// The name of the location where the bucket will be created.
//
- // For directory buckets, the name of the location is the AZ ID of the
- // Availability Zone where the bucket will be created. An example AZ ID value is
- // usw2-az1 .
+ // For directory buckets, the name of the location is the Zone ID of the
+ // Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An
+ // example AZ ID value is usw2-az1 .
Name *string
// The type of location where the bucket will be created.
@@ -2371,6 +2527,38 @@ type MetadataEntry struct {
noSmithyDocumentSerde
}
+// The metadata table configuration for a general purpose bucket.
+type MetadataTableConfiguration struct {
+
+ // The destination information for the metadata table configuration. The
+ // destination table bucket must be in the same Region and Amazon Web Services
+ // account as the general purpose bucket. The specified metadata table name must be
+ // unique within the aws_s3_metadata namespace in the destination table bucket.
+ //
+ // This member is required.
+ S3TablesDestination *S3TablesDestination
+
+ noSmithyDocumentSerde
+}
+
+// The metadata table configuration for a general purpose bucket. The destination
+//
+// table bucket must be in the same Region and Amazon Web Services account as the
+// general purpose bucket. The specified metadata table name must be unique within
+// the aws_s3_metadata namespace in the destination table bucket.
+type MetadataTableConfigurationResult struct {
+
+ // The destination information for the metadata table configuration. The
+ // destination table bucket must be in the same Region and Amazon Web Services
+ // account as the general purpose bucket. The specified metadata table name must be
+ // unique within the aws_s3_metadata namespace in the destination table bucket.
+ //
+ // This member is required.
+ S3TablesDestinationResult *S3TablesDestinationResult
+
+ noSmithyDocumentSerde
+}
+
// A container specifying replication metrics-related settings enabling
//
// replication metrics and events.
@@ -2489,6 +2677,12 @@ type MultipartUpload struct {
// The algorithm that was used to create a checksum of the object.
ChecksumAlgorithm ChecksumAlgorithm
+ // The checksum type that is used to calculate the object’s checksum value. For
+ // more information, see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType ChecksumType
+
// Date and time at which the multipart upload was initiated.
Initiated *time.Time
@@ -2521,6 +2715,9 @@ type MultipartUpload struct {
// configuration action on a bucket that has versioning enabled (or suspended) to
// request that Amazon S3 delete noncurrent object versions at a specific period in
// the object's lifetime.
+//
+// This parameter applies to general purpose buckets only. It is not supported for
+// directory bucket lifecycle configurations.
type NoncurrentVersionExpiration struct {
// Specifies how many noncurrent versions Amazon S3 will retain. You can specify
@@ -2528,6 +2725,9 @@ type NoncurrentVersionExpiration struct {
// additional noncurrent versions beyond the specified number to retain. For more
// information about noncurrent versions, see [Lifecycle configuration elements]in the Amazon S3 User Guide.
//
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
+ //
// [Lifecycle configuration elements]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html
NewerNoncurrentVersions *int32
@@ -2536,6 +2736,9 @@ type NoncurrentVersionExpiration struct {
// For information about the noncurrent days calculations, see [How Amazon S3 Calculates When an Object Became Noncurrent]in the Amazon S3
// User Guide.
//
+ // This parameter applies to general purpose buckets only. It is not supported for
+ // directory bucket lifecycle configurations.
+ //
// [How Amazon S3 Calculates When an Object Became Noncurrent]: https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations
NoncurrentDays *int32
@@ -2613,6 +2816,12 @@ type Object struct {
// The algorithm that was used to create a checksum of the object.
ChecksumAlgorithm []ChecksumAlgorithm
+ // The checksum type that is used to calculate the object’s checksum value. For
+ // more information, see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType ChecksumType
+
// The entity tag is a hash of the object. The ETag reflects changes only to the
// contents of an object, not its metadata. The ETag may or may not be an MD5
// digest of the object data. Whether or not it is depends on how the object was
@@ -2683,6 +2892,26 @@ type ObjectIdentifier struct {
// This member is required.
Key *string
+ // An entity tag (ETag) is an identifier assigned by a web server to a specific
+ // version of a resource found at a URL. This header field makes the request method
+ // conditional on ETags .
+ //
+ // Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings
+ // unique to the object.
+ ETag *string
+
+ // If present, the objects are deleted only if its modification times matches the
+ // provided Timestamp .
+ //
+ // This functionality is only supported for directory buckets.
+ LastModifiedTime *time.Time
+
+ // If present, the objects are deleted only if its size matches the provided size
+ // in bytes.
+ //
+ // This functionality is only supported for directory buckets.
+ Size *int64
+
// Version ID for the specific version of the object to delete.
//
// This functionality is not supported for directory buckets.
@@ -2743,45 +2972,41 @@ type ObjectLockRule struct {
// A container for elements related to an individual part.
type ObjectPart struct {
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies the
- // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity]
- // in the Amazon S3 User Guide.
+ // The Base64 encoded, 32-bit CRC-32 checksum of the part. This checksum is
+ // present if the multipart upload request was created with the CRC-32 checksum
+ // algorithm. For more information, see [Checking object integrity]in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32 *string
- // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // The Base64 encoded, 32-bit CRC-32C checksum of the part. This checksum is
+ // present if the multipart upload request was created with the CRC-32C checksum
+ // algorithm. For more information, see [Checking object integrity]in the Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32C *string
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. When you use the API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // The Base64 encoded, 64-bit CRC-64NVME checksum of the part. This checksum is
+ // present if the multipart upload request was created with the CRC-64NVME
+ // checksum algorithm, or if the object was uploaded without a checksum (and Amazon
+ // S3 added the default checksum, CRC-64NVME , to the uploaded object). For more
+ // information, see [Checking object integrity]in the Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // The Base64 encoded, 160-bit SHA-1 checksum of the part. This checksum is
+ // present if the multipart upload request was created with the SHA-1 checksum
+ // algorithm. For more information, see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA1 *string
- // The base64-encoded, 256-bit SHA-256 digest of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // The Base64 encoded, 256-bit SHA-256 checksum of the part. This checksum is
+ // present if the multipart upload request was created with the SHA-256 checksum
+ // algorithm. For more information, see [Checking object integrity]in the Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA256 *string
// The part number identifying the part. This value is a positive integer between
@@ -2800,6 +3025,12 @@ type ObjectVersion struct {
// The algorithm that was used to create a checksum of the object.
ChecksumAlgorithm []ChecksumAlgorithm
+ // The checksum type that is used to calculate the object’s checksum value. For
+ // more information, see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumType ChecksumType
+
// The entity tag is an MD5 hash of that version of the object.
ETag *string
@@ -2942,40 +3173,39 @@ type ParquetInput struct {
// Container for elements related to a part.
type Part struct {
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies the
- // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity]
- // in the Amazon S3 User Guide.
+ // The Base64 encoded, 32-bit CRC-32 checksum of the part. This checksum is
+ // present if the object was uploaded with the CRC-32 checksum algorithm. For more
+ // information, see [Checking object integrity]in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32 *string
- // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be
- // present if it was uploaded with the object. When you use an API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // The Base64 encoded, 32-bit CRC-32C checksum of the part. This checksum is
+ // present if the object was uploaded with the CRC-32C checksum algorithm. For
+ // more information, see [Checking object integrity]in the Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumCRC32C *string
- // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
- // present if it was uploaded with the object. When you use the API operation on an
- // object that was uploaded using multipart uploads, this value may not be a direct
- // checksum value of the full object. Instead, it's a calculation based on the
- // checksum values of each individual part. For more information about how
- // checksums are calculated with multipart uploads, see [Checking object integrity]in the Amazon S3 User
- // Guide.
+ // The Base64 encoded, 64-bit CRC-64NVME checksum of the part. This checksum is
+ // present if the multipart upload request was created with the CRC-64NVME
+ // checksum algorithm, or if the object was uploaded without a checksum (and Amazon
+ // S3 added the default checksum, CRC-64NVME , to the uploaded object). For more
+ // information, see [Checking object integrity]in the Amazon S3 User Guide.
//
- // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
+ ChecksumCRC64NVME *string
+
+ // The Base64 encoded, 160-bit SHA-1 checksum of the part. This checksum is
+ // present if the object was uploaded with the SHA-1 checksum algorithm. For more
+ // information, see [Checking object integrity]in the Amazon S3 User Guide.
+ //
+ // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA1 *string
- // This header can be used as a data integrity check to verify that the data
- // received is the same data that was originally sent. This header specifies the
- // base64-encoded, 256-bit SHA-256 digest of the object. For more information, see [Checking object integrity]
- // in the Amazon S3 User Guide.
+ // The Base64 encoded, 256-bit SHA-256 checksum of the part. This checksum is
+ // present if the object was uploaded with the SHA-256 checksum algorithm. For
+ // more information, see [Checking object integrity]in the Amazon S3 User Guide.
//
// [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
ChecksumSHA256 *string
@@ -3453,13 +3683,23 @@ type RestoreRequest struct {
// Describes the location where the restore job's output is stored.
OutputLocation *OutputLocation
+ // Amazon S3 Select is no longer available to new customers. Existing customers of
+ // Amazon S3 Select can continue to use the feature as usual. [Learn more]
+ //
// Describes the parameters for Select job types.
+ //
+ // [Learn more]: http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/
SelectParameters *SelectParameters
// Retrieval tier at which the restore will be processed.
Tier Tier
+ // Amazon S3 Select is no longer available to new customers. Existing customers of
+ // Amazon S3 Select can continue to use the feature as usual. [Learn more]
+ //
// Type of restore request.
+ //
+ // [Learn more]: http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/
Type RestoreRequestType
noSmithyDocumentSerde
@@ -3567,6 +3807,69 @@ type S3Location struct {
noSmithyDocumentSerde
}
+// The destination information for the metadata table configuration. The
+//
+// destination table bucket must be in the same Region and Amazon Web Services
+// account as the general purpose bucket. The specified metadata table name must be
+// unique within the aws_s3_metadata namespace in the destination table bucket.
+type S3TablesDestination struct {
+
+ // The Amazon Resource Name (ARN) for the table bucket that's specified as the
+ // destination in the metadata table configuration. The destination table bucket
+ // must be in the same Region and Amazon Web Services account as the general
+ // purpose bucket.
+ //
+ // This member is required.
+ TableBucketArn *string
+
+ // The name for the metadata table in your metadata table configuration. The
+ // specified metadata table name must be unique within the aws_s3_metadata
+ // namespace in the destination table bucket.
+ //
+ // This member is required.
+ TableName *string
+
+ noSmithyDocumentSerde
+}
+
+// The destination information for the metadata table configuration. The
+//
+// destination table bucket must be in the same Region and Amazon Web Services
+// account as the general purpose bucket. The specified metadata table name must be
+// unique within the aws_s3_metadata namespace in the destination table bucket.
+type S3TablesDestinationResult struct {
+
+ // The Amazon Resource Name (ARN) for the metadata table in the metadata table
+ // configuration. The specified metadata table name must be unique within the
+ // aws_s3_metadata namespace in the destination table bucket.
+ //
+ // This member is required.
+ TableArn *string
+
+ // The Amazon Resource Name (ARN) for the table bucket that's specified as the
+ // destination in the metadata table configuration. The destination table bucket
+ // must be in the same Region and Amazon Web Services account as the general
+ // purpose bucket.
+ //
+ // This member is required.
+ TableBucketArn *string
+
+ // The name for the metadata table in your metadata table configuration. The
+ // specified metadata table name must be unique within the aws_s3_metadata
+ // namespace in the destination table bucket.
+ //
+ // This member is required.
+ TableName *string
+
+ // The table bucket namespace for the metadata table in your metadata table
+ // configuration. This value is always aws_s3_metadata .
+ //
+ // This member is required.
+ TableNamespace *string
+
+ noSmithyDocumentSerde
+}
+
// Specifies the byte range of the object to get the records from. A record is
// processed when its first byte is contained by the range. This parameter is
// optional, but when specified, it must not be empty. See RFC 2616, Section
@@ -3646,11 +3949,26 @@ type SelectObjectContentEventStreamMemberStats struct {
func (*SelectObjectContentEventStreamMemberStats) isSelectObjectContentEventStream() {}
+// Amazon S3 Select is no longer available to new customers. Existing customers of
+// Amazon S3 Select can continue to use the feature as usual. [Learn more]
+//
// Describes the parameters for Select job types.
+//
+// Learn [How to optimize querying your data in Amazon S3] using [Amazon Athena], [S3 Object Lambda], or client-side filtering.
+//
+// [Learn more]: http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/
+// [How to optimize querying your data in Amazon S3]: http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/
+// [Amazon Athena]: https://docs.aws.amazon.com/athena/latest/ug/what-is.html
+// [S3 Object Lambda]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html
type SelectParameters struct {
+ // Amazon S3 Select is no longer available to new customers. Existing customers of
+ // Amazon S3 Select can continue to use the feature as usual. [Learn more]
+ //
// The expression that is used to query the object.
//
+ // [Learn more]: http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/
+ //
// This member is required.
Expression *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go
index 91d42185..97a56bd3 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/validators.go
@@ -90,6 +90,26 @@ func (m *validateOpCreateBucket) HandleInitialize(ctx context.Context, in middle
return next.HandleInitialize(ctx, in)
}
+type validateOpCreateBucketMetadataTableConfiguration struct {
+}
+
+func (*validateOpCreateBucketMetadataTableConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateBucketMetadataTableConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateBucketMetadataTableConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateBucketMetadataTableConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
type validateOpCreateMultipartUpload struct {
}
@@ -270,6 +290,26 @@ func (m *validateOpDeleteBucketLifecycle) HandleInitialize(ctx context.Context,
return next.HandleInitialize(ctx, in)
}
+type validateOpDeleteBucketMetadataTableConfiguration struct {
+}
+
+func (*validateOpDeleteBucketMetadataTableConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteBucketMetadataTableConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteBucketMetadataTableConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteBucketMetadataTableConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
type validateOpDeleteBucketMetricsConfiguration struct {
}
@@ -670,6 +710,26 @@ func (m *validateOpGetBucketLogging) HandleInitialize(ctx context.Context, in mi
return next.HandleInitialize(ctx, in)
}
+type validateOpGetBucketMetadataTableConfiguration struct {
+}
+
+func (*validateOpGetBucketMetadataTableConfiguration) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetBucketMetadataTableConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetBucketMetadataTableConfigurationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetBucketMetadataTableConfigurationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
type validateOpGetBucketMetricsConfiguration struct {
}
@@ -1886,6 +1946,10 @@ func addOpCreateBucketValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateBucket{}, middleware.After)
}
+func addOpCreateBucketMetadataTableConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateBucketMetadataTableConfiguration{}, middleware.After)
+}
+
func addOpCreateMultipartUploadValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateMultipartUpload{}, middleware.After)
}
@@ -1922,6 +1986,10 @@ func addOpDeleteBucketLifecycleValidationMiddleware(stack *middleware.Stack) err
return stack.Initialize.Add(&validateOpDeleteBucketLifecycle{}, middleware.After)
}
+func addOpDeleteBucketMetadataTableConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteBucketMetadataTableConfiguration{}, middleware.After)
+}
+
func addOpDeleteBucketMetricsConfigurationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteBucketMetricsConfiguration{}, middleware.After)
}
@@ -2002,6 +2070,10 @@ func addOpGetBucketLoggingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetBucketLogging{}, middleware.After)
}
+func addOpGetBucketMetadataTableConfigurationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetBucketMetadataTableConfiguration{}, middleware.After)
+}
+
func addOpGetBucketMetricsConfigurationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetBucketMetricsConfiguration{}, middleware.After)
}
@@ -2974,6 +3046,25 @@ func validateLoggingEnabled(v *types.LoggingEnabled) error {
}
}
+func validateMetadataTableConfiguration(v *types.MetadataTableConfiguration) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "MetadataTableConfiguration"}
+ if v.S3TablesDestination == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("S3TablesDestination"))
+ } else if v.S3TablesDestination != nil {
+ if err := validateS3TablesDestination(v.S3TablesDestination); err != nil {
+ invalidParams.AddNested("S3TablesDestination", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
func validateMetrics(v *types.Metrics) error {
if v == nil {
return nil
@@ -3482,6 +3573,24 @@ func validateS3Location(v *types.S3Location) error {
}
}
+func validateS3TablesDestination(v *types.S3TablesDestination) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "S3TablesDestination"}
+ if v.TableBucketArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TableBucketArn"))
+ }
+ if v.TableName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TableName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
func validateSelectParameters(v *types.SelectParameters) error {
if v == nil {
return nil
@@ -3933,6 +4042,28 @@ func validateOpCreateBucketInput(v *CreateBucketInput) error {
}
}
+func validateOpCreateBucketMetadataTableConfigurationInput(v *CreateBucketMetadataTableConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateBucketMetadataTableConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if v.MetadataTableConfiguration == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("MetadataTableConfiguration"))
+ } else if v.MetadataTableConfiguration != nil {
+ if err := validateMetadataTableConfiguration(v.MetadataTableConfiguration); err != nil {
+ invalidParams.AddNested("MetadataTableConfiguration", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
func validateOpCreateMultipartUploadInput(v *CreateMultipartUploadInput) error {
if v == nil {
return nil
@@ -4080,6 +4211,21 @@ func validateOpDeleteBucketLifecycleInput(v *DeleteBucketLifecycleInput) error {
}
}
+func validateOpDeleteBucketMetadataTableConfigurationInput(v *DeleteBucketMetadataTableConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteBucketMetadataTableConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
func validateOpDeleteBucketMetricsConfigurationInput(v *DeleteBucketMetricsConfigurationInput) error {
if v == nil {
return nil
@@ -4405,6 +4551,21 @@ func validateOpGetBucketLoggingInput(v *GetBucketLoggingInput) error {
}
}
+func validateOpGetBucketMetadataTableConfigurationInput(v *GetBucketMetadataTableConfigurationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetBucketMetadataTableConfigurationInput"}
+ if v.Bucket == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Bucket"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
func validateOpGetBucketMetricsConfigurationInput(v *GetBucketMetricsConfigurationInput) error {
if v == nil {
return nil
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
index a62058e5..d8f0d5d1 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
@@ -1,3 +1,33 @@
+# v1.24.12 (2025-01-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.24.11 (2025-01-17)
+
+* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop.
+
+# v1.24.10 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.9 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.8 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.7 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.6 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.24.5 (2024-11-07)
* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go
index 644ee1e0..0b244f14 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go
@@ -684,7 +684,7 @@ func addRetry(stack *middleware.Stack, o Options) error {
m.LogAttempts = o.ClientLogMode.IsRetries()
m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sso")
})
- if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
+ if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil {
return err
}
if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
index 7c1604ea..3bdb1208 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
@@ -3,4 +3,4 @@
package sso
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.24.5"
+const goModuleVersion = "1.24.12"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
index b7625523..2e650695 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
@@ -1,3 +1,34 @@
+# v1.28.11 (2025-01-24)
+
+* **Documentation**: Fixed typos in the descriptions.
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.28.10 (2025-01-17)
+
+* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop.
+
+# v1.28.9 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.8 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.7 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.6 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.5 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
# v1.28.4 (2024-11-06)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
index 0b05bf6c..9b7f4acc 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
@@ -684,7 +684,7 @@ func addRetry(stack *middleware.Stack, o Options) error {
m.LogAttempts = o.ClientLogMode.IsRetries()
m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ssooidc")
})
- if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
+ if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil {
return err
}
if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
index 5fb8d2ab..2ab35244 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
@@ -12,7 +12,7 @@ import (
// Creates and returns access and refresh tokens for clients that are
// authenticated using client secrets. The access token can be used to fetch
-// short-term credentials for the assigned AWS accounts or to access application
+// short-lived credentials for the assigned AWS accounts or to access application
// APIs using bearer authentication.
func (c *Client) CreateToken(ctx context.Context, params *CreateTokenInput, optFns ...func(*Options)) (*CreateTokenOutput, error) {
if params == nil {
@@ -43,22 +43,21 @@ type CreateTokenInput struct {
// This member is required.
ClientSecret *string
- // Supports the following OAuth grant types: Device Code and Refresh Token.
- // Specify either of the following values, depending on the grant type that you
- // want:
+ // Supports the following OAuth grant types: Authorization Code, Device Code, and
+ // Refresh Token. Specify one of the following values, depending on the grant type
+ // that you want:
+ //
+ // * Authorization Code - authorization_code
//
// * Device Code - urn:ietf:params:oauth:grant-type:device_code
//
// * Refresh Token - refresh_token
//
- // For information about how to obtain the device code, see the StartDeviceAuthorization topic.
- //
// This member is required.
GrantType *string
// Used only when calling this API for the Authorization Code grant type. The
- // short-term code is used to identify this authorization request. This grant type
- // is currently unsupported for the CreateTokenAPI.
+ // short-lived code is used to identify this authorization request.
Code *string
// Used only when calling this API for the Authorization Code grant type. This
@@ -66,9 +65,9 @@ type CreateTokenInput struct {
// challenge value the client passed at authorization time.
CodeVerifier *string
- // Used only when calling this API for the Device Code grant type. This short-term
- // code is used to identify this authorization request. This comes from the result
- // of the StartDeviceAuthorizationAPI.
+ // Used only when calling this API for the Device Code grant type. This
+ // short-lived code is used to identify this authorization request. This comes from
+ // the result of the StartDeviceAuthorizationAPI.
DeviceCode *string
// Used only when calling this API for the Authorization Code grant type. This
@@ -77,7 +76,7 @@ type CreateTokenInput struct {
RedirectUri *string
// Used only when calling this API for the Refresh Token grant type. This token is
- // used to refresh short-term tokens, such as the access token, that might expire.
+ // used to refresh short-lived tokens, such as the access token, that might expire.
//
// For more information about the features and limitations of the current IAM
// Identity Center OIDC implementation, see Considerations for Using this Guide in
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go
index 8abd4369..e5253ce8 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go
@@ -12,7 +12,7 @@ import (
// Creates and returns access and refresh tokens for clients and applications that
// are authenticated using IAM entities. The access token can be used to fetch
-// short-term credentials for the assigned Amazon Web Services accounts or to
+// short-lived credentials for the assigned Amazon Web Services accounts or to
// access application APIs using bearer authentication.
func (c *Client) CreateTokenWithIAM(ctx context.Context, params *CreateTokenWithIAMInput, optFns ...func(*Options)) (*CreateTokenWithIAMOutput, error) {
if params == nil {
@@ -59,7 +59,7 @@ type CreateTokenWithIAMInput struct {
Assertion *string
// Used only when calling this API for the Authorization Code grant type. This
- // short-term code is used to identify this authorization request. The code is
+ // short-lived code is used to identify this authorization request. The code is
// obtained through a redirect from IAM Identity Center to a redirect URI persisted
// in the Authorization Code GrantOptions for the application.
Code *string
@@ -75,7 +75,7 @@ type CreateTokenWithIAMInput struct {
RedirectUri *string
// Used only when calling this API for the Refresh Token grant type. This token is
- // used to refresh short-term tokens, such as the access token, that might expire.
+ // used to refresh short-lived tokens, such as the access token, that might expire.
//
// For more information about the features and limitations of the current IAM
// Identity Center OIDC implementation, see Considerations for Using this Guide in
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
index 03a3594b..2022270d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
@@ -10,9 +10,9 @@ import (
smithyhttp "github.com/aws/smithy-go/transport/http"
)
-// Registers a client with IAM Identity Center. This allows clients to initiate
-// device authorization. The output should be persisted for reuse through many
-// authentication requests.
+// Registers a public client with IAM Identity Center. This allows clients to
+// perform authorization using the authorization code grant with Proof Key for Code
+// Exchange (PKCE) or the device code grant.
func (c *Client) RegisterClient(ctx context.Context, params *RegisterClientInput, optFns ...func(*Options)) (*RegisterClientOutput, error) {
if params == nil {
params = &RegisterClientInput{}
@@ -48,7 +48,15 @@ type RegisterClientInput struct {
EntitledApplicationArn *string
// The list of OAuth 2.0 grant types that are defined by the client. This list is
- // used to restrict the token granting flows available to the client.
+ // used to restrict the token granting flows available to the client. Supports the
+ // following OAuth 2.0 grant types: Authorization Code, Device Code, and Refresh
+ // Token.
+ //
+ // * Authorization Code - authorization_code
+ //
+ // * Device Code - urn:ietf:params:oauth:grant-type:device_code
+ //
+ // * Refresh Token - refresh_token
GrantTypes []string
// The IAM Identity Center Issuer URL associated with an instance of IAM Identity
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go
index 1d258e56..f3510b18 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go
@@ -8,9 +8,12 @@
// Center. The service also enables the client to fetch the user’s access token
// upon successful authentication and authorization with IAM Identity Center.
//
-// IAM Identity Center uses the sso and identitystore API namespaces.
+// # API namespaces
//
-// # Considerations for Using This Guide
+// IAM Identity Center uses the sso and identitystore API namespaces. IAM Identity
+// Center OpenID Connect uses the sso-oidc namespace.
+//
+// # Considerations for using this guide
//
// Before you begin using this guide, we recommend that you first review the
// following important information about how the IAM Identity Center OIDC service
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
index a0db85a3..9f78e8f7 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
@@ -3,4 +3,4 @@
package ssooidc
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.28.4"
+const goModuleVersion = "1.28.11"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
index 95fe128b..4a95edf9 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
@@ -1,3 +1,49 @@
+# v1.33.10 (2025-01-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+* **Dependency Update**: Upgrade to smithy-go v1.22.2.
+
+# v1.33.9 (2025-01-17)
+
+* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop.
+
+# v1.33.8 (2025-01-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.7 (2025-01-14)
+
+* No change notes available for this release.
+
+# v1.33.6 (2025-01-10)
+
+* **Documentation**: Fixed typos in the descriptions.
+
+# v1.33.5 (2025-01-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.4 (2025-01-08)
+
+* No change notes available for this release.
+
+# v1.33.3 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.2 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.1 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.0 (2024-11-14)
+
+* **Feature**: This release introduces the new API 'AssumeRoot', which returns short-term credentials that you can use to perform privileged tasks.
+
# v1.32.4 (2024-11-06)
* **Dependency Update**: Updated to the latest SDK module versions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
index 4e678ce2..25787325 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
@@ -688,7 +688,7 @@ func addRetry(stack *middleware.Stack, o Options) error {
m.LogAttempts = o.ClientLogMode.IsRetries()
m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sts")
})
- if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
+ if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil {
return err
}
if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
index be03f017..d0563277 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
@@ -16,7 +16,7 @@ import (
// Amazon Web Services resources. These temporary credentials consist of an access
// key ID, a secret access key, and a security token. Typically, you use AssumeRole
// within your account or for cross-account access. For a comparison of AssumeRole
-// with other API operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the
+// with other API operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the
// IAM User Guide.
//
// # Permissions
@@ -26,16 +26,16 @@ import (
// cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken
// API operations.
//
-// (Optional) You can pass inline or managed [session policies] to this operation. You can pass a
-// single JSON policy document to use as an inline session policy. You can also
-// specify up to 10 managed policy Amazon Resource Names (ARNs) to use as managed
-// session policies. The plaintext that you use for both inline and managed session
-// policies can't exceed 2,048 characters. Passing policies to this operation
-// returns new temporary credentials. The resulting session's permissions are the
-// intersection of the role's identity-based policy and the session policies. You
-// can use the role's temporary credentials in subsequent Amazon Web Services API
-// calls to access resources in the account that owns the role. You cannot use
-// session policies to grant more permissions than those allowed by the
+// (Optional) You can pass inline or managed session policies to this operation.
+// You can pass a single JSON policy document to use as an inline session policy.
+// You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use
+// as managed session policies. The plaintext that you use for both inline and
+// managed session policies can't exceed 2,048 characters. Passing policies to this
+// operation returns new temporary credentials. The resulting session's permissions
+// are the intersection of the role's identity-based policy and the session
+// policies. You can use the role's temporary credentials in subsequent Amazon Web
+// Services API calls to access resources in the account that owns the role. You
+// cannot use session policies to grant more permissions than those allowed by the
// identity-based policy of the role that is being assumed. For more information,
// see [Session Policies]in the IAM User Guide.
//
@@ -104,10 +104,9 @@ import (
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
-// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
-// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
// [IAM Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
+// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
func (c *Client) AssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*Options)) (*AssumeRoleOutput, error) {
if params == nil {
@@ -141,10 +140,18 @@ type AssumeRoleInput struct {
// the temporary security credentials will expose the role session name to the
// external account in their CloudTrail logs.
//
+ // For security purposes, administrators can view this field in [CloudTrail logs] to help identify
+ // who performed an action in Amazon Web Services. Your administrator might require
+ // that you specify your user name as the session name when you assume the role.
+ // For more information, see [sts:RoleSessionName]sts:RoleSessionName .
+ //
// The regex used to validate this parameter is a string of characters consisting
// of upper- and lower-case alphanumeric characters with no spaces. You can also
// include underscores or any of the following characters: =,.@-
//
+ // [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
+ // [sts:RoleSessionName]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
+ //
// This member is required.
RoleSessionName *string
@@ -163,7 +170,7 @@ type AssumeRoleInput struct {
// 43200 seconds (12 hours), depending on the maximum session duration setting for
// your role. However, if you assume a role using role chaining and provide a
// DurationSeconds parameter value greater than one hour, the operation fails. To
- // learn how to view the maximum value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide.
+ // learn how to view the maximum value for your role, see [Update the maximum session duration for a role].
//
// By default, the value is set to 3600 seconds.
//
@@ -173,7 +180,7 @@ type AssumeRoleInput struct {
// parameter that specifies the maximum length of the console session. For more
// information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide.
//
- // [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
+ // [Update the maximum session duration for a role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
// [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
DurationSeconds *int32
@@ -218,7 +225,10 @@ type AssumeRoleInput struct {
// by percentage how close the policies and tags for your request are to the upper
// size limit.
//
+ // For more information about role session permissions, see [Session policies].
+ //
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
+ // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
Policy *string
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
@@ -273,10 +283,10 @@ type AssumeRoleInput struct {
SerialNumber *string
// The source identity specified by the principal that is calling the AssumeRole
- // operation.
+ // operation. The source identity value persists across [chained role]sessions.
//
// You can require users to specify a source identity when they assume a role. You
- // do this by using the sts:SourceIdentity condition key in a role trust policy.
+ // do this by using the [sts:SourceIdentity]sts:SourceIdentity condition key in a role trust policy.
// You can use source identity information in CloudTrail logs to determine who took
// actions with a role. You can use the aws:SourceIdentity condition key to
// further control access to Amazon Web Services resources based on the value of
@@ -285,11 +295,13 @@ type AssumeRoleInput struct {
//
// The regex used to validate this parameter is a string of characters consisting
// of upper- and lower-case alphanumeric characters with no spaces. You can also
- // include underscores or any of the following characters: =,.@-. You cannot use a
+ // include underscores or any of the following characters: +=,.@-. You cannot use a
// value that begins with the text aws: . This prefix is reserved for Amazon Web
// Services internal use.
//
+ // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining
// [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
+ // [sts:SourceIdentity]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity
SourceIdentity *string
// A list of session tags that you want to pass. Each session tag consists of a
@@ -342,8 +354,8 @@ type AssumeRoleInput struct {
// a tag key as transitive, the corresponding key and value passes to subsequent
// sessions in a role chain. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide.
//
- // This parameter is optional. When you set session tags as transitive, the
- // session policy and session tags packed binary limit is not affected.
+ // This parameter is optional. The transitive status of a session tag does not
+ // impact its packed binary size.
//
// If you choose not to specify a transitive tag key, then no tags are passed from
// this session to any subsequent sessions.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
index b8b0c095..d0e117ac 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
@@ -16,7 +16,7 @@ import (
// mechanism for tying an enterprise identity store or directory to role-based
// Amazon Web Services access without user-specific credentials or configuration.
// For a comparison of AssumeRoleWithSAML with the other API operations that
-// produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide.
+// produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide.
//
// The temporary security credentials returned by this operation consist of an
// access key ID, a secret access key, and a security token. Applications can use
@@ -130,10 +130,10 @@ import (
// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
// [Creating a Role for SAML 2.0 Federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html
// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
-// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
// [Creating SAML Identity Providers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html
// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
+// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
// [Configuring a Relying Party and Claims]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html
// [Role chaining]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
@@ -219,6 +219,8 @@ type AssumeRoleWithSAMLInput struct {
// \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage
// return (\u000D) characters.
//
+ // For more information about role session permissions, see [Session policies].
+ //
// An Amazon Web Services conversion compresses the passed inline session policy,
// managed policy ARNs, and session tags into a packed binary format that has a
// separate limit. Your request can fail for this limit even if your plaintext
@@ -227,6 +229,7 @@ type AssumeRoleWithSAMLInput struct {
// size limit.
//
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
+ // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
Policy *string
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
@@ -304,7 +307,8 @@ type AssumeRoleWithSAMLOutput struct {
// allowed space.
PackedPolicySize *int32
- // The value in the SourceIdentity attribute in the SAML assertion.
+ // The value in the SourceIdentity attribute in the SAML assertion. The source
+ // identity value persists across [chained role]sessions.
//
// You can require users to set a source identity value when they assume a role.
// You do this by using the sts:SourceIdentity condition key in a role trust
@@ -321,7 +325,7 @@ type AssumeRoleWithSAMLOutput struct {
// of upper- and lower-case alphanumeric characters with no spaces. You can also
// include underscores or any of the following characters: =,.@-
//
- // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining
+ // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts
// [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
SourceIdentity *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
index ffe2479f..0ae4bc17 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
@@ -31,7 +31,7 @@ import (
// Services credentials. Instead, the identity of the caller is validated by using
// a token from the web identity provider. For a comparison of
// AssumeRoleWithWebIdentity with the other API operations that produce temporary
-// credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide.
+// credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide.
//
// The temporary security credentials returned by this API consist of an access
// key ID, a secret access key, and a security token. Applications can use these
@@ -45,7 +45,7 @@ import (
// DurationSeconds parameter to specify the duration of your session. You can
// provide a value from 900 seconds (15 minutes) up to the maximum session duration
// setting for the role. This setting can have a value from 1 hour to 12 hours. To
-// learn how to view the maximum value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide.
+// learn how to view the maximum value for your role, see [Update the maximum session duration for a role]in the IAM User Guide.
// The maximum session duration limit applies when you use the AssumeRole* API
// operations or the assume-role* CLI commands. However the limit does not apply
// when you use those operations to create a console URL. For more information, see
@@ -111,34 +111,23 @@ import (
// that you avoid using any personally identifiable information (PII) in this
// field. For example, you could instead use a GUID or a pairwise identifier, as [suggested in the OIDC specification].
//
-// For more information about how to use web identity federation and the
+// For more information about how to use OIDC federation and the
// AssumeRoleWithWebIdentity API, see the following resources:
//
// [Using Web Identity Federation API Operations for Mobile Apps]
// - and [Federation Through a Web-based Identity Provider].
//
-// [Web Identity Federation Playground]
-// - . Walk through the process of authenticating through Login with Amazon,
-// Facebook, or Google, getting temporary security credentials, and then using
-// those credentials to make a request to Amazon Web Services.
-//
// [Amazon Web Services SDK for iOS Developer Guide]
// - and [Amazon Web Services SDK for Android Developer Guide]. These toolkits contain sample apps that show how to invoke the
// identity providers. The toolkits then show how to use the information from these
// providers to get and use temporary security credentials.
//
-// [Web Identity Federation with Mobile Applications]
-// - . This article discusses web identity federation and shows an example of
-// how to use web identity federation to get access to content in Amazon S3.
-//
// [Amazon Web Services SDK for iOS Developer Guide]: http://aws.amazon.com/sdkforios/
-// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
-// [Web Identity Federation Playground]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
// [Amazon Web Services SDK for Android Developer Guide]: http://aws.amazon.com/sdkforandroid/
// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
-// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
+// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
// [Subject]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
// [Amazon Cognito identity pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
@@ -148,7 +137,7 @@ import (
// [Amazon Cognito federated identities]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
-// [Web Identity Federation with Mobile Applications]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
+// [Update the maximum session duration for a role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration
// [Using Web Identity Federation API Operations for Mobile Apps]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
// [suggested in the OIDC specification]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
func (c *Client) AssumeRoleWithWebIdentity(ctx context.Context, params *AssumeRoleWithWebIdentityInput, optFns ...func(*Options)) (*AssumeRoleWithWebIdentityOutput, error) {
@@ -170,6 +159,17 @@ type AssumeRoleWithWebIdentityInput struct {
// The Amazon Resource Name (ARN) of the role that the caller is assuming.
//
+ // Additional considerations apply to Amazon Cognito identity pools that assume [cross-account IAM roles].
+ // The trust policies of these roles must accept the cognito-identity.amazonaws.com
+ // service principal and must contain the cognito-identity.amazonaws.com:aud
+ // condition key to restrict role assumption to users from your intended identity
+ // pools. A policy that trusts Amazon Cognito identity pools without this condition
+ // creates a risk that a user from an unintended identity pool can assume the role.
+ // For more information, see [Trust policies for IAM roles in Basic (Classic) authentication]in the Amazon Cognito Developer Guide.
+ //
+ // [cross-account IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html
+ // [Trust policies for IAM roles in Basic (Classic) authentication]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies
+ //
// This member is required.
RoleArn *string
@@ -179,18 +179,28 @@ type AssumeRoleWithWebIdentityInput struct {
// associated with that user. This session name is included as part of the ARN and
// assumed role ID in the AssumedRoleUser response element.
//
+ // For security purposes, administrators can view this field in [CloudTrail logs] to help identify
+ // who performed an action in Amazon Web Services. Your administrator might require
+ // that you specify your user name as the session name when you assume the role.
+ // For more information, see [sts:RoleSessionName]sts:RoleSessionName .
+ //
// The regex used to validate this parameter is a string of characters consisting
// of upper- and lower-case alphanumeric characters with no spaces. You can also
// include underscores or any of the following characters: =,.@-
//
+ // [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds
+ // [sts:RoleSessionName]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname
+ //
// This member is required.
RoleSessionName *string
// The OAuth 2.0 access token or OpenID Connect ID token that is provided by the
// identity provider. Your application must get this token by authenticating the
// user who is using your application with a web identity provider before the
- // application makes an AssumeRoleWithWebIdentity call. Only tokens with RSA
- // algorithms (RS256) are supported.
+ // application makes an AssumeRoleWithWebIdentity call. Timestamps in the token
+ // must be formatted as either an integer or a long integer. Tokens must be signed
+ // using either RSA keys (RS256, RS384, or RS512) or ECDSA keys (ES256, ES384, or
+ // ES512).
//
// This member is required.
WebIdentityToken *string
@@ -232,6 +242,8 @@ type AssumeRoleWithWebIdentityInput struct {
// \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage
// return (\u000D) characters.
//
+ // For more information about role session permissions, see [Session policies].
+ //
// An Amazon Web Services conversion compresses the passed inline session policy,
// managed policy ARNs, and session tags into a packed binary format that has a
// separate limit. Your request can fail for this limit even if your plaintext
@@ -240,6 +252,7 @@ type AssumeRoleWithWebIdentityInput struct {
// size limit.
//
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
+ // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
Policy *string
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
@@ -337,7 +350,7 @@ type AssumeRoleWithWebIdentityOutput struct {
// of upper- and lower-case alphanumeric characters with no spaces. You can also
// include underscores or any of the following characters: =,.@-
//
- // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining
+ // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts
// [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
// [Using Tokens with User Pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html
SourceIdentity *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go
new file mode 100644
index 00000000..cd976e57
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go
@@ -0,0 +1,220 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package sts
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/sts/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a set of short term credentials you can use to perform privileged tasks
+// on a member account in your organization.
+//
+// Before you can launch a privileged session, you must have centralized root
+// access in your organization. For steps to enable this feature, see [Centralize root access for member accounts]in the IAM
+// User Guide.
+//
+// The STS global endpoint is not supported for AssumeRoot. You must send this
+// request to a Regional STS endpoint. For more information, see [Endpoints].
+//
+// You can track AssumeRoot in CloudTrail logs to determine what actions were
+// performed in a session. For more information, see [Track privileged tasks in CloudTrail]in the IAM User Guide.
+//
+// [Endpoints]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints
+// [Track privileged tasks in CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html
+// [Centralize root access for member accounts]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html
+func (c *Client) AssumeRoot(ctx context.Context, params *AssumeRootInput, optFns ...func(*Options)) (*AssumeRootOutput, error) {
+ if params == nil {
+ params = &AssumeRootInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "AssumeRoot", params, optFns, c.addOperationAssumeRootMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*AssumeRootOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type AssumeRootInput struct {
+
+ // The member account principal ARN or account ID.
+ //
+ // This member is required.
+ TargetPrincipal *string
+
+ // The identity based policy that scopes the session to the privileged tasks that
+ // can be performed. You can use one of following Amazon Web Services managed
+ // policies to scope root session actions.
+ //
+ // [IAMAuditRootUserCredentials]
+ //
+ // [IAMCreateRootUserPassword]
+ //
+ // [IAMDeleteRootUserCredentials]
+ //
+ // [S3UnlockBucketPolicy]
+ //
+ // [SQSUnlockQueuePolicy]
+ //
+ // [IAMDeleteRootUserCredentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials
+ // [IAMCreateRootUserPassword]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword
+ // [IAMAuditRootUserCredentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials
+ // [S3UnlockBucketPolicy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy
+ // [SQSUnlockQueuePolicy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy
+ //
+ // This member is required.
+ TaskPolicyArn *types.PolicyDescriptorType
+
+ // The duration, in seconds, of the privileged session. The value can range from 0
+ // seconds up to the maximum session duration of 900 seconds (15 minutes). If you
+ // specify a value higher than this setting, the operation fails.
+ //
+ // By default, the value is set to 900 seconds.
+ DurationSeconds *int32
+
+ noSmithyDocumentSerde
+}
+
+type AssumeRootOutput struct {
+
+ // The temporary security credentials, which include an access key ID, a secret
+ // access key, and a security token.
+ //
+ // The size of the security token that STS API operations return is not fixed. We
+ // strongly recommend that you make no assumptions about the maximum size.
+ Credentials *types.Credentials
+
+ // The source identity specified by the principal that is calling the AssumeRoot
+ // operation.
+ //
+ // You can use the aws:SourceIdentity condition key to control access based on the
+ // value of source identity. For more information about using source identity, see [Monitor and control actions taken with assumed roles]
+ // in the IAM User Guide.
+ //
+ // The regex used to validate this parameter is a string of characters consisting
+ // of upper- and lower-case alphanumeric characters with no spaces. You can also
+ // include underscores or any of the following characters: =,.@-
+ //
+ // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
+ SourceIdentity *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoot{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAssumeRoot{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoot"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpAssumeRootValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoot(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opAssumeRoot(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "AssumeRoot",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
index 96f59ec6..e2ecc792 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go
@@ -20,7 +20,7 @@ import (
// credentials of an IAM user. As a result, this call is appropriate in contexts
// where those credentials can be safeguarded, usually in a server-based
// application. For a comparison of GetFederationToken with the other API
-// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide.
+// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide.
//
// Although it is possible to call GetFederationToken using the security
// credentials of an Amazon Web Services account root user rather than an IAM user
@@ -104,9 +104,9 @@ import (
// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
// [GetFederationToken—Federation Through a Custom Identity Broker]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken
-// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
// [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
+// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
func (c *Client) GetFederationToken(ctx context.Context, params *GetFederationTokenInput, optFns ...func(*Options)) (*GetFederationTokenOutput, error) {
if params == nil {
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
index 0ed9ecbc..fdc45111 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go
@@ -22,7 +22,7 @@ import (
// the call returns, IAM users can then make programmatic calls to API operations
// that require MFA authentication. An incorrect MFA code causes the API to return
// an access denied error. For a comparison of GetSessionToken with the other API
-// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Comparing the Amazon Web Services STS API operations] in the IAM User Guide.
+// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide.
//
// No permissions are required for users to perform this operation. The purpose of
// the sts:GetSessionToken operation is to authenticate the user using MFA. You
@@ -63,10 +63,10 @@ import (
// credentials, see [Temporary Credentials for Users in Untrusted Environments]in the IAM User Guide.
//
// [Permissions for GetSessionToken]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html
-// [Comparing the Amazon Web Services STS API operations]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
// [Temporary Credentials for Users in Untrusted Environments]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
// [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials
// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
+// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html
func (c *Client) GetSessionToken(ctx context.Context, params *GetSessionTokenInput, optFns ...func(*Options)) (*GetSessionTokenOutput, error) {
if params == nil {
params = &GetSessionTokenInput{}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
index cf0cc54e..59349890 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go
@@ -410,6 +410,121 @@ func awsAwsquery_deserializeOpErrorAssumeRoleWithWebIdentity(response *smithyhtt
}
}
+type awsAwsquery_deserializeOpAssumeRoot struct {
+}
+
+func (*awsAwsquery_deserializeOpAssumeRoot) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsquery_deserializeOpAssumeRoot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoot(response, &metadata)
+ }
+ output := &AssumeRootOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+ body := io.TeeReader(response.Body, ringBuffer)
+ rootDecoder := xml.NewDecoder(body)
+ t, err := smithyxml.FetchRootElement(rootDecoder)
+ if err == io.EOF {
+ return out, metadata, nil
+ }
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ }
+
+ decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
+ t, err = decoder.GetElement("AssumeRootResult")
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ err = awsAwsquery_deserializeOpDocumentAssumeRootOutput(&output, decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsquery_deserializeOpErrorAssumeRoot(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
+ if err != nil {
+ return err
+ }
+ if reqID := errorComponents.RequestID; len(reqID) != 0 {
+ awsmiddleware.SetRequestIDMetadata(metadata, reqID)
+ }
+ if len(errorComponents.Code) != 0 {
+ errorCode = errorComponents.Code
+ }
+ if len(errorComponents.Message) != 0 {
+ errorMessage = errorComponents.Message
+ }
+ errorBody.Seek(0, io.SeekStart)
+ switch {
+ case strings.EqualFold("ExpiredTokenException", errorCode):
+ return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody)
+
+ case strings.EqualFold("RegionDisabledException", errorCode):
+ return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
type awsAwsquery_deserializeOpDecodeAuthorizationMessage struct {
}
@@ -2268,6 +2383,61 @@ func awsAwsquery_deserializeOpDocumentAssumeRoleWithWebIdentityOutput(v **Assume
return nil
}
+func awsAwsquery_deserializeOpDocumentAssumeRootOutput(v **AssumeRootOutput, decoder smithyxml.NodeDecoder) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ var sv *AssumeRootOutput
+ if *v == nil {
+ sv = &AssumeRootOutput{}
+ } else {
+ sv = *v
+ }
+
+ for {
+ t, done, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if done {
+ break
+ }
+ originalDecoder := decoder
+ decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
+ switch {
+ case strings.EqualFold("Credentials", t.Name.Local):
+ nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
+ if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
+ return err
+ }
+
+ case strings.EqualFold("SourceIdentity", t.Name.Local):
+ val, err := decoder.Value()
+ if err != nil {
+ return err
+ }
+ if val == nil {
+ break
+ }
+ {
+ xtv := string(val)
+ sv.SourceIdentity = ptr.String(xtv)
+ }
+
+ default:
+ // Do nothing and ignore the unexpected tag element
+ err = decoder.Decoder.Skip()
+ if err != nil {
+ return err
+ }
+
+ }
+ decoder = originalDecoder
+ }
+ *v = sv
+ return nil
+}
+
func awsAwsquery_deserializeOpDocumentDecodeAuthorizationMessageOutput(v **DecodeAuthorizationMessageOutput, decoder smithyxml.NodeDecoder) error {
if v == nil {
return fmt.Errorf("unexpected nil of type %T", v)
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
index 6b6e839e..70a88452 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json
@@ -13,6 +13,7 @@
"api_op_AssumeRole.go",
"api_op_AssumeRoleWithSAML.go",
"api_op_AssumeRoleWithWebIdentity.go",
+ "api_op_AssumeRoot.go",
"api_op_DecodeAuthorizationMessage.go",
"api_op_GetAccessKeyInfo.go",
"api_op_GetCallerIdentity.go",
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
index a7c0c282..6db8f82f 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
@@ -3,4 +3,4 @@
package sts
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.32.4"
+const goModuleVersion = "1.33.10"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
index 9fe930b8..4e07994d 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go
@@ -175,6 +175,9 @@ var defaultPartitions = endpoints.Partitions{
endpoints.EndpointKey{
Region: "ap-southeast-5",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-7",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "aws-global",
}: endpoints.Endpoint{
@@ -222,6 +225,9 @@ var defaultPartitions = endpoints.Partitions{
endpoints.EndpointKey{
Region: "me-south-1",
}: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "mx-central-1",
+ }: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "sa-east-1",
}: endpoints.Endpoint{},
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go
index 1bcbc828..96b22213 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go
@@ -226,6 +226,76 @@ func (m *awsAwsquery_serializeOpAssumeRoleWithWebIdentity) HandleSerialize(ctx c
return next.HandleSerialize(ctx, in)
}
+type awsAwsquery_serializeOpAssumeRoot struct {
+}
+
+func (*awsAwsquery_serializeOpAssumeRoot) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsquery_serializeOpAssumeRoot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*AssumeRootInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")
+
+ bodyWriter := bytes.NewBuffer(nil)
+ bodyEncoder := query.NewEncoder(bodyWriter)
+ body := bodyEncoder.Object()
+ body.Key("Action").String("AssumeRoot")
+ body.Key("Version").String("2011-06-15")
+
+ if err := awsAwsquery_serializeOpDocumentAssumeRootInput(input, bodyEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ err = bodyEncoder.Encode()
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
type awsAwsquery_serializeOpDecodeAuthorizationMessage struct {
}
@@ -821,6 +891,30 @@ func awsAwsquery_serializeOpDocumentAssumeRoleWithWebIdentityInput(v *AssumeRole
return nil
}
+func awsAwsquery_serializeOpDocumentAssumeRootInput(v *AssumeRootInput, value query.Value) error {
+ object := value.Object()
+ _ = object
+
+ if v.DurationSeconds != nil {
+ objectKey := object.Key("DurationSeconds")
+ objectKey.Integer(*v.DurationSeconds)
+ }
+
+ if v.TargetPrincipal != nil {
+ objectKey := object.Key("TargetPrincipal")
+ objectKey.String(*v.TargetPrincipal)
+ }
+
+ if v.TaskPolicyArn != nil {
+ objectKey := object.Key("TaskPolicyArn")
+ if err := awsAwsquery_serializeDocumentPolicyDescriptorType(v.TaskPolicyArn, objectKey); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
func awsAwsquery_serializeOpDocumentDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput, value query.Value) error {
object := value.Object()
_ = object
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
index 9573a4b6..041629bb 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go
@@ -95,8 +95,8 @@ func (e *IDPRejectedClaimException) ErrorCode() string {
func (e *IDPRejectedClaimException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The error returned if the message passed to DecodeAuthorizationMessage was
-// invalid. This can happen if the token contains invalid characters, such as
-// linebreaks.
+// invalid. This can happen if the token contains invalid characters, such as line
+// breaks, or if the message has expired.
type InvalidAuthorizationMessageException struct {
Message *string
@@ -218,10 +218,10 @@ func (e *PackedPolicyTooLargeException) ErrorFault() smithy.ErrorFault { return
// STS is not activated in the requested region for the account that is being
// asked to generate credentials. The account administrator must use the IAM
-// console to activate STS in that region. For more information, see [Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region]in the IAM
+// console to activate STS in that region. For more information, see [Activating and Deactivating STS in an Amazon Web Services Region]in the IAM
// User Guide.
//
-// [Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html
+// [Activating and Deactivating STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html
type RegionDisabledException struct {
Message *string
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go
index 3e4bad2a..1026e221 100644
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go
@@ -70,6 +70,26 @@ func (m *validateOpAssumeRoleWithWebIdentity) HandleInitialize(ctx context.Conte
return next.HandleInitialize(ctx, in)
}
+type validateOpAssumeRoot struct {
+}
+
+func (*validateOpAssumeRoot) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpAssumeRoot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*AssumeRootInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpAssumeRootInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
type validateOpDecodeAuthorizationMessage struct {
}
@@ -142,6 +162,10 @@ func addOpAssumeRoleWithWebIdentityValidationMiddleware(stack *middleware.Stack)
return stack.Initialize.Add(&validateOpAssumeRoleWithWebIdentity{}, middleware.After)
}
+func addOpAssumeRootValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpAssumeRoot{}, middleware.After)
+}
+
func addOpDecodeAuthorizationMessageValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDecodeAuthorizationMessage{}, middleware.After)
}
@@ -254,6 +278,24 @@ func validateOpAssumeRoleWithWebIdentityInput(v *AssumeRoleWithWebIdentityInput)
}
}
+func validateOpAssumeRootInput(v *AssumeRootInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "AssumeRootInput"}
+ if v.TargetPrincipal == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TargetPrincipal"))
+ }
+ if v.TaskPolicyArn == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TaskPolicyArn"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
func validateOpDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput) error {
if v == nil {
return nil
diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md
index 56b19e3a..de39171c 100644
--- a/vendor/github.com/aws/smithy-go/CHANGELOG.md
+++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md
@@ -1,3 +1,13 @@
+# Release (2025-01-21)
+
+## General Highlights
+* **Dependency Update**: Updated to the latest SDK module versions
+
+## Module Highlights
+* `github.com/aws/smithy-go`: v1.22.2
+ * **Bug Fix**: Fix HTTP metrics data race.
+ * **Bug Fix**: Replace usages of deprecated ioutil package.
+
# Release (2024-11-15)
## General Highlights
diff --git a/vendor/github.com/aws/smithy-go/CONTRIBUTING.md b/vendor/github.com/aws/smithy-go/CONTRIBUTING.md
index c4b6a1c5..1f8d01ff 100644
--- a/vendor/github.com/aws/smithy-go/CONTRIBUTING.md
+++ b/vendor/github.com/aws/smithy-go/CONTRIBUTING.md
@@ -39,6 +39,37 @@ To send us a pull request, please:
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
+### Changelog Documents
+
+(You can SKIP this step if you are only changing the code generator, and not the runtime).
+
+When submitting a pull request please include a changelog file on a folder named `.changelog`.
+These are used to generate the content `CHANGELOG.md` and Release Notes. The format of the file is as follows:
+
+```
+{
+ "id": "12345678-1234-1234-1234-123456789012"
+ "type": "bugfix"
+ "collapse": true
+ "description": "Fix improper use of printf-style functions.",
+ "modules": [
+ "."
+ ]
+}
+```
+
+* id: a UUID. This should also be used for the name of the file, so if your id is `12345678-1234-1234-1234-123456789012` the file should be named `12345678-1234-1234-1234-123456789012.json/`
+* type: one of the following:
+ * bugfix: Fixing an existing bug
+ * Feature: Adding a new feature to an existing service
+ * Release: Releasing a new module
+ * Dependency: Updating dependencies
+ * Announcement: Making an announcement, like deprecation of a module
+* collapse: whether this change should appear separately on the release notes on every module listed on `modules` (`"collapse": false`), or if it should show up as a single entry (`"collapse": true`)
+ * For the smithy-go repository this should always be `false`
+* description: Description of this change. Most of the times is the same as the title of the PR
+* modules: which Go modules does this change impact. The root module is expressed as "."
+
## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
diff --git a/vendor/github.com/aws/smithy-go/Makefile b/vendor/github.com/aws/smithy-go/Makefile
index e66fa8ca..a3c2cf17 100644
--- a/vendor/github.com/aws/smithy-go/Makefile
+++ b/vendor/github.com/aws/smithy-go/Makefile
@@ -98,5 +98,12 @@ module-version:
##############
.PHONY: install-changelog
+external-changelog:
+ mkdir -p .changelog
+ cp changelog-template.json .changelog/00000000-0000-0000-0000-000000000000.json
+ @echo "Generate a new UUID and update the file at .changelog/00000000-0000-0000-0000-000000000000.json"
+ @echo "Make sure to rename the file with your new id, like .changelog/12345678-1234-1234-1234-123456789012.json"
+ @echo "See CONTRIBUTING.md 'Changelog Documents' and an example at https://github.com/aws/smithy-go/pull/543/files"
+
install-changelog:
go install ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION}
diff --git a/vendor/github.com/aws/smithy-go/changelog-template.json b/vendor/github.com/aws/smithy-go/changelog-template.json
new file mode 100644
index 00000000..d36e2b3e
--- /dev/null
+++ b/vendor/github.com/aws/smithy-go/changelog-template.json
@@ -0,0 +1,9 @@
+{
+ "id": "00000000-0000-0000-0000-000000000000",
+ "type": "feature|bugfix|dependency",
+ "description": "Description of your changes",
+ "collapse": false,
+ "modules": [
+ "."
+ ]
+}
diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go
index 212eae4f..a51ceca4 100644
--- a/vendor/github.com/aws/smithy-go/go_module_metadata.go
+++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go
@@ -3,4 +3,4 @@
package smithy
// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.22.1"
+const goModuleVersion = "1.22.2"
diff --git a/vendor/github.com/aws/smithy-go/transport/http/host.go b/vendor/github.com/aws/smithy-go/transport/http/host.go
index 6b290fec..db9801be 100644
--- a/vendor/github.com/aws/smithy-go/transport/http/host.go
+++ b/vendor/github.com/aws/smithy-go/transport/http/host.go
@@ -69,7 +69,7 @@ func ValidPortNumber(port string) bool {
return true
}
-// ValidHostLabel returns whether the label is a valid RFC 3986 host abel.
+// ValidHostLabel returns whether the label is a valid RFC 3986 host label.
func ValidHostLabel(label string) bool {
if l := len(label); l == 0 || l > 63 {
return false
diff --git a/vendor/github.com/aws/smithy-go/transport/http/metrics.go b/vendor/github.com/aws/smithy-go/transport/http/metrics.go
index ab110139..d1beaa59 100644
--- a/vendor/github.com/aws/smithy-go/transport/http/metrics.go
+++ b/vendor/github.com/aws/smithy-go/transport/http/metrics.go
@@ -5,6 +5,7 @@ import (
"crypto/tls"
"net/http"
"net/http/httptrace"
+ "sync/atomic"
"time"
"github.com/aws/smithy-go/metrics"
@@ -42,10 +43,10 @@ type timedClientDo struct {
}
func (c *timedClientDo) Do(r *http.Request) (*http.Response, error) {
- c.hm.doStart = now()
+ c.hm.doStart.Store(now())
resp, err := c.ClientDo.Do(r)
- c.hm.DoRequestDuration.Record(r.Context(), elapsed(c.hm.doStart))
+ c.hm.DoRequestDuration.Record(r.Context(), c.hm.doStart.Elapsed())
return resp, err
}
@@ -58,10 +59,10 @@ type httpMetrics struct {
DoRequestDuration metrics.Float64Histogram // client.http.do_request_duration
TimeToFirstByte metrics.Float64Histogram // client.http.time_to_first_byte
- doStart time.Time
- dnsStart time.Time
- connectStart time.Time
- tlsStart time.Time
+ doStart safeTime
+ dnsStart safeTime
+ connectStart safeTime
+ tlsStart safeTime
}
func newHTTPMetrics(meter metrics.Meter) (*httpMetrics, error) {
@@ -115,15 +116,15 @@ func newHTTPMetrics(meter metrics.Meter) (*httpMetrics, error) {
}
func (m *httpMetrics) DNSStart(httptrace.DNSStartInfo) {
- m.dnsStart = now()
+ m.dnsStart.Store(now())
}
func (m *httpMetrics) ConnectStart(string, string) {
- m.connectStart = now()
+ m.connectStart.Store(now())
}
func (m *httpMetrics) TLSHandshakeStart() {
- m.tlsStart = now()
+ m.tlsStart.Store(now())
}
func (m *httpMetrics) GotConn(ctx context.Context) func(httptrace.GotConnInfo) {
@@ -140,25 +141,25 @@ func (m *httpMetrics) PutIdleConn(ctx context.Context) func(error) {
func (m *httpMetrics) DNSDone(ctx context.Context) func(httptrace.DNSDoneInfo) {
return func(httptrace.DNSDoneInfo) {
- m.DNSLookupDuration.Record(ctx, elapsed(m.dnsStart))
+ m.DNSLookupDuration.Record(ctx, m.dnsStart.Elapsed())
}
}
func (m *httpMetrics) ConnectDone(ctx context.Context) func(string, string, error) {
return func(string, string, error) {
- m.ConnectDuration.Record(ctx, elapsed(m.connectStart))
+ m.ConnectDuration.Record(ctx, m.connectStart.Elapsed())
}
}
func (m *httpMetrics) TLSHandshakeDone(ctx context.Context) func(tls.ConnectionState, error) {
return func(tls.ConnectionState, error) {
- m.TLSHandshakeDuration.Record(ctx, elapsed(m.tlsStart))
+ m.TLSHandshakeDuration.Record(ctx, m.tlsStart.Elapsed())
}
}
func (m *httpMetrics) GotFirstResponseByte(ctx context.Context) func() {
return func() {
- m.TimeToFirstByte.Record(ctx, elapsed(m.doStart))
+ m.TimeToFirstByte.Record(ctx, m.doStart.Elapsed())
}
}
@@ -177,8 +178,21 @@ func (m *httpMetrics) addConnIdle(ctx context.Context, incr int64) {
})
}
-func elapsed(start time.Time) float64 {
+type safeTime struct {
+ atomic.Value // time.Time
+}
+
+func (st *safeTime) Store(v time.Time) {
+ st.Value.Store(v)
+}
+
+func (st *safeTime) Load() time.Time {
+ t, _ := st.Value.Load().(time.Time)
+ return t
+}
+
+func (st *safeTime) Elapsed() float64 {
end := now()
- elapsed := end.Sub(start)
+ elapsed := end.Sub(st.Load())
return float64(elapsed) / 1e9
}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go
index 1d3b218a..914338f2 100644
--- a/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go
+++ b/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go
@@ -2,10 +2,10 @@ package http
import (
"context"
+ "io"
+
"github.com/aws/smithy-go/logging"
"github.com/aws/smithy-go/middleware"
- "io"
- "io/ioutil"
)
// AddErrorCloseResponseBodyMiddleware adds the middleware to automatically
@@ -30,7 +30,7 @@ func (m *errorCloseResponseBodyMiddleware) HandleDeserialize(
if err != nil {
if resp, ok := out.RawResponse.(*Response); ok && resp != nil && resp.Body != nil {
// Consume the full body to prevent TCP connection resets on some platforms
- _, _ = io.Copy(ioutil.Discard, resp.Body)
+ _, _ = io.Copy(io.Discard, resp.Body)
// Do not validate that the response closes successfully.
resp.Body.Close()
}
@@ -64,7 +64,7 @@ func (m *closeResponseBody) HandleDeserialize(
if resp, ok := out.RawResponse.(*Response); ok {
// Consume the full body to prevent TCP connection resets on some platforms
- _, copyErr := io.Copy(ioutil.Discard, resp.Body)
+ _, copyErr := io.Copy(io.Discard, resp.Body)
if copyErr != nil {
middleware.GetLogger(ctx).Logf(logging.Warn, "failed to discard remaining HTTP response body, this may affect connection reuse")
}
diff --git a/vendor/github.com/aws/smithy-go/transport/http/request.go b/vendor/github.com/aws/smithy-go/transport/http/request.go
index 7177d6f9..5cbf6f10 100644
--- a/vendor/github.com/aws/smithy-go/transport/http/request.go
+++ b/vendor/github.com/aws/smithy-go/transport/http/request.go
@@ -4,7 +4,6 @@ import (
"context"
"fmt"
"io"
- "io/ioutil"
"net/http"
"net/url"
"strings"
@@ -167,7 +166,7 @@ func (r *Request) Build(ctx context.Context) *http.Request {
switch stream := r.stream.(type) {
case *io.PipeReader:
- req.Body = ioutil.NopCloser(stream)
+ req.Body = io.NopCloser(stream)
req.ContentLength = -1
default:
// HTTP Client Request must only have a non-nil body if the
@@ -175,7 +174,7 @@ func (r *Request) Build(ctx context.Context) *http.Request {
// Client will interpret a non-nil body and ContentLength 0 as
// "unknown". This is unwanted behavior.
if req.ContentLength != 0 && r.stream != nil {
- req.Body = iointernal.NewSafeReadCloser(ioutil.NopCloser(stream))
+ req.Body = iointernal.NewSafeReadCloser(io.NopCloser(stream))
}
}
diff --git a/vendor/github.com/cenkalti/backoff/v4/.gitignore b/vendor/github.com/cenkalti/backoff/v4/.gitignore
new file mode 100644
index 00000000..50d95c54
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/.gitignore
@@ -0,0 +1,25 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+
+# IDEs
+.idea/
diff --git a/vendor/github.com/cenkalti/backoff/v4/LICENSE b/vendor/github.com/cenkalti/backoff/v4/LICENSE
new file mode 100644
index 00000000..89b81799
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Cenk Altı
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/cenkalti/backoff/v4/README.md b/vendor/github.com/cenkalti/backoff/v4/README.md
new file mode 100644
index 00000000..9433004a
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/README.md
@@ -0,0 +1,30 @@
+# Exponential Backoff [![GoDoc][godoc image]][godoc] [![Coverage Status][coveralls image]][coveralls]
+
+This is a Go port of the exponential backoff algorithm from [Google's HTTP Client Library for Java][google-http-java-client].
+
+[Exponential backoff][exponential backoff wiki]
+is an algorithm that uses feedback to multiplicatively decrease the rate of some process,
+in order to gradually find an acceptable rate.
+The retries exponentially increase and stop increasing when a certain threshold is met.
+
+## Usage
+
+Import path is `github.com/cenkalti/backoff/v4`. Please note the version part at the end.
+
+Use https://pkg.go.dev/github.com/cenkalti/backoff/v4 to view the documentation.
+
+## Contributing
+
+* I would like to keep this library as small as possible.
+* Please don't send a PR without opening an issue and discussing it first.
+* If proposed change is not a common use case, I will probably not accept it.
+
+[godoc]: https://pkg.go.dev/github.com/cenkalti/backoff/v4
+[godoc image]: https://godoc.org/github.com/cenkalti/backoff?status.png
+[coveralls]: https://coveralls.io/github/cenkalti/backoff?branch=master
+[coveralls image]: https://coveralls.io/repos/github/cenkalti/backoff/badge.svg?branch=master
+
+[google-http-java-client]: https://github.com/google/google-http-java-client/blob/da1aa993e90285ec18579f1553339b00e19b3ab5/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java
+[exponential backoff wiki]: http://en.wikipedia.org/wiki/Exponential_backoff
+
+[advanced example]: https://pkg.go.dev/github.com/cenkalti/backoff/v4?tab=doc#pkg-examples
diff --git a/vendor/github.com/cenkalti/backoff/v4/backoff.go b/vendor/github.com/cenkalti/backoff/v4/backoff.go
new file mode 100644
index 00000000..3676ee40
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/backoff.go
@@ -0,0 +1,66 @@
+// Package backoff implements backoff algorithms for retrying operations.
+//
+// Use Retry function for retrying operations that may fail.
+// If Retry does not meet your needs,
+// copy/paste the function into your project and modify as you wish.
+//
+// There is also Ticker type similar to time.Ticker.
+// You can use it if you need to work with channels.
+//
+// See Examples section below for usage examples.
+package backoff
+
+import "time"
+
+// BackOff is a backoff policy for retrying an operation.
+type BackOff interface {
+ // NextBackOff returns the duration to wait before retrying the operation,
+ // or backoff. Stop to indicate that no more retries should be made.
+ //
+ // Example usage:
+ //
+ // duration := backoff.NextBackOff();
+ // if (duration == backoff.Stop) {
+ // // Do not retry operation.
+ // } else {
+ // // Sleep for duration and retry operation.
+ // }
+ //
+ NextBackOff() time.Duration
+
+ // Reset to initial state.
+ Reset()
+}
+
+// Stop indicates that no more retries should be made for use in NextBackOff().
+const Stop time.Duration = -1
+
+// ZeroBackOff is a fixed backoff policy whose backoff time is always zero,
+// meaning that the operation is retried immediately without waiting, indefinitely.
+type ZeroBackOff struct{}
+
+func (b *ZeroBackOff) Reset() {}
+
+func (b *ZeroBackOff) NextBackOff() time.Duration { return 0 }
+
+// StopBackOff is a fixed backoff policy that always returns backoff.Stop for
+// NextBackOff(), meaning that the operation should never be retried.
+type StopBackOff struct{}
+
+func (b *StopBackOff) Reset() {}
+
+func (b *StopBackOff) NextBackOff() time.Duration { return Stop }
+
+// ConstantBackOff is a backoff policy that always returns the same backoff delay.
+// This is in contrast to an exponential backoff policy,
+// which returns a delay that grows longer as you call NextBackOff() over and over again.
+type ConstantBackOff struct {
+ Interval time.Duration
+}
+
+func (b *ConstantBackOff) Reset() {}
+func (b *ConstantBackOff) NextBackOff() time.Duration { return b.Interval }
+
+func NewConstantBackOff(d time.Duration) *ConstantBackOff {
+ return &ConstantBackOff{Interval: d}
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/context.go b/vendor/github.com/cenkalti/backoff/v4/context.go
new file mode 100644
index 00000000..48482330
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/context.go
@@ -0,0 +1,62 @@
+package backoff
+
+import (
+ "context"
+ "time"
+)
+
+// BackOffContext is a backoff policy that stops retrying after the context
+// is canceled.
+type BackOffContext interface { // nolint: golint
+ BackOff
+ Context() context.Context
+}
+
+type backOffContext struct {
+ BackOff
+ ctx context.Context
+}
+
+// WithContext returns a BackOffContext with context ctx
+//
+// ctx must not be nil
+func WithContext(b BackOff, ctx context.Context) BackOffContext { // nolint: golint
+ if ctx == nil {
+ panic("nil context")
+ }
+
+ if b, ok := b.(*backOffContext); ok {
+ return &backOffContext{
+ BackOff: b.BackOff,
+ ctx: ctx,
+ }
+ }
+
+ return &backOffContext{
+ BackOff: b,
+ ctx: ctx,
+ }
+}
+
+func getContext(b BackOff) context.Context {
+ if cb, ok := b.(BackOffContext); ok {
+ return cb.Context()
+ }
+ if tb, ok := b.(*backOffTries); ok {
+ return getContext(tb.delegate)
+ }
+ return context.Background()
+}
+
+func (b *backOffContext) Context() context.Context {
+ return b.ctx
+}
+
+func (b *backOffContext) NextBackOff() time.Duration {
+ select {
+ case <-b.ctx.Done():
+ return Stop
+ default:
+ return b.BackOff.NextBackOff()
+ }
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/exponential.go b/vendor/github.com/cenkalti/backoff/v4/exponential.go
new file mode 100644
index 00000000..aac99f19
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/exponential.go
@@ -0,0 +1,216 @@
+package backoff
+
+import (
+ "math/rand"
+ "time"
+)
+
+/*
+ExponentialBackOff is a backoff implementation that increases the backoff
+period for each retry attempt using a randomization function that grows exponentially.
+
+NextBackOff() is calculated using the following formula:
+
+ randomized interval =
+ RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])
+
+In other words NextBackOff() will range between the randomization factor
+percentage below and above the retry interval.
+
+For example, given the following parameters:
+
+ RetryInterval = 2
+ RandomizationFactor = 0.5
+ Multiplier = 2
+
+the actual backoff period used in the next retry attempt will range between 1 and 3 seconds,
+multiplied by the exponential, that is, between 2 and 6 seconds.
+
+Note: MaxInterval caps the RetryInterval and not the randomized interval.
+
+If the time elapsed since an ExponentialBackOff instance is created goes past the
+MaxElapsedTime, then the method NextBackOff() starts returning backoff.Stop.
+
+The elapsed time can be reset by calling Reset().
+
+Example: Given the following default arguments, for 10 tries the sequence will be,
+and assuming we go over the MaxElapsedTime on the 10th try:
+
+ Request # RetryInterval (seconds) Randomized Interval (seconds)
+
+ 1 0.5 [0.25, 0.75]
+ 2 0.75 [0.375, 1.125]
+ 3 1.125 [0.562, 1.687]
+ 4 1.687 [0.8435, 2.53]
+ 5 2.53 [1.265, 3.795]
+ 6 3.795 [1.897, 5.692]
+ 7 5.692 [2.846, 8.538]
+ 8 8.538 [4.269, 12.807]
+ 9 12.807 [6.403, 19.210]
+ 10 19.210 backoff.Stop
+
+Note: Implementation is not thread-safe.
+*/
+type ExponentialBackOff struct {
+ InitialInterval time.Duration
+ RandomizationFactor float64
+ Multiplier float64
+ MaxInterval time.Duration
+ // After MaxElapsedTime the ExponentialBackOff returns Stop.
+ // It never stops if MaxElapsedTime == 0.
+ MaxElapsedTime time.Duration
+ Stop time.Duration
+ Clock Clock
+
+ currentInterval time.Duration
+ startTime time.Time
+}
+
+// Clock is an interface that returns current time for BackOff.
+type Clock interface {
+ Now() time.Time
+}
+
+// ExponentialBackOffOpts is a function type used to configure ExponentialBackOff options.
+type ExponentialBackOffOpts func(*ExponentialBackOff)
+
+// Default values for ExponentialBackOff.
+const (
+ DefaultInitialInterval = 500 * time.Millisecond
+ DefaultRandomizationFactor = 0.5
+ DefaultMultiplier = 1.5
+ DefaultMaxInterval = 60 * time.Second
+ DefaultMaxElapsedTime = 15 * time.Minute
+)
+
+// NewExponentialBackOff creates an instance of ExponentialBackOff using default values.
+func NewExponentialBackOff(opts ...ExponentialBackOffOpts) *ExponentialBackOff {
+ b := &ExponentialBackOff{
+ InitialInterval: DefaultInitialInterval,
+ RandomizationFactor: DefaultRandomizationFactor,
+ Multiplier: DefaultMultiplier,
+ MaxInterval: DefaultMaxInterval,
+ MaxElapsedTime: DefaultMaxElapsedTime,
+ Stop: Stop,
+ Clock: SystemClock,
+ }
+ for _, fn := range opts {
+ fn(b)
+ }
+ b.Reset()
+ return b
+}
+
+// WithInitialInterval sets the initial interval between retries.
+func WithInitialInterval(duration time.Duration) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.InitialInterval = duration
+ }
+}
+
+// WithRandomizationFactor sets the randomization factor to add jitter to intervals.
+func WithRandomizationFactor(randomizationFactor float64) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.RandomizationFactor = randomizationFactor
+ }
+}
+
+// WithMultiplier sets the multiplier for increasing the interval after each retry.
+func WithMultiplier(multiplier float64) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.Multiplier = multiplier
+ }
+}
+
+// WithMaxInterval sets the maximum interval between retries.
+func WithMaxInterval(duration time.Duration) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.MaxInterval = duration
+ }
+}
+
+// WithMaxElapsedTime sets the maximum total time for retries.
+func WithMaxElapsedTime(duration time.Duration) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.MaxElapsedTime = duration
+ }
+}
+
+// WithRetryStopDuration sets the duration after which retries should stop.
+func WithRetryStopDuration(duration time.Duration) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.Stop = duration
+ }
+}
+
+// WithClockProvider sets the clock used to measure time.
+func WithClockProvider(clock Clock) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.Clock = clock
+ }
+}
+
+type systemClock struct{}
+
+func (t systemClock) Now() time.Time {
+ return time.Now()
+}
+
+// SystemClock implements Clock interface that uses time.Now().
+var SystemClock = systemClock{}
+
+// Reset the interval back to the initial retry interval and restarts the timer.
+// Reset must be called before using b.
+func (b *ExponentialBackOff) Reset() {
+ b.currentInterval = b.InitialInterval
+ b.startTime = b.Clock.Now()
+}
+
+// NextBackOff calculates the next backoff interval using the formula:
+// Randomized interval = RetryInterval * (1 ± RandomizationFactor)
+func (b *ExponentialBackOff) NextBackOff() time.Duration {
+ // Make sure we have not gone over the maximum elapsed time.
+ elapsed := b.GetElapsedTime()
+ next := getRandomValueFromInterval(b.RandomizationFactor, rand.Float64(), b.currentInterval)
+ b.incrementCurrentInterval()
+ if b.MaxElapsedTime != 0 && elapsed+next > b.MaxElapsedTime {
+ return b.Stop
+ }
+ return next
+}
+
+// GetElapsedTime returns the elapsed time since an ExponentialBackOff instance
+// is created and is reset when Reset() is called.
+//
+// The elapsed time is computed using time.Now().UnixNano(). It is
+// safe to call even while the backoff policy is used by a running
+// ticker.
+func (b *ExponentialBackOff) GetElapsedTime() time.Duration {
+ return b.Clock.Now().Sub(b.startTime)
+}
+
+// Increments the current interval by multiplying it with the multiplier.
+func (b *ExponentialBackOff) incrementCurrentInterval() {
+ // Check for overflow, if overflow is detected set the current interval to the max interval.
+ if float64(b.currentInterval) >= float64(b.MaxInterval)/b.Multiplier {
+ b.currentInterval = b.MaxInterval
+ } else {
+ b.currentInterval = time.Duration(float64(b.currentInterval) * b.Multiplier)
+ }
+}
+
+// Returns a random value from the following interval:
+// [currentInterval - randomizationFactor * currentInterval, currentInterval + randomizationFactor * currentInterval].
+func getRandomValueFromInterval(randomizationFactor, random float64, currentInterval time.Duration) time.Duration {
+ if randomizationFactor == 0 {
+ return currentInterval // make sure no randomness is used when randomizationFactor is 0.
+ }
+ var delta = randomizationFactor * float64(currentInterval)
+ var minInterval = float64(currentInterval) - delta
+ var maxInterval = float64(currentInterval) + delta
+
+ // Get a random value from the range [minInterval, maxInterval].
+ // The formula used below has a +1 because if the minInterval is 1 and the maxInterval is 3 then
+ // we want a 33% chance for selecting either 1, 2 or 3.
+ return time.Duration(minInterval + (random * (maxInterval - minInterval + 1)))
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/retry.go b/vendor/github.com/cenkalti/backoff/v4/retry.go
new file mode 100644
index 00000000..b9c0c51c
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/retry.go
@@ -0,0 +1,146 @@
+package backoff
+
+import (
+ "errors"
+ "time"
+)
+
+// An OperationWithData is executing by RetryWithData() or RetryNotifyWithData().
+// The operation will be retried using a backoff policy if it returns an error.
+type OperationWithData[T any] func() (T, error)
+
+// An Operation is executing by Retry() or RetryNotify().
+// The operation will be retried using a backoff policy if it returns an error.
+type Operation func() error
+
+func (o Operation) withEmptyData() OperationWithData[struct{}] {
+ return func() (struct{}, error) {
+ return struct{}{}, o()
+ }
+}
+
+// Notify is a notify-on-error function. It receives an operation error and
+// backoff delay if the operation failed (with an error).
+//
+// NOTE that if the backoff policy stated to stop retrying,
+// the notify function isn't called.
+type Notify func(error, time.Duration)
+
+// Retry the operation o until it does not return error or BackOff stops.
+// o is guaranteed to be run at least once.
+//
+// If o returns a *PermanentError, the operation is not retried, and the
+// wrapped error is returned.
+//
+// Retry sleeps the goroutine for the duration returned by BackOff after a
+// failed operation returns.
+func Retry(o Operation, b BackOff) error {
+ return RetryNotify(o, b, nil)
+}
+
+// RetryWithData is like Retry but returns data in the response too.
+func RetryWithData[T any](o OperationWithData[T], b BackOff) (T, error) {
+ return RetryNotifyWithData(o, b, nil)
+}
+
+// RetryNotify calls notify function with the error and wait duration
+// for each failed attempt before sleep.
+func RetryNotify(operation Operation, b BackOff, notify Notify) error {
+ return RetryNotifyWithTimer(operation, b, notify, nil)
+}
+
+// RetryNotifyWithData is like RetryNotify but returns data in the response too.
+func RetryNotifyWithData[T any](operation OperationWithData[T], b BackOff, notify Notify) (T, error) {
+ return doRetryNotify(operation, b, notify, nil)
+}
+
+// RetryNotifyWithTimer calls notify function with the error and wait duration using the given Timer
+// for each failed attempt before sleep.
+// A default timer that uses system timer is used when nil is passed.
+func RetryNotifyWithTimer(operation Operation, b BackOff, notify Notify, t Timer) error {
+ _, err := doRetryNotify(operation.withEmptyData(), b, notify, t)
+ return err
+}
+
+// RetryNotifyWithTimerAndData is like RetryNotifyWithTimer but returns data in the response too.
+func RetryNotifyWithTimerAndData[T any](operation OperationWithData[T], b BackOff, notify Notify, t Timer) (T, error) {
+ return doRetryNotify(operation, b, notify, t)
+}
+
+func doRetryNotify[T any](operation OperationWithData[T], b BackOff, notify Notify, t Timer) (T, error) {
+ var (
+ err error
+ next time.Duration
+ res T
+ )
+ if t == nil {
+ t = &defaultTimer{}
+ }
+
+ defer func() {
+ t.Stop()
+ }()
+
+ ctx := getContext(b)
+
+ b.Reset()
+ for {
+ res, err = operation()
+ if err == nil {
+ return res, nil
+ }
+
+ var permanent *PermanentError
+ if errors.As(err, &permanent) {
+ return res, permanent.Err
+ }
+
+ if next = b.NextBackOff(); next == Stop {
+ if cerr := ctx.Err(); cerr != nil {
+ return res, cerr
+ }
+
+ return res, err
+ }
+
+ if notify != nil {
+ notify(err, next)
+ }
+
+ t.Start(next)
+
+ select {
+ case <-ctx.Done():
+ return res, ctx.Err()
+ case <-t.C():
+ }
+ }
+}
+
+// PermanentError signals that the operation should not be retried.
+type PermanentError struct {
+ Err error
+}
+
+func (e *PermanentError) Error() string {
+ return e.Err.Error()
+}
+
+func (e *PermanentError) Unwrap() error {
+ return e.Err
+}
+
+func (e *PermanentError) Is(target error) bool {
+ _, ok := target.(*PermanentError)
+ return ok
+}
+
+// Permanent wraps the given err in a *PermanentError.
+func Permanent(err error) error {
+ if err == nil {
+ return nil
+ }
+ return &PermanentError{
+ Err: err,
+ }
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/ticker.go b/vendor/github.com/cenkalti/backoff/v4/ticker.go
new file mode 100644
index 00000000..df9d68bc
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/ticker.go
@@ -0,0 +1,97 @@
+package backoff
+
+import (
+ "context"
+ "sync"
+ "time"
+)
+
+// Ticker holds a channel that delivers `ticks' of a clock at times reported by a BackOff.
+//
+// Ticks will continue to arrive when the previous operation is still running,
+// so operations that take a while to fail could run in quick succession.
+type Ticker struct {
+ C <-chan time.Time
+ c chan time.Time
+ b BackOff
+ ctx context.Context
+ timer Timer
+ stop chan struct{}
+ stopOnce sync.Once
+}
+
+// NewTicker returns a new Ticker containing a channel that will send
+// the time at times specified by the BackOff argument. Ticker is
+// guaranteed to tick at least once. The channel is closed when Stop
+// method is called or BackOff stops. It is not safe to manipulate the
+// provided backoff policy (notably calling NextBackOff or Reset)
+// while the ticker is running.
+func NewTicker(b BackOff) *Ticker {
+ return NewTickerWithTimer(b, &defaultTimer{})
+}
+
+// NewTickerWithTimer returns a new Ticker with a custom timer.
+// A default timer that uses system timer is used when nil is passed.
+func NewTickerWithTimer(b BackOff, timer Timer) *Ticker {
+ if timer == nil {
+ timer = &defaultTimer{}
+ }
+ c := make(chan time.Time)
+ t := &Ticker{
+ C: c,
+ c: c,
+ b: b,
+ ctx: getContext(b),
+ timer: timer,
+ stop: make(chan struct{}),
+ }
+ t.b.Reset()
+ go t.run()
+ return t
+}
+
+// Stop turns off a ticker. After Stop, no more ticks will be sent.
+func (t *Ticker) Stop() {
+ t.stopOnce.Do(func() { close(t.stop) })
+}
+
+func (t *Ticker) run() {
+ c := t.c
+ defer close(c)
+
+ // Ticker is guaranteed to tick at least once.
+ afterC := t.send(time.Now())
+
+ for {
+ if afterC == nil {
+ return
+ }
+
+ select {
+ case tick := <-afterC:
+ afterC = t.send(tick)
+ case <-t.stop:
+ t.c = nil // Prevent future ticks from being sent to the channel.
+ return
+ case <-t.ctx.Done():
+ return
+ }
+ }
+}
+
+func (t *Ticker) send(tick time.Time) <-chan time.Time {
+ select {
+ case t.c <- tick:
+ case <-t.stop:
+ return nil
+ }
+
+ next := t.b.NextBackOff()
+ if next == Stop {
+ t.Stop()
+ return nil
+ }
+
+ t.timer.Start(next)
+ return t.timer.C()
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/timer.go b/vendor/github.com/cenkalti/backoff/v4/timer.go
new file mode 100644
index 00000000..8120d021
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/timer.go
@@ -0,0 +1,35 @@
+package backoff
+
+import "time"
+
+type Timer interface {
+ Start(duration time.Duration)
+ Stop()
+ C() <-chan time.Time
+}
+
+// defaultTimer implements Timer interface using time.Timer
+type defaultTimer struct {
+ timer *time.Timer
+}
+
+// C returns the timers channel which receives the current time when the timer fires.
+func (t *defaultTimer) C() <-chan time.Time {
+ return t.timer.C
+}
+
+// Start starts the timer to fire after the given duration
+func (t *defaultTimer) Start(duration time.Duration) {
+ if t.timer == nil {
+ t.timer = time.NewTimer(duration)
+ } else {
+ t.timer.Reset(duration)
+ }
+}
+
+// Stop is called when the timer is not used anymore and resources may be freed.
+func (t *defaultTimer) Stop() {
+ if t.timer != nil {
+ t.timer.Stop()
+ }
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/tries.go b/vendor/github.com/cenkalti/backoff/v4/tries.go
new file mode 100644
index 00000000..28d58ca3
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/tries.go
@@ -0,0 +1,38 @@
+package backoff
+
+import "time"
+
+/*
+WithMaxRetries creates a wrapper around another BackOff, which will
+return Stop if NextBackOff() has been called too many times since
+the last time Reset() was called
+
+Note: Implementation is not thread-safe.
+*/
+func WithMaxRetries(b BackOff, max uint64) BackOff {
+ return &backOffTries{delegate: b, maxTries: max}
+}
+
+type backOffTries struct {
+ delegate BackOff
+ maxTries uint64
+ numTries uint64
+}
+
+func (b *backOffTries) NextBackOff() time.Duration {
+ if b.maxTries == 0 {
+ return Stop
+ }
+ if b.maxTries > 0 {
+ if b.maxTries <= b.numTries {
+ return Stop
+ }
+ b.numTries++
+ }
+ return b.delegate.NextBackOff()
+}
+
+func (b *backOffTries) Reset() {
+ b.numTries = 0
+ b.delegate.Reset()
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go b/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go
index f6c80280..19229226 100644
--- a/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go
+++ b/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go
@@ -13,6 +13,8 @@ import (
grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+ "go.opentelemetry.io/otel/propagation"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
@@ -40,10 +42,12 @@ type connectorClient struct {
ratelimitV1.RateLimiterServiceClient
connectorV2.GrantManagerServiceClient
connectorV2.ResourceManagerServiceClient
+ connectorV2.ResourceDeleterServiceClient
connectorV2.AccountManagerServiceClient
connectorV2.CredentialManagerServiceClient
connectorV2.EventServiceClient
connectorV2.TicketsServiceClient
+ connectorV2.ActionServiceClient
}
var ErrConnectorNotImplemented = errors.New("client does not implement connector connectorV2")
@@ -152,43 +156,27 @@ func (cw *wrapper) Run(ctx context.Context, serverCfg *connectorwrapperV1.Server
grpc.Creds(credentials.NewTLS(tlsConfig)),
grpc.ChainUnaryInterceptor(ugrpc.UnaryServerInterceptor(ctx)...),
grpc.ChainStreamInterceptor(ugrpc.StreamServerInterceptors(ctx)...),
+ grpc.StatsHandler(otelgrpc.NewServerHandler(
+ otelgrpc.WithPropagators(
+ propagation.NewCompositeTextMapPropagator(
+ propagation.TraceContext{},
+ propagation.Baggage{},
+ ),
+ ),
+ )),
)
- connectorV2.RegisterConnectorServiceServer(server, cw.server)
- connectorV2.RegisterGrantsServiceServer(server, cw.server)
- connectorV2.RegisterEntitlementsServiceServer(server, cw.server)
- connectorV2.RegisterResourcesServiceServer(server, cw.server)
- connectorV2.RegisterResourceTypesServiceServer(server, cw.server)
- connectorV2.RegisterAssetServiceServer(server, cw.server)
- connectorV2.RegisterEventServiceServer(server, cw.server)
-
- if cw.ticketingEnabled {
- connectorV2.RegisterTicketsServiceServer(server, cw.server)
- } else {
- noop := &noopTicketing{}
- connectorV2.RegisterTicketsServiceServer(server, noop)
- }
-
- if cw.provisioningEnabled {
- connectorV2.RegisterGrantManagerServiceServer(server, cw.server)
- connectorV2.RegisterResourceManagerServiceServer(server, cw.server)
- connectorV2.RegisterAccountManagerServiceServer(server, cw.server)
- connectorV2.RegisterCredentialManagerServiceServer(server, cw.server)
- } else {
- noop := &noopProvisioner{}
- connectorV2.RegisterGrantManagerServiceServer(server, noop)
- connectorV2.RegisterResourceManagerServiceServer(server, noop)
- connectorV2.RegisterAccountManagerServiceServer(server, noop)
- connectorV2.RegisterCredentialManagerServiceServer(server, noop)
- }
rl, err := ratelimit2.NewLimiter(ctx, cw.now, serverCfg.RateLimiterConfig)
if err != nil {
return err
}
cw.rateLimiter = rl
-
- ratelimitV1.RegisterRateLimiterServiceServer(server, cw.rateLimiter)
-
+ opts := &RegisterOps{
+ Ratelimiter: cw.rateLimiter,
+ ProvisioningEnabled: cw.provisioningEnabled,
+ TicketingEnabled: cw.ticketingEnabled,
+ }
+ Register(ctx, server, cw.server, opts)
return server.Serve(l)
}
@@ -306,12 +294,20 @@ func (cw *wrapper) C(ctx context.Context) (types.ConnectorClient, error) {
var dialErr error
var conn *grpc.ClientConn
for {
- conn, err = grpc.DialContext(
+ conn, err = grpc.DialContext( //nolint:staticcheck // grpc.DialContext is deprecated but we are using it still.
ctx,
fmt.Sprintf("127.0.0.1:%d", listenPort),
grpc.WithTransportCredentials(credentials.NewTLS(clientTLSConfig)),
- grpc.WithBlock(),
+ grpc.WithBlock(), //nolint:staticcheck // grpc.WithBlock is deprecated but we are using it still.
grpc.WithChainUnaryInterceptor(ratelimit2.UnaryInterceptor(cw.now, cw.rlDescriptors...)),
+ grpc.WithStatsHandler(otelgrpc.NewClientHandler(
+ otelgrpc.WithPropagators(
+ propagation.NewCompositeTextMapPropagator(
+ propagation.TraceContext{},
+ propagation.Baggage{},
+ ),
+ ),
+ )),
)
if err != nil {
dialErr = err
@@ -326,23 +322,7 @@ func (cw *wrapper) C(ctx context.Context) (types.ConnectorClient, error) {
}
cw.conn = conn
-
- cw.client = &connectorClient{
- ResourceTypesServiceClient: connectorV2.NewResourceTypesServiceClient(cw.conn),
- ResourcesServiceClient: connectorV2.NewResourcesServiceClient(cw.conn),
- EntitlementsServiceClient: connectorV2.NewEntitlementsServiceClient(cw.conn),
- GrantsServiceClient: connectorV2.NewGrantsServiceClient(cw.conn),
- ConnectorServiceClient: connectorV2.NewConnectorServiceClient(cw.conn),
- AssetServiceClient: connectorV2.NewAssetServiceClient(cw.conn),
- RateLimiterServiceClient: ratelimitV1.NewRateLimiterServiceClient(cw.conn),
- GrantManagerServiceClient: connectorV2.NewGrantManagerServiceClient(cw.conn),
- ResourceManagerServiceClient: connectorV2.NewResourceManagerServiceClient(cw.conn),
- AccountManagerServiceClient: connectorV2.NewAccountManagerServiceClient(cw.conn),
- CredentialManagerServiceClient: connectorV2.NewCredentialManagerServiceClient(cw.conn),
- EventServiceClient: connectorV2.NewEventServiceClient(cw.conn),
- TicketsServiceClient: connectorV2.NewTicketsServiceClient(cw.conn),
- }
-
+ cw.client = NewConnectorClient(ctx, cw.conn)
return cw.client, nil
}
@@ -373,3 +353,73 @@ func (cw *wrapper) Close() error {
return nil
}
+
+type RegisterOps struct {
+ Ratelimiter ratelimitV1.RateLimiterServiceServer
+ ProvisioningEnabled bool
+ TicketingEnabled bool
+}
+
+func Register(ctx context.Context, s grpc.ServiceRegistrar, srv types.ConnectorServer, opts *RegisterOps) {
+ if opts == nil {
+ opts = &RegisterOps{}
+ }
+
+ connectorV2.RegisterConnectorServiceServer(s, srv)
+ connectorV2.RegisterGrantsServiceServer(s, srv)
+ connectorV2.RegisterEntitlementsServiceServer(s, srv)
+ connectorV2.RegisterResourcesServiceServer(s, srv)
+ connectorV2.RegisterResourceTypesServiceServer(s, srv)
+ connectorV2.RegisterAssetServiceServer(s, srv)
+ connectorV2.RegisterEventServiceServer(s, srv)
+
+ if opts.TicketingEnabled {
+ connectorV2.RegisterTicketsServiceServer(s, srv)
+ } else {
+ noop := &noopTicketing{}
+ connectorV2.RegisterTicketsServiceServer(s, noop)
+ }
+
+ connectorV2.RegisterActionServiceServer(s, srv)
+
+ if opts.ProvisioningEnabled {
+ connectorV2.RegisterGrantManagerServiceServer(s, srv)
+ connectorV2.RegisterResourceManagerServiceServer(s, srv)
+ connectorV2.RegisterResourceDeleterServiceServer(s, srv)
+ connectorV2.RegisterAccountManagerServiceServer(s, srv)
+ connectorV2.RegisterCredentialManagerServiceServer(s, srv)
+ } else {
+ noop := &noopProvisioner{}
+ connectorV2.RegisterGrantManagerServiceServer(s, noop)
+ connectorV2.RegisterResourceManagerServiceServer(s, noop)
+ connectorV2.RegisterResourceDeleterServiceServer(s, noop)
+ connectorV2.RegisterAccountManagerServiceServer(s, noop)
+ connectorV2.RegisterCredentialManagerServiceServer(s, noop)
+ }
+
+ if opts.Ratelimiter != nil {
+ ratelimitV1.RegisterRateLimiterServiceServer(s, opts.Ratelimiter)
+ }
+}
+
+// NewConnectorClient takes a grpc.ClientConnInterface and returns an implementation of the ConnectorClient interface.
+// It does not check that the connection actually supports the services.
+func NewConnectorClient(ctx context.Context, cc grpc.ClientConnInterface) types.ConnectorClient {
+ return &connectorClient{
+ ResourceTypesServiceClient: connectorV2.NewResourceTypesServiceClient(cc),
+ ResourcesServiceClient: connectorV2.NewResourcesServiceClient(cc),
+ EntitlementsServiceClient: connectorV2.NewEntitlementsServiceClient(cc),
+ GrantsServiceClient: connectorV2.NewGrantsServiceClient(cc),
+ ConnectorServiceClient: connectorV2.NewConnectorServiceClient(cc),
+ AssetServiceClient: connectorV2.NewAssetServiceClient(cc),
+ RateLimiterServiceClient: ratelimitV1.NewRateLimiterServiceClient(cc),
+ GrantManagerServiceClient: connectorV2.NewGrantManagerServiceClient(cc),
+ ResourceManagerServiceClient: connectorV2.NewResourceManagerServiceClient(cc),
+ ResourceDeleterServiceClient: connectorV2.NewResourceDeleterServiceClient(cc),
+ AccountManagerServiceClient: connectorV2.NewAccountManagerServiceClient(cc),
+ CredentialManagerServiceClient: connectorV2.NewCredentialManagerServiceClient(cc),
+ EventServiceClient: connectorV2.NewEventServiceClient(cc),
+ TicketsServiceClient: connectorV2.NewTicketsServiceClient(cc),
+ ActionServiceClient: connectorV2.NewActionServiceClient(cc),
+ }
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_provisioner.go b/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_provisioner.go
index 63b3b846..85f57ea9 100644
--- a/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_provisioner.go
+++ b/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_provisioner.go
@@ -26,6 +26,10 @@ func (n *noopProvisioner) DeleteResource(ctx context.Context, request *v2.Delete
return nil, status.Error(codes.FailedPrecondition, "provisioning is not enabled")
}
+func (n *noopProvisioner) DeleteResourceV2(ctx context.Context, request *v2.DeleteResourceV2Request) (*v2.DeleteResourceV2Response, error) {
+ return nil, status.Error(codes.FailedPrecondition, "provisioning is not enabled")
+}
+
func (n *noopProvisioner) RotateCredential(ctx context.Context, request *v2.RotateCredentialRequest) (*v2.RotateCredentialResponse, error) {
return nil, status.Error(codes.FailedPrecondition, "provisioning is not enabled")
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/annotation_sync_details.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/annotation_sync_details.pb.go
index aa8cf7b3..71b4ddb2 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/annotation_sync_details.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/annotation_sync_details.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/c1z/v1/annotation_sync_details.proto
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -21,20 +22,17 @@ const (
)
type SyncDetails struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *SyncDetails) Reset() {
*x = SyncDetails{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_c1z_v1_annotation_sync_details_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_c1z_v1_annotation_sync_details_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SyncDetails) String() string {
@@ -45,7 +43,7 @@ func (*SyncDetails) ProtoMessage() {}
func (x *SyncDetails) ProtoReflect() protoreflect.Message {
mi := &file_c1_c1z_v1_annotation_sync_details_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -69,7 +67,7 @@ func (x *SyncDetails) GetId() string {
var File_c1_c1z_v1_annotation_sync_details_proto protoreflect.FileDescriptor
-var file_c1_c1z_v1_annotation_sync_details_proto_rawDesc = []byte{
+var file_c1_c1z_v1_annotation_sync_details_proto_rawDesc = string([]byte{
0x0a, 0x27, 0x63, 0x31, 0x2f, 0x63, 0x31, 0x7a, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x64, 0x65, 0x74, 0x61,
0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63, 0x31, 0x2e, 0x63, 0x31,
@@ -79,22 +77,22 @@ var file_c1_c1z_v1_annotation_sync_details_proto_rawDesc = []byte{
0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62,
0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63,
0x31, 0x7a, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_c1z_v1_annotation_sync_details_proto_rawDescOnce sync.Once
- file_c1_c1z_v1_annotation_sync_details_proto_rawDescData = file_c1_c1z_v1_annotation_sync_details_proto_rawDesc
+ file_c1_c1z_v1_annotation_sync_details_proto_rawDescData []byte
)
func file_c1_c1z_v1_annotation_sync_details_proto_rawDescGZIP() []byte {
file_c1_c1z_v1_annotation_sync_details_proto_rawDescOnce.Do(func() {
- file_c1_c1z_v1_annotation_sync_details_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_c1z_v1_annotation_sync_details_proto_rawDescData)
+ file_c1_c1z_v1_annotation_sync_details_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_c1z_v1_annotation_sync_details_proto_rawDesc), len(file_c1_c1z_v1_annotation_sync_details_proto_rawDesc)))
})
return file_c1_c1z_v1_annotation_sync_details_proto_rawDescData
}
var file_c1_c1z_v1_annotation_sync_details_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_c1_c1z_v1_annotation_sync_details_proto_goTypes = []interface{}{
+var file_c1_c1z_v1_annotation_sync_details_proto_goTypes = []any{
(*SyncDetails)(nil), // 0: c1.c1z.v1.SyncDetails
}
var file_c1_c1z_v1_annotation_sync_details_proto_depIdxs = []int32{
@@ -110,25 +108,11 @@ func file_c1_c1z_v1_annotation_sync_details_proto_init() {
if File_c1_c1z_v1_annotation_sync_details_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_c1z_v1_annotation_sync_details_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SyncDetails); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_c1z_v1_annotation_sync_details_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_c1z_v1_annotation_sync_details_proto_rawDesc), len(file_c1_c1z_v1_annotation_sync_details_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -139,7 +123,6 @@ func file_c1_c1z_v1_annotation_sync_details_proto_init() {
MessageInfos: file_c1_c1z_v1_annotation_sync_details_proto_msgTypes,
}.Build()
File_c1_c1z_v1_annotation_sync_details_proto = out.File
- file_c1_c1z_v1_annotation_sync_details_proto_rawDesc = nil
file_c1_c1z_v1_annotation_sync_details_proto_goTypes = nil
file_c1_c1z_v1_annotation_sync_details_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/annotation_sync_details.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/annotation_sync_details.pb.validate.go
index dde89dc4..0126513c 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/annotation_sync_details.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/annotation_sync_details.pb.validate.go
@@ -72,7 +72,7 @@ type SyncDetailsMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m SyncDetailsMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/diff.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/diff.pb.go
index 45e235b5..ac849400 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/diff.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/diff.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/c1z/v1/diff.proto
@@ -12,6 +12,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -22,22 +23,19 @@ const (
)
type ResourceDiff struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Created []*v2.Resource `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"`
+ Deleted []*v2.Resource `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"`
+ Modified []*v2.Resource `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Created []*v2.Resource `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"`
- Deleted []*v2.Resource `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"`
- Modified []*v2.Resource `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ResourceDiff) Reset() {
*x = ResourceDiff{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_c1z_v1_diff_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_c1z_v1_diff_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourceDiff) String() string {
@@ -48,7 +46,7 @@ func (*ResourceDiff) ProtoMessage() {}
func (x *ResourceDiff) ProtoReflect() protoreflect.Message {
mi := &file_c1_c1z_v1_diff_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -85,22 +83,19 @@ func (x *ResourceDiff) GetModified() []*v2.Resource {
}
type EntitlementDiff struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Created []*v2.Entitlement `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"`
+ Deleted []*v2.Entitlement `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"`
+ Modified []*v2.Entitlement `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Created []*v2.Entitlement `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"`
- Deleted []*v2.Entitlement `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"`
- Modified []*v2.Entitlement `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *EntitlementDiff) Reset() {
*x = EntitlementDiff{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_c1z_v1_diff_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_c1z_v1_diff_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *EntitlementDiff) String() string {
@@ -111,7 +106,7 @@ func (*EntitlementDiff) ProtoMessage() {}
func (x *EntitlementDiff) ProtoReflect() protoreflect.Message {
mi := &file_c1_c1z_v1_diff_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -148,22 +143,19 @@ func (x *EntitlementDiff) GetModified() []*v2.Entitlement {
}
type GrantDiff struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Created []*v2.Grant `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"`
+ Deleted []*v2.Grant `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"`
+ Modified []*v2.Grant `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Created []*v2.Grant `protobuf:"bytes,1,rep,name=created,proto3" json:"created,omitempty"`
- Deleted []*v2.Grant `protobuf:"bytes,2,rep,name=deleted,proto3" json:"deleted,omitempty"`
- Modified []*v2.Grant `protobuf:"bytes,3,rep,name=modified,proto3" json:"modified,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantDiff) Reset() {
*x = GrantDiff{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_c1z_v1_diff_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_c1z_v1_diff_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantDiff) String() string {
@@ -174,7 +166,7 @@ func (*GrantDiff) ProtoMessage() {}
func (x *GrantDiff) ProtoReflect() protoreflect.Message {
mi := &file_c1_c1z_v1_diff_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -211,22 +203,19 @@ func (x *GrantDiff) GetModified() []*v2.Grant {
}
type C1ZDiffOutput struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resources *ResourceDiff `protobuf:"bytes,1,opt,name=resources,proto3" json:"resources,omitempty"`
+ Entitlements *EntitlementDiff `protobuf:"bytes,2,opt,name=entitlements,proto3" json:"entitlements,omitempty"`
+ Grants *GrantDiff `protobuf:"bytes,3,opt,name=grants,proto3" json:"grants,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Resources *ResourceDiff `protobuf:"bytes,1,opt,name=resources,proto3" json:"resources,omitempty"`
- Entitlements *EntitlementDiff `protobuf:"bytes,2,opt,name=entitlements,proto3" json:"entitlements,omitempty"`
- Grants *GrantDiff `protobuf:"bytes,3,opt,name=grants,proto3" json:"grants,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *C1ZDiffOutput) Reset() {
*x = C1ZDiffOutput{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_c1z_v1_diff_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_c1z_v1_diff_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *C1ZDiffOutput) String() string {
@@ -237,7 +226,7 @@ func (*C1ZDiffOutput) ProtoMessage() {}
func (x *C1ZDiffOutput) ProtoReflect() protoreflect.Message {
mi := &file_c1_c1z_v1_diff_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -275,7 +264,7 @@ func (x *C1ZDiffOutput) GetGrants() *GrantDiff {
var File_c1_c1z_v1_diff_proto protoreflect.FileDescriptor
-var file_c1_c1z_v1_diff_proto_rawDesc = []byte{
+var file_c1_c1z_v1_diff_proto_rawDesc = string([]byte{
0x0a, 0x14, 0x63, 0x31, 0x2f, 0x63, 0x31, 0x7a, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x69, 0x66, 0x66,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63, 0x31, 0x2e, 0x63, 0x31, 0x7a, 0x2e, 0x76,
0x31, 0x1a, 0x21, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f,
@@ -333,22 +322,22 @@ var file_c1_c1z_v1_diff_proto_rawDesc = []byte{
0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d,
0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x31, 0x7a, 0x2f, 0x76, 0x31,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_c1z_v1_diff_proto_rawDescOnce sync.Once
- file_c1_c1z_v1_diff_proto_rawDescData = file_c1_c1z_v1_diff_proto_rawDesc
+ file_c1_c1z_v1_diff_proto_rawDescData []byte
)
func file_c1_c1z_v1_diff_proto_rawDescGZIP() []byte {
file_c1_c1z_v1_diff_proto_rawDescOnce.Do(func() {
- file_c1_c1z_v1_diff_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_c1z_v1_diff_proto_rawDescData)
+ file_c1_c1z_v1_diff_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_c1z_v1_diff_proto_rawDesc), len(file_c1_c1z_v1_diff_proto_rawDesc)))
})
return file_c1_c1z_v1_diff_proto_rawDescData
}
var file_c1_c1z_v1_diff_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
-var file_c1_c1z_v1_diff_proto_goTypes = []interface{}{
+var file_c1_c1z_v1_diff_proto_goTypes = []any{
(*ResourceDiff)(nil), // 0: c1.c1z.v1.ResourceDiff
(*EntitlementDiff)(nil), // 1: c1.c1z.v1.EntitlementDiff
(*GrantDiff)(nil), // 2: c1.c1z.v1.GrantDiff
@@ -382,61 +371,11 @@ func file_c1_c1z_v1_diff_proto_init() {
if File_c1_c1z_v1_diff_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_c1z_v1_diff_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourceDiff); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_c1z_v1_diff_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*EntitlementDiff); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_c1z_v1_diff_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantDiff); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_c1z_v1_diff_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*C1ZDiffOutput); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_c1z_v1_diff_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_c1z_v1_diff_proto_rawDesc), len(file_c1_c1z_v1_diff_proto_rawDesc)),
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
@@ -447,7 +386,6 @@ func file_c1_c1z_v1_diff_proto_init() {
MessageInfos: file_c1_c1z_v1_diff_proto_msgTypes,
}.Build()
File_c1_c1z_v1_diff_proto = out.File
- file_c1_c1z_v1_diff_proto_rawDesc = nil
file_c1_c1z_v1_diff_proto_goTypes = nil
file_c1_c1z_v1_diff_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/diff.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/diff.pb.validate.go
index 5f8fd29e..3f66b109 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/diff.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/c1z/v1/diff.pb.validate.go
@@ -172,7 +172,7 @@ type ResourceDiffMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourceDiffMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -374,7 +374,7 @@ type EntitlementDiffMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m EntitlementDiffMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -575,7 +575,7 @@ type GrantDiffMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantDiffMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -762,7 +762,7 @@ type C1ZDiffOutputMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m C1ZDiffOutputMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go
new file mode 100644
index 00000000..ac5856b5
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go
@@ -0,0 +1,1107 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.4
+// protoc (unknown)
+// source: c1/config/v1/config.proto
+
+package v1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ConstraintKind int32
+
+const (
+ ConstraintKind_CONSTRAINT_KIND_UNSPECIFIED ConstraintKind = 0
+ ConstraintKind_CONSTRAINT_KIND_REQUIRED_TOGETHER ConstraintKind = 1
+ ConstraintKind_CONSTRAINT_KIND_AT_LEAST_ONE ConstraintKind = 2
+ ConstraintKind_CONSTRAINT_KIND_MUTUALLY_EXCLUSIVE ConstraintKind = 3
+ ConstraintKind_CONSTRAINT_KIND_DEPENDENT_ON ConstraintKind = 4
+)
+
+// Enum value maps for ConstraintKind.
+var (
+ ConstraintKind_name = map[int32]string{
+ 0: "CONSTRAINT_KIND_UNSPECIFIED",
+ 1: "CONSTRAINT_KIND_REQUIRED_TOGETHER",
+ 2: "CONSTRAINT_KIND_AT_LEAST_ONE",
+ 3: "CONSTRAINT_KIND_MUTUALLY_EXCLUSIVE",
+ 4: "CONSTRAINT_KIND_DEPENDENT_ON",
+ }
+ ConstraintKind_value = map[string]int32{
+ "CONSTRAINT_KIND_UNSPECIFIED": 0,
+ "CONSTRAINT_KIND_REQUIRED_TOGETHER": 1,
+ "CONSTRAINT_KIND_AT_LEAST_ONE": 2,
+ "CONSTRAINT_KIND_MUTUALLY_EXCLUSIVE": 3,
+ "CONSTRAINT_KIND_DEPENDENT_ON": 4,
+ }
+)
+
+func (x ConstraintKind) Enum() *ConstraintKind {
+ p := new(ConstraintKind)
+ *p = x
+ return p
+}
+
+func (x ConstraintKind) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ConstraintKind) Descriptor() protoreflect.EnumDescriptor {
+ return file_c1_config_v1_config_proto_enumTypes[0].Descriptor()
+}
+
+func (ConstraintKind) Type() protoreflect.EnumType {
+ return &file_c1_config_v1_config_proto_enumTypes[0]
+}
+
+func (x ConstraintKind) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ConstraintKind.Descriptor instead.
+func (ConstraintKind) EnumDescriptor() ([]byte, []int) {
+ return file_c1_config_v1_config_proto_rawDescGZIP(), []int{0}
+}
+
+type StringFieldType int32
+
+const (
+ StringFieldType_STRING_FIELD_TYPE_TEXT_UNSPECIFIED StringFieldType = 0 // default/catch all. Its a text field.
+ StringFieldType_STRING_FIELD_TYPE_RANDOM StringFieldType = 1
+ StringFieldType_STRING_FIELD_TYPE_OAUTH2 StringFieldType = 2
+ StringFieldType_STRING_FIELD_TYPE_CONNECTOR_DERIVED_OPTIONS StringFieldType = 3
+ StringFieldType_STRING_FIELD_TYPE_FILE_UPLOAD StringFieldType = 4
+)
+
+// Enum value maps for StringFieldType.
+var (
+ StringFieldType_name = map[int32]string{
+ 0: "STRING_FIELD_TYPE_TEXT_UNSPECIFIED",
+ 1: "STRING_FIELD_TYPE_RANDOM",
+ 2: "STRING_FIELD_TYPE_OAUTH2",
+ 3: "STRING_FIELD_TYPE_CONNECTOR_DERIVED_OPTIONS",
+ 4: "STRING_FIELD_TYPE_FILE_UPLOAD",
+ }
+ StringFieldType_value = map[string]int32{
+ "STRING_FIELD_TYPE_TEXT_UNSPECIFIED": 0,
+ "STRING_FIELD_TYPE_RANDOM": 1,
+ "STRING_FIELD_TYPE_OAUTH2": 2,
+ "STRING_FIELD_TYPE_CONNECTOR_DERIVED_OPTIONS": 3,
+ "STRING_FIELD_TYPE_FILE_UPLOAD": 4,
+ }
+)
+
+func (x StringFieldType) Enum() *StringFieldType {
+ p := new(StringFieldType)
+ *p = x
+ return p
+}
+
+func (x StringFieldType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (StringFieldType) Descriptor() protoreflect.EnumDescriptor {
+ return file_c1_config_v1_config_proto_enumTypes[1].Descriptor()
+}
+
+func (StringFieldType) Type() protoreflect.EnumType {
+ return &file_c1_config_v1_config_proto_enumTypes[1]
+}
+
+func (x StringFieldType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use StringFieldType.Descriptor instead.
+func (StringFieldType) EnumDescriptor() ([]byte, []int) {
+ return file_c1_config_v1_config_proto_rawDescGZIP(), []int{1}
+}
+
+type Configuration struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Fields []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
+ Constraints []*Constraint `protobuf:"bytes,2,rep,name=constraints,proto3" json:"constraints,omitempty"`
+ DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ HelpUrl string `protobuf:"bytes,4,opt,name=help_url,json=helpUrl,proto3" json:"help_url,omitempty"`
+ IconUrl string `protobuf:"bytes,5,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"`
+ IsDirectory bool `protobuf:"varint,7,opt,name=is_directory,json=isDirectory,proto3" json:"is_directory,omitempty"`
+ CatalogId string `protobuf:"bytes,8,opt,name=catalog_id,json=catalogId,proto3" json:"catalog_id,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Configuration) Reset() {
+ *x = Configuration{}
+ mi := &file_c1_config_v1_config_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Configuration) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Configuration) ProtoMessage() {}
+
+func (x *Configuration) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_config_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Configuration.ProtoReflect.Descriptor instead.
+func (*Configuration) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_config_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Configuration) GetFields() []*Field {
+ if x != nil {
+ return x.Fields
+ }
+ return nil
+}
+
+func (x *Configuration) GetConstraints() []*Constraint {
+ if x != nil {
+ return x.Constraints
+ }
+ return nil
+}
+
+func (x *Configuration) GetDisplayName() string {
+ if x != nil {
+ return x.DisplayName
+ }
+ return ""
+}
+
+func (x *Configuration) GetHelpUrl() string {
+ if x != nil {
+ return x.HelpUrl
+ }
+ return ""
+}
+
+func (x *Configuration) GetIconUrl() string {
+ if x != nil {
+ return x.IconUrl
+ }
+ return ""
+}
+
+func (x *Configuration) GetIsDirectory() bool {
+ if x != nil {
+ return x.IsDirectory
+ }
+ return false
+}
+
+func (x *Configuration) GetCatalogId() string {
+ if x != nil {
+ return x.CatalogId
+ }
+ return ""
+}
+
+type Constraint struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Kind ConstraintKind `protobuf:"varint,1,opt,name=kind,proto3,enum=c1.config.v1.ConstraintKind" json:"kind,omitempty"`
+ FieldNames []string `protobuf:"bytes,2,rep,name=field_names,json=fieldNames,proto3" json:"field_names,omitempty"`
+ SecondaryFieldNames []string `protobuf:"bytes,3,rep,name=secondary_field_names,json=secondaryFieldNames,proto3" json:"secondary_field_names,omitempty"`
+ Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // optional
+ HelpText string `protobuf:"bytes,5,opt,name=help_text,json=helpText,proto3" json:"help_text,omitempty"` // optional
+ IsFieldGroup bool `protobuf:"varint,6,opt,name=is_field_group,json=isFieldGroup,proto3" json:"is_field_group,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Constraint) Reset() {
+ *x = Constraint{}
+ mi := &file_c1_config_v1_config_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Constraint) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Constraint) ProtoMessage() {}
+
+func (x *Constraint) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_config_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Constraint.ProtoReflect.Descriptor instead.
+func (*Constraint) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_config_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *Constraint) GetKind() ConstraintKind {
+ if x != nil {
+ return x.Kind
+ }
+ return ConstraintKind_CONSTRAINT_KIND_UNSPECIFIED
+}
+
+func (x *Constraint) GetFieldNames() []string {
+ if x != nil {
+ return x.FieldNames
+ }
+ return nil
+}
+
+func (x *Constraint) GetSecondaryFieldNames() []string {
+ if x != nil {
+ return x.SecondaryFieldNames
+ }
+ return nil
+}
+
+func (x *Constraint) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Constraint) GetHelpText() string {
+ if x != nil {
+ return x.HelpText
+ }
+ return ""
+}
+
+func (x *Constraint) GetIsFieldGroup() bool {
+ if x != nil {
+ return x.IsFieldGroup
+ }
+ return false
+}
+
+type Field struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // canonical name, typically in snake
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
+ Placeholder string `protobuf:"bytes,4,opt,name=placeholder,proto3" json:"placeholder,omitempty"`
+ IsRequired bool `protobuf:"varint,5,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"`
+ IsOps bool `protobuf:"varint,6,opt,name=is_ops,json=isOps,proto3" json:"is_ops,omitempty"`
+ IsSecret bool `protobuf:"varint,7,opt,name=is_secret,json=isSecret,proto3" json:"is_secret,omitempty"`
+ // Types that are valid to be assigned to Field:
+ //
+ // *Field_StringField
+ // *Field_IntField
+ // *Field_BoolField
+ // *Field_StringSliceField
+ // *Field_StringMapField
+ Field isField_Field `protobuf_oneof:"field"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Field) Reset() {
+ *x = Field{}
+ mi := &file_c1_config_v1_config_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Field) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Field) ProtoMessage() {}
+
+func (x *Field) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_config_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Field.ProtoReflect.Descriptor instead.
+func (*Field) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_config_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *Field) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Field) GetDisplayName() string {
+ if x != nil {
+ return x.DisplayName
+ }
+ return ""
+}
+
+func (x *Field) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Field) GetPlaceholder() string {
+ if x != nil {
+ return x.Placeholder
+ }
+ return ""
+}
+
+func (x *Field) GetIsRequired() bool {
+ if x != nil {
+ return x.IsRequired
+ }
+ return false
+}
+
+func (x *Field) GetIsOps() bool {
+ if x != nil {
+ return x.IsOps
+ }
+ return false
+}
+
+func (x *Field) GetIsSecret() bool {
+ if x != nil {
+ return x.IsSecret
+ }
+ return false
+}
+
+func (x *Field) GetField() isField_Field {
+ if x != nil {
+ return x.Field
+ }
+ return nil
+}
+
+func (x *Field) GetStringField() *StringField {
+ if x != nil {
+ if x, ok := x.Field.(*Field_StringField); ok {
+ return x.StringField
+ }
+ }
+ return nil
+}
+
+func (x *Field) GetIntField() *IntField {
+ if x != nil {
+ if x, ok := x.Field.(*Field_IntField); ok {
+ return x.IntField
+ }
+ }
+ return nil
+}
+
+func (x *Field) GetBoolField() *BoolField {
+ if x != nil {
+ if x, ok := x.Field.(*Field_BoolField); ok {
+ return x.BoolField
+ }
+ }
+ return nil
+}
+
+func (x *Field) GetStringSliceField() *StringSliceField {
+ if x != nil {
+ if x, ok := x.Field.(*Field_StringSliceField); ok {
+ return x.StringSliceField
+ }
+ }
+ return nil
+}
+
+func (x *Field) GetStringMapField() *StringMapField {
+ if x != nil {
+ if x, ok := x.Field.(*Field_StringMapField); ok {
+ return x.StringMapField
+ }
+ }
+ return nil
+}
+
+type isField_Field interface {
+ isField_Field()
+}
+
+type Field_StringField struct {
+ StringField *StringField `protobuf:"bytes,100,opt,name=string_field,json=stringField,proto3,oneof"`
+}
+
+type Field_IntField struct {
+ IntField *IntField `protobuf:"bytes,101,opt,name=int_field,json=intField,proto3,oneof"`
+}
+
+type Field_BoolField struct {
+ BoolField *BoolField `protobuf:"bytes,102,opt,name=bool_field,json=boolField,proto3,oneof"`
+}
+
+type Field_StringSliceField struct {
+ StringSliceField *StringSliceField `protobuf:"bytes,103,opt,name=string_slice_field,json=stringSliceField,proto3,oneof"`
+}
+
+type Field_StringMapField struct {
+ StringMapField *StringMapField `protobuf:"bytes,104,opt,name=string_map_field,json=stringMapField,proto3,oneof"`
+}
+
+func (*Field_StringField) isField_Field() {}
+
+func (*Field_IntField) isField_Field() {}
+
+func (*Field_BoolField) isField_Field() {}
+
+func (*Field_StringSliceField) isField_Field() {}
+
+func (*Field_StringMapField) isField_Field() {}
+
+type IntField struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // rules
+ DefaultValue int64 `protobuf:"varint,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+ Rules *Int64Rules `protobuf:"bytes,2,opt,name=rules,proto3,oneof" json:"rules,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *IntField) Reset() {
+ *x = IntField{}
+ mi := &file_c1_config_v1_config_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *IntField) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IntField) ProtoMessage() {}
+
+func (x *IntField) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_config_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IntField.ProtoReflect.Descriptor instead.
+func (*IntField) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_config_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *IntField) GetDefaultValue() int64 {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return 0
+}
+
+func (x *IntField) GetRules() *Int64Rules {
+ if x != nil {
+ return x.Rules
+ }
+ return nil
+}
+
+type BoolField struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DefaultValue bool `protobuf:"varint,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+ Rules *BoolRules `protobuf:"bytes,2,opt,name=rules,proto3,oneof" json:"rules,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BoolField) Reset() {
+ *x = BoolField{}
+ mi := &file_c1_config_v1_config_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BoolField) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BoolField) ProtoMessage() {}
+
+func (x *BoolField) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_config_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BoolField.ProtoReflect.Descriptor instead.
+func (*BoolField) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_config_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *BoolField) GetDefaultValue() bool {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return false
+}
+
+func (x *BoolField) GetRules() *BoolRules {
+ if x != nil {
+ return x.Rules
+ }
+ return nil
+}
+
+type StringSliceField struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DefaultValue []string `protobuf:"bytes,1,rep,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+ Rules *RepeatedStringRules `protobuf:"bytes,2,opt,name=rules,proto3,oneof" json:"rules,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *StringSliceField) Reset() {
+ *x = StringSliceField{}
+ mi := &file_c1_config_v1_config_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *StringSliceField) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringSliceField) ProtoMessage() {}
+
+func (x *StringSliceField) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_config_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StringSliceField.ProtoReflect.Descriptor instead.
+func (*StringSliceField) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_config_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *StringSliceField) GetDefaultValue() []string {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return nil
+}
+
+func (x *StringSliceField) GetRules() *RepeatedStringRules {
+ if x != nil {
+ return x.Rules
+ }
+ return nil
+}
+
+type StringMapField struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DefaultValue map[string]*anypb.Any `protobuf:"bytes,1,rep,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ Rules *StringMapRules `protobuf:"bytes,2,opt,name=rules,proto3,oneof" json:"rules,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *StringMapField) Reset() {
+ *x = StringMapField{}
+ mi := &file_c1_config_v1_config_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *StringMapField) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringMapField) ProtoMessage() {}
+
+func (x *StringMapField) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_config_proto_msgTypes[6]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StringMapField.ProtoReflect.Descriptor instead.
+func (*StringMapField) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_config_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *StringMapField) GetDefaultValue() map[string]*anypb.Any {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return nil
+}
+
+func (x *StringMapField) GetRules() *StringMapRules {
+ if x != nil {
+ return x.Rules
+ }
+ return nil
+}
+
+type StringFieldOption struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+ DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *StringFieldOption) Reset() {
+ *x = StringFieldOption{}
+ mi := &file_c1_config_v1_config_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *StringFieldOption) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringFieldOption) ProtoMessage() {}
+
+func (x *StringFieldOption) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_config_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StringFieldOption.ProtoReflect.Descriptor instead.
+func (*StringFieldOption) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_config_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *StringFieldOption) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *StringFieldOption) GetValue() string {
+ if x != nil {
+ return x.Value
+ }
+ return ""
+}
+
+func (x *StringFieldOption) GetDisplayName() string {
+ if x != nil {
+ return x.DisplayName
+ }
+ return ""
+}
+
+type StringField struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DefaultValue string `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+ Rules *StringRules `protobuf:"bytes,2,opt,name=rules,proto3,oneof" json:"rules,omitempty"`
+ Type StringFieldType `protobuf:"varint,3,opt,name=type,proto3,enum=c1.config.v1.StringFieldType" json:"type,omitempty"`
+ // only used for FileUpload atm, oneofs are evil
+ AllowedExtensions []string `protobuf:"bytes,4,rep,name=allowed_extensions,json=allowedExtensions,proto3" json:"allowed_extensions,omitempty"`
+ Options []*StringFieldOption `protobuf:"bytes,5,rep,name=options,proto3" json:"options,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *StringField) Reset() {
+ *x = StringField{}
+ mi := &file_c1_config_v1_config_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *StringField) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringField) ProtoMessage() {}
+
+func (x *StringField) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_config_proto_msgTypes[8]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StringField.ProtoReflect.Descriptor instead.
+func (*StringField) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_config_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *StringField) GetDefaultValue() string {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return ""
+}
+
+func (x *StringField) GetRules() *StringRules {
+ if x != nil {
+ return x.Rules
+ }
+ return nil
+}
+
+func (x *StringField) GetType() StringFieldType {
+ if x != nil {
+ return x.Type
+ }
+ return StringFieldType_STRING_FIELD_TYPE_TEXT_UNSPECIFIED
+}
+
+func (x *StringField) GetAllowedExtensions() []string {
+ if x != nil {
+ return x.AllowedExtensions
+ }
+ return nil
+}
+
+func (x *StringField) GetOptions() []*StringFieldOption {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+var File_c1_config_v1_config_proto protoreflect.FileDescriptor
+
+var file_c1_config_v1_config_proto_rawDesc = string([]byte{
+ 0x0a, 0x19, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x63, 0x31, 0x2f, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93,
+ 0x02, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x2b, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x13, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e,
+ 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x3a, 0x0a,
+ 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76,
+ 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x63, 0x6f,
+ 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73,
+ 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08,
+ 0x68, 0x65, 0x6c, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+ 0x68, 0x65, 0x6c, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f,
+ 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55,
+ 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x44, 0x69, 0x72, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67,
+ 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x74, 0x61, 0x6c,
+ 0x6f, 0x67, 0x49, 0x64, 0x22, 0xea, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61,
+ 0x69, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31,
+ 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x52,
+ 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c,
+ 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64,
+ 0x61, 0x72, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18,
+ 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79,
+ 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b,
+ 0x0a, 0x09, 0x68, 0x65, 0x6c, 0x70, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x08, 0x68, 0x65, 0x6c, 0x70, 0x54, 0x65, 0x78, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x69,
+ 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47, 0x72, 0x6f, 0x75,
+ 0x70, 0x22, 0xab, 0x04, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61,
+ 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c,
+ 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65,
+ 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71,
+ 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x6f, 0x70,
+ 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x4f, 0x70, 0x73, 0x12, 0x1b,
+ 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x08, 0x69, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x3e, 0x0a, 0x0c, 0x73,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31,
+ 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x0b,
+ 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x09, 0x69,
+ 0x6e, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e,
+ 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x46, 0x69, 0x65,
+ 0x6c, 0x64, 0x12, 0x38, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48,
+ 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x4e, 0x0a, 0x12,
+ 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x65,
+ 0x6c, 0x64, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x6c,
+ 0x69, 0x63, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, 0x74, 0x72, 0x69,
+ 0x6e, 0x67, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x48, 0x0a, 0x10,
+ 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x46,
+ 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61,
+ 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22,
+ 0x6e, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64,
+ 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x03, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x12, 0x33, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x18, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x49,
+ 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6c,
+ 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22,
+ 0x6e, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d,
+ 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x32, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x17, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e,
+ 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6c,
+ 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22,
+ 0x7f, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x46, 0x69,
+ 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61,
+ 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65,
+ 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75,
+ 0x6c, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73,
+ 0x22, 0xff, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x46, 0x69,
+ 0x65, 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,
+ 0x4d, 0x61, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61,
+ 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65,
+ 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70,
+ 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x88, 0x01,
+ 0x01, 0x1a, 0x55, 0x0a, 0x11, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x72, 0x75, 0x6c,
+ 0x65, 0x73, 0x22, 0x60, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c,
+ 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79,
+ 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x8f, 0x02, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46,
+ 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x72, 0x75, 0x6c,
+ 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75,
+ 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12,
+ 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
+ 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11,
+ 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76,
+ 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0x0a, 0x06,
+ 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2a, 0xc4, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x74,
+ 0x72, 0x61, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e,
+ 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53,
+ 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x25, 0x0a, 0x21, 0x43, 0x4f,
+ 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x52, 0x45,
+ 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x4f, 0x47, 0x45, 0x54, 0x48, 0x45, 0x52, 0x10,
+ 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f,
+ 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x54, 0x5f, 0x4c, 0x45, 0x41, 0x53, 0x54, 0x5f, 0x4f, 0x4e,
+ 0x45, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e,
+ 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4d, 0x55, 0x54, 0x55, 0x41, 0x4c, 0x4c, 0x59, 0x5f,
+ 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x56, 0x45, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x43,
+ 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x44,
+ 0x45, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x4e, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x04, 0x2a, 0xc9, 0x01,
+ 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x26, 0x0a, 0x22, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x49, 0x45, 0x4c,
+ 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50,
+ 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x52,
+ 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52,
+ 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x52, 0x49, 0x4e,
+ 0x47, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x41, 0x55,
+ 0x54, 0x48, 0x32, 0x10, 0x02, 0x12, 0x2f, 0x0a, 0x2b, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f,
+ 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45,
+ 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x44, 0x45, 0x52, 0x49, 0x56, 0x45, 0x44, 0x5f, 0x4f, 0x50, 0x54,
+ 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47,
+ 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45,
+ 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f,
+ 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70,
+ 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
+
+var (
+ file_c1_config_v1_config_proto_rawDescOnce sync.Once
+ file_c1_config_v1_config_proto_rawDescData []byte
+)
+
+func file_c1_config_v1_config_proto_rawDescGZIP() []byte {
+ file_c1_config_v1_config_proto_rawDescOnce.Do(func() {
+ file_c1_config_v1_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_config_v1_config_proto_rawDesc), len(file_c1_config_v1_config_proto_rawDesc)))
+ })
+ return file_c1_config_v1_config_proto_rawDescData
+}
+
+var file_c1_config_v1_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_c1_config_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
+var file_c1_config_v1_config_proto_goTypes = []any{
+ (ConstraintKind)(0), // 0: c1.config.v1.ConstraintKind
+ (StringFieldType)(0), // 1: c1.config.v1.StringFieldType
+ (*Configuration)(nil), // 2: c1.config.v1.Configuration
+ (*Constraint)(nil), // 3: c1.config.v1.Constraint
+ (*Field)(nil), // 4: c1.config.v1.Field
+ (*IntField)(nil), // 5: c1.config.v1.IntField
+ (*BoolField)(nil), // 6: c1.config.v1.BoolField
+ (*StringSliceField)(nil), // 7: c1.config.v1.StringSliceField
+ (*StringMapField)(nil), // 8: c1.config.v1.StringMapField
+ (*StringFieldOption)(nil), // 9: c1.config.v1.StringFieldOption
+ (*StringField)(nil), // 10: c1.config.v1.StringField
+ nil, // 11: c1.config.v1.StringMapField.DefaultValueEntry
+ (*Int64Rules)(nil), // 12: c1.config.v1.Int64Rules
+ (*BoolRules)(nil), // 13: c1.config.v1.BoolRules
+ (*RepeatedStringRules)(nil), // 14: c1.config.v1.RepeatedStringRules
+ (*StringMapRules)(nil), // 15: c1.config.v1.StringMapRules
+ (*StringRules)(nil), // 16: c1.config.v1.StringRules
+ (*anypb.Any)(nil), // 17: google.protobuf.Any
+}
+var file_c1_config_v1_config_proto_depIdxs = []int32{
+ 4, // 0: c1.config.v1.Configuration.fields:type_name -> c1.config.v1.Field
+ 3, // 1: c1.config.v1.Configuration.constraints:type_name -> c1.config.v1.Constraint
+ 0, // 2: c1.config.v1.Constraint.kind:type_name -> c1.config.v1.ConstraintKind
+ 10, // 3: c1.config.v1.Field.string_field:type_name -> c1.config.v1.StringField
+ 5, // 4: c1.config.v1.Field.int_field:type_name -> c1.config.v1.IntField
+ 6, // 5: c1.config.v1.Field.bool_field:type_name -> c1.config.v1.BoolField
+ 7, // 6: c1.config.v1.Field.string_slice_field:type_name -> c1.config.v1.StringSliceField
+ 8, // 7: c1.config.v1.Field.string_map_field:type_name -> c1.config.v1.StringMapField
+ 12, // 8: c1.config.v1.IntField.rules:type_name -> c1.config.v1.Int64Rules
+ 13, // 9: c1.config.v1.BoolField.rules:type_name -> c1.config.v1.BoolRules
+ 14, // 10: c1.config.v1.StringSliceField.rules:type_name -> c1.config.v1.RepeatedStringRules
+ 11, // 11: c1.config.v1.StringMapField.default_value:type_name -> c1.config.v1.StringMapField.DefaultValueEntry
+ 15, // 12: c1.config.v1.StringMapField.rules:type_name -> c1.config.v1.StringMapRules
+ 16, // 13: c1.config.v1.StringField.rules:type_name -> c1.config.v1.StringRules
+ 1, // 14: c1.config.v1.StringField.type:type_name -> c1.config.v1.StringFieldType
+ 9, // 15: c1.config.v1.StringField.options:type_name -> c1.config.v1.StringFieldOption
+ 17, // 16: c1.config.v1.StringMapField.DefaultValueEntry.value:type_name -> google.protobuf.Any
+ 17, // [17:17] is the sub-list for method output_type
+ 17, // [17:17] is the sub-list for method input_type
+ 17, // [17:17] is the sub-list for extension type_name
+ 17, // [17:17] is the sub-list for extension extendee
+ 0, // [0:17] is the sub-list for field type_name
+}
+
+func init() { file_c1_config_v1_config_proto_init() }
+func file_c1_config_v1_config_proto_init() {
+ if File_c1_config_v1_config_proto != nil {
+ return
+ }
+ file_c1_config_v1_rules_proto_init()
+ file_c1_config_v1_config_proto_msgTypes[2].OneofWrappers = []any{
+ (*Field_StringField)(nil),
+ (*Field_IntField)(nil),
+ (*Field_BoolField)(nil),
+ (*Field_StringSliceField)(nil),
+ (*Field_StringMapField)(nil),
+ }
+ file_c1_config_v1_config_proto_msgTypes[3].OneofWrappers = []any{}
+ file_c1_config_v1_config_proto_msgTypes[4].OneofWrappers = []any{}
+ file_c1_config_v1_config_proto_msgTypes[5].OneofWrappers = []any{}
+ file_c1_config_v1_config_proto_msgTypes[6].OneofWrappers = []any{}
+ file_c1_config_v1_config_proto_msgTypes[8].OneofWrappers = []any{}
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_config_v1_config_proto_rawDesc), len(file_c1_config_v1_config_proto_rawDesc)),
+ NumEnums: 2,
+ NumMessages: 10,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_c1_config_v1_config_proto_goTypes,
+ DependencyIndexes: file_c1_config_v1_config_proto_depIdxs,
+ EnumInfos: file_c1_config_v1_config_proto_enumTypes,
+ MessageInfos: file_c1_config_v1_config_proto_msgTypes,
+ }.Build()
+ File_c1_config_v1_config_proto = out.File
+ file_c1_config_v1_config_proto_goTypes = nil
+ file_c1_config_v1_config_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.validate.go
new file mode 100644
index 00000000..c97b1e8f
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.validate.go
@@ -0,0 +1,1501 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: c1/config/v1/config.proto
+
+package v1
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Configuration with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Configuration) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Configuration with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ConfigurationMultiError, or
+// nil if none found.
+func (m *Configuration) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Configuration) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetFields() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ConfigurationValidationError{
+ field: fmt.Sprintf("Fields[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ConfigurationValidationError{
+ field: fmt.Sprintf("Fields[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ConfigurationValidationError{
+ field: fmt.Sprintf("Fields[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetConstraints() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ConfigurationValidationError{
+ field: fmt.Sprintf("Constraints[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ConfigurationValidationError{
+ field: fmt.Sprintf("Constraints[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ConfigurationValidationError{
+ field: fmt.Sprintf("Constraints[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for DisplayName
+
+ // no validation rules for HelpUrl
+
+ // no validation rules for IconUrl
+
+ // no validation rules for IsDirectory
+
+ // no validation rules for CatalogId
+
+ if len(errors) > 0 {
+ return ConfigurationMultiError(errors)
+ }
+
+ return nil
+}
+
+// ConfigurationMultiError is an error wrapping multiple validation errors
+// returned by Configuration.ValidateAll() if the designated constraints
+// aren't met.
+type ConfigurationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ConfigurationMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ConfigurationMultiError) AllErrors() []error { return m }
+
+// ConfigurationValidationError is the validation error returned by
+// Configuration.Validate if the designated constraints aren't met.
+type ConfigurationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ConfigurationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ConfigurationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ConfigurationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ConfigurationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ConfigurationValidationError) ErrorName() string { return "ConfigurationValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ConfigurationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sConfiguration.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ConfigurationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ConfigurationValidationError{}
+
+// Validate checks the field values on Constraint with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Constraint) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Constraint with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ConstraintMultiError, or
+// nil if none found.
+func (m *Constraint) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Constraint) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Kind
+
+ // no validation rules for Name
+
+ // no validation rules for HelpText
+
+ // no validation rules for IsFieldGroup
+
+ if len(errors) > 0 {
+ return ConstraintMultiError(errors)
+ }
+
+ return nil
+}
+
+// ConstraintMultiError is an error wrapping multiple validation errors
+// returned by Constraint.ValidateAll() if the designated constraints aren't met.
+type ConstraintMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ConstraintMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ConstraintMultiError) AllErrors() []error { return m }
+
+// ConstraintValidationError is the validation error returned by
+// Constraint.Validate if the designated constraints aren't met.
+type ConstraintValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ConstraintValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ConstraintValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ConstraintValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ConstraintValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ConstraintValidationError) ErrorName() string { return "ConstraintValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ConstraintValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sConstraint.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ConstraintValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ConstraintValidationError{}
+
+// Validate checks the field values on Field with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Field) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Field with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in FieldMultiError, or nil if none found.
+func (m *Field) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Field) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for DisplayName
+
+ // no validation rules for Description
+
+ // no validation rules for Placeholder
+
+ // no validation rules for IsRequired
+
+ // no validation rules for IsOps
+
+ // no validation rules for IsSecret
+
+ switch v := m.Field.(type) {
+ case *Field_StringField:
+ if v == nil {
+ err := FieldValidationError{
+ field: "Field",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetStringField()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, FieldValidationError{
+ field: "StringField",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, FieldValidationError{
+ field: "StringField",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStringField()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return FieldValidationError{
+ field: "StringField",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Field_IntField:
+ if v == nil {
+ err := FieldValidationError{
+ field: "Field",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetIntField()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, FieldValidationError{
+ field: "IntField",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, FieldValidationError{
+ field: "IntField",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetIntField()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return FieldValidationError{
+ field: "IntField",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Field_BoolField:
+ if v == nil {
+ err := FieldValidationError{
+ field: "Field",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetBoolField()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, FieldValidationError{
+ field: "BoolField",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, FieldValidationError{
+ field: "BoolField",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetBoolField()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return FieldValidationError{
+ field: "BoolField",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Field_StringSliceField:
+ if v == nil {
+ err := FieldValidationError{
+ field: "Field",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetStringSliceField()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, FieldValidationError{
+ field: "StringSliceField",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, FieldValidationError{
+ field: "StringSliceField",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStringSliceField()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return FieldValidationError{
+ field: "StringSliceField",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Field_StringMapField:
+ if v == nil {
+ err := FieldValidationError{
+ field: "Field",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetStringMapField()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, FieldValidationError{
+ field: "StringMapField",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, FieldValidationError{
+ field: "StringMapField",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStringMapField()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return FieldValidationError{
+ field: "StringMapField",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return FieldMultiError(errors)
+ }
+
+ return nil
+}
+
+// FieldMultiError is an error wrapping multiple validation errors returned by
+// Field.ValidateAll() if the designated constraints aren't met.
+type FieldMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FieldMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m FieldMultiError) AllErrors() []error { return m }
+
+// FieldValidationError is the validation error returned by Field.Validate if
+// the designated constraints aren't met.
+type FieldValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FieldValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FieldValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FieldValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FieldValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FieldValidationError) ErrorName() string { return "FieldValidationError" }
+
+// Error satisfies the builtin error interface
+func (e FieldValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sField.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FieldValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FieldValidationError{}
+
+// Validate checks the field values on IntField with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *IntField) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on IntField with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in IntFieldMultiError, or nil
+// if none found.
+func (m *IntField) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IntField) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for DefaultValue
+
+ if m.Rules != nil {
+
+ if all {
+ switch v := interface{}(m.GetRules()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IntFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IntFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IntFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return IntFieldMultiError(errors)
+ }
+
+ return nil
+}
+
+// IntFieldMultiError is an error wrapping multiple validation errors returned
+// by IntField.ValidateAll() if the designated constraints aren't met.
+type IntFieldMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IntFieldMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m IntFieldMultiError) AllErrors() []error { return m }
+
+// IntFieldValidationError is the validation error returned by
+// IntField.Validate if the designated constraints aren't met.
+type IntFieldValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IntFieldValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IntFieldValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IntFieldValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IntFieldValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IntFieldValidationError) ErrorName() string { return "IntFieldValidationError" }
+
+// Error satisfies the builtin error interface
+func (e IntFieldValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sIntField.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IntFieldValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IntFieldValidationError{}
+
+// Validate checks the field values on BoolField with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *BoolField) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BoolField with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in BoolFieldMultiError, or nil
+// if none found.
+func (m *BoolField) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BoolField) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for DefaultValue
+
+ if m.Rules != nil {
+
+ if all {
+ switch v := interface{}(m.GetRules()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BoolFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BoolFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BoolFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return BoolFieldMultiError(errors)
+ }
+
+ return nil
+}
+
+// BoolFieldMultiError is an error wrapping multiple validation errors returned
+// by BoolField.ValidateAll() if the designated constraints aren't met.
+type BoolFieldMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BoolFieldMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BoolFieldMultiError) AllErrors() []error { return m }
+
+// BoolFieldValidationError is the validation error returned by
+// BoolField.Validate if the designated constraints aren't met.
+type BoolFieldValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BoolFieldValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BoolFieldValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BoolFieldValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BoolFieldValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BoolFieldValidationError) ErrorName() string { return "BoolFieldValidationError" }
+
+// Error satisfies the builtin error interface
+func (e BoolFieldValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sBoolField.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BoolFieldValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BoolFieldValidationError{}
+
+// Validate checks the field values on StringSliceField with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *StringSliceField) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StringSliceField with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// StringSliceFieldMultiError, or nil if none found.
+func (m *StringSliceField) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StringSliceField) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.Rules != nil {
+
+ if all {
+ switch v := interface{}(m.GetRules()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StringSliceFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StringSliceFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StringSliceFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return StringSliceFieldMultiError(errors)
+ }
+
+ return nil
+}
+
+// StringSliceFieldMultiError is an error wrapping multiple validation errors
+// returned by StringSliceField.ValidateAll() if the designated constraints
+// aren't met.
+type StringSliceFieldMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StringSliceFieldMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StringSliceFieldMultiError) AllErrors() []error { return m }
+
+// StringSliceFieldValidationError is the validation error returned by
+// StringSliceField.Validate if the designated constraints aren't met.
+type StringSliceFieldValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StringSliceFieldValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StringSliceFieldValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StringSliceFieldValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StringSliceFieldValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StringSliceFieldValidationError) ErrorName() string { return "StringSliceFieldValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StringSliceFieldValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStringSliceField.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StringSliceFieldValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StringSliceFieldValidationError{}
+
+// Validate checks the field values on StringMapField with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *StringMapField) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StringMapField with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in StringMapFieldMultiError,
+// or nil if none found.
+func (m *StringMapField) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StringMapField) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ {
+ sorted_keys := make([]string, len(m.GetDefaultValue()))
+ i := 0
+ for key := range m.GetDefaultValue() {
+ sorted_keys[i] = key
+ i++
+ }
+ sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] })
+ for _, key := range sorted_keys {
+ val := m.GetDefaultValue()[key]
+ _ = val
+
+ // no validation rules for DefaultValue[key]
+
+ if all {
+ switch v := interface{}(val).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StringMapFieldValidationError{
+ field: fmt.Sprintf("DefaultValue[%v]", key),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StringMapFieldValidationError{
+ field: fmt.Sprintf("DefaultValue[%v]", key),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(val).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StringMapFieldValidationError{
+ field: fmt.Sprintf("DefaultValue[%v]", key),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+ }
+
+ if m.Rules != nil {
+
+ if all {
+ switch v := interface{}(m.GetRules()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StringMapFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StringMapFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StringMapFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return StringMapFieldMultiError(errors)
+ }
+
+ return nil
+}
+
+// StringMapFieldMultiError is an error wrapping multiple validation errors
+// returned by StringMapField.ValidateAll() if the designated constraints
+// aren't met.
+type StringMapFieldMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StringMapFieldMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StringMapFieldMultiError) AllErrors() []error { return m }
+
+// StringMapFieldValidationError is the validation error returned by
+// StringMapField.Validate if the designated constraints aren't met.
+type StringMapFieldValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StringMapFieldValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StringMapFieldValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StringMapFieldValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StringMapFieldValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StringMapFieldValidationError) ErrorName() string { return "StringMapFieldValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StringMapFieldValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStringMapField.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StringMapFieldValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StringMapFieldValidationError{}
+
+// Validate checks the field values on StringFieldOption with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *StringFieldOption) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StringFieldOption with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// StringFieldOptionMultiError, or nil if none found.
+func (m *StringFieldOption) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StringFieldOption) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Value
+
+ // no validation rules for DisplayName
+
+ if len(errors) > 0 {
+ return StringFieldOptionMultiError(errors)
+ }
+
+ return nil
+}
+
+// StringFieldOptionMultiError is an error wrapping multiple validation errors
+// returned by StringFieldOption.ValidateAll() if the designated constraints
+// aren't met.
+type StringFieldOptionMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StringFieldOptionMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StringFieldOptionMultiError) AllErrors() []error { return m }
+
+// StringFieldOptionValidationError is the validation error returned by
+// StringFieldOption.Validate if the designated constraints aren't met.
+type StringFieldOptionValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StringFieldOptionValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StringFieldOptionValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StringFieldOptionValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StringFieldOptionValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StringFieldOptionValidationError) ErrorName() string {
+ return "StringFieldOptionValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StringFieldOptionValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStringFieldOption.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StringFieldOptionValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StringFieldOptionValidationError{}
+
+// Validate checks the field values on StringField with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *StringField) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StringField with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in StringFieldMultiError, or
+// nil if none found.
+func (m *StringField) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StringField) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for DefaultValue
+
+ // no validation rules for Type
+
+ for idx, item := range m.GetOptions() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StringFieldValidationError{
+ field: fmt.Sprintf("Options[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StringFieldValidationError{
+ field: fmt.Sprintf("Options[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StringFieldValidationError{
+ field: fmt.Sprintf("Options[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if m.Rules != nil {
+
+ if all {
+ switch v := interface{}(m.GetRules()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StringFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StringFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StringFieldValidationError{
+ field: "Rules",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return StringFieldMultiError(errors)
+ }
+
+ return nil
+}
+
+// StringFieldMultiError is an error wrapping multiple validation errors
+// returned by StringField.ValidateAll() if the designated constraints aren't met.
+type StringFieldMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StringFieldMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StringFieldMultiError) AllErrors() []error { return m }
+
+// StringFieldValidationError is the validation error returned by
+// StringField.Validate if the designated constraints aren't met.
+type StringFieldValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StringFieldValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StringFieldValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StringFieldValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StringFieldValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StringFieldValidationError) ErrorName() string { return "StringFieldValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StringFieldValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStringField.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StringFieldValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StringFieldValidationError{}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.go
new file mode 100644
index 00000000..0958f39c
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.go
@@ -0,0 +1,951 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.4
+// protoc (unknown)
+// source: c1/config/v1/rules.proto
+
+package v1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type WellKnownString int32
+
+const (
+ WellKnownString_WELL_KNOWN_STRING_UNSPECIFIED WellKnownString = 0
+ // Email specifies that the field must be a valid email address as
+ // defined by RFC 5322
+ WellKnownString_WELL_KNOWN_STRING_EMAIL WellKnownString = 1
+ // Hostname specifies that the field must be a valid hostname as
+ // defined by RFC 1034. This constraint does not support
+ // internationalized domain names (IDNs).
+ WellKnownString_WELL_KNOWN_STRING_HOSTNAME WellKnownString = 2
+ // Ip specifies that the field must be a valid IP (v4 or v6) address.
+ // Valid IPv6 addresses should not include surrounding square brackets.
+ WellKnownString_WELL_KNOWN_STRING_IP WellKnownString = 3
+ // Ipv4 specifies that the field must be a valid IPv4 address.
+ WellKnownString_WELL_KNOWN_STRING_IPV4 WellKnownString = 4
+ // Ipv6 specifies that the field must be a valid IPv6 address. Valid
+ // IPv6 addresses should not include surrounding square brackets.
+ WellKnownString_WELL_KNOWN_STRING_IPV6 WellKnownString = 5
+ WellKnownString_WELL_KNOWN_STRING_URI WellKnownString = 6
+ // Address specifies that the field must be either a valid hostname as
+ // defined by RFC 1034 (which does not support internationalized domain
+ // names or IDNs), or it can be a valid IP (v4 or v6).
+ WellKnownString_WELL_KNOWN_STRING_ADDRESS WellKnownString = 7
+ // Uuid specifies that the field must be a valid UUID as defined by
+ // RFC 4122
+ WellKnownString_WELL_KNOWN_STRING_UUID WellKnownString = 8
+)
+
+// Enum value maps for WellKnownString.
+var (
+ WellKnownString_name = map[int32]string{
+ 0: "WELL_KNOWN_STRING_UNSPECIFIED",
+ 1: "WELL_KNOWN_STRING_EMAIL",
+ 2: "WELL_KNOWN_STRING_HOSTNAME",
+ 3: "WELL_KNOWN_STRING_IP",
+ 4: "WELL_KNOWN_STRING_IPV4",
+ 5: "WELL_KNOWN_STRING_IPV6",
+ 6: "WELL_KNOWN_STRING_URI",
+ 7: "WELL_KNOWN_STRING_ADDRESS",
+ 8: "WELL_KNOWN_STRING_UUID",
+ }
+ WellKnownString_value = map[string]int32{
+ "WELL_KNOWN_STRING_UNSPECIFIED": 0,
+ "WELL_KNOWN_STRING_EMAIL": 1,
+ "WELL_KNOWN_STRING_HOSTNAME": 2,
+ "WELL_KNOWN_STRING_IP": 3,
+ "WELL_KNOWN_STRING_IPV4": 4,
+ "WELL_KNOWN_STRING_IPV6": 5,
+ "WELL_KNOWN_STRING_URI": 6,
+ "WELL_KNOWN_STRING_ADDRESS": 7,
+ "WELL_KNOWN_STRING_UUID": 8,
+ }
+)
+
+func (x WellKnownString) Enum() *WellKnownString {
+ p := new(WellKnownString)
+ *p = x
+ return p
+}
+
+func (x WellKnownString) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (WellKnownString) Descriptor() protoreflect.EnumDescriptor {
+ return file_c1_config_v1_rules_proto_enumTypes[0].Descriptor()
+}
+
+func (WellKnownString) Type() protoreflect.EnumType {
+ return &file_c1_config_v1_rules_proto_enumTypes[0]
+}
+
+func (x WellKnownString) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use WellKnownString.Descriptor instead.
+func (WellKnownString) EnumDescriptor() ([]byte, []int) {
+ return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{0}
+}
+
+// Int64Rules describes the constraints applied to `int64` values
+type Int64Rules struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Const specifies that this field must be exactly the specified value
+ Eq *int64 `protobuf:"varint,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *int64 `protobuf:"varint,2,opt,name=lt,proto3,oneof" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *int64 `protobuf:"varint,3,opt,name=lte,proto3,oneof" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *int64 `protobuf:"varint,4,opt,name=gt,proto3,oneof" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *int64 `protobuf:"varint,5,opt,name=gte,proto3,oneof" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []int64 `protobuf:"varint,6,rep,packed,name=in,proto3" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []int64 `protobuf:"varint,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ ValidateEmpty bool `protobuf:"varint,8,opt,name=validate_empty,json=validateEmpty,proto3" json:"validate_empty,omitempty"`
+ IsRequired bool `protobuf:"varint,9,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Int64Rules) Reset() {
+ *x = Int64Rules{}
+ mi := &file_c1_config_v1_rules_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Int64Rules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int64Rules) ProtoMessage() {}
+
+func (x *Int64Rules) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_rules_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int64Rules.ProtoReflect.Descriptor instead.
+func (*Int64Rules) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Int64Rules) GetEq() int64 {
+ if x != nil && x.Eq != nil {
+ return *x.Eq
+ }
+ return 0
+}
+
+func (x *Int64Rules) GetLt() int64 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *Int64Rules) GetLte() int64 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *Int64Rules) GetGt() int64 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *Int64Rules) GetGte() int64 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *Int64Rules) GetIn() []int64 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *Int64Rules) GetNotIn() []int64 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *Int64Rules) GetValidateEmpty() bool {
+ if x != nil {
+ return x.ValidateEmpty
+ }
+ return false
+}
+
+func (x *Int64Rules) GetIsRequired() bool {
+ if x != nil {
+ return x.IsRequired
+ }
+ return false
+}
+
+// BoolRules describes the constraints applied to `bool` values
+type BoolRules struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Const specifies that this field must be exactly the specified value
+ Eq *bool `protobuf:"varint,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BoolRules) Reset() {
+ *x = BoolRules{}
+ mi := &file_c1_config_v1_rules_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BoolRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BoolRules) ProtoMessage() {}
+
+func (x *BoolRules) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_rules_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BoolRules.ProtoReflect.Descriptor instead.
+func (*BoolRules) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *BoolRules) GetEq() bool {
+ if x != nil && x.Eq != nil {
+ return *x.Eq
+ }
+ return false
+}
+
+// RepeatedRules describe the constraints applied to `repeated` values
+type RepeatedRules struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // MinItems specifies that this field must have the specified number of
+ // items at a minimum
+ MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems,proto3,oneof" json:"min_items,omitempty"`
+ // MaxItems specifies that this field must have the specified number of
+ // items at a maximum
+ MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems,proto3,oneof" json:"max_items,omitempty"`
+ // Unique specifies that all elements in this field must be unique. This
+ // constraint is only applicable to scalar and enum types (messages are not
+ // supported).
+ Unique bool `protobuf:"varint,3,opt,name=unique,proto3" json:"unique,omitempty"`
+ // Items specifies the constraints to be applied to each item in the field.
+ // Repeated message fields will still execute validation against each item
+ // unless skip is specified here.
+ //
+ // Types that are valid to be assigned to ItemRules:
+ //
+ // *RepeatedRules_Int64
+ // *RepeatedRules_Bool
+ // *RepeatedRules_String_
+ ItemRules isRepeatedRules_ItemRules `protobuf_oneof:"item_rules"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ ValidateEmpty bool `protobuf:"varint,4,opt,name=validate_empty,json=validateEmpty,proto3" json:"validate_empty,omitempty"`
+ IsRequired bool `protobuf:"varint,5,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *RepeatedRules) Reset() {
+ *x = RepeatedRules{}
+ mi := &file_c1_config_v1_rules_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *RepeatedRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepeatedRules) ProtoMessage() {}
+
+func (x *RepeatedRules) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_rules_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RepeatedRules.ProtoReflect.Descriptor instead.
+func (*RepeatedRules) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *RepeatedRules) GetMinItems() uint64 {
+ if x != nil && x.MinItems != nil {
+ return *x.MinItems
+ }
+ return 0
+}
+
+func (x *RepeatedRules) GetMaxItems() uint64 {
+ if x != nil && x.MaxItems != nil {
+ return *x.MaxItems
+ }
+ return 0
+}
+
+func (x *RepeatedRules) GetUnique() bool {
+ if x != nil {
+ return x.Unique
+ }
+ return false
+}
+
+func (x *RepeatedRules) GetItemRules() isRepeatedRules_ItemRules {
+ if x != nil {
+ return x.ItemRules
+ }
+ return nil
+}
+
+func (x *RepeatedRules) GetInt64() *Int64Rules {
+ if x != nil {
+ if x, ok := x.ItemRules.(*RepeatedRules_Int64); ok {
+ return x.Int64
+ }
+ }
+ return nil
+}
+
+func (x *RepeatedRules) GetBool() *BoolRules {
+ if x != nil {
+ if x, ok := x.ItemRules.(*RepeatedRules_Bool); ok {
+ return x.Bool
+ }
+ }
+ return nil
+}
+
+func (x *RepeatedRules) GetString_() *StringRules {
+ if x != nil {
+ if x, ok := x.ItemRules.(*RepeatedRules_String_); ok {
+ return x.String_
+ }
+ }
+ return nil
+}
+
+func (x *RepeatedRules) GetValidateEmpty() bool {
+ if x != nil {
+ return x.ValidateEmpty
+ }
+ return false
+}
+
+func (x *RepeatedRules) GetIsRequired() bool {
+ if x != nil {
+ return x.IsRequired
+ }
+ return false
+}
+
+type isRepeatedRules_ItemRules interface {
+ isRepeatedRules_ItemRules()
+}
+
+type RepeatedRules_Int64 struct {
+ // Scalar Field Types
+ Int64 *Int64Rules `protobuf:"bytes,100,opt,name=int64,proto3,oneof"`
+}
+
+type RepeatedRules_Bool struct {
+ Bool *BoolRules `protobuf:"bytes,101,opt,name=bool,proto3,oneof"`
+}
+
+type RepeatedRules_String_ struct {
+ String_ *StringRules `protobuf:"bytes,102,opt,name=string,proto3,oneof"` // RepeatedRules repeated = 103;
+}
+
+func (*RepeatedRules_Int64) isRepeatedRules_ItemRules() {}
+
+func (*RepeatedRules_Bool) isRepeatedRules_ItemRules() {}
+
+func (*RepeatedRules_String_) isRepeatedRules_ItemRules() {}
+
+type RepeatedStringRules struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // MinItems specifies that this field must have the specified number of
+ // items at a minimum
+ MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems,proto3,oneof" json:"min_items,omitempty"`
+ // MaxItems specifies that this field must have the specified number of
+ // items at a maximum
+ MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems,proto3,oneof" json:"max_items,omitempty"`
+ // Unique specifies that all elements in this field must be unique. This
+ // constraint is only applicable to scalar and enum types (messages are not
+ // supported).
+ Unique bool `protobuf:"varint,3,opt,name=unique,proto3" json:"unique,omitempty"`
+ ItemRules *StringRules `protobuf:"bytes,4,opt,name=item_rules,json=itemRules,proto3" json:"item_rules,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ ValidateEmpty bool `protobuf:"varint,5,opt,name=validate_empty,json=validateEmpty,proto3" json:"validate_empty,omitempty"`
+ IsRequired bool `protobuf:"varint,6,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` // repeated string eq = 7;
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *RepeatedStringRules) Reset() {
+ *x = RepeatedStringRules{}
+ mi := &file_c1_config_v1_rules_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *RepeatedStringRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepeatedStringRules) ProtoMessage() {}
+
+func (x *RepeatedStringRules) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_rules_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RepeatedStringRules.ProtoReflect.Descriptor instead.
+func (*RepeatedStringRules) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *RepeatedStringRules) GetMinItems() uint64 {
+ if x != nil && x.MinItems != nil {
+ return *x.MinItems
+ }
+ return 0
+}
+
+func (x *RepeatedStringRules) GetMaxItems() uint64 {
+ if x != nil && x.MaxItems != nil {
+ return *x.MaxItems
+ }
+ return 0
+}
+
+func (x *RepeatedStringRules) GetUnique() bool {
+ if x != nil {
+ return x.Unique
+ }
+ return false
+}
+
+func (x *RepeatedStringRules) GetItemRules() *StringRules {
+ if x != nil {
+ return x.ItemRules
+ }
+ return nil
+}
+
+func (x *RepeatedStringRules) GetValidateEmpty() bool {
+ if x != nil {
+ return x.ValidateEmpty
+ }
+ return false
+}
+
+func (x *RepeatedStringRules) GetIsRequired() bool {
+ if x != nil {
+ return x.IsRequired
+ }
+ return false
+}
+
+type StringRules struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Const specifies that this field must be exactly the specified value
+ Eq *string `protobuf:"bytes,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"`
+ // Len specifies that this field must be the specified number of
+ // characters (Unicode code points). Note that the number of
+ // characters may differ from the number of bytes in the string.
+ Len *uint64 `protobuf:"varint,19,opt,name=len,proto3,oneof" json:"len,omitempty"`
+ // MinLen specifies that this field must be the specified number of
+ // characters (Unicode code points) at a minimum. Note that the number of
+ // characters may differ from the number of bytes in the string.
+ MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen,proto3,oneof" json:"min_len,omitempty"`
+ // MaxLen specifies that this field must be the specified number of
+ // characters (Unicode code points) at a maximum. Note that the number of
+ // characters may differ from the number of bytes in the string.
+ MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen,proto3,oneof" json:"max_len,omitempty"`
+ // Pattern specifies that this field must match against the specified
+ // regular expression (RE2 syntax). The included expression should elide
+ // any delimiters.
+ Pattern *string `protobuf:"bytes,6,opt,name=pattern,proto3,oneof" json:"pattern,omitempty"`
+ // Prefix specifies that this field must have the specified substring at
+ // the beginning of the string.
+ Prefix *string `protobuf:"bytes,7,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"`
+ // Suffix specifies that this field must have the specified substring at
+ // the end of the string.
+ Suffix *string `protobuf:"bytes,8,opt,name=suffix,proto3,oneof" json:"suffix,omitempty"`
+ // Contains specifies that this field must have the specified substring
+ // anywhere in the string.
+ Contains *string `protobuf:"bytes,9,opt,name=contains,proto3,oneof" json:"contains,omitempty"`
+ // NotContains specifies that this field cannot have the specified substring
+ // anywhere in the string.
+ NotContains *string `protobuf:"bytes,23,opt,name=not_contains,json=notContains,proto3,oneof" json:"not_contains,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []string `protobuf:"bytes,10,rep,name=in,proto3" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []string `protobuf:"bytes,11,rep,name=not_in,json=notIn,proto3" json:"not_in,omitempty"`
+ WellKnown WellKnownString `protobuf:"varint,12,opt,name=well_known,json=wellKnown,proto3,enum=c1.config.v1.WellKnownString" json:"well_known,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ ValidateEmpty bool `protobuf:"varint,26,opt,name=validate_empty,json=validateEmpty,proto3" json:"validate_empty,omitempty"`
+ IsRequired bool `protobuf:"varint,27,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *StringRules) Reset() {
+ *x = StringRules{}
+ mi := &file_c1_config_v1_rules_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *StringRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringRules) ProtoMessage() {}
+
+func (x *StringRules) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_rules_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StringRules.ProtoReflect.Descriptor instead.
+func (*StringRules) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *StringRules) GetEq() string {
+ if x != nil && x.Eq != nil {
+ return *x.Eq
+ }
+ return ""
+}
+
+func (x *StringRules) GetLen() uint64 {
+ if x != nil && x.Len != nil {
+ return *x.Len
+ }
+ return 0
+}
+
+func (x *StringRules) GetMinLen() uint64 {
+ if x != nil && x.MinLen != nil {
+ return *x.MinLen
+ }
+ return 0
+}
+
+func (x *StringRules) GetMaxLen() uint64 {
+ if x != nil && x.MaxLen != nil {
+ return *x.MaxLen
+ }
+ return 0
+}
+
+func (x *StringRules) GetPattern() string {
+ if x != nil && x.Pattern != nil {
+ return *x.Pattern
+ }
+ return ""
+}
+
+func (x *StringRules) GetPrefix() string {
+ if x != nil && x.Prefix != nil {
+ return *x.Prefix
+ }
+ return ""
+}
+
+func (x *StringRules) GetSuffix() string {
+ if x != nil && x.Suffix != nil {
+ return *x.Suffix
+ }
+ return ""
+}
+
+func (x *StringRules) GetContains() string {
+ if x != nil && x.Contains != nil {
+ return *x.Contains
+ }
+ return ""
+}
+
+func (x *StringRules) GetNotContains() string {
+ if x != nil && x.NotContains != nil {
+ return *x.NotContains
+ }
+ return ""
+}
+
+func (x *StringRules) GetIn() []string {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *StringRules) GetNotIn() []string {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *StringRules) GetWellKnown() WellKnownString {
+ if x != nil {
+ return x.WellKnown
+ }
+ return WellKnownString_WELL_KNOWN_STRING_UNSPECIFIED
+}
+
+func (x *StringRules) GetValidateEmpty() bool {
+ if x != nil {
+ return x.ValidateEmpty
+ }
+ return false
+}
+
+func (x *StringRules) GetIsRequired() bool {
+ if x != nil {
+ return x.IsRequired
+ }
+ return false
+}
+
+type StringMapRules struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ ValidateEmpty bool `protobuf:"varint,1,opt,name=validate_empty,json=validateEmpty,proto3" json:"validate_empty,omitempty"`
+ IsRequired bool `protobuf:"varint,2,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *StringMapRules) Reset() {
+ *x = StringMapRules{}
+ mi := &file_c1_config_v1_rules_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *StringMapRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringMapRules) ProtoMessage() {}
+
+func (x *StringMapRules) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_config_v1_rules_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StringMapRules.ProtoReflect.Descriptor instead.
+func (*StringMapRules) Descriptor() ([]byte, []int) {
+ return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *StringMapRules) GetValidateEmpty() bool {
+ if x != nil {
+ return x.ValidateEmpty
+ }
+ return false
+}
+
+func (x *StringMapRules) GetIsRequired() bool {
+ if x != nil {
+ return x.IsRequired
+ }
+ return false
+}
+
+var File_c1_config_v1_rules_proto protoreflect.FileDescriptor
+
+var file_c1_config_v1_rules_proto_rawDesc = string([]byte{
+ 0x0a, 0x18, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x72,
+ 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x22, 0x8d, 0x02, 0x0a, 0x0a, 0x49, 0x6e, 0x74,
+ 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x13, 0x0a, 0x02, 0x65, 0x71, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x02, 0x65, 0x71, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02,
+ 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x02, 0x6c, 0x74, 0x88, 0x01,
+ 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02,
+ 0x52, 0x03, 0x6c, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x02, 0x67, 0x74, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a,
+ 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, 0x03, 0x67, 0x74,
+ 0x65, 0x88, 0x01, 0x01, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03,
+ 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07,
+ 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70,
+ 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
+ 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69,
+ 0x72, 0x65, 0x64, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x65, 0x71, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x6c,
+ 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6c, 0x74, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x67, 0x74,
+ 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x67, 0x74, 0x65, 0x22, 0x27, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c,
+ 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x13, 0x0a, 0x02, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x08, 0x48, 0x00, 0x52, 0x02, 0x65, 0x71, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x65,
+ 0x71, 0x22, 0xf3, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75,
+ 0x6c, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65,
+ 0x6d, 0x73, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65,
+ 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49,
+ 0x74, 0x65, 0x6d, 0x73, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12,
+ 0x30, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e,
+ 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36,
+ 0x34, 0x12, 0x2d, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x17, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x42,
+ 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c,
+ 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e,
+ 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
+ 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0c, 0x0a,
+ 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f,
+ 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61,
+ 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x8f, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x65,
+ 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12,
+ 0x20, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x88, 0x01,
+ 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73,
+ 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x69,
+ 0x74, 0x65, 0x6d, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x09, 0x69, 0x74, 0x65, 0x6d,
+ 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
+ 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0c, 0x0a,
+ 0x0a, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f,
+ 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xab, 0x04, 0x0a, 0x0b, 0x53, 0x74,
+ 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x13, 0x0a, 0x02, 0x65, 0x71, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x65, 0x71, 0x88, 0x01, 0x01, 0x12, 0x15,
+ 0x0a, 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x03, 0x6c,
+ 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e,
+ 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x88, 0x01,
+ 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x06, 0x20, 0x01,
+ 0x28, 0x09, 0x48, 0x04, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x88, 0x01, 0x01,
+ 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
+ 0x48, 0x05, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a,
+ 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52,
+ 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x63, 0x6f,
+ 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x08,
+ 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x6e,
+ 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28,
+ 0x09, 0x48, 0x08, 0x52, 0x0b, 0x6e, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73,
+ 0x88, 0x01, 0x01, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52,
+ 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x0b, 0x20,
+ 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x3c, 0x0a, 0x0a, 0x77, 0x65,
+ 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65,
+ 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x77,
+ 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12,
+ 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x1b,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
+ 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x65, 0x71, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6c, 0x65, 0x6e, 0x42,
+ 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
+ 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x74, 0x74,
+ 0x65, 0x72, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x09,
+ 0x0a, 0x07, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x63, 0x6f,
+ 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x22, 0x58, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e,
+ 0x67, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79,
+ 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
+ 0x64, 0x2a, 0x99, 0x02, 0x0a, 0x0f, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x53,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x1d, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e,
+ 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
+ 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x57, 0x45, 0x4c, 0x4c,
+ 0x5f, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x4d,
+ 0x41, 0x49, 0x4c, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e,
+ 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x4f, 0x53, 0x54, 0x4e,
+ 0x41, 0x4d, 0x45, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e,
+ 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x50, 0x10, 0x03, 0x12,
+ 0x1a, 0x0a, 0x16, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54,
+ 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x50, 0x56, 0x34, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x57,
+ 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47,
+ 0x5f, 0x49, 0x50, 0x56, 0x36, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x45, 0x4c, 0x4c, 0x5f,
+ 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x52, 0x49,
+ 0x10, 0x06, 0x12, 0x1d, 0x0a, 0x19, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
+ 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x10,
+ 0x07, 0x12, 0x1a, 0x0a, 0x16, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f,
+ 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x55, 0x49, 0x44, 0x10, 0x08, 0x42, 0x33, 0x5a,
+ 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64,
+ 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73,
+ 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f,
+ 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
+
+var (
+ file_c1_config_v1_rules_proto_rawDescOnce sync.Once
+ file_c1_config_v1_rules_proto_rawDescData []byte
+)
+
+func file_c1_config_v1_rules_proto_rawDescGZIP() []byte {
+ file_c1_config_v1_rules_proto_rawDescOnce.Do(func() {
+ file_c1_config_v1_rules_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_config_v1_rules_proto_rawDesc), len(file_c1_config_v1_rules_proto_rawDesc)))
+ })
+ return file_c1_config_v1_rules_proto_rawDescData
+}
+
+var file_c1_config_v1_rules_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_c1_config_v1_rules_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_c1_config_v1_rules_proto_goTypes = []any{
+ (WellKnownString)(0), // 0: c1.config.v1.WellKnownString
+ (*Int64Rules)(nil), // 1: c1.config.v1.Int64Rules
+ (*BoolRules)(nil), // 2: c1.config.v1.BoolRules
+ (*RepeatedRules)(nil), // 3: c1.config.v1.RepeatedRules
+ (*RepeatedStringRules)(nil), // 4: c1.config.v1.RepeatedStringRules
+ (*StringRules)(nil), // 5: c1.config.v1.StringRules
+ (*StringMapRules)(nil), // 6: c1.config.v1.StringMapRules
+}
+var file_c1_config_v1_rules_proto_depIdxs = []int32{
+ 1, // 0: c1.config.v1.RepeatedRules.int64:type_name -> c1.config.v1.Int64Rules
+ 2, // 1: c1.config.v1.RepeatedRules.bool:type_name -> c1.config.v1.BoolRules
+ 5, // 2: c1.config.v1.RepeatedRules.string:type_name -> c1.config.v1.StringRules
+ 5, // 3: c1.config.v1.RepeatedStringRules.item_rules:type_name -> c1.config.v1.StringRules
+ 0, // 4: c1.config.v1.StringRules.well_known:type_name -> c1.config.v1.WellKnownString
+ 5, // [5:5] is the sub-list for method output_type
+ 5, // [5:5] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_c1_config_v1_rules_proto_init() }
+func file_c1_config_v1_rules_proto_init() {
+ if File_c1_config_v1_rules_proto != nil {
+ return
+ }
+ file_c1_config_v1_rules_proto_msgTypes[0].OneofWrappers = []any{}
+ file_c1_config_v1_rules_proto_msgTypes[1].OneofWrappers = []any{}
+ file_c1_config_v1_rules_proto_msgTypes[2].OneofWrappers = []any{
+ (*RepeatedRules_Int64)(nil),
+ (*RepeatedRules_Bool)(nil),
+ (*RepeatedRules_String_)(nil),
+ }
+ file_c1_config_v1_rules_proto_msgTypes[3].OneofWrappers = []any{}
+ file_c1_config_v1_rules_proto_msgTypes[4].OneofWrappers = []any{}
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_config_v1_rules_proto_rawDesc), len(file_c1_config_v1_rules_proto_rawDesc)),
+ NumEnums: 1,
+ NumMessages: 6,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_c1_config_v1_rules_proto_goTypes,
+ DependencyIndexes: file_c1_config_v1_rules_proto_depIdxs,
+ EnumInfos: file_c1_config_v1_rules_proto_enumTypes,
+ MessageInfos: file_c1_config_v1_rules_proto_msgTypes,
+ }.Build()
+ File_c1_config_v1_rules_proto = out.File
+ file_c1_config_v1_rules_proto_goTypes = nil
+ file_c1_config_v1_rules_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.validate.go
new file mode 100644
index 00000000..a2c8ff0d
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.validate.go
@@ -0,0 +1,894 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: c1/config/v1/rules.proto
+
+package v1
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Int64Rules with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Int64Rules) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Int64Rules with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in Int64RulesMultiError, or
+// nil if none found.
+func (m *Int64Rules) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Int64Rules) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for ValidateEmpty
+
+ // no validation rules for IsRequired
+
+ if m.Eq != nil {
+ // no validation rules for Eq
+ }
+
+ if m.Lt != nil {
+ // no validation rules for Lt
+ }
+
+ if m.Lte != nil {
+ // no validation rules for Lte
+ }
+
+ if m.Gt != nil {
+ // no validation rules for Gt
+ }
+
+ if m.Gte != nil {
+ // no validation rules for Gte
+ }
+
+ if len(errors) > 0 {
+ return Int64RulesMultiError(errors)
+ }
+
+ return nil
+}
+
+// Int64RulesMultiError is an error wrapping multiple validation errors
+// returned by Int64Rules.ValidateAll() if the designated constraints aren't met.
+type Int64RulesMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Int64RulesMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Int64RulesMultiError) AllErrors() []error { return m }
+
+// Int64RulesValidationError is the validation error returned by
+// Int64Rules.Validate if the designated constraints aren't met.
+type Int64RulesValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Int64RulesValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Int64RulesValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Int64RulesValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Int64RulesValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Int64RulesValidationError) ErrorName() string { return "Int64RulesValidationError" }
+
+// Error satisfies the builtin error interface
+func (e Int64RulesValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sInt64Rules.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Int64RulesValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Int64RulesValidationError{}
+
+// Validate checks the field values on BoolRules with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *BoolRules) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BoolRules with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in BoolRulesMultiError, or nil
+// if none found.
+func (m *BoolRules) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BoolRules) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.Eq != nil {
+ // no validation rules for Eq
+ }
+
+ if len(errors) > 0 {
+ return BoolRulesMultiError(errors)
+ }
+
+ return nil
+}
+
+// BoolRulesMultiError is an error wrapping multiple validation errors returned
+// by BoolRules.ValidateAll() if the designated constraints aren't met.
+type BoolRulesMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BoolRulesMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BoolRulesMultiError) AllErrors() []error { return m }
+
+// BoolRulesValidationError is the validation error returned by
+// BoolRules.Validate if the designated constraints aren't met.
+type BoolRulesValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BoolRulesValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BoolRulesValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BoolRulesValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BoolRulesValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BoolRulesValidationError) ErrorName() string { return "BoolRulesValidationError" }
+
+// Error satisfies the builtin error interface
+func (e BoolRulesValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sBoolRules.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BoolRulesValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BoolRulesValidationError{}
+
+// Validate checks the field values on RepeatedRules with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *RepeatedRules) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RepeatedRules with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in RepeatedRulesMultiError, or
+// nil if none found.
+func (m *RepeatedRules) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RepeatedRules) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Unique
+
+ // no validation rules for ValidateEmpty
+
+ // no validation rules for IsRequired
+
+ switch v := m.ItemRules.(type) {
+ case *RepeatedRules_Int64:
+ if v == nil {
+ err := RepeatedRulesValidationError{
+ field: "ItemRules",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetInt64()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RepeatedRulesValidationError{
+ field: "Int64",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RepeatedRulesValidationError{
+ field: "Int64",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetInt64()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RepeatedRulesValidationError{
+ field: "Int64",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *RepeatedRules_Bool:
+ if v == nil {
+ err := RepeatedRulesValidationError{
+ field: "ItemRules",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetBool()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RepeatedRulesValidationError{
+ field: "Bool",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RepeatedRulesValidationError{
+ field: "Bool",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetBool()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RepeatedRulesValidationError{
+ field: "Bool",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *RepeatedRules_String_:
+ if v == nil {
+ err := RepeatedRulesValidationError{
+ field: "ItemRules",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetString_()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RepeatedRulesValidationError{
+ field: "String_",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RepeatedRulesValidationError{
+ field: "String_",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetString_()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RepeatedRulesValidationError{
+ field: "String_",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if m.MinItems != nil {
+ // no validation rules for MinItems
+ }
+
+ if m.MaxItems != nil {
+ // no validation rules for MaxItems
+ }
+
+ if len(errors) > 0 {
+ return RepeatedRulesMultiError(errors)
+ }
+
+ return nil
+}
+
+// RepeatedRulesMultiError is an error wrapping multiple validation errors
+// returned by RepeatedRules.ValidateAll() if the designated constraints
+// aren't met.
+type RepeatedRulesMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RepeatedRulesMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RepeatedRulesMultiError) AllErrors() []error { return m }
+
+// RepeatedRulesValidationError is the validation error returned by
+// RepeatedRules.Validate if the designated constraints aren't met.
+type RepeatedRulesValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RepeatedRulesValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RepeatedRulesValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RepeatedRulesValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RepeatedRulesValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RepeatedRulesValidationError) ErrorName() string { return "RepeatedRulesValidationError" }
+
+// Error satisfies the builtin error interface
+func (e RepeatedRulesValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRepeatedRules.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RepeatedRulesValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RepeatedRulesValidationError{}
+
+// Validate checks the field values on RepeatedStringRules with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *RepeatedStringRules) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RepeatedStringRules with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// RepeatedStringRulesMultiError, or nil if none found.
+func (m *RepeatedStringRules) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RepeatedStringRules) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Unique
+
+ if all {
+ switch v := interface{}(m.GetItemRules()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RepeatedStringRulesValidationError{
+ field: "ItemRules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RepeatedStringRulesValidationError{
+ field: "ItemRules",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetItemRules()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RepeatedStringRulesValidationError{
+ field: "ItemRules",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for ValidateEmpty
+
+ // no validation rules for IsRequired
+
+ if m.MinItems != nil {
+ // no validation rules for MinItems
+ }
+
+ if m.MaxItems != nil {
+ // no validation rules for MaxItems
+ }
+
+ if len(errors) > 0 {
+ return RepeatedStringRulesMultiError(errors)
+ }
+
+ return nil
+}
+
+// RepeatedStringRulesMultiError is an error wrapping multiple validation
+// errors returned by RepeatedStringRules.ValidateAll() if the designated
+// constraints aren't met.
+type RepeatedStringRulesMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RepeatedStringRulesMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RepeatedStringRulesMultiError) AllErrors() []error { return m }
+
+// RepeatedStringRulesValidationError is the validation error returned by
+// RepeatedStringRules.Validate if the designated constraints aren't met.
+type RepeatedStringRulesValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RepeatedStringRulesValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RepeatedStringRulesValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RepeatedStringRulesValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RepeatedStringRulesValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RepeatedStringRulesValidationError) ErrorName() string {
+ return "RepeatedStringRulesValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e RepeatedStringRulesValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRepeatedStringRules.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RepeatedStringRulesValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RepeatedStringRulesValidationError{}
+
+// Validate checks the field values on StringRules with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *StringRules) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StringRules with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in StringRulesMultiError, or
+// nil if none found.
+func (m *StringRules) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StringRules) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for WellKnown
+
+ // no validation rules for ValidateEmpty
+
+ // no validation rules for IsRequired
+
+ if m.Eq != nil {
+ // no validation rules for Eq
+ }
+
+ if m.Len != nil {
+ // no validation rules for Len
+ }
+
+ if m.MinLen != nil {
+ // no validation rules for MinLen
+ }
+
+ if m.MaxLen != nil {
+ // no validation rules for MaxLen
+ }
+
+ if m.Pattern != nil {
+ // no validation rules for Pattern
+ }
+
+ if m.Prefix != nil {
+ // no validation rules for Prefix
+ }
+
+ if m.Suffix != nil {
+ // no validation rules for Suffix
+ }
+
+ if m.Contains != nil {
+ // no validation rules for Contains
+ }
+
+ if m.NotContains != nil {
+ // no validation rules for NotContains
+ }
+
+ if len(errors) > 0 {
+ return StringRulesMultiError(errors)
+ }
+
+ return nil
+}
+
+// StringRulesMultiError is an error wrapping multiple validation errors
+// returned by StringRules.ValidateAll() if the designated constraints aren't met.
+type StringRulesMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StringRulesMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StringRulesMultiError) AllErrors() []error { return m }
+
+// StringRulesValidationError is the validation error returned by
+// StringRules.Validate if the designated constraints aren't met.
+type StringRulesValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StringRulesValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StringRulesValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StringRulesValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StringRulesValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StringRulesValidationError) ErrorName() string { return "StringRulesValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StringRulesValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStringRules.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StringRulesValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StringRulesValidationError{}
+
+// Validate checks the field values on StringMapRules with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *StringMapRules) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StringMapRules with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in StringMapRulesMultiError,
+// or nil if none found.
+func (m *StringMapRules) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StringMapRules) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for ValidateEmpty
+
+ // no validation rules for IsRequired
+
+ if len(errors) > 0 {
+ return StringMapRulesMultiError(errors)
+ }
+
+ return nil
+}
+
+// StringMapRulesMultiError is an error wrapping multiple validation errors
+// returned by StringMapRules.ValidateAll() if the designated constraints
+// aren't met.
+type StringMapRulesMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StringMapRulesMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StringMapRulesMultiError) AllErrors() []error { return m }
+
+// StringMapRulesValidationError is the validation error returned by
+// StringMapRules.Validate if the designated constraints aren't met.
+type StringMapRulesValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StringMapRulesValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StringMapRulesValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StringMapRulesValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StringMapRulesValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StringMapRulesValidationError) ErrorName() string { return "StringMapRulesValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StringMapRulesValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStringMapRules.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StringMapRulesValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StringMapRulesValidationError{}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.go
new file mode 100644
index 00000000..569a555f
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.go
@@ -0,0 +1,881 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.4
+// protoc (unknown)
+// source: c1/connector/v2/action.proto
+
+package v2
+
+import (
+ v1 "github.com/conductorone/baton-sdk/pb/c1/config/v1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type BatonActionStatus int32
+
+const (
+ BatonActionStatus_BATON_ACTION_STATUS_UNSPECIFIED BatonActionStatus = 0
+ BatonActionStatus_BATON_ACTION_STATUS_UNKNOWN BatonActionStatus = 1
+ BatonActionStatus_BATON_ACTION_STATUS_PENDING BatonActionStatus = 2
+ BatonActionStatus_BATON_ACTION_STATUS_RUNNING BatonActionStatus = 3
+ BatonActionStatus_BATON_ACTION_STATUS_COMPLETE BatonActionStatus = 4
+ BatonActionStatus_BATON_ACTION_STATUS_FAILED BatonActionStatus = 5
+)
+
+// Enum value maps for BatonActionStatus.
+var (
+ BatonActionStatus_name = map[int32]string{
+ 0: "BATON_ACTION_STATUS_UNSPECIFIED",
+ 1: "BATON_ACTION_STATUS_UNKNOWN",
+ 2: "BATON_ACTION_STATUS_PENDING",
+ 3: "BATON_ACTION_STATUS_RUNNING",
+ 4: "BATON_ACTION_STATUS_COMPLETE",
+ 5: "BATON_ACTION_STATUS_FAILED",
+ }
+ BatonActionStatus_value = map[string]int32{
+ "BATON_ACTION_STATUS_UNSPECIFIED": 0,
+ "BATON_ACTION_STATUS_UNKNOWN": 1,
+ "BATON_ACTION_STATUS_PENDING": 2,
+ "BATON_ACTION_STATUS_RUNNING": 3,
+ "BATON_ACTION_STATUS_COMPLETE": 4,
+ "BATON_ACTION_STATUS_FAILED": 5,
+ }
+)
+
+func (x BatonActionStatus) Enum() *BatonActionStatus {
+ p := new(BatonActionStatus)
+ *p = x
+ return p
+}
+
+func (x BatonActionStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (BatonActionStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_c1_connector_v2_action_proto_enumTypes[0].Descriptor()
+}
+
+func (BatonActionStatus) Type() protoreflect.EnumType {
+ return &file_c1_connector_v2_action_proto_enumTypes[0]
+}
+
+func (x BatonActionStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use BatonActionStatus.Descriptor instead.
+func (BatonActionStatus) EnumDescriptor() ([]byte, []int) {
+ return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{0}
+}
+
+type BatonActionSchema struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Arguments []*v1.Field `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"`
+ Constraints []*v1.Constraint `protobuf:"bytes,3,rep,name=constraints,proto3" json:"constraints,omitempty"`
+ ReturnTypes []*v1.Field `protobuf:"bytes,4,rep,name=return_types,json=returnTypes,proto3" json:"return_types,omitempty"`
+ DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BatonActionSchema) Reset() {
+ *x = BatonActionSchema{}
+ mi := &file_c1_connector_v2_action_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BatonActionSchema) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BatonActionSchema) ProtoMessage() {}
+
+func (x *BatonActionSchema) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_action_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BatonActionSchema.ProtoReflect.Descriptor instead.
+func (*BatonActionSchema) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *BatonActionSchema) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *BatonActionSchema) GetArguments() []*v1.Field {
+ if x != nil {
+ return x.Arguments
+ }
+ return nil
+}
+
+func (x *BatonActionSchema) GetConstraints() []*v1.Constraint {
+ if x != nil {
+ return x.Constraints
+ }
+ return nil
+}
+
+func (x *BatonActionSchema) GetReturnTypes() []*v1.Field {
+ if x != nil {
+ return x.ReturnTypes
+ }
+ return nil
+}
+
+func (x *BatonActionSchema) GetDisplayName() string {
+ if x != nil {
+ return x.DisplayName
+ }
+ return ""
+}
+
+func (x *BatonActionSchema) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+type InvokeActionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Args *structpb.Struct `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *InvokeActionRequest) Reset() {
+ *x = InvokeActionRequest{}
+ mi := &file_c1_connector_v2_action_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *InvokeActionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InvokeActionRequest) ProtoMessage() {}
+
+func (x *InvokeActionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_action_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InvokeActionRequest.ProtoReflect.Descriptor instead.
+func (*InvokeActionRequest) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *InvokeActionRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *InvokeActionRequest) GetArgs() *structpb.Struct {
+ if x != nil {
+ return x.Args
+ }
+ return nil
+}
+
+func (x *InvokeActionRequest) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type InvokeActionResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Status BatonActionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=c1.connector.v2.BatonActionStatus" json:"status,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Response *structpb.Struct `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"`
+ Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *InvokeActionResponse) Reset() {
+ *x = InvokeActionResponse{}
+ mi := &file_c1_connector_v2_action_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *InvokeActionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InvokeActionResponse) ProtoMessage() {}
+
+func (x *InvokeActionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_action_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InvokeActionResponse.ProtoReflect.Descriptor instead.
+func (*InvokeActionResponse) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *InvokeActionResponse) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *InvokeActionResponse) GetStatus() BatonActionStatus {
+ if x != nil {
+ return x.Status
+ }
+ return BatonActionStatus_BATON_ACTION_STATUS_UNSPECIFIED
+}
+
+func (x *InvokeActionResponse) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+func (x *InvokeActionResponse) GetResponse() *structpb.Struct {
+ if x != nil {
+ return x.Response
+ }
+ return nil
+}
+
+func (x *InvokeActionResponse) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type GetActionStatusRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Deprecated: Marked as deprecated in c1/connector/v2/action.proto.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetActionStatusRequest) Reset() {
+ *x = GetActionStatusRequest{}
+ mi := &file_c1_connector_v2_action_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetActionStatusRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetActionStatusRequest) ProtoMessage() {}
+
+func (x *GetActionStatusRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_action_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetActionStatusRequest.ProtoReflect.Descriptor instead.
+func (*GetActionStatusRequest) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{3}
+}
+
+// Deprecated: Marked as deprecated in c1/connector/v2/action.proto.
+func (x *GetActionStatusRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *GetActionStatusRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *GetActionStatusRequest) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type GetActionStatusResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+ Status BatonActionStatus `protobuf:"varint,3,opt,name=status,proto3,enum=c1.connector.v2.BatonActionStatus" json:"status,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Response *structpb.Struct `protobuf:"bytes,5,opt,name=response,proto3" json:"response,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetActionStatusResponse) Reset() {
+ *x = GetActionStatusResponse{}
+ mi := &file_c1_connector_v2_action_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetActionStatusResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetActionStatusResponse) ProtoMessage() {}
+
+func (x *GetActionStatusResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_action_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetActionStatusResponse.ProtoReflect.Descriptor instead.
+func (*GetActionStatusResponse) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *GetActionStatusResponse) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *GetActionStatusResponse) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *GetActionStatusResponse) GetStatus() BatonActionStatus {
+ if x != nil {
+ return x.Status
+ }
+ return BatonActionStatus_BATON_ACTION_STATUS_UNSPECIFIED
+}
+
+func (x *GetActionStatusResponse) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+func (x *GetActionStatusResponse) GetResponse() *structpb.Struct {
+ if x != nil {
+ return x.Response
+ }
+ return nil
+}
+
+type GetActionSchemaRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetActionSchemaRequest) Reset() {
+ *x = GetActionSchemaRequest{}
+ mi := &file_c1_connector_v2_action_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetActionSchemaRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetActionSchemaRequest) ProtoMessage() {}
+
+func (x *GetActionSchemaRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_action_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetActionSchemaRequest.ProtoReflect.Descriptor instead.
+func (*GetActionSchemaRequest) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *GetActionSchemaRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *GetActionSchemaRequest) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type GetActionSchemaResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Schema *BatonActionSchema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetActionSchemaResponse) Reset() {
+ *x = GetActionSchemaResponse{}
+ mi := &file_c1_connector_v2_action_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetActionSchemaResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetActionSchemaResponse) ProtoMessage() {}
+
+func (x *GetActionSchemaResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_action_proto_msgTypes[6]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetActionSchemaResponse.ProtoReflect.Descriptor instead.
+func (*GetActionSchemaResponse) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *GetActionSchemaResponse) GetSchema() *BatonActionSchema {
+ if x != nil {
+ return x.Schema
+ }
+ return nil
+}
+
+func (x *GetActionSchemaResponse) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type ListActionSchemasRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ListActionSchemasRequest) Reset() {
+ *x = ListActionSchemasRequest{}
+ mi := &file_c1_connector_v2_action_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ListActionSchemasRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListActionSchemasRequest) ProtoMessage() {}
+
+func (x *ListActionSchemasRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_action_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListActionSchemasRequest.ProtoReflect.Descriptor instead.
+func (*ListActionSchemasRequest) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *ListActionSchemasRequest) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type ListActionSchemasResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Schemas []*BatonActionSchema `protobuf:"bytes,1,rep,name=schemas,proto3" json:"schemas,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ListActionSchemasResponse) Reset() {
+ *x = ListActionSchemasResponse{}
+ mi := &file_c1_connector_v2_action_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ListActionSchemasResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListActionSchemasResponse) ProtoMessage() {}
+
+func (x *ListActionSchemasResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_action_proto_msgTypes[8]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListActionSchemasResponse.ProtoReflect.Descriptor instead.
+func (*ListActionSchemasResponse) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *ListActionSchemasResponse) GetSchemas() []*BatonActionSchema {
+ if x != nil {
+ return x.Schemas
+ }
+ return nil
+}
+
+func (x *ListActionSchemasResponse) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+var File_c1_connector_v2_action_proto protoreflect.FileDescriptor
+
+var file_c1_connector_v2_action_proto_rawDesc = string([]byte{
+ 0x0a, 0x1c, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
+ 0x32, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a,
+ 0x19, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x02, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a,
+ 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x13, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e,
+ 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x12, 0x3a, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18,
+ 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52,
+ 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x0c,
+ 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76,
+ 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54,
+ 0x79, 0x70, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70,
+ 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x49, 0x6e,
+ 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x61, 0x72,
+ 0x67, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe3, 0x01, 0x0a, 0x14, 0x49,
+ 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
+ 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75,
+ 0x63, 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x22, 0x78, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
+ 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x17, 0x47,
+ 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74,
+ 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x74,
+ 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06,
+ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
+ 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33,
+ 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x64, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x17, 0x47, 0x65,
+ 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x18, 0x4c, 0x69, 0x73,
+ 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
+ 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x91, 0x01,
+ 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x73,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42,
+ 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,
+ 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2a, 0xdd, 0x01, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x42, 0x41, 0x54, 0x4f, 0x4e,
+ 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55,
+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b,
+ 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41,
+ 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x12, 0x1f, 0x0a,
+ 0x1b, 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54,
+ 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1f,
+ 0x0a, 0x1b, 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53,
+ 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12,
+ 0x20, 0x0a, 0x1c, 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
+ 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10,
+ 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f,
+ 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10,
+ 0x05, 0x32, 0xa4, 0x03, 0x0a, 0x0d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x76, 0x6f,
+ 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x64, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47,
+ 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x11,
+ 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,
+ 0x73, 0x12, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c,
+ 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72,
+ 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62,
+ 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
+
+var (
+ file_c1_connector_v2_action_proto_rawDescOnce sync.Once
+ file_c1_connector_v2_action_proto_rawDescData []byte
+)
+
+func file_c1_connector_v2_action_proto_rawDescGZIP() []byte {
+ file_c1_connector_v2_action_proto_rawDescOnce.Do(func() {
+ file_c1_connector_v2_action_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_action_proto_rawDesc), len(file_c1_connector_v2_action_proto_rawDesc)))
+ })
+ return file_c1_connector_v2_action_proto_rawDescData
+}
+
+var file_c1_connector_v2_action_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_c1_connector_v2_action_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
+var file_c1_connector_v2_action_proto_goTypes = []any{
+ (BatonActionStatus)(0), // 0: c1.connector.v2.BatonActionStatus
+ (*BatonActionSchema)(nil), // 1: c1.connector.v2.BatonActionSchema
+ (*InvokeActionRequest)(nil), // 2: c1.connector.v2.InvokeActionRequest
+ (*InvokeActionResponse)(nil), // 3: c1.connector.v2.InvokeActionResponse
+ (*GetActionStatusRequest)(nil), // 4: c1.connector.v2.GetActionStatusRequest
+ (*GetActionStatusResponse)(nil), // 5: c1.connector.v2.GetActionStatusResponse
+ (*GetActionSchemaRequest)(nil), // 6: c1.connector.v2.GetActionSchemaRequest
+ (*GetActionSchemaResponse)(nil), // 7: c1.connector.v2.GetActionSchemaResponse
+ (*ListActionSchemasRequest)(nil), // 8: c1.connector.v2.ListActionSchemasRequest
+ (*ListActionSchemasResponse)(nil), // 9: c1.connector.v2.ListActionSchemasResponse
+ (*v1.Field)(nil), // 10: c1.config.v1.Field
+ (*v1.Constraint)(nil), // 11: c1.config.v1.Constraint
+ (*structpb.Struct)(nil), // 12: google.protobuf.Struct
+ (*anypb.Any)(nil), // 13: google.protobuf.Any
+}
+var file_c1_connector_v2_action_proto_depIdxs = []int32{
+ 10, // 0: c1.connector.v2.BatonActionSchema.arguments:type_name -> c1.config.v1.Field
+ 11, // 1: c1.connector.v2.BatonActionSchema.constraints:type_name -> c1.config.v1.Constraint
+ 10, // 2: c1.connector.v2.BatonActionSchema.return_types:type_name -> c1.config.v1.Field
+ 12, // 3: c1.connector.v2.InvokeActionRequest.args:type_name -> google.protobuf.Struct
+ 13, // 4: c1.connector.v2.InvokeActionRequest.annotations:type_name -> google.protobuf.Any
+ 0, // 5: c1.connector.v2.InvokeActionResponse.status:type_name -> c1.connector.v2.BatonActionStatus
+ 13, // 6: c1.connector.v2.InvokeActionResponse.annotations:type_name -> google.protobuf.Any
+ 12, // 7: c1.connector.v2.InvokeActionResponse.response:type_name -> google.protobuf.Struct
+ 13, // 8: c1.connector.v2.GetActionStatusRequest.annotations:type_name -> google.protobuf.Any
+ 0, // 9: c1.connector.v2.GetActionStatusResponse.status:type_name -> c1.connector.v2.BatonActionStatus
+ 13, // 10: c1.connector.v2.GetActionStatusResponse.annotations:type_name -> google.protobuf.Any
+ 12, // 11: c1.connector.v2.GetActionStatusResponse.response:type_name -> google.protobuf.Struct
+ 13, // 12: c1.connector.v2.GetActionSchemaRequest.annotations:type_name -> google.protobuf.Any
+ 1, // 13: c1.connector.v2.GetActionSchemaResponse.schema:type_name -> c1.connector.v2.BatonActionSchema
+ 13, // 14: c1.connector.v2.GetActionSchemaResponse.annotations:type_name -> google.protobuf.Any
+ 13, // 15: c1.connector.v2.ListActionSchemasRequest.annotations:type_name -> google.protobuf.Any
+ 1, // 16: c1.connector.v2.ListActionSchemasResponse.schemas:type_name -> c1.connector.v2.BatonActionSchema
+ 13, // 17: c1.connector.v2.ListActionSchemasResponse.annotations:type_name -> google.protobuf.Any
+ 2, // 18: c1.connector.v2.ActionService.InvokeAction:input_type -> c1.connector.v2.InvokeActionRequest
+ 4, // 19: c1.connector.v2.ActionService.GetActionStatus:input_type -> c1.connector.v2.GetActionStatusRequest
+ 6, // 20: c1.connector.v2.ActionService.GetActionSchema:input_type -> c1.connector.v2.GetActionSchemaRequest
+ 8, // 21: c1.connector.v2.ActionService.ListActionSchemas:input_type -> c1.connector.v2.ListActionSchemasRequest
+ 3, // 22: c1.connector.v2.ActionService.InvokeAction:output_type -> c1.connector.v2.InvokeActionResponse
+ 5, // 23: c1.connector.v2.ActionService.GetActionStatus:output_type -> c1.connector.v2.GetActionStatusResponse
+ 7, // 24: c1.connector.v2.ActionService.GetActionSchema:output_type -> c1.connector.v2.GetActionSchemaResponse
+ 9, // 25: c1.connector.v2.ActionService.ListActionSchemas:output_type -> c1.connector.v2.ListActionSchemasResponse
+ 22, // [22:26] is the sub-list for method output_type
+ 18, // [18:22] is the sub-list for method input_type
+ 18, // [18:18] is the sub-list for extension type_name
+ 18, // [18:18] is the sub-list for extension extendee
+ 0, // [0:18] is the sub-list for field type_name
+}
+
+func init() { file_c1_connector_v2_action_proto_init() }
+func file_c1_connector_v2_action_proto_init() {
+ if File_c1_connector_v2_action_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_action_proto_rawDesc), len(file_c1_connector_v2_action_proto_rawDesc)),
+ NumEnums: 1,
+ NumMessages: 9,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_c1_connector_v2_action_proto_goTypes,
+ DependencyIndexes: file_c1_connector_v2_action_proto_depIdxs,
+ EnumInfos: file_c1_connector_v2_action_proto_enumTypes,
+ MessageInfos: file_c1_connector_v2_action_proto_msgTypes,
+ }.Build()
+ File_c1_connector_v2_action_proto = out.File
+ file_c1_connector_v2_action_proto_goTypes = nil
+ file_c1_connector_v2_action_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.validate.go
new file mode 100644
index 00000000..590b0616
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.validate.go
@@ -0,0 +1,1504 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: c1/connector/v2/action.proto
+
+package v2
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on BatonActionSchema with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *BatonActionSchema) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BatonActionSchema with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// BatonActionSchemaMultiError, or nil if none found.
+func (m *BatonActionSchema) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BatonActionSchema) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ for idx, item := range m.GetArguments() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BatonActionSchemaValidationError{
+ field: fmt.Sprintf("Arguments[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BatonActionSchemaValidationError{
+ field: fmt.Sprintf("Arguments[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BatonActionSchemaValidationError{
+ field: fmt.Sprintf("Arguments[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetConstraints() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BatonActionSchemaValidationError{
+ field: fmt.Sprintf("Constraints[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BatonActionSchemaValidationError{
+ field: fmt.Sprintf("Constraints[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BatonActionSchemaValidationError{
+ field: fmt.Sprintf("Constraints[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetReturnTypes() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BatonActionSchemaValidationError{
+ field: fmt.Sprintf("ReturnTypes[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BatonActionSchemaValidationError{
+ field: fmt.Sprintf("ReturnTypes[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BatonActionSchemaValidationError{
+ field: fmt.Sprintf("ReturnTypes[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for DisplayName
+
+ // no validation rules for Description
+
+ if len(errors) > 0 {
+ return BatonActionSchemaMultiError(errors)
+ }
+
+ return nil
+}
+
+// BatonActionSchemaMultiError is an error wrapping multiple validation errors
+// returned by BatonActionSchema.ValidateAll() if the designated constraints
+// aren't met.
+type BatonActionSchemaMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BatonActionSchemaMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BatonActionSchemaMultiError) AllErrors() []error { return m }
+
+// BatonActionSchemaValidationError is the validation error returned by
+// BatonActionSchema.Validate if the designated constraints aren't met.
+type BatonActionSchemaValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BatonActionSchemaValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BatonActionSchemaValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BatonActionSchemaValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BatonActionSchemaValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BatonActionSchemaValidationError) ErrorName() string {
+ return "BatonActionSchemaValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e BatonActionSchemaValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sBatonActionSchema.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BatonActionSchemaValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BatonActionSchemaValidationError{}
+
+// Validate checks the field values on InvokeActionRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *InvokeActionRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on InvokeActionRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// InvokeActionRequestMultiError, or nil if none found.
+func (m *InvokeActionRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *InvokeActionRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ if all {
+ switch v := interface{}(m.GetArgs()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, InvokeActionRequestValidationError{
+ field: "Args",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, InvokeActionRequestValidationError{
+ field: "Args",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetArgs()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return InvokeActionRequestValidationError{
+ field: "Args",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, InvokeActionRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, InvokeActionRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return InvokeActionRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return InvokeActionRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// InvokeActionRequestMultiError is an error wrapping multiple validation
+// errors returned by InvokeActionRequest.ValidateAll() if the designated
+// constraints aren't met.
+type InvokeActionRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m InvokeActionRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m InvokeActionRequestMultiError) AllErrors() []error { return m }
+
+// InvokeActionRequestValidationError is the validation error returned by
+// InvokeActionRequest.Validate if the designated constraints aren't met.
+type InvokeActionRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e InvokeActionRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e InvokeActionRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e InvokeActionRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e InvokeActionRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e InvokeActionRequestValidationError) ErrorName() string {
+ return "InvokeActionRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e InvokeActionRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sInvokeActionRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = InvokeActionRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = InvokeActionRequestValidationError{}
+
+// Validate checks the field values on InvokeActionResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *InvokeActionResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on InvokeActionResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// InvokeActionResponseMultiError, or nil if none found.
+func (m *InvokeActionResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *InvokeActionResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Id
+
+ // no validation rules for Status
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, InvokeActionResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, InvokeActionResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return InvokeActionResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetResponse()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, InvokeActionResponseValidationError{
+ field: "Response",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, InvokeActionResponseValidationError{
+ field: "Response",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return InvokeActionResponseValidationError{
+ field: "Response",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Name
+
+ if len(errors) > 0 {
+ return InvokeActionResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// InvokeActionResponseMultiError is an error wrapping multiple validation
+// errors returned by InvokeActionResponse.ValidateAll() if the designated
+// constraints aren't met.
+type InvokeActionResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m InvokeActionResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m InvokeActionResponseMultiError) AllErrors() []error { return m }
+
+// InvokeActionResponseValidationError is the validation error returned by
+// InvokeActionResponse.Validate if the designated constraints aren't met.
+type InvokeActionResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e InvokeActionResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e InvokeActionResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e InvokeActionResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e InvokeActionResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e InvokeActionResponseValidationError) ErrorName() string {
+ return "InvokeActionResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e InvokeActionResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sInvokeActionResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = InvokeActionResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = InvokeActionResponseValidationError{}
+
+// Validate checks the field values on GetActionStatusRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *GetActionStatusRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GetActionStatusRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// GetActionStatusRequestMultiError, or nil if none found.
+func (m *GetActionStatusRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GetActionStatusRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Id
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GetActionStatusRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GetActionStatusRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GetActionStatusRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return GetActionStatusRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// GetActionStatusRequestMultiError is an error wrapping multiple validation
+// errors returned by GetActionStatusRequest.ValidateAll() if the designated
+// constraints aren't met.
+type GetActionStatusRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GetActionStatusRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m GetActionStatusRequestMultiError) AllErrors() []error { return m }
+
+// GetActionStatusRequestValidationError is the validation error returned by
+// GetActionStatusRequest.Validate if the designated constraints aren't met.
+type GetActionStatusRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GetActionStatusRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GetActionStatusRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GetActionStatusRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GetActionStatusRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GetActionStatusRequestValidationError) ErrorName() string {
+ return "GetActionStatusRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GetActionStatusRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sGetActionStatusRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GetActionStatusRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GetActionStatusRequestValidationError{}
+
+// Validate checks the field values on GetActionStatusResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *GetActionStatusResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GetActionStatusResponse with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// GetActionStatusResponseMultiError, or nil if none found.
+func (m *GetActionStatusResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GetActionStatusResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Id
+
+ // no validation rules for Status
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GetActionStatusResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GetActionStatusResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GetActionStatusResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetResponse()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GetActionStatusResponseValidationError{
+ field: "Response",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GetActionStatusResponseValidationError{
+ field: "Response",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GetActionStatusResponseValidationError{
+ field: "Response",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return GetActionStatusResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// GetActionStatusResponseMultiError is an error wrapping multiple validation
+// errors returned by GetActionStatusResponse.ValidateAll() if the designated
+// constraints aren't met.
+type GetActionStatusResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GetActionStatusResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m GetActionStatusResponseMultiError) AllErrors() []error { return m }
+
+// GetActionStatusResponseValidationError is the validation error returned by
+// GetActionStatusResponse.Validate if the designated constraints aren't met.
+type GetActionStatusResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GetActionStatusResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GetActionStatusResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GetActionStatusResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GetActionStatusResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GetActionStatusResponseValidationError) ErrorName() string {
+ return "GetActionStatusResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GetActionStatusResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sGetActionStatusResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GetActionStatusResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GetActionStatusResponseValidationError{}
+
+// Validate checks the field values on GetActionSchemaRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *GetActionSchemaRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GetActionSchemaRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// GetActionSchemaRequestMultiError, or nil if none found.
+func (m *GetActionSchemaRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GetActionSchemaRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GetActionSchemaRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GetActionSchemaRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GetActionSchemaRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return GetActionSchemaRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// GetActionSchemaRequestMultiError is an error wrapping multiple validation
+// errors returned by GetActionSchemaRequest.ValidateAll() if the designated
+// constraints aren't met.
+type GetActionSchemaRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GetActionSchemaRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m GetActionSchemaRequestMultiError) AllErrors() []error { return m }
+
+// GetActionSchemaRequestValidationError is the validation error returned by
+// GetActionSchemaRequest.Validate if the designated constraints aren't met.
+type GetActionSchemaRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GetActionSchemaRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GetActionSchemaRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GetActionSchemaRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GetActionSchemaRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GetActionSchemaRequestValidationError) ErrorName() string {
+ return "GetActionSchemaRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GetActionSchemaRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sGetActionSchemaRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GetActionSchemaRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GetActionSchemaRequestValidationError{}
+
+// Validate checks the field values on GetActionSchemaResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *GetActionSchemaResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GetActionSchemaResponse with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// GetActionSchemaResponseMultiError, or nil if none found.
+func (m *GetActionSchemaResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GetActionSchemaResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetSchema()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GetActionSchemaResponseValidationError{
+ field: "Schema",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GetActionSchemaResponseValidationError{
+ field: "Schema",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSchema()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GetActionSchemaResponseValidationError{
+ field: "Schema",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GetActionSchemaResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GetActionSchemaResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GetActionSchemaResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return GetActionSchemaResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// GetActionSchemaResponseMultiError is an error wrapping multiple validation
+// errors returned by GetActionSchemaResponse.ValidateAll() if the designated
+// constraints aren't met.
+type GetActionSchemaResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GetActionSchemaResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m GetActionSchemaResponseMultiError) AllErrors() []error { return m }
+
+// GetActionSchemaResponseValidationError is the validation error returned by
+// GetActionSchemaResponse.Validate if the designated constraints aren't met.
+type GetActionSchemaResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GetActionSchemaResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GetActionSchemaResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GetActionSchemaResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GetActionSchemaResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GetActionSchemaResponseValidationError) ErrorName() string {
+ return "GetActionSchemaResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GetActionSchemaResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sGetActionSchemaResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GetActionSchemaResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GetActionSchemaResponseValidationError{}
+
+// Validate checks the field values on ListActionSchemasRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ListActionSchemasRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ListActionSchemasRequest with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ListActionSchemasRequestMultiError, or nil if none found.
+func (m *ListActionSchemasRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ListActionSchemasRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ListActionSchemasRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ListActionSchemasRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ListActionSchemasRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ListActionSchemasRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ListActionSchemasRequestMultiError is an error wrapping multiple validation
+// errors returned by ListActionSchemasRequest.ValidateAll() if the designated
+// constraints aren't met.
+type ListActionSchemasRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ListActionSchemasRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ListActionSchemasRequestMultiError) AllErrors() []error { return m }
+
+// ListActionSchemasRequestValidationError is the validation error returned by
+// ListActionSchemasRequest.Validate if the designated constraints aren't met.
+type ListActionSchemasRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ListActionSchemasRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ListActionSchemasRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ListActionSchemasRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ListActionSchemasRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ListActionSchemasRequestValidationError) ErrorName() string {
+ return "ListActionSchemasRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ListActionSchemasRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sListActionSchemasRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ListActionSchemasRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ListActionSchemasRequestValidationError{}
+
+// Validate checks the field values on ListActionSchemasResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ListActionSchemasResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ListActionSchemasResponse with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ListActionSchemasResponseMultiError, or nil if none found.
+func (m *ListActionSchemasResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ListActionSchemasResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetSchemas() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ListActionSchemasResponseValidationError{
+ field: fmt.Sprintf("Schemas[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ListActionSchemasResponseValidationError{
+ field: fmt.Sprintf("Schemas[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ListActionSchemasResponseValidationError{
+ field: fmt.Sprintf("Schemas[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ListActionSchemasResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ListActionSchemasResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ListActionSchemasResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ListActionSchemasResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ListActionSchemasResponseMultiError is an error wrapping multiple validation
+// errors returned by ListActionSchemasResponse.ValidateAll() if the
+// designated constraints aren't met.
+type ListActionSchemasResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ListActionSchemasResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ListActionSchemasResponseMultiError) AllErrors() []error { return m }
+
+// ListActionSchemasResponseValidationError is the validation error returned by
+// ListActionSchemasResponse.Validate if the designated constraints aren't met.
+type ListActionSchemasResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ListActionSchemasResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ListActionSchemasResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ListActionSchemasResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ListActionSchemasResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ListActionSchemasResponseValidationError) ErrorName() string {
+ return "ListActionSchemasResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ListActionSchemasResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sListActionSchemasResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ListActionSchemasResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ListActionSchemasResponseValidationError{}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action_grpc.pb.go
new file mode 100644
index 00000000..3600a529
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action_grpc.pb.go
@@ -0,0 +1,233 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc (unknown)
+// source: c1/connector/v2/action.proto
+
+package v2
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ ActionService_InvokeAction_FullMethodName = "/c1.connector.v2.ActionService/InvokeAction"
+ ActionService_GetActionStatus_FullMethodName = "/c1.connector.v2.ActionService/GetActionStatus"
+ ActionService_GetActionSchema_FullMethodName = "/c1.connector.v2.ActionService/GetActionSchema"
+ ActionService_ListActionSchemas_FullMethodName = "/c1.connector.v2.ActionService/ListActionSchemas"
+)
+
+// ActionServiceClient is the client API for ActionService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type ActionServiceClient interface {
+ InvokeAction(ctx context.Context, in *InvokeActionRequest, opts ...grpc.CallOption) (*InvokeActionResponse, error)
+ GetActionStatus(ctx context.Context, in *GetActionStatusRequest, opts ...grpc.CallOption) (*GetActionStatusResponse, error)
+ GetActionSchema(ctx context.Context, in *GetActionSchemaRequest, opts ...grpc.CallOption) (*GetActionSchemaResponse, error)
+ ListActionSchemas(ctx context.Context, in *ListActionSchemasRequest, opts ...grpc.CallOption) (*ListActionSchemasResponse, error)
+}
+
+type actionServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewActionServiceClient(cc grpc.ClientConnInterface) ActionServiceClient {
+ return &actionServiceClient{cc}
+}
+
+func (c *actionServiceClient) InvokeAction(ctx context.Context, in *InvokeActionRequest, opts ...grpc.CallOption) (*InvokeActionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(InvokeActionResponse)
+ err := c.cc.Invoke(ctx, ActionService_InvokeAction_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *actionServiceClient) GetActionStatus(ctx context.Context, in *GetActionStatusRequest, opts ...grpc.CallOption) (*GetActionStatusResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(GetActionStatusResponse)
+ err := c.cc.Invoke(ctx, ActionService_GetActionStatus_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *actionServiceClient) GetActionSchema(ctx context.Context, in *GetActionSchemaRequest, opts ...grpc.CallOption) (*GetActionSchemaResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(GetActionSchemaResponse)
+ err := c.cc.Invoke(ctx, ActionService_GetActionSchema_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *actionServiceClient) ListActionSchemas(ctx context.Context, in *ListActionSchemasRequest, opts ...grpc.CallOption) (*ListActionSchemasResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ListActionSchemasResponse)
+ err := c.cc.Invoke(ctx, ActionService_ListActionSchemas_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// ActionServiceServer is the server API for ActionService service.
+// All implementations should embed UnimplementedActionServiceServer
+// for forward compatibility.
+type ActionServiceServer interface {
+ InvokeAction(context.Context, *InvokeActionRequest) (*InvokeActionResponse, error)
+ GetActionStatus(context.Context, *GetActionStatusRequest) (*GetActionStatusResponse, error)
+ GetActionSchema(context.Context, *GetActionSchemaRequest) (*GetActionSchemaResponse, error)
+ ListActionSchemas(context.Context, *ListActionSchemasRequest) (*ListActionSchemasResponse, error)
+}
+
+// UnimplementedActionServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedActionServiceServer struct{}
+
+func (UnimplementedActionServiceServer) InvokeAction(context.Context, *InvokeActionRequest) (*InvokeActionResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method InvokeAction not implemented")
+}
+func (UnimplementedActionServiceServer) GetActionStatus(context.Context, *GetActionStatusRequest) (*GetActionStatusResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetActionStatus not implemented")
+}
+func (UnimplementedActionServiceServer) GetActionSchema(context.Context, *GetActionSchemaRequest) (*GetActionSchemaResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetActionSchema not implemented")
+}
+func (UnimplementedActionServiceServer) ListActionSchemas(context.Context, *ListActionSchemasRequest) (*ListActionSchemasResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListActionSchemas not implemented")
+}
+func (UnimplementedActionServiceServer) testEmbeddedByValue() {}
+
+// UnsafeActionServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to ActionServiceServer will
+// result in compilation errors.
+type UnsafeActionServiceServer interface {
+ mustEmbedUnimplementedActionServiceServer()
+}
+
+func RegisterActionServiceServer(s grpc.ServiceRegistrar, srv ActionServiceServer) {
+ // If the following call pancis, it indicates UnimplementedActionServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&ActionService_ServiceDesc, srv)
+}
+
+func _ActionService_InvokeAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(InvokeActionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ActionServiceServer).InvokeAction(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ActionService_InvokeAction_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ActionServiceServer).InvokeAction(ctx, req.(*InvokeActionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ActionService_GetActionStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetActionStatusRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ActionServiceServer).GetActionStatus(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ActionService_GetActionStatus_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ActionServiceServer).GetActionStatus(ctx, req.(*GetActionStatusRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ActionService_GetActionSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetActionSchemaRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ActionServiceServer).GetActionSchema(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ActionService_GetActionSchema_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ActionServiceServer).GetActionSchema(ctx, req.(*GetActionSchemaRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ActionService_ListActionSchemas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListActionSchemasRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ActionServiceServer).ListActionSchemas(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ActionService_ListActionSchemas_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ActionServiceServer).ListActionSchemas(ctx, req.(*ListActionSchemasRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// ActionService_ServiceDesc is the grpc.ServiceDesc for ActionService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ActionService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "c1.connector.v2.ActionService",
+ HandlerType: (*ActionServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "InvokeAction",
+ Handler: _ActionService_InvokeAction_Handler,
+ },
+ {
+ MethodName: "GetActionStatus",
+ Handler: _ActionService_GetActionStatus_Handler,
+ },
+ {
+ MethodName: "GetActionSchema",
+ Handler: _ActionService_GetActionSchema_Handler,
+ },
+ {
+ MethodName: "ListActionSchemas",
+ Handler: _ActionService_ListActionSchemas_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "c1/connector/v2/action.proto",
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.go
new file mode 100644
index 00000000..0a269afd
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.go
@@ -0,0 +1,247 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.4
+// protoc (unknown)
+// source: c1/connector/v2/annotation_baton_id.proto
+
+package v2
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ExternalResourceMatch struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceType ResourceType_Trait `protobuf:"varint,1,opt,name=resource_type,json=resourceType,proto3,enum=c1.connector.v2.ResourceType_Trait" json:"resource_type,omitempty"`
+ Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
+ Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExternalResourceMatch) Reset() {
+ *x = ExternalResourceMatch{}
+ mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExternalResourceMatch) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExternalResourceMatch) ProtoMessage() {}
+
+func (x *ExternalResourceMatch) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExternalResourceMatch.ProtoReflect.Descriptor instead.
+func (*ExternalResourceMatch) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_annotation_baton_id_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ExternalResourceMatch) GetResourceType() ResourceType_Trait {
+ if x != nil {
+ return x.ResourceType
+ }
+ return ResourceType_TRAIT_UNSPECIFIED
+}
+
+func (x *ExternalResourceMatch) GetKey() string {
+ if x != nil {
+ return x.Key
+ }
+ return ""
+}
+
+func (x *ExternalResourceMatch) GetValue() string {
+ if x != nil {
+ return x.Value
+ }
+ return ""
+}
+
+type ExternalResourceMatchAll struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceType ResourceType_Trait `protobuf:"varint,1,opt,name=resource_type,json=resourceType,proto3,enum=c1.connector.v2.ResourceType_Trait" json:"resource_type,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExternalResourceMatchAll) Reset() {
+ *x = ExternalResourceMatchAll{}
+ mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExternalResourceMatchAll) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExternalResourceMatchAll) ProtoMessage() {}
+
+func (x *ExternalResourceMatchAll) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExternalResourceMatchAll.ProtoReflect.Descriptor instead.
+func (*ExternalResourceMatchAll) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_annotation_baton_id_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ExternalResourceMatchAll) GetResourceType() ResourceType_Trait {
+ if x != nil {
+ return x.ResourceType
+ }
+ return ResourceType_TRAIT_UNSPECIFIED
+}
+
+type BatonID struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BatonID) Reset() {
+ *x = BatonID{}
+ mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BatonID) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BatonID) ProtoMessage() {}
+
+func (x *BatonID) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BatonID.ProtoReflect.Descriptor instead.
+func (*BatonID) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_annotation_baton_id_proto_rawDescGZIP(), []int{2}
+}
+
+var File_c1_connector_v2_annotation_baton_id_proto protoreflect.FileDescriptor
+
+var file_c1_connector_v2_annotation_baton_id_proto_rawDesc = string([]byte{
+ 0x0a, 0x29, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
+ 0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x74,
+ 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x1e, 0x63, 0x31,
+ 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a,
+ 0x15, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x48, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x54, 0x72, 0x61,
+ 0x69, 0x74, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
+ 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
+ 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x64, 0x0a, 0x18, 0x45, 0x78, 0x74, 0x65,
+ 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x41, 0x6c, 0x6c, 0x12, 0x48, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x74,
+ 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x09,
+ 0x0a, 0x07, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x49, 0x44, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f,
+ 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70,
+ 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
+ 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
+
+var (
+ file_c1_connector_v2_annotation_baton_id_proto_rawDescOnce sync.Once
+ file_c1_connector_v2_annotation_baton_id_proto_rawDescData []byte
+)
+
+func file_c1_connector_v2_annotation_baton_id_proto_rawDescGZIP() []byte {
+ file_c1_connector_v2_annotation_baton_id_proto_rawDescOnce.Do(func() {
+ file_c1_connector_v2_annotation_baton_id_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_baton_id_proto_rawDesc), len(file_c1_connector_v2_annotation_baton_id_proto_rawDesc)))
+ })
+ return file_c1_connector_v2_annotation_baton_id_proto_rawDescData
+}
+
+var file_c1_connector_v2_annotation_baton_id_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_c1_connector_v2_annotation_baton_id_proto_goTypes = []any{
+ (*ExternalResourceMatch)(nil), // 0: c1.connector.v2.ExternalResourceMatch
+ (*ExternalResourceMatchAll)(nil), // 1: c1.connector.v2.ExternalResourceMatchAll
+ (*BatonID)(nil), // 2: c1.connector.v2.BatonID
+ (ResourceType_Trait)(0), // 3: c1.connector.v2.ResourceType.Trait
+}
+var file_c1_connector_v2_annotation_baton_id_proto_depIdxs = []int32{
+ 3, // 0: c1.connector.v2.ExternalResourceMatch.resource_type:type_name -> c1.connector.v2.ResourceType.Trait
+ 3, // 1: c1.connector.v2.ExternalResourceMatchAll.resource_type:type_name -> c1.connector.v2.ResourceType.Trait
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_c1_connector_v2_annotation_baton_id_proto_init() }
+func file_c1_connector_v2_annotation_baton_id_proto_init() {
+ if File_c1_connector_v2_annotation_baton_id_proto != nil {
+ return
+ }
+ file_c1_connector_v2_resource_proto_init()
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_baton_id_proto_rawDesc), len(file_c1_connector_v2_annotation_baton_id_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_c1_connector_v2_annotation_baton_id_proto_goTypes,
+ DependencyIndexes: file_c1_connector_v2_annotation_baton_id_proto_depIdxs,
+ MessageInfos: file_c1_connector_v2_annotation_baton_id_proto_msgTypes,
+ }.Build()
+ File_c1_connector_v2_annotation_baton_id_proto = out.File
+ file_c1_connector_v2_annotation_baton_id_proto_goTypes = nil
+ file_c1_connector_v2_annotation_baton_id_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.validate.go
new file mode 100644
index 00000000..86294027
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.validate.go
@@ -0,0 +1,346 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: c1/connector/v2/annotation_baton_id.proto
+
+package v2
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on ExternalResourceMatch with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ExternalResourceMatch) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExternalResourceMatch with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ExternalResourceMatchMultiError, or nil if none found.
+func (m *ExternalResourceMatch) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExternalResourceMatch) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for ResourceType
+
+ // no validation rules for Key
+
+ // no validation rules for Value
+
+ if len(errors) > 0 {
+ return ExternalResourceMatchMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExternalResourceMatchMultiError is an error wrapping multiple validation
+// errors returned by ExternalResourceMatch.ValidateAll() if the designated
+// constraints aren't met.
+type ExternalResourceMatchMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExternalResourceMatchMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExternalResourceMatchMultiError) AllErrors() []error { return m }
+
+// ExternalResourceMatchValidationError is the validation error returned by
+// ExternalResourceMatch.Validate if the designated constraints aren't met.
+type ExternalResourceMatchValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExternalResourceMatchValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExternalResourceMatchValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExternalResourceMatchValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExternalResourceMatchValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExternalResourceMatchValidationError) ErrorName() string {
+ return "ExternalResourceMatchValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExternalResourceMatchValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sExternalResourceMatch.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExternalResourceMatchValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExternalResourceMatchValidationError{}
+
+// Validate checks the field values on ExternalResourceMatchAll with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ExternalResourceMatchAll) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExternalResourceMatchAll with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ExternalResourceMatchAllMultiError, or nil if none found.
+func (m *ExternalResourceMatchAll) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExternalResourceMatchAll) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for ResourceType
+
+ if len(errors) > 0 {
+ return ExternalResourceMatchAllMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExternalResourceMatchAllMultiError is an error wrapping multiple validation
+// errors returned by ExternalResourceMatchAll.ValidateAll() if the designated
+// constraints aren't met.
+type ExternalResourceMatchAllMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExternalResourceMatchAllMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExternalResourceMatchAllMultiError) AllErrors() []error { return m }
+
+// ExternalResourceMatchAllValidationError is the validation error returned by
+// ExternalResourceMatchAll.Validate if the designated constraints aren't met.
+type ExternalResourceMatchAllValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExternalResourceMatchAllValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExternalResourceMatchAllValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExternalResourceMatchAllValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExternalResourceMatchAllValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExternalResourceMatchAllValidationError) ErrorName() string {
+ return "ExternalResourceMatchAllValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExternalResourceMatchAllValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sExternalResourceMatchAll.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExternalResourceMatchAllValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExternalResourceMatchAllValidationError{}
+
+// Validate checks the field values on BatonID with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *BatonID) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BatonID with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in BatonIDMultiError, or nil if none found.
+func (m *BatonID) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BatonID) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return BatonIDMultiError(errors)
+ }
+
+ return nil
+}
+
+// BatonIDMultiError is an error wrapping multiple validation errors returned
+// by BatonID.ValidateAll() if the designated constraints aren't met.
+type BatonIDMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BatonIDMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BatonIDMultiError) AllErrors() []error { return m }
+
+// BatonIDValidationError is the validation error returned by BatonID.Validate
+// if the designated constraints aren't met.
+type BatonIDValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BatonIDValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BatonIDValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BatonIDValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BatonIDValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BatonIDValidationError) ErrorName() string { return "BatonIDValidationError" }
+
+// Error satisfies the builtin error interface
+func (e BatonIDValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sBatonID.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BatonIDValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BatonIDValidationError{}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_entitlement.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_entitlement.pb.go
index 7e536816..1abd77fb 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_entitlement.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_entitlement.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/annotation_entitlement.proto
@@ -12,6 +12,7 @@ import (
structpb "google.golang.org/protobuf/types/known/structpb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -22,21 +23,18 @@ const (
)
type EntitlementImmutable struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SourceId string `protobuf:"bytes,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
+ Metadata *structpb.Struct `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
unknownFields protoimpl.UnknownFields
-
- SourceId string `protobuf:"bytes,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
- Metadata *structpb.Struct `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *EntitlementImmutable) Reset() {
*x = EntitlementImmutable{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_entitlement_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_entitlement_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *EntitlementImmutable) String() string {
@@ -47,7 +45,7 @@ func (*EntitlementImmutable) ProtoMessage() {}
func (x *EntitlementImmutable) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_entitlement_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -78,7 +76,7 @@ func (x *EntitlementImmutable) GetMetadata() *structpb.Struct {
var File_c1_connector_v2_annotation_entitlement_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_annotation_entitlement_proto_rawDesc = []byte{
+var file_c1_connector_v2_annotation_entitlement_proto_rawDesc = string([]byte{
0x0a, 0x2c, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74,
0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
@@ -96,22 +94,22 @@ var file_c1_connector_v2_annotation_entitlement_proto_rawDesc = []byte{
0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f,
0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_v2_annotation_entitlement_proto_rawDescOnce sync.Once
- file_c1_connector_v2_annotation_entitlement_proto_rawDescData = file_c1_connector_v2_annotation_entitlement_proto_rawDesc
+ file_c1_connector_v2_annotation_entitlement_proto_rawDescData []byte
)
func file_c1_connector_v2_annotation_entitlement_proto_rawDescGZIP() []byte {
file_c1_connector_v2_annotation_entitlement_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_annotation_entitlement_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_annotation_entitlement_proto_rawDescData)
+ file_c1_connector_v2_annotation_entitlement_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_entitlement_proto_rawDesc), len(file_c1_connector_v2_annotation_entitlement_proto_rawDesc)))
})
return file_c1_connector_v2_annotation_entitlement_proto_rawDescData
}
var file_c1_connector_v2_annotation_entitlement_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_c1_connector_v2_annotation_entitlement_proto_goTypes = []interface{}{
+var file_c1_connector_v2_annotation_entitlement_proto_goTypes = []any{
(*EntitlementImmutable)(nil), // 0: c1.connector.v2.EntitlementImmutable
(*structpb.Struct)(nil), // 1: google.protobuf.Struct
}
@@ -129,25 +127,11 @@ func file_c1_connector_v2_annotation_entitlement_proto_init() {
if File_c1_connector_v2_annotation_entitlement_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_annotation_entitlement_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*EntitlementImmutable); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_annotation_entitlement_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_entitlement_proto_rawDesc), len(file_c1_connector_v2_annotation_entitlement_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -158,7 +142,6 @@ func file_c1_connector_v2_annotation_entitlement_proto_init() {
MessageInfos: file_c1_connector_v2_annotation_entitlement_proto_msgTypes,
}.Build()
File_c1_connector_v2_annotation_entitlement_proto = out.File
- file_c1_connector_v2_annotation_entitlement_proto_rawDesc = nil
file_c1_connector_v2_annotation_entitlement_proto_goTypes = nil
file_c1_connector_v2_annotation_entitlement_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_entitlement.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_entitlement.pb.validate.go
index 189bf53e..9c3e9de7 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_entitlement.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_entitlement.pb.validate.go
@@ -102,7 +102,7 @@ type EntitlementImmutableMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m EntitlementImmutableMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_etag.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_etag.pb.go
index 909ee0a3..939bedd9 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_etag.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_etag.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/annotation_etag.proto
@@ -12,6 +12,7 @@ import (
structpb "google.golang.org/protobuf/types/known/structpb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -22,21 +23,18 @@ const (
)
type ETag struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ EntitlementId string `protobuf:"bytes,2,opt,name=entitlement_id,json=entitlementId,proto3" json:"entitlement_id,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
- EntitlementId string `protobuf:"bytes,2,opt,name=entitlement_id,json=entitlementId,proto3" json:"entitlement_id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ETag) Reset() {
*x = ETag{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_etag_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_etag_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ETag) String() string {
@@ -47,7 +45,7 @@ func (*ETag) ProtoMessage() {}
func (x *ETag) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_etag_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -77,20 +75,17 @@ func (x *ETag) GetEntitlementId() string {
}
type ETagMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Metadata *structpb.Struct `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Metadata *structpb.Struct `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ETagMetadata) Reset() {
*x = ETagMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_etag_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_etag_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ETagMetadata) String() string {
@@ -101,7 +96,7 @@ func (*ETagMetadata) ProtoMessage() {}
func (x *ETagMetadata) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_etag_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -124,20 +119,17 @@ func (x *ETagMetadata) GetMetadata() *structpb.Struct {
}
type ETagMatch struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ EntitlementId string `protobuf:"bytes,1,opt,name=entitlement_id,json=entitlementId,proto3" json:"entitlement_id,omitempty"`
unknownFields protoimpl.UnknownFields
-
- EntitlementId string `protobuf:"bytes,1,opt,name=entitlement_id,json=entitlementId,proto3" json:"entitlement_id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ETagMatch) Reset() {
*x = ETagMatch{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_etag_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_etag_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ETagMatch) String() string {
@@ -148,7 +140,7 @@ func (*ETagMatch) ProtoMessage() {}
func (x *ETagMatch) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_etag_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -172,7 +164,7 @@ func (x *ETagMatch) GetEntitlementId() string {
var File_c1_connector_v2_annotation_etag_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_annotation_etag_proto_rawDesc = []byte{
+var file_c1_connector_v2_annotation_etag_proto_rawDesc = string([]byte{
0x0a, 0x25, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x74, 0x61,
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
@@ -195,22 +187,22 @@ var file_c1_connector_v2_annotation_etag_proto_rawDesc = []byte{
0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f,
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_v2_annotation_etag_proto_rawDescOnce sync.Once
- file_c1_connector_v2_annotation_etag_proto_rawDescData = file_c1_connector_v2_annotation_etag_proto_rawDesc
+ file_c1_connector_v2_annotation_etag_proto_rawDescData []byte
)
func file_c1_connector_v2_annotation_etag_proto_rawDescGZIP() []byte {
file_c1_connector_v2_annotation_etag_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_annotation_etag_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_annotation_etag_proto_rawDescData)
+ file_c1_connector_v2_annotation_etag_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_etag_proto_rawDesc), len(file_c1_connector_v2_annotation_etag_proto_rawDesc)))
})
return file_c1_connector_v2_annotation_etag_proto_rawDescData
}
var file_c1_connector_v2_annotation_etag_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
-var file_c1_connector_v2_annotation_etag_proto_goTypes = []interface{}{
+var file_c1_connector_v2_annotation_etag_proto_goTypes = []any{
(*ETag)(nil), // 0: c1.connector.v2.ETag
(*ETagMetadata)(nil), // 1: c1.connector.v2.ETagMetadata
(*ETagMatch)(nil), // 2: c1.connector.v2.ETagMatch
@@ -230,49 +222,11 @@ func file_c1_connector_v2_annotation_etag_proto_init() {
if File_c1_connector_v2_annotation_etag_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_annotation_etag_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ETag); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_etag_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ETagMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_etag_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ETagMatch); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_annotation_etag_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_etag_proto_rawDesc), len(file_c1_connector_v2_annotation_etag_proto_rawDesc)),
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
@@ -283,7 +237,6 @@ func file_c1_connector_v2_annotation_etag_proto_init() {
MessageInfos: file_c1_connector_v2_annotation_etag_proto_msgTypes,
}.Build()
File_c1_connector_v2_annotation_etag_proto = out.File
- file_c1_connector_v2_annotation_etag_proto_rawDesc = nil
file_c1_connector_v2_annotation_etag_proto_goTypes = nil
file_c1_connector_v2_annotation_etag_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_etag.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_etag.pb.validate.go
index e11de420..9b7e488e 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_etag.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_etag.pb.validate.go
@@ -73,7 +73,7 @@ type ETagMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ETagMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -201,7 +201,7 @@ type ETagMetadataMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ETagMetadataMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -302,7 +302,7 @@ type ETagMatchMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ETagMatchMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_link.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_link.pb.go
index 12f31b3e..65c95579 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_link.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_link.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/annotation_external_link.proto
@@ -12,6 +12,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -22,20 +23,17 @@ const (
)
type ExternalLink struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ExternalLink) Reset() {
*x = ExternalLink{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_external_link_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_external_link_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ExternalLink) String() string {
@@ -46,7 +44,7 @@ func (*ExternalLink) ProtoMessage() {}
func (x *ExternalLink) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_external_link_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -70,7 +68,7 @@ func (x *ExternalLink) GetUrl() string {
var File_c1_connector_v2_annotation_external_link_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_annotation_external_link_proto_rawDesc = []byte{
+var file_c1_connector_v2_annotation_external_link_proto_rawDesc = string([]byte{
0x0a, 0x2e, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
@@ -85,22 +83,22 @@ var file_c1_connector_v2_annotation_external_link_proto_rawDesc = []byte{
0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62,
0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_v2_annotation_external_link_proto_rawDescOnce sync.Once
- file_c1_connector_v2_annotation_external_link_proto_rawDescData = file_c1_connector_v2_annotation_external_link_proto_rawDesc
+ file_c1_connector_v2_annotation_external_link_proto_rawDescData []byte
)
func file_c1_connector_v2_annotation_external_link_proto_rawDescGZIP() []byte {
file_c1_connector_v2_annotation_external_link_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_annotation_external_link_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_annotation_external_link_proto_rawDescData)
+ file_c1_connector_v2_annotation_external_link_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_external_link_proto_rawDesc), len(file_c1_connector_v2_annotation_external_link_proto_rawDesc)))
})
return file_c1_connector_v2_annotation_external_link_proto_rawDescData
}
var file_c1_connector_v2_annotation_external_link_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_c1_connector_v2_annotation_external_link_proto_goTypes = []interface{}{
+var file_c1_connector_v2_annotation_external_link_proto_goTypes = []any{
(*ExternalLink)(nil), // 0: c1.connector.v2.ExternalLink
}
var file_c1_connector_v2_annotation_external_link_proto_depIdxs = []int32{
@@ -116,25 +114,11 @@ func file_c1_connector_v2_annotation_external_link_proto_init() {
if File_c1_connector_v2_annotation_external_link_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_annotation_external_link_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ExternalLink); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_annotation_external_link_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_external_link_proto_rawDesc), len(file_c1_connector_v2_annotation_external_link_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -145,7 +129,6 @@ func file_c1_connector_v2_annotation_external_link_proto_init() {
MessageInfos: file_c1_connector_v2_annotation_external_link_proto_msgTypes,
}.Build()
File_c1_connector_v2_annotation_external_link_proto = out.File
- file_c1_connector_v2_annotation_external_link_proto_rawDesc = nil
file_c1_connector_v2_annotation_external_link_proto_goTypes = nil
file_c1_connector_v2_annotation_external_link_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_link.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_link.pb.validate.go
index 24d1b83c..35c60dd1 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_link.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_link.pb.validate.go
@@ -117,7 +117,7 @@ type ExternalLinkMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ExternalLinkMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.go
index 445884ae..c4d64910 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/annotation_external_ticket.proto
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -21,20 +22,17 @@ const (
)
type ExternalTicketSettings struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ExternalTicketSettings) Reset() {
*x = ExternalTicketSettings{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_external_ticket_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_external_ticket_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ExternalTicketSettings) String() string {
@@ -45,7 +43,7 @@ func (*ExternalTicketSettings) ProtoMessage() {}
func (x *ExternalTicketSettings) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_external_ticket_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -69,7 +67,7 @@ func (x *ExternalTicketSettings) GetEnabled() bool {
var File_c1_connector_v2_annotation_external_ticket_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_annotation_external_ticket_proto_rawDesc = []byte{
+var file_c1_connector_v2_annotation_external_ticket_proto_rawDesc = string([]byte{
0x0a, 0x30, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f,
@@ -82,22 +80,22 @@ var file_c1_connector_v2_annotation_external_ticket_proto_rawDesc = []byte{
0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f,
0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_v2_annotation_external_ticket_proto_rawDescOnce sync.Once
- file_c1_connector_v2_annotation_external_ticket_proto_rawDescData = file_c1_connector_v2_annotation_external_ticket_proto_rawDesc
+ file_c1_connector_v2_annotation_external_ticket_proto_rawDescData []byte
)
func file_c1_connector_v2_annotation_external_ticket_proto_rawDescGZIP() []byte {
file_c1_connector_v2_annotation_external_ticket_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_annotation_external_ticket_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_annotation_external_ticket_proto_rawDescData)
+ file_c1_connector_v2_annotation_external_ticket_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_external_ticket_proto_rawDesc), len(file_c1_connector_v2_annotation_external_ticket_proto_rawDesc)))
})
return file_c1_connector_v2_annotation_external_ticket_proto_rawDescData
}
var file_c1_connector_v2_annotation_external_ticket_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_c1_connector_v2_annotation_external_ticket_proto_goTypes = []interface{}{
+var file_c1_connector_v2_annotation_external_ticket_proto_goTypes = []any{
(*ExternalTicketSettings)(nil), // 0: c1.connector.v2.ExternalTicketSettings
}
var file_c1_connector_v2_annotation_external_ticket_proto_depIdxs = []int32{
@@ -113,25 +111,11 @@ func file_c1_connector_v2_annotation_external_ticket_proto_init() {
if File_c1_connector_v2_annotation_external_ticket_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_annotation_external_ticket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ExternalTicketSettings); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_annotation_external_ticket_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_external_ticket_proto_rawDesc), len(file_c1_connector_v2_annotation_external_ticket_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -142,7 +126,6 @@ func file_c1_connector_v2_annotation_external_ticket_proto_init() {
MessageInfos: file_c1_connector_v2_annotation_external_ticket_proto_msgTypes,
}.Build()
File_c1_connector_v2_annotation_external_ticket_proto = out.File
- file_c1_connector_v2_annotation_external_ticket_proto_rawDesc = nil
file_c1_connector_v2_annotation_external_ticket_proto_goTypes = nil
file_c1_connector_v2_annotation_external_ticket_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.validate.go
index abe6a364..a718090c 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_external_ticket.pb.validate.go
@@ -73,7 +73,7 @@ type ExternalTicketSettingsMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ExternalTicketSettingsMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_grant.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_grant.pb.go
index 85e7febc..b2a5e03e 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_grant.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_grant.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/annotation_grant.proto
@@ -12,6 +12,7 @@ import (
structpb "google.golang.org/protobuf/types/known/structpb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -22,20 +23,17 @@ const (
)
type GrantMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Metadata *structpb.Struct `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Metadata *structpb.Struct `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantMetadata) Reset() {
*x = GrantMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantMetadata) String() string {
@@ -46,7 +44,7 @@ func (*GrantMetadata) ProtoMessage() {}
func (x *GrantMetadata) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -69,22 +67,19 @@ func (x *GrantMetadata) GetMetadata() *structpb.Struct {
}
type GrantExpandable struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- EntitlementIds []string `protobuf:"bytes,1,rep,name=entitlement_ids,json=entitlementIds,proto3" json:"entitlement_ids,omitempty"`
- Shallow bool `protobuf:"varint,2,opt,name=shallow,proto3" json:"shallow,omitempty"`
- ResourceTypeIds []string `protobuf:"bytes,3,rep,name=resource_type_ids,json=resourceTypeIds,proto3" json:"resource_type_ids,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ EntitlementIds []string `protobuf:"bytes,1,rep,name=entitlement_ids,json=entitlementIds,proto3" json:"entitlement_ids,omitempty"`
+ Shallow bool `protobuf:"varint,2,opt,name=shallow,proto3" json:"shallow,omitempty"`
+ ResourceTypeIds []string `protobuf:"bytes,3,rep,name=resource_type_ids,json=resourceTypeIds,proto3" json:"resource_type_ids,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GrantExpandable) Reset() {
*x = GrantExpandable{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantExpandable) String() string {
@@ -95,7 +90,7 @@ func (*GrantExpandable) ProtoMessage() {}
func (x *GrantExpandable) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -133,21 +128,18 @@ func (x *GrantExpandable) GetResourceTypeIds() []string {
// Grant cannot be updated or revoked. For example, membership in an "all users" group.
type GrantImmutable struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SourceId string `protobuf:"bytes,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
+ Metadata *structpb.Struct `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
unknownFields protoimpl.UnknownFields
-
- SourceId string `protobuf:"bytes,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
- Metadata *structpb.Struct `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantImmutable) Reset() {
*x = GrantImmutable{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantImmutable) String() string {
@@ -158,7 +150,7 @@ func (*GrantImmutable) ProtoMessage() {}
func (x *GrantImmutable) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -189,18 +181,16 @@ func (x *GrantImmutable) GetMetadata() *structpb.Struct {
// Grant was not created because the entitlement already existed.
type GrantAlreadyExists struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GrantAlreadyExists) Reset() {
*x = GrantAlreadyExists{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantAlreadyExists) String() string {
@@ -211,7 +201,7 @@ func (*GrantAlreadyExists) ProtoMessage() {}
func (x *GrantAlreadyExists) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -228,18 +218,16 @@ func (*GrantAlreadyExists) Descriptor() ([]byte, []int) {
// Grant was not revoked because the entitlement does not exist.
type GrantAlreadyRevoked struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GrantAlreadyRevoked) Reset() {
*x = GrantAlreadyRevoked{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantAlreadyRevoked) String() string {
@@ -250,7 +238,7 @@ func (*GrantAlreadyRevoked) ProtoMessage() {}
func (x *GrantAlreadyRevoked) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_grant_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -267,7 +255,7 @@ func (*GrantAlreadyRevoked) Descriptor() ([]byte, []int) {
var File_c1_connector_v2_annotation_grant_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_annotation_grant_proto_rawDesc = []byte{
+var file_c1_connector_v2_annotation_grant_proto_rawDesc = string([]byte{
0x0a, 0x26, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x61,
0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
@@ -300,22 +288,22 @@ var file_c1_connector_v2_annotation_grant_proto_rawDesc = []byte{
0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e,
0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
-}
+})
var (
file_c1_connector_v2_annotation_grant_proto_rawDescOnce sync.Once
- file_c1_connector_v2_annotation_grant_proto_rawDescData = file_c1_connector_v2_annotation_grant_proto_rawDesc
+ file_c1_connector_v2_annotation_grant_proto_rawDescData []byte
)
func file_c1_connector_v2_annotation_grant_proto_rawDescGZIP() []byte {
file_c1_connector_v2_annotation_grant_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_annotation_grant_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_annotation_grant_proto_rawDescData)
+ file_c1_connector_v2_annotation_grant_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_grant_proto_rawDesc), len(file_c1_connector_v2_annotation_grant_proto_rawDesc)))
})
return file_c1_connector_v2_annotation_grant_proto_rawDescData
}
var file_c1_connector_v2_annotation_grant_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
-var file_c1_connector_v2_annotation_grant_proto_goTypes = []interface{}{
+var file_c1_connector_v2_annotation_grant_proto_goTypes = []any{
(*GrantMetadata)(nil), // 0: c1.connector.v2.GrantMetadata
(*GrantExpandable)(nil), // 1: c1.connector.v2.GrantExpandable
(*GrantImmutable)(nil), // 2: c1.connector.v2.GrantImmutable
@@ -338,73 +326,11 @@ func file_c1_connector_v2_annotation_grant_proto_init() {
if File_c1_connector_v2_annotation_grant_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_annotation_grant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_grant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantExpandable); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_grant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantImmutable); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_grant_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantAlreadyExists); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_grant_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantAlreadyRevoked); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_annotation_grant_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_grant_proto_rawDesc), len(file_c1_connector_v2_annotation_grant_proto_rawDesc)),
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
@@ -415,7 +341,6 @@ func file_c1_connector_v2_annotation_grant_proto_init() {
MessageInfos: file_c1_connector_v2_annotation_grant_proto_msgTypes,
}.Build()
File_c1_connector_v2_annotation_grant_proto = out.File
- file_c1_connector_v2_annotation_grant_proto_rawDesc = nil
file_c1_connector_v2_annotation_grant_proto_goTypes = nil
file_c1_connector_v2_annotation_grant_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_grant.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_grant.pb.validate.go
index 4458379b..33017b39 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_grant.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_grant.pb.validate.go
@@ -100,7 +100,7 @@ type GrantMetadataMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantMetadataMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -202,7 +202,7 @@ type GrantExpandableMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantExpandableMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -333,7 +333,7 @@ type GrantImmutableMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantImmutableMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -433,7 +433,7 @@ type GrantAlreadyExistsMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantAlreadyExistsMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -535,7 +535,7 @@ type GrantAlreadyRevokedMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantAlreadyRevokedMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_ratelimit.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_ratelimit.pb.go
index 28687efa..3f711ada 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_ratelimit.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_ratelimit.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/annotation_ratelimit.proto
@@ -12,6 +12,7 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -74,23 +75,20 @@ func (RateLimitDescription_Status) EnumDescriptor() ([]byte, []int) {
}
type RateLimitDescription struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Status RateLimitDescription_Status `protobuf:"varint,1,opt,name=status,proto3,enum=c1.connector.v2.RateLimitDescription_Status" json:"status,omitempty"`
+ Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
+ Remaining int64 `protobuf:"varint,3,opt,name=remaining,proto3" json:"remaining,omitempty"`
+ ResetAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=reset_at,json=resetAt,proto3" json:"reset_at,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Status RateLimitDescription_Status `protobuf:"varint,1,opt,name=status,proto3,enum=c1.connector.v2.RateLimitDescription_Status" json:"status,omitempty"`
- Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
- Remaining int64 `protobuf:"varint,3,opt,name=remaining,proto3" json:"remaining,omitempty"`
- ResetAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=reset_at,json=resetAt,proto3" json:"reset_at,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *RateLimitDescription) Reset() {
*x = RateLimitDescription{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_ratelimit_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_ratelimit_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RateLimitDescription) String() string {
@@ -101,7 +99,7 @@ func (*RateLimitDescription) ProtoMessage() {}
func (x *RateLimitDescription) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_ratelimit_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -146,7 +144,7 @@ func (x *RateLimitDescription) GetResetAt() *timestamppb.Timestamp {
var File_c1_connector_v2_annotation_ratelimit_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_annotation_ratelimit_proto_rawDesc = []byte{
+var file_c1_connector_v2_annotation_ratelimit_proto_rawDesc = string([]byte{
0x0a, 0x2a, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74,
0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31,
@@ -176,23 +174,23 @@ var file_c1_connector_v2_annotation_ratelimit_proto_rawDesc = []byte{
0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e,
0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
-}
+})
var (
file_c1_connector_v2_annotation_ratelimit_proto_rawDescOnce sync.Once
- file_c1_connector_v2_annotation_ratelimit_proto_rawDescData = file_c1_connector_v2_annotation_ratelimit_proto_rawDesc
+ file_c1_connector_v2_annotation_ratelimit_proto_rawDescData []byte
)
func file_c1_connector_v2_annotation_ratelimit_proto_rawDescGZIP() []byte {
file_c1_connector_v2_annotation_ratelimit_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_annotation_ratelimit_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_annotation_ratelimit_proto_rawDescData)
+ file_c1_connector_v2_annotation_ratelimit_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_ratelimit_proto_rawDesc), len(file_c1_connector_v2_annotation_ratelimit_proto_rawDesc)))
})
return file_c1_connector_v2_annotation_ratelimit_proto_rawDescData
}
var file_c1_connector_v2_annotation_ratelimit_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_c1_connector_v2_annotation_ratelimit_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_c1_connector_v2_annotation_ratelimit_proto_goTypes = []interface{}{
+var file_c1_connector_v2_annotation_ratelimit_proto_goTypes = []any{
(RateLimitDescription_Status)(0), // 0: c1.connector.v2.RateLimitDescription.Status
(*RateLimitDescription)(nil), // 1: c1.connector.v2.RateLimitDescription
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
@@ -212,25 +210,11 @@ func file_c1_connector_v2_annotation_ratelimit_proto_init() {
if File_c1_connector_v2_annotation_ratelimit_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_annotation_ratelimit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RateLimitDescription); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_annotation_ratelimit_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_ratelimit_proto_rawDesc), len(file_c1_connector_v2_annotation_ratelimit_proto_rawDesc)),
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
@@ -242,7 +226,6 @@ func file_c1_connector_v2_annotation_ratelimit_proto_init() {
MessageInfos: file_c1_connector_v2_annotation_ratelimit_proto_msgTypes,
}.Build()
File_c1_connector_v2_annotation_ratelimit_proto = out.File
- file_c1_connector_v2_annotation_ratelimit_proto_rawDesc = nil
file_c1_connector_v2_annotation_ratelimit_proto_goTypes = nil
file_c1_connector_v2_annotation_ratelimit_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_ratelimit.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_ratelimit.pb.validate.go
index 4b99cde3..2bfbcd1b 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_ratelimit.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_ratelimit.pb.validate.go
@@ -106,7 +106,7 @@ type RateLimitDescriptionMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m RateLimitDescriptionMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_request.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_request.pb.go
index 2d85e65f..50d405e7 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_request.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_request.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/annotation_request.proto
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -21,20 +22,17 @@ const (
)
type RequestId struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
unknownFields protoimpl.UnknownFields
-
- RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *RequestId) Reset() {
*x = RequestId{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_request_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_request_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RequestId) String() string {
@@ -45,7 +43,7 @@ func (*RequestId) ProtoMessage() {}
func (x *RequestId) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_request_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -69,7 +67,7 @@ func (x *RequestId) GetRequestId() string {
var File_c1_connector_v2_annotation_request_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_annotation_request_proto_rawDesc = []byte{
+var file_c1_connector_v2_annotation_request_proto_rawDesc = string([]byte{
0x0a, 0x28, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63,
@@ -81,22 +79,22 @@ var file_c1_connector_v2_annotation_request_proto_rawDesc = []byte{
0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f,
0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_v2_annotation_request_proto_rawDescOnce sync.Once
- file_c1_connector_v2_annotation_request_proto_rawDescData = file_c1_connector_v2_annotation_request_proto_rawDesc
+ file_c1_connector_v2_annotation_request_proto_rawDescData []byte
)
func file_c1_connector_v2_annotation_request_proto_rawDescGZIP() []byte {
file_c1_connector_v2_annotation_request_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_annotation_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_annotation_request_proto_rawDescData)
+ file_c1_connector_v2_annotation_request_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_request_proto_rawDesc), len(file_c1_connector_v2_annotation_request_proto_rawDesc)))
})
return file_c1_connector_v2_annotation_request_proto_rawDescData
}
var file_c1_connector_v2_annotation_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_c1_connector_v2_annotation_request_proto_goTypes = []interface{}{
+var file_c1_connector_v2_annotation_request_proto_goTypes = []any{
(*RequestId)(nil), // 0: c1.connector.v2.RequestId
}
var file_c1_connector_v2_annotation_request_proto_depIdxs = []int32{
@@ -112,25 +110,11 @@ func file_c1_connector_v2_annotation_request_proto_init() {
if File_c1_connector_v2_annotation_request_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_annotation_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RequestId); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_annotation_request_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_request_proto_rawDesc), len(file_c1_connector_v2_annotation_request_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -141,7 +125,6 @@ func file_c1_connector_v2_annotation_request_proto_init() {
MessageInfos: file_c1_connector_v2_annotation_request_proto_msgTypes,
}.Build()
File_c1_connector_v2_annotation_request_proto = out.File
- file_c1_connector_v2_annotation_request_proto_rawDesc = nil
file_c1_connector_v2_annotation_request_proto_goTypes = nil
file_c1_connector_v2_annotation_request_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_request.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_request.pb.validate.go
index 7ca9b88b..c5f7a955 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_request.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_request.pb.validate.go
@@ -72,7 +72,7 @@ type RequestIdMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m RequestIdMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_resource_tree.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_resource_tree.pb.go
index 3ae9b086..75d893a7 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_resource_tree.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_resource_tree.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/annotation_resource_tree.proto
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -21,20 +22,17 @@ const (
)
type ChildResourceType struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- ResourceTypeId string `protobuf:"bytes,1,opt,name=resource_type_id,json=resourceTypeId,proto3" json:"resource_type_id,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceTypeId string `protobuf:"bytes,1,opt,name=resource_type_id,json=resourceTypeId,proto3" json:"resource_type_id,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ChildResourceType) Reset() {
*x = ChildResourceType{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_resource_tree_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_resource_tree_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ChildResourceType) String() string {
@@ -45,7 +43,7 @@ func (*ChildResourceType) ProtoMessage() {}
func (x *ChildResourceType) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_resource_tree_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -68,18 +66,16 @@ func (x *ChildResourceType) GetResourceTypeId() string {
}
type SkipEntitlementsAndGrants struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *SkipEntitlementsAndGrants) Reset() {
*x = SkipEntitlementsAndGrants{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_resource_tree_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_resource_tree_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SkipEntitlementsAndGrants) String() string {
@@ -90,7 +86,7 @@ func (*SkipEntitlementsAndGrants) ProtoMessage() {}
func (x *SkipEntitlementsAndGrants) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_resource_tree_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -107,7 +103,7 @@ func (*SkipEntitlementsAndGrants) Descriptor() ([]byte, []int) {
var File_c1_connector_v2_annotation_resource_tree_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_annotation_resource_tree_proto_rawDesc = []byte{
+var file_c1_connector_v2_annotation_resource_tree_proto_rawDesc = string([]byte{
0x0a, 0x2e, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
@@ -122,22 +118,22 @@ var file_c1_connector_v2_annotation_resource_tree_proto_rawDesc = []byte{
0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73,
0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_v2_annotation_resource_tree_proto_rawDescOnce sync.Once
- file_c1_connector_v2_annotation_resource_tree_proto_rawDescData = file_c1_connector_v2_annotation_resource_tree_proto_rawDesc
+ file_c1_connector_v2_annotation_resource_tree_proto_rawDescData []byte
)
func file_c1_connector_v2_annotation_resource_tree_proto_rawDescGZIP() []byte {
file_c1_connector_v2_annotation_resource_tree_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_annotation_resource_tree_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_annotation_resource_tree_proto_rawDescData)
+ file_c1_connector_v2_annotation_resource_tree_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_resource_tree_proto_rawDesc), len(file_c1_connector_v2_annotation_resource_tree_proto_rawDesc)))
})
return file_c1_connector_v2_annotation_resource_tree_proto_rawDescData
}
var file_c1_connector_v2_annotation_resource_tree_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_c1_connector_v2_annotation_resource_tree_proto_goTypes = []interface{}{
+var file_c1_connector_v2_annotation_resource_tree_proto_goTypes = []any{
(*ChildResourceType)(nil), // 0: c1.connector.v2.ChildResourceType
(*SkipEntitlementsAndGrants)(nil), // 1: c1.connector.v2.SkipEntitlementsAndGrants
}
@@ -154,37 +150,11 @@ func file_c1_connector_v2_annotation_resource_tree_proto_init() {
if File_c1_connector_v2_annotation_resource_tree_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_annotation_resource_tree_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ChildResourceType); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_resource_tree_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SkipEntitlementsAndGrants); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_annotation_resource_tree_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_resource_tree_proto_rawDesc), len(file_c1_connector_v2_annotation_resource_tree_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
@@ -195,7 +165,6 @@ func file_c1_connector_v2_annotation_resource_tree_proto_init() {
MessageInfos: file_c1_connector_v2_annotation_resource_tree_proto_msgTypes,
}.Build()
File_c1_connector_v2_annotation_resource_tree_proto = out.File
- file_c1_connector_v2_annotation_resource_tree_proto_rawDesc = nil
file_c1_connector_v2_annotation_resource_tree_proto_goTypes = nil
file_c1_connector_v2_annotation_resource_tree_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_resource_tree.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_resource_tree.pb.validate.go
index 63e05505..4a36fde5 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_resource_tree.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_resource_tree.pb.validate.go
@@ -73,7 +73,7 @@ type ChildResourceTypeMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ChildResourceTypeMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -175,7 +175,7 @@ type SkipEntitlementsAndGrantsMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m SkipEntitlementsAndGrantsMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go
index 51866e6b..67256fe5 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/annotation_trait.proto
@@ -14,6 +14,7 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -186,32 +187,30 @@ func (AppTrait_AppFlag) EnumDescriptor() ([]byte, []int) {
}
type UserTrait struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Emails []*UserTrait_Email `protobuf:"bytes,1,rep,name=emails,proto3" json:"emails,omitempty"`
- Status *UserTrait_Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
- Profile *structpb.Struct `protobuf:"bytes,3,opt,name=profile,proto3" json:"profile,omitempty"`
- Icon *AssetRef `protobuf:"bytes,4,opt,name=icon,proto3" json:"icon,omitempty"`
- AccountType UserTrait_AccountType `protobuf:"varint,5,opt,name=account_type,json=accountType,proto3,enum=c1.connector.v2.UserTrait_AccountType" json:"account_type,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Emails []*UserTrait_Email `protobuf:"bytes,1,rep,name=emails,proto3" json:"emails,omitempty"`
+ Status *UserTrait_Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
+ Profile *structpb.Struct `protobuf:"bytes,3,opt,name=profile,proto3" json:"profile,omitempty"`
+ Icon *AssetRef `protobuf:"bytes,4,opt,name=icon,proto3" json:"icon,omitempty"`
+ AccountType UserTrait_AccountType `protobuf:"varint,5,opt,name=account_type,json=accountType,proto3,enum=c1.connector.v2.UserTrait_AccountType" json:"account_type,omitempty"`
// The user's login
Login string `protobuf:"bytes,6,opt,name=login,proto3" json:"login,omitempty"`
// Any additional login aliases for the user
- LoginAliases []string `protobuf:"bytes,7,rep,name=login_aliases,json=loginAliases,proto3" json:"login_aliases,omitempty"`
- CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
- LastLogin *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=last_login,json=lastLogin,proto3" json:"last_login,omitempty"`
- MfaStatus *UserTrait_MFAStatus `protobuf:"bytes,10,opt,name=mfa_status,json=mfaStatus,proto3" json:"mfa_status,omitempty"`
- SsoStatus *UserTrait_SSOStatus `protobuf:"bytes,11,opt,name=sso_status,json=ssoStatus,proto3" json:"sso_status,omitempty"`
+ LoginAliases []string `protobuf:"bytes,7,rep,name=login_aliases,json=loginAliases,proto3" json:"login_aliases,omitempty"`
+ CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
+ LastLogin *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=last_login,json=lastLogin,proto3" json:"last_login,omitempty"`
+ MfaStatus *UserTrait_MFAStatus `protobuf:"bytes,10,opt,name=mfa_status,json=mfaStatus,proto3" json:"mfa_status,omitempty"`
+ SsoStatus *UserTrait_SSOStatus `protobuf:"bytes,11,opt,name=sso_status,json=ssoStatus,proto3" json:"sso_status,omitempty"`
+ StructuredName *UserTrait_StructuredName `protobuf:"bytes,12,opt,name=structured_name,json=structuredName,proto3" json:"structured_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *UserTrait) Reset() {
*x = UserTrait{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *UserTrait) String() string {
@@ -222,7 +221,7 @@ func (*UserTrait) ProtoMessage() {}
func (x *UserTrait) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -314,22 +313,26 @@ func (x *UserTrait) GetSsoStatus() *UserTrait_SSOStatus {
return nil
}
+func (x *UserTrait) GetStructuredName() *UserTrait_StructuredName {
+ if x != nil {
+ return x.StructuredName
+ }
+ return nil
+}
+
type GroupTrait struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Icon *AssetRef `protobuf:"bytes,1,opt,name=icon,proto3" json:"icon,omitempty"`
+ Profile *structpb.Struct `protobuf:"bytes,2,opt,name=profile,proto3" json:"profile,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Icon *AssetRef `protobuf:"bytes,1,opt,name=icon,proto3" json:"icon,omitempty"`
- Profile *structpb.Struct `protobuf:"bytes,2,opt,name=profile,proto3" json:"profile,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GroupTrait) Reset() {
*x = GroupTrait{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GroupTrait) String() string {
@@ -340,7 +343,7 @@ func (*GroupTrait) ProtoMessage() {}
func (x *GroupTrait) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -370,20 +373,17 @@ func (x *GroupTrait) GetProfile() *structpb.Struct {
}
type RoleTrait struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Profile *structpb.Struct `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Profile *structpb.Struct `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *RoleTrait) Reset() {
*x = RoleTrait{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RoleTrait) String() string {
@@ -394,7 +394,7 @@ func (*RoleTrait) ProtoMessage() {}
func (x *RoleTrait) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -417,24 +417,21 @@ func (x *RoleTrait) GetProfile() *structpb.Struct {
}
type AppTrait struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ HelpUrl string `protobuf:"bytes,1,opt,name=help_url,json=helpUrl,proto3" json:"help_url,omitempty"`
+ Icon *AssetRef `protobuf:"bytes,2,opt,name=icon,proto3" json:"icon,omitempty"`
+ Logo *AssetRef `protobuf:"bytes,3,opt,name=logo,proto3" json:"logo,omitempty"`
+ Profile *structpb.Struct `protobuf:"bytes,4,opt,name=profile,proto3" json:"profile,omitempty"`
+ Flags []AppTrait_AppFlag `protobuf:"varint,5,rep,packed,name=flags,proto3,enum=c1.connector.v2.AppTrait_AppFlag" json:"flags,omitempty"`
unknownFields protoimpl.UnknownFields
-
- HelpUrl string `protobuf:"bytes,1,opt,name=help_url,json=helpUrl,proto3" json:"help_url,omitempty"`
- Icon *AssetRef `protobuf:"bytes,2,opt,name=icon,proto3" json:"icon,omitempty"`
- Logo *AssetRef `protobuf:"bytes,3,opt,name=logo,proto3" json:"logo,omitempty"`
- Profile *structpb.Struct `protobuf:"bytes,4,opt,name=profile,proto3" json:"profile,omitempty"`
- Flags []AppTrait_AppFlag `protobuf:"varint,5,rep,packed,name=flags,proto3,enum=c1.connector.v2.AppTrait_AppFlag" json:"flags,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *AppTrait) Reset() {
*x = AppTrait{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AppTrait) String() string {
@@ -445,7 +442,7 @@ func (*AppTrait) ProtoMessage() {}
func (x *AppTrait) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -496,24 +493,22 @@ func (x *AppTrait) GetFlags() []AppTrait_AppFlag {
}
type SecretTrait struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Profile *structpb.Struct `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
+ CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
+ ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
+ LastUsedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_used_at,json=lastUsedAt,proto3" json:"last_used_at,omitempty"`
+ CreatedById *ResourceId `protobuf:"bytes,5,opt,name=created_by_id,json=createdById,proto3" json:"created_by_id,omitempty"`
+ IdentityId *ResourceId `protobuf:"bytes,6,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Profile *structpb.Struct `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
- CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
- ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
- LastUsedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_used_at,json=lastUsedAt,proto3" json:"last_used_at,omitempty"`
- CreatedById *ResourceId `protobuf:"bytes,5,opt,name=created_by_id,json=createdById,proto3" json:"created_by_id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *SecretTrait) Reset() {
*x = SecretTrait{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SecretTrait) String() string {
@@ -524,7 +519,7 @@ func (*SecretTrait) ProtoMessage() {}
func (x *SecretTrait) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -574,23 +569,27 @@ func (x *SecretTrait) GetCreatedById() *ResourceId {
return nil
}
-type UserTrait_Email struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (x *SecretTrait) GetIdentityId() *ResourceId {
+ if x != nil {
+ return x.IdentityId
+ }
+ return nil
+}
- Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
+type UserTrait_Email struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
// Indicates if this is the user's primary email. Only one entry can be marked as primary.
- IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"`
+ IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *UserTrait_Email) Reset() {
*x = UserTrait_Email{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *UserTrait_Email) String() string {
@@ -601,7 +600,7 @@ func (*UserTrait_Email) ProtoMessage() {}
func (x *UserTrait_Email) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -631,21 +630,18 @@ func (x *UserTrait_Email) GetIsPrimary() bool {
}
type UserTrait_Status struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Status UserTrait_Status_Status `protobuf:"varint,1,opt,name=status,proto3,enum=c1.connector.v2.UserTrait_Status_Status" json:"status,omitempty"`
+ Details string `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Status UserTrait_Status_Status `protobuf:"varint,1,opt,name=status,proto3,enum=c1.connector.v2.UserTrait_Status_Status" json:"status,omitempty"`
- Details string `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *UserTrait_Status) Reset() {
*x = UserTrait_Status{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *UserTrait_Status) String() string {
@@ -656,7 +652,7 @@ func (*UserTrait_Status) ProtoMessage() {}
func (x *UserTrait_Status) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -686,20 +682,17 @@ func (x *UserTrait_Status) GetDetails() string {
}
type UserTrait_MFAStatus struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ MfaEnabled bool `protobuf:"varint,1,opt,name=mfa_enabled,json=mfaEnabled,proto3" json:"mfa_enabled,omitempty"`
unknownFields protoimpl.UnknownFields
-
- MfaEnabled bool `protobuf:"varint,1,opt,name=mfa_enabled,json=mfaEnabled,proto3" json:"mfa_enabled,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *UserTrait_MFAStatus) Reset() {
*x = UserTrait_MFAStatus{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *UserTrait_MFAStatus) String() string {
@@ -710,7 +703,7 @@ func (*UserTrait_MFAStatus) ProtoMessage() {}
func (x *UserTrait_MFAStatus) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -733,20 +726,17 @@ func (x *UserTrait_MFAStatus) GetMfaEnabled() bool {
}
type UserTrait_SSOStatus struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SsoEnabled bool `protobuf:"varint,1,opt,name=sso_enabled,json=ssoEnabled,proto3" json:"sso_enabled,omitempty"`
unknownFields protoimpl.UnknownFields
-
- SsoEnabled bool `protobuf:"varint,1,opt,name=sso_enabled,json=ssoEnabled,proto3" json:"sso_enabled,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *UserTrait_SSOStatus) Reset() {
*x = UserTrait_SSOStatus{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *UserTrait_SSOStatus) String() string {
@@ -757,7 +747,7 @@ func (*UserTrait_SSOStatus) ProtoMessage() {}
func (x *UserTrait_SSOStatus) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -779,9 +769,85 @@ func (x *UserTrait_SSOStatus) GetSsoEnabled() bool {
return false
}
+type UserTrait_StructuredName struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ GivenName string `protobuf:"bytes,1,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty"`
+ FamilyName string `protobuf:"bytes,2,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty"`
+ MiddleNames []string `protobuf:"bytes,3,rep,name=middle_names,json=middleNames,proto3" json:"middle_names,omitempty"`
+ Prefix string `protobuf:"bytes,4,opt,name=prefix,proto3" json:"prefix,omitempty"`
+ Suffix string `protobuf:"bytes,5,opt,name=suffix,proto3" json:"suffix,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *UserTrait_StructuredName) Reset() {
+ *x = UserTrait_StructuredName{}
+ mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *UserTrait_StructuredName) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserTrait_StructuredName) ProtoMessage() {}
+
+func (x *UserTrait_StructuredName) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_annotation_trait_proto_msgTypes[9]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserTrait_StructuredName.ProtoReflect.Descriptor instead.
+func (*UserTrait_StructuredName) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_annotation_trait_proto_rawDescGZIP(), []int{0, 4}
+}
+
+func (x *UserTrait_StructuredName) GetGivenName() string {
+ if x != nil {
+ return x.GivenName
+ }
+ return ""
+}
+
+func (x *UserTrait_StructuredName) GetFamilyName() string {
+ if x != nil {
+ return x.FamilyName
+ }
+ return ""
+}
+
+func (x *UserTrait_StructuredName) GetMiddleNames() []string {
+ if x != nil {
+ return x.MiddleNames
+ }
+ return nil
+}
+
+func (x *UserTrait_StructuredName) GetPrefix() string {
+ if x != nil {
+ return x.Prefix
+ }
+ return ""
+}
+
+func (x *UserTrait_StructuredName) GetSuffix() string {
+ if x != nil {
+ return x.Suffix
+ }
+ return ""
+}
+
var File_c1_connector_v2_annotation_trait_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_annotation_trait_proto_rawDesc = []byte{
+var file_c1_connector_v2_annotation_trait_proto_rawDesc = string([]byte{
0x0a, 0x26, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61,
0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
@@ -794,8 +860,8 @@ var file_c1_connector_v2_annotation_trait_proto_rawDesc = []byte{
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f,
- 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa,
- 0x08, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x06,
+ 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4,
+ 0x0a, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x06,
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63,
0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x06,
@@ -834,161 +900,184 @@ var file_c1_connector_v2_annotation_trait_proto_rawDesc = []byte{
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63,
0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x2e, 0x53, 0x53, 0x4f, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x52, 0x09, 0x73, 0x73, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x49, 0x0a,
- 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
- 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01,
- 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f,
- 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69,
- 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x1a, 0xdc, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61,
- 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x2e,
- 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa,
- 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
- 0x27, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52,
- 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x5d, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53,
- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54,
- 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13,
- 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45,
- 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45,
- 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x2c, 0x0a, 0x09, 0x4d, 0x46, 0x41, 0x53, 0x74,
- 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x66, 0x61, 0x5f, 0x65, 0x6e, 0x61, 0x62,
- 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6d, 0x66, 0x61, 0x45, 0x6e,
- 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x2c, 0x0a, 0x09, 0x53, 0x53, 0x4f, 0x53, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x73, 0x6f, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x73, 0x6f, 0x45, 0x6e, 0x61, 0x62,
- 0x6c, 0x65, 0x64, 0x22, 0x76, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79,
- 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59,
- 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
- 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45,
- 0x5f, 0x48, 0x55, 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x43, 0x43, 0x4f,
- 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45,
- 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59,
- 0x50, 0x45, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x10, 0x03, 0x22, 0x6e, 0x0a, 0x0a, 0x47,
- 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x69, 0x63, 0x6f,
- 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x75, 0x73, 0x52, 0x09, 0x73, 0x73, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x52, 0x0a,
+ 0x0f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x61,
+ 0x69, 0x74, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d,
+ 0x65, 0x52, 0x0e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d,
+ 0x65, 0x1a, 0x49, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x07, 0x61, 0x64,
+ 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
+ 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x1a, 0xdc, 0x01, 0x0a,
+ 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72,
+ 0x61, 0x69, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x08,
+ 0xd0, 0x01, 0x01, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x5d, 0x0a, 0x06,
+ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,
+ 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12,
+ 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44,
+ 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53,
+ 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55,
+ 0x53, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x2c, 0x0a, 0x09, 0x4d,
+ 0x46, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x66, 0x61, 0x5f,
+ 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6d,
+ 0x66, 0x61, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x2c, 0x0a, 0x09, 0x53, 0x53, 0x4f,
+ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x73, 0x6f, 0x5f, 0x65, 0x6e,
+ 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x73, 0x6f,
+ 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0xa3, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x75,
+ 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69,
+ 0x76, 0x65, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x67, 0x69, 0x76, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x61, 0x6d,
+ 0x69, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+ 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69,
+ 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09,
+ 0x52, 0x0b, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x16, 0x0a,
+ 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70,
+ 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x22, 0x76, 0x0a,
+ 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18,
+ 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53,
+ 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43,
+ 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x55, 0x4d, 0x41, 0x4e,
+ 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59,
+ 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13,
+ 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, 0x53,
+ 0x54, 0x45, 0x4d, 0x10, 0x03, 0x22, 0x6e, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72,
+ 0x61, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x04, 0x69, 0x63,
+ 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72,
+ 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x3e, 0x0a, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x72, 0x61,
+ 0x69, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72,
+ 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x9a, 0x03, 0x0a, 0x08, 0x41, 0x70, 0x70, 0x54, 0x72, 0x61,
+ 0x69, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x68, 0x65, 0x6c, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x20, 0x01, 0x28, 0x80, 0x08,
+ 0x3a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0xd0, 0x01, 0x01, 0x88, 0x01, 0x01,
+ 0x52, 0x07, 0x68, 0x65, 0x6c, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x2d, 0x0a, 0x04, 0x69, 0x63, 0x6f,
+ 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52,
- 0x65, 0x66, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66,
- 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75,
- 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x3e, 0x0a, 0x09, 0x52,
- 0x6f, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66,
- 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75,
- 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x9a, 0x03, 0x0a, 0x08,
- 0x41, 0x70, 0x70, 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x68, 0x65, 0x6c, 0x70,
- 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72,
- 0x15, 0x20, 0x01, 0x28, 0x80, 0x08, 0x3a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f,
- 0xd0, 0x01, 0x01, 0x88, 0x01, 0x01, 0x52, 0x07, 0x68, 0x65, 0x6c, 0x70, 0x55, 0x72, 0x6c, 0x12,
- 0x2d, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x2d,
- 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41,
- 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x6f, 0x12, 0x31, 0x0a,
- 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
- 0x12, 0x37, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32,
- 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
- 0x32, 0x2e, 0x41, 0x70, 0x70, 0x54, 0x72, 0x61, 0x69, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x46, 0x6c,
- 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x07, 0x41, 0x70,
- 0x70, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41,
- 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
- 0x13, 0x0a, 0x0f, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x48, 0x49, 0x44, 0x44,
- 0x45, 0x4e, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47,
- 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x41,
- 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x53, 0x41, 0x4d, 0x4c, 0x10, 0x03, 0x12, 0x11,
- 0x0a, 0x0d, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x49, 0x44, 0x43, 0x10,
- 0x04, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x42, 0x4f,
- 0x4f, 0x4b, 0x4d, 0x41, 0x52, 0x4b, 0x10, 0x05, 0x22, 0xb5, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x63,
- 0x72, 0x65, 0x74, 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66,
- 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75,
- 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65,
- 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
- 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41,
- 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x61,
- 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
- 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x73, 0x65, 0x64, 0x41, 0x74, 0x12,
- 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x49, 0x64, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x49, 0x64,
- 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
- 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f,
- 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+ 0x65, 0x66, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x6f,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65,
+ 0x66, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x6f, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69,
+ 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63,
+ 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x66, 0x6c,
+ 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x54,
+ 0x72, 0x61, 0x69, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c,
+ 0x61, 0x67, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x12,
+ 0x18, 0x0a, 0x14, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50,
+ 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x50, 0x50,
+ 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x48, 0x49, 0x44, 0x44, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x15,
+ 0x0a, 0x11, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54,
+ 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41,
+ 0x47, 0x5f, 0x53, 0x41, 0x4d, 0x4c, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x50, 0x50, 0x5f,
+ 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x49, 0x44, 0x43, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x41,
+ 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x42, 0x4f, 0x4f, 0x4b, 0x4d, 0x41, 0x52, 0x4b,
+ 0x10, 0x05, 0x22, 0xf3, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x54, 0x72, 0x61,
+ 0x69, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72,
+ 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
+ 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
+ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
+ 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
+ 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x6c,
+ 0x61, 0x73, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c,
+ 0x61, 0x73, 0x74, 0x55, 0x73, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
+ 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0b, 0x63,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x69, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x69, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72,
+ 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62,
+ 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
var (
file_c1_connector_v2_annotation_trait_proto_rawDescOnce sync.Once
- file_c1_connector_v2_annotation_trait_proto_rawDescData = file_c1_connector_v2_annotation_trait_proto_rawDesc
+ file_c1_connector_v2_annotation_trait_proto_rawDescData []byte
)
func file_c1_connector_v2_annotation_trait_proto_rawDescGZIP() []byte {
file_c1_connector_v2_annotation_trait_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_annotation_trait_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_annotation_trait_proto_rawDescData)
+ file_c1_connector_v2_annotation_trait_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_trait_proto_rawDesc), len(file_c1_connector_v2_annotation_trait_proto_rawDesc)))
})
return file_c1_connector_v2_annotation_trait_proto_rawDescData
}
var file_c1_connector_v2_annotation_trait_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
-var file_c1_connector_v2_annotation_trait_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
-var file_c1_connector_v2_annotation_trait_proto_goTypes = []interface{}{
- (UserTrait_AccountType)(0), // 0: c1.connector.v2.UserTrait.AccountType
- (UserTrait_Status_Status)(0), // 1: c1.connector.v2.UserTrait.Status.Status
- (AppTrait_AppFlag)(0), // 2: c1.connector.v2.AppTrait.AppFlag
- (*UserTrait)(nil), // 3: c1.connector.v2.UserTrait
- (*GroupTrait)(nil), // 4: c1.connector.v2.GroupTrait
- (*RoleTrait)(nil), // 5: c1.connector.v2.RoleTrait
- (*AppTrait)(nil), // 6: c1.connector.v2.AppTrait
- (*SecretTrait)(nil), // 7: c1.connector.v2.SecretTrait
- (*UserTrait_Email)(nil), // 8: c1.connector.v2.UserTrait.Email
- (*UserTrait_Status)(nil), // 9: c1.connector.v2.UserTrait.Status
- (*UserTrait_MFAStatus)(nil), // 10: c1.connector.v2.UserTrait.MFAStatus
- (*UserTrait_SSOStatus)(nil), // 11: c1.connector.v2.UserTrait.SSOStatus
- (*structpb.Struct)(nil), // 12: google.protobuf.Struct
- (*AssetRef)(nil), // 13: c1.connector.v2.AssetRef
- (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp
- (*ResourceId)(nil), // 15: c1.connector.v2.ResourceId
+var file_c1_connector_v2_annotation_trait_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
+var file_c1_connector_v2_annotation_trait_proto_goTypes = []any{
+ (UserTrait_AccountType)(0), // 0: c1.connector.v2.UserTrait.AccountType
+ (UserTrait_Status_Status)(0), // 1: c1.connector.v2.UserTrait.Status.Status
+ (AppTrait_AppFlag)(0), // 2: c1.connector.v2.AppTrait.AppFlag
+ (*UserTrait)(nil), // 3: c1.connector.v2.UserTrait
+ (*GroupTrait)(nil), // 4: c1.connector.v2.GroupTrait
+ (*RoleTrait)(nil), // 5: c1.connector.v2.RoleTrait
+ (*AppTrait)(nil), // 6: c1.connector.v2.AppTrait
+ (*SecretTrait)(nil), // 7: c1.connector.v2.SecretTrait
+ (*UserTrait_Email)(nil), // 8: c1.connector.v2.UserTrait.Email
+ (*UserTrait_Status)(nil), // 9: c1.connector.v2.UserTrait.Status
+ (*UserTrait_MFAStatus)(nil), // 10: c1.connector.v2.UserTrait.MFAStatus
+ (*UserTrait_SSOStatus)(nil), // 11: c1.connector.v2.UserTrait.SSOStatus
+ (*UserTrait_StructuredName)(nil), // 12: c1.connector.v2.UserTrait.StructuredName
+ (*structpb.Struct)(nil), // 13: google.protobuf.Struct
+ (*AssetRef)(nil), // 14: c1.connector.v2.AssetRef
+ (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp
+ (*ResourceId)(nil), // 16: c1.connector.v2.ResourceId
}
var file_c1_connector_v2_annotation_trait_proto_depIdxs = []int32{
8, // 0: c1.connector.v2.UserTrait.emails:type_name -> c1.connector.v2.UserTrait.Email
9, // 1: c1.connector.v2.UserTrait.status:type_name -> c1.connector.v2.UserTrait.Status
- 12, // 2: c1.connector.v2.UserTrait.profile:type_name -> google.protobuf.Struct
- 13, // 3: c1.connector.v2.UserTrait.icon:type_name -> c1.connector.v2.AssetRef
+ 13, // 2: c1.connector.v2.UserTrait.profile:type_name -> google.protobuf.Struct
+ 14, // 3: c1.connector.v2.UserTrait.icon:type_name -> c1.connector.v2.AssetRef
0, // 4: c1.connector.v2.UserTrait.account_type:type_name -> c1.connector.v2.UserTrait.AccountType
- 14, // 5: c1.connector.v2.UserTrait.created_at:type_name -> google.protobuf.Timestamp
- 14, // 6: c1.connector.v2.UserTrait.last_login:type_name -> google.protobuf.Timestamp
+ 15, // 5: c1.connector.v2.UserTrait.created_at:type_name -> google.protobuf.Timestamp
+ 15, // 6: c1.connector.v2.UserTrait.last_login:type_name -> google.protobuf.Timestamp
10, // 7: c1.connector.v2.UserTrait.mfa_status:type_name -> c1.connector.v2.UserTrait.MFAStatus
11, // 8: c1.connector.v2.UserTrait.sso_status:type_name -> c1.connector.v2.UserTrait.SSOStatus
- 13, // 9: c1.connector.v2.GroupTrait.icon:type_name -> c1.connector.v2.AssetRef
- 12, // 10: c1.connector.v2.GroupTrait.profile:type_name -> google.protobuf.Struct
- 12, // 11: c1.connector.v2.RoleTrait.profile:type_name -> google.protobuf.Struct
- 13, // 12: c1.connector.v2.AppTrait.icon:type_name -> c1.connector.v2.AssetRef
- 13, // 13: c1.connector.v2.AppTrait.logo:type_name -> c1.connector.v2.AssetRef
- 12, // 14: c1.connector.v2.AppTrait.profile:type_name -> google.protobuf.Struct
- 2, // 15: c1.connector.v2.AppTrait.flags:type_name -> c1.connector.v2.AppTrait.AppFlag
- 12, // 16: c1.connector.v2.SecretTrait.profile:type_name -> google.protobuf.Struct
- 14, // 17: c1.connector.v2.SecretTrait.created_at:type_name -> google.protobuf.Timestamp
- 14, // 18: c1.connector.v2.SecretTrait.expires_at:type_name -> google.protobuf.Timestamp
- 14, // 19: c1.connector.v2.SecretTrait.last_used_at:type_name -> google.protobuf.Timestamp
- 15, // 20: c1.connector.v2.SecretTrait.created_by_id:type_name -> c1.connector.v2.ResourceId
- 1, // 21: c1.connector.v2.UserTrait.Status.status:type_name -> c1.connector.v2.UserTrait.Status.Status
- 22, // [22:22] is the sub-list for method output_type
- 22, // [22:22] is the sub-list for method input_type
- 22, // [22:22] is the sub-list for extension type_name
- 22, // [22:22] is the sub-list for extension extendee
- 0, // [0:22] is the sub-list for field type_name
+ 12, // 9: c1.connector.v2.UserTrait.structured_name:type_name -> c1.connector.v2.UserTrait.StructuredName
+ 14, // 10: c1.connector.v2.GroupTrait.icon:type_name -> c1.connector.v2.AssetRef
+ 13, // 11: c1.connector.v2.GroupTrait.profile:type_name -> google.protobuf.Struct
+ 13, // 12: c1.connector.v2.RoleTrait.profile:type_name -> google.protobuf.Struct
+ 14, // 13: c1.connector.v2.AppTrait.icon:type_name -> c1.connector.v2.AssetRef
+ 14, // 14: c1.connector.v2.AppTrait.logo:type_name -> c1.connector.v2.AssetRef
+ 13, // 15: c1.connector.v2.AppTrait.profile:type_name -> google.protobuf.Struct
+ 2, // 16: c1.connector.v2.AppTrait.flags:type_name -> c1.connector.v2.AppTrait.AppFlag
+ 13, // 17: c1.connector.v2.SecretTrait.profile:type_name -> google.protobuf.Struct
+ 15, // 18: c1.connector.v2.SecretTrait.created_at:type_name -> google.protobuf.Timestamp
+ 15, // 19: c1.connector.v2.SecretTrait.expires_at:type_name -> google.protobuf.Timestamp
+ 15, // 20: c1.connector.v2.SecretTrait.last_used_at:type_name -> google.protobuf.Timestamp
+ 16, // 21: c1.connector.v2.SecretTrait.created_by_id:type_name -> c1.connector.v2.ResourceId
+ 16, // 22: c1.connector.v2.SecretTrait.identity_id:type_name -> c1.connector.v2.ResourceId
+ 1, // 23: c1.connector.v2.UserTrait.Status.status:type_name -> c1.connector.v2.UserTrait.Status.Status
+ 24, // [24:24] is the sub-list for method output_type
+ 24, // [24:24] is the sub-list for method input_type
+ 24, // [24:24] is the sub-list for extension type_name
+ 24, // [24:24] is the sub-list for extension extendee
+ 0, // [0:24] is the sub-list for field type_name
}
func init() { file_c1_connector_v2_annotation_trait_proto_init() }
@@ -998,123 +1087,13 @@ func file_c1_connector_v2_annotation_trait_proto_init() {
}
file_c1_connector_v2_asset_proto_init()
file_c1_connector_v2_resource_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_annotation_trait_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UserTrait); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_trait_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GroupTrait); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_trait_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RoleTrait); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_trait_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AppTrait); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_trait_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SecretTrait); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_trait_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UserTrait_Email); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_trait_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UserTrait_Status); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_trait_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UserTrait_MFAStatus); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_annotation_trait_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UserTrait_SSOStatus); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_annotation_trait_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_trait_proto_rawDesc), len(file_c1_connector_v2_annotation_trait_proto_rawDesc)),
NumEnums: 3,
- NumMessages: 9,
+ NumMessages: 10,
NumExtensions: 0,
NumServices: 0,
},
@@ -1124,7 +1103,6 @@ func file_c1_connector_v2_annotation_trait_proto_init() {
MessageInfos: file_c1_connector_v2_annotation_trait_proto_msgTypes,
}.Build()
File_c1_connector_v2_annotation_trait_proto = out.File
- file_c1_connector_v2_annotation_trait_proto_rawDesc = nil
file_c1_connector_v2_annotation_trait_proto_goTypes = nil
file_c1_connector_v2_annotation_trait_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.validate.go
index 0cc95e45..a0288dc3 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.validate.go
@@ -318,6 +318,35 @@ func (m *UserTrait) validate(all bool) error {
}
}
+ if all {
+ switch v := interface{}(m.GetStructuredName()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, UserTraitValidationError{
+ field: "StructuredName",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, UserTraitValidationError{
+ field: "StructuredName",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStructuredName()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return UserTraitValidationError{
+ field: "StructuredName",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
if len(errors) > 0 {
return UserTraitMultiError(errors)
}
@@ -331,7 +360,7 @@ type UserTraitMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m UserTraitMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -488,7 +517,7 @@ type GroupTraitMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GroupTraitMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -616,7 +645,7 @@ type RoleTraitMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m RoleTraitMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -849,7 +878,7 @@ type AppTraitMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m AppTraitMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1080,6 +1109,35 @@ func (m *SecretTrait) validate(all bool) error {
}
}
+ if all {
+ switch v := interface{}(m.GetIdentityId()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SecretTraitValidationError{
+ field: "IdentityId",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SecretTraitValidationError{
+ field: "IdentityId",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetIdentityId()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SecretTraitValidationError{
+ field: "IdentityId",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
if len(errors) > 0 {
return SecretTraitMultiError(errors)
}
@@ -1093,7 +1151,7 @@ type SecretTraitMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m SecretTraitMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1257,7 +1315,7 @@ type UserTrait_EmailMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m UserTrait_EmailMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1383,7 +1441,7 @@ type UserTrait_StatusMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m UserTrait_StatusMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1485,7 +1543,7 @@ type UserTrait_MFAStatusMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m UserTrait_MFAStatusMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1589,7 +1647,7 @@ type UserTrait_SSOStatusMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m UserTrait_SSOStatusMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1654,3 +1712,113 @@ var _ interface {
Cause() error
ErrorName() string
} = UserTrait_SSOStatusValidationError{}
+
+// Validate checks the field values on UserTrait_StructuredName with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *UserTrait_StructuredName) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on UserTrait_StructuredName with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// UserTrait_StructuredNameMultiError, or nil if none found.
+func (m *UserTrait_StructuredName) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *UserTrait_StructuredName) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for GivenName
+
+ // no validation rules for FamilyName
+
+ // no validation rules for Prefix
+
+ // no validation rules for Suffix
+
+ if len(errors) > 0 {
+ return UserTrait_StructuredNameMultiError(errors)
+ }
+
+ return nil
+}
+
+// UserTrait_StructuredNameMultiError is an error wrapping multiple validation
+// errors returned by UserTrait_StructuredName.ValidateAll() if the designated
+// constraints aren't met.
+type UserTrait_StructuredNameMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m UserTrait_StructuredNameMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m UserTrait_StructuredNameMultiError) AllErrors() []error { return m }
+
+// UserTrait_StructuredNameValidationError is the validation error returned by
+// UserTrait_StructuredName.Validate if the designated constraints aren't met.
+type UserTrait_StructuredNameValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e UserTrait_StructuredNameValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e UserTrait_StructuredNameValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e UserTrait_StructuredNameValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e UserTrait_StructuredNameValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e UserTrait_StructuredNameValidationError) ErrorName() string {
+ return "UserTrait_StructuredNameValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e UserTrait_StructuredNameValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sUserTrait_StructuredName.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = UserTrait_StructuredNameValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = UserTrait_StructuredNameValidationError{}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_v1_identifier.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_v1_identifier.pb.go
index de9b128b..94049c61 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_v1_identifier.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_v1_identifier.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/annotation_v1_identifier.proto
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -21,20 +22,17 @@ const (
)
type V1Identifier struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *V1Identifier) Reset() {
*x = V1Identifier{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_annotation_v1_identifier_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_annotation_v1_identifier_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *V1Identifier) String() string {
@@ -45,7 +43,7 @@ func (*V1Identifier) ProtoMessage() {}
func (x *V1Identifier) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_annotation_v1_identifier_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -69,7 +67,7 @@ func (x *V1Identifier) GetId() string {
var File_c1_connector_v2_annotation_v1_identifier_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_annotation_v1_identifier_proto_rawDesc = []byte{
+var file_c1_connector_v2_annotation_v1_identifier_proto_rawDesc = string([]byte{
0x0a, 0x2e, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x5f,
0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
@@ -81,22 +79,22 @@ var file_c1_connector_v2_annotation_v1_identifier_proto_rawDesc = []byte{
0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e,
0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
-}
+})
var (
file_c1_connector_v2_annotation_v1_identifier_proto_rawDescOnce sync.Once
- file_c1_connector_v2_annotation_v1_identifier_proto_rawDescData = file_c1_connector_v2_annotation_v1_identifier_proto_rawDesc
+ file_c1_connector_v2_annotation_v1_identifier_proto_rawDescData []byte
)
func file_c1_connector_v2_annotation_v1_identifier_proto_rawDescGZIP() []byte {
file_c1_connector_v2_annotation_v1_identifier_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_annotation_v1_identifier_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_annotation_v1_identifier_proto_rawDescData)
+ file_c1_connector_v2_annotation_v1_identifier_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_v1_identifier_proto_rawDesc), len(file_c1_connector_v2_annotation_v1_identifier_proto_rawDesc)))
})
return file_c1_connector_v2_annotation_v1_identifier_proto_rawDescData
}
var file_c1_connector_v2_annotation_v1_identifier_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_c1_connector_v2_annotation_v1_identifier_proto_goTypes = []interface{}{
+var file_c1_connector_v2_annotation_v1_identifier_proto_goTypes = []any{
(*V1Identifier)(nil), // 0: c1.connector.v2.V1Identifier
}
var file_c1_connector_v2_annotation_v1_identifier_proto_depIdxs = []int32{
@@ -112,25 +110,11 @@ func file_c1_connector_v2_annotation_v1_identifier_proto_init() {
if File_c1_connector_v2_annotation_v1_identifier_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_annotation_v1_identifier_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*V1Identifier); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_annotation_v1_identifier_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_v1_identifier_proto_rawDesc), len(file_c1_connector_v2_annotation_v1_identifier_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -141,7 +125,6 @@ func file_c1_connector_v2_annotation_v1_identifier_proto_init() {
MessageInfos: file_c1_connector_v2_annotation_v1_identifier_proto_msgTypes,
}.Build()
File_c1_connector_v2_annotation_v1_identifier_proto = out.File
- file_c1_connector_v2_annotation_v1_identifier_proto_rawDesc = nil
file_c1_connector_v2_annotation_v1_identifier_proto_goTypes = nil
file_c1_connector_v2_annotation_v1_identifier_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_v1_identifier.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_v1_identifier.pb.validate.go
index 0fb152bc..5d2036ab 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_v1_identifier.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_v1_identifier.pb.validate.go
@@ -72,7 +72,7 @@ type V1IdentifierMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m V1IdentifierMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset.pb.go
index 4fab9b2e..f720a3b7 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/asset.proto
@@ -12,6 +12,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -22,20 +23,17 @@ const (
)
type AssetRef struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *AssetRef) Reset() {
*x = AssetRef{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_asset_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_asset_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AssetRef) String() string {
@@ -46,7 +44,7 @@ func (*AssetRef) ProtoMessage() {}
func (x *AssetRef) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_asset_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -69,20 +67,17 @@ func (x *AssetRef) GetId() string {
}
type AssetServiceGetAssetRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Asset *AssetRef `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Asset *AssetRef `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *AssetServiceGetAssetRequest) Reset() {
*x = AssetServiceGetAssetRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_asset_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_asset_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AssetServiceGetAssetRequest) String() string {
@@ -93,7 +88,7 @@ func (*AssetServiceGetAssetRequest) ProtoMessage() {}
func (x *AssetServiceGetAssetRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_asset_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -116,24 +111,21 @@ func (x *AssetServiceGetAssetRequest) GetAsset() *AssetRef {
}
type AssetServiceGetAssetResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Types that are assignable to Msg:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Msg:
//
// *AssetServiceGetAssetResponse_Metadata_
// *AssetServiceGetAssetResponse_Data_
- Msg isAssetServiceGetAssetResponse_Msg `protobuf_oneof:"msg"`
+ Msg isAssetServiceGetAssetResponse_Msg `protobuf_oneof:"msg"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *AssetServiceGetAssetResponse) Reset() {
*x = AssetServiceGetAssetResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_asset_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_asset_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AssetServiceGetAssetResponse) String() string {
@@ -144,7 +136,7 @@ func (*AssetServiceGetAssetResponse) ProtoMessage() {}
func (x *AssetServiceGetAssetResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_asset_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -159,23 +151,27 @@ func (*AssetServiceGetAssetResponse) Descriptor() ([]byte, []int) {
return file_c1_connector_v2_asset_proto_rawDescGZIP(), []int{2}
}
-func (m *AssetServiceGetAssetResponse) GetMsg() isAssetServiceGetAssetResponse_Msg {
- if m != nil {
- return m.Msg
+func (x *AssetServiceGetAssetResponse) GetMsg() isAssetServiceGetAssetResponse_Msg {
+ if x != nil {
+ return x.Msg
}
return nil
}
func (x *AssetServiceGetAssetResponse) GetMetadata() *AssetServiceGetAssetResponse_Metadata {
- if x, ok := x.GetMsg().(*AssetServiceGetAssetResponse_Metadata_); ok {
- return x.Metadata
+ if x != nil {
+ if x, ok := x.Msg.(*AssetServiceGetAssetResponse_Metadata_); ok {
+ return x.Metadata
+ }
}
return nil
}
func (x *AssetServiceGetAssetResponse) GetData() *AssetServiceGetAssetResponse_Data {
- if x, ok := x.GetMsg().(*AssetServiceGetAssetResponse_Data_); ok {
- return x.Data
+ if x != nil {
+ if x, ok := x.Msg.(*AssetServiceGetAssetResponse_Data_); ok {
+ return x.Data
+ }
}
return nil
}
@@ -197,20 +193,17 @@ func (*AssetServiceGetAssetResponse_Metadata_) isAssetServiceGetAssetResponse_Ms
func (*AssetServiceGetAssetResponse_Data_) isAssetServiceGetAssetResponse_Msg() {}
type AssetServiceGetAssetResponse_Metadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
unknownFields protoimpl.UnknownFields
-
- ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *AssetServiceGetAssetResponse_Metadata) Reset() {
*x = AssetServiceGetAssetResponse_Metadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_asset_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_asset_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AssetServiceGetAssetResponse_Metadata) String() string {
@@ -221,7 +214,7 @@ func (*AssetServiceGetAssetResponse_Metadata) ProtoMessage() {}
func (x *AssetServiceGetAssetResponse_Metadata) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_asset_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -244,20 +237,17 @@ func (x *AssetServiceGetAssetResponse_Metadata) GetContentType() string {
}
type AssetServiceGetAssetResponse_Data struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *AssetServiceGetAssetResponse_Data) Reset() {
*x = AssetServiceGetAssetResponse_Data{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_asset_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_asset_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AssetServiceGetAssetResponse_Data) String() string {
@@ -268,7 +258,7 @@ func (*AssetServiceGetAssetResponse_Data) ProtoMessage() {}
func (x *AssetServiceGetAssetResponse_Data) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_asset_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -292,7 +282,7 @@ func (x *AssetServiceGetAssetResponse_Data) GetData() []byte {
var File_c1_connector_v2_asset_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_asset_proto_rawDesc = []byte{
+var file_c1_connector_v2_asset_proto_rawDesc = string([]byte{
0x0a, 0x1b, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63,
0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x17,
@@ -337,22 +327,22 @@ var file_c1_connector_v2_asset_proto_rawDesc = []byte{
0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31,
0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_v2_asset_proto_rawDescOnce sync.Once
- file_c1_connector_v2_asset_proto_rawDescData = file_c1_connector_v2_asset_proto_rawDesc
+ file_c1_connector_v2_asset_proto_rawDescData []byte
)
func file_c1_connector_v2_asset_proto_rawDescGZIP() []byte {
file_c1_connector_v2_asset_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_asset_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_asset_proto_rawDescData)
+ file_c1_connector_v2_asset_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_asset_proto_rawDesc), len(file_c1_connector_v2_asset_proto_rawDesc)))
})
return file_c1_connector_v2_asset_proto_rawDescData
}
var file_c1_connector_v2_asset_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
-var file_c1_connector_v2_asset_proto_goTypes = []interface{}{
+var file_c1_connector_v2_asset_proto_goTypes = []any{
(*AssetRef)(nil), // 0: c1.connector.v2.AssetRef
(*AssetServiceGetAssetRequest)(nil), // 1: c1.connector.v2.AssetServiceGetAssetRequest
(*AssetServiceGetAssetResponse)(nil), // 2: c1.connector.v2.AssetServiceGetAssetResponse
@@ -377,69 +367,7 @@ func file_c1_connector_v2_asset_proto_init() {
if File_c1_connector_v2_asset_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_asset_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AssetRef); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_asset_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AssetServiceGetAssetRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_asset_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AssetServiceGetAssetResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_asset_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AssetServiceGetAssetResponse_Metadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_asset_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AssetServiceGetAssetResponse_Data); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_c1_connector_v2_asset_proto_msgTypes[2].OneofWrappers = []interface{}{
+ file_c1_connector_v2_asset_proto_msgTypes[2].OneofWrappers = []any{
(*AssetServiceGetAssetResponse_Metadata_)(nil),
(*AssetServiceGetAssetResponse_Data_)(nil),
}
@@ -447,7 +375,7 @@ func file_c1_connector_v2_asset_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_asset_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_asset_proto_rawDesc), len(file_c1_connector_v2_asset_proto_rawDesc)),
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
@@ -458,7 +386,6 @@ func file_c1_connector_v2_asset_proto_init() {
MessageInfos: file_c1_connector_v2_asset_proto_msgTypes,
}.Build()
File_c1_connector_v2_asset_proto = out.File
- file_c1_connector_v2_asset_proto_rawDesc = nil
file_c1_connector_v2_asset_proto_goTypes = nil
file_c1_connector_v2_asset_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset.pb.validate.go
index bc36a62a..812b1ced 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset.pb.validate.go
@@ -81,7 +81,7 @@ type AssetRefMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m AssetRefMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -221,7 +221,7 @@ type AssetServiceGetAssetRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m AssetServiceGetAssetRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -424,7 +424,7 @@ type AssetServiceGetAssetResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m AssetServiceGetAssetResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -540,7 +540,7 @@ type AssetServiceGetAssetResponse_MetadataMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m AssetServiceGetAssetResponse_MetadataMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -656,7 +656,7 @@ type AssetServiceGetAssetResponse_DataMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m AssetServiceGetAssetResponse_DataMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset_grpc.pb.go
index b2f78322..86bdc6dd 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/asset_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/connector/v2/asset.proto
@@ -15,14 +15,18 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ AssetService_GetAsset_FullMethodName = "/c1.connector.v2.AssetService/GetAsset"
+)
// AssetServiceClient is the client API for AssetService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type AssetServiceClient interface {
- GetAsset(ctx context.Context, in *AssetServiceGetAssetRequest, opts ...grpc.CallOption) (AssetService_GetAssetClient, error)
+ GetAsset(ctx context.Context, in *AssetServiceGetAssetRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[AssetServiceGetAssetResponse], error)
}
type assetServiceClient struct {
@@ -33,12 +37,13 @@ func NewAssetServiceClient(cc grpc.ClientConnInterface) AssetServiceClient {
return &assetServiceClient{cc}
}
-func (c *assetServiceClient) GetAsset(ctx context.Context, in *AssetServiceGetAssetRequest, opts ...grpc.CallOption) (AssetService_GetAssetClient, error) {
- stream, err := c.cc.NewStream(ctx, &AssetService_ServiceDesc.Streams[0], "/c1.connector.v2.AssetService/GetAsset", opts...)
+func (c *assetServiceClient) GetAsset(ctx context.Context, in *AssetServiceGetAssetRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[AssetServiceGetAssetResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &AssetService_ServiceDesc.Streams[0], AssetService_GetAsset_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
- x := &assetServiceGetAssetClient{stream}
+ x := &grpc.GenericClientStream[AssetServiceGetAssetRequest, AssetServiceGetAssetResponse]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
@@ -48,37 +53,27 @@ func (c *assetServiceClient) GetAsset(ctx context.Context, in *AssetServiceGetAs
return x, nil
}
-type AssetService_GetAssetClient interface {
- Recv() (*AssetServiceGetAssetResponse, error)
- grpc.ClientStream
-}
-
-type assetServiceGetAssetClient struct {
- grpc.ClientStream
-}
-
-func (x *assetServiceGetAssetClient) Recv() (*AssetServiceGetAssetResponse, error) {
- m := new(AssetServiceGetAssetResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type AssetService_GetAssetClient = grpc.ServerStreamingClient[AssetServiceGetAssetResponse]
// AssetServiceServer is the server API for AssetService service.
// All implementations should embed UnimplementedAssetServiceServer
-// for forward compatibility
+// for forward compatibility.
type AssetServiceServer interface {
- GetAsset(*AssetServiceGetAssetRequest, AssetService_GetAssetServer) error
+ GetAsset(*AssetServiceGetAssetRequest, grpc.ServerStreamingServer[AssetServiceGetAssetResponse]) error
}
-// UnimplementedAssetServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedAssetServiceServer struct {
-}
+// UnimplementedAssetServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedAssetServiceServer struct{}
-func (UnimplementedAssetServiceServer) GetAsset(*AssetServiceGetAssetRequest, AssetService_GetAssetServer) error {
+func (UnimplementedAssetServiceServer) GetAsset(*AssetServiceGetAssetRequest, grpc.ServerStreamingServer[AssetServiceGetAssetResponse]) error {
return status.Errorf(codes.Unimplemented, "method GetAsset not implemented")
}
+func (UnimplementedAssetServiceServer) testEmbeddedByValue() {}
// UnsafeAssetServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AssetServiceServer will
@@ -88,6 +83,13 @@ type UnsafeAssetServiceServer interface {
}
func RegisterAssetServiceServer(s grpc.ServiceRegistrar, srv AssetServiceServer) {
+ // If the following call pancis, it indicates UnimplementedAssetServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&AssetService_ServiceDesc, srv)
}
@@ -96,21 +98,11 @@ func _AssetService_GetAsset_Handler(srv interface{}, stream grpc.ServerStream) e
if err := stream.RecvMsg(m); err != nil {
return err
}
- return srv.(AssetServiceServer).GetAsset(m, &assetServiceGetAssetServer{stream})
-}
-
-type AssetService_GetAssetServer interface {
- Send(*AssetServiceGetAssetResponse) error
- grpc.ServerStream
-}
-
-type assetServiceGetAssetServer struct {
- grpc.ServerStream
+ return srv.(AssetServiceServer).GetAsset(m, &grpc.GenericServerStream[AssetServiceGetAssetRequest, AssetServiceGetAssetResponse]{ServerStream: stream})
}
-func (x *assetServiceGetAssetServer) Send(m *AssetServiceGetAssetResponse) error {
- return x.ServerStream.SendMsg(m)
-}
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type AssetService_GetAssetServer = grpc.ServerStreamingServer[AssetServiceGetAssetResponse]
// AssetService_ServiceDesc is the grpc.ServiceDesc for AssetService service.
// It's only intended for direct use with grpc.RegisterService,
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config.pb.go
index a2b273e4..f0e34d03 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/config.proto
@@ -12,6 +12,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -22,18 +23,16 @@ const (
)
type SchemaServiceGetSchemaRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *SchemaServiceGetSchemaRequest) Reset() {
*x = SchemaServiceGetSchemaRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_config_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_config_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SchemaServiceGetSchemaRequest) String() string {
@@ -44,7 +43,7 @@ func (*SchemaServiceGetSchemaRequest) ProtoMessage() {}
func (x *SchemaServiceGetSchemaRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_config_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -60,21 +59,18 @@ func (*SchemaServiceGetSchemaRequest) Descriptor() ([]byte, []int) {
}
type SchemaServiceGetSchemaResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
+ Schema *ConfigSchema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
- Schema *ConfigSchema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *SchemaServiceGetSchemaResponse) Reset() {
*x = SchemaServiceGetSchemaResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_config_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_config_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SchemaServiceGetSchemaResponse) String() string {
@@ -85,7 +81,7 @@ func (*SchemaServiceGetSchemaResponse) ProtoMessage() {}
func (x *SchemaServiceGetSchemaResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_config_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -115,24 +111,21 @@ func (x *SchemaServiceGetSchemaResponse) GetSchema() *ConfigSchema {
}
type ConfigSchema struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Fields []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ HelpUrl string `protobuf:"bytes,3,opt,name=help_url,json=helpUrl,proto3" json:"help_url,omitempty"`
+ Icon *AssetRef `protobuf:"bytes,4,opt,name=icon,proto3" json:"icon,omitempty"`
+ Logo *AssetRef `protobuf:"bytes,5,opt,name=logo,proto3" json:"logo,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Fields []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
- DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
- HelpUrl string `protobuf:"bytes,3,opt,name=help_url,json=helpUrl,proto3" json:"help_url,omitempty"`
- Icon *AssetRef `protobuf:"bytes,4,opt,name=icon,proto3" json:"icon,omitempty"`
- Logo *AssetRef `protobuf:"bytes,5,opt,name=logo,proto3" json:"logo,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ConfigSchema) Reset() {
*x = ConfigSchema{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_config_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_config_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConfigSchema) String() string {
@@ -143,7 +136,7 @@ func (*ConfigSchema) ProtoMessage() {}
func (x *ConfigSchema) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_config_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -194,10 +187,7 @@ func (x *ConfigSchema) GetLogo() *AssetRef {
}
type Field struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Must not start with `C1_` and match [a-zA-Z0-9_]{2,64}. Must be unique within a connector.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// empty or https URL
@@ -205,22 +195,22 @@ type Field struct {
// Human readable label for this Field
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
Placeholder string `protobuf:"bytes,4,opt,name=placeholder,proto3" json:"placeholder,omitempty"`
- // Types that are assignable to Field:
+ // Types that are valid to be assigned to Field:
//
// *Field_Str
// *Field_Select
// *Field_Random
// *Field_File
- Field isField_Field `protobuf_oneof:"field"`
+ Field isField_Field `protobuf_oneof:"field"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Field) Reset() {
*x = Field{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_config_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_config_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Field) String() string {
@@ -231,7 +221,7 @@ func (*Field) ProtoMessage() {}
func (x *Field) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_config_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -274,37 +264,45 @@ func (x *Field) GetPlaceholder() string {
return ""
}
-func (m *Field) GetField() isField_Field {
- if m != nil {
- return m.Field
+func (x *Field) GetField() isField_Field {
+ if x != nil {
+ return x.Field
}
return nil
}
func (x *Field) GetStr() *StringField {
- if x, ok := x.GetField().(*Field_Str); ok {
- return x.Str
+ if x != nil {
+ if x, ok := x.Field.(*Field_Str); ok {
+ return x.Str
+ }
}
return nil
}
func (x *Field) GetSelect() *SelectField {
- if x, ok := x.GetField().(*Field_Select); ok {
- return x.Select
+ if x != nil {
+ if x, ok := x.Field.(*Field_Select); ok {
+ return x.Select
+ }
}
return nil
}
func (x *Field) GetRandom() *RandomStringField {
- if x, ok := x.GetField().(*Field_Random); ok {
- return x.Random
+ if x != nil {
+ if x, ok := x.Field.(*Field_Random); ok {
+ return x.Random
+ }
}
return nil
}
func (x *Field) GetFile() *FileField {
- if x, ok := x.GetField().(*Field_File); ok {
- return x.File
+ if x != nil {
+ if x, ok := x.Field.(*Field_File); ok {
+ return x.File
+ }
}
return nil
}
@@ -338,23 +336,20 @@ func (*Field_Random) isField_Field() {}
func (*Field_File) isField_Field() {}
type StringField struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// If secret, value is write-only in UI and a password-type form is used.
Secret bool `protobuf:"varint,1,opt,name=secret,proto3" json:"secret,omitempty"`
// validator rules for value. may be empty.
ValueValidator *validate.StringRules `protobuf:"bytes,2,opt,name=value_validator,json=valueValidator,proto3" json:"value_validator,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *StringField) Reset() {
*x = StringField{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_config_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_config_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *StringField) String() string {
@@ -365,7 +360,7 @@ func (*StringField) ProtoMessage() {}
func (x *StringField) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_config_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -395,21 +390,18 @@ func (x *StringField) GetValueValidator() *validate.StringRules {
}
type SelectField struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// list of items that are selected from
- Items []*SelectField_Item `protobuf:"bytes,5,rep,name=items,proto3" json:"items,omitempty"`
+ Items []*SelectField_Item `protobuf:"bytes,5,rep,name=items,proto3" json:"items,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *SelectField) Reset() {
*x = SelectField{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_config_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_config_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SelectField) String() string {
@@ -420,7 +412,7 @@ func (*SelectField) ProtoMessage() {}
func (x *SelectField) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_config_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -443,20 +435,17 @@ func (x *SelectField) GetItems() []*SelectField_Item {
}
type RandomStringField struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *RandomStringField) Reset() {
*x = RandomStringField{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_config_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_config_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RandomStringField) String() string {
@@ -467,7 +456,7 @@ func (*RandomStringField) ProtoMessage() {}
func (x *RandomStringField) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_config_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -490,22 +479,19 @@ func (x *RandomStringField) GetLength() int32 {
}
type FileField struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Secret bool `protobuf:"varint,1,opt,name=secret,proto3" json:"secret,omitempty"`
- ValueValidator *validate.StringRules `protobuf:"bytes,2,opt,name=value_validator,json=valueValidator,proto3" json:"value_validator,omitempty"`
- AllowedExtensions []string `protobuf:"bytes,3,rep,name=allowed_extensions,json=allowedExtensions,proto3" json:"allowed_extensions,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Secret bool `protobuf:"varint,1,opt,name=secret,proto3" json:"secret,omitempty"`
+ ValueValidator *validate.StringRules `protobuf:"bytes,2,opt,name=value_validator,json=valueValidator,proto3" json:"value_validator,omitempty"`
+ AllowedExtensions []string `protobuf:"bytes,3,rep,name=allowed_extensions,json=allowedExtensions,proto3" json:"allowed_extensions,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *FileField) Reset() {
*x = FileField{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_config_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_config_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *FileField) String() string {
@@ -516,7 +502,7 @@ func (*FileField) ProtoMessage() {}
func (x *FileField) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_config_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -553,21 +539,18 @@ func (x *FileField) GetAllowedExtensions() []string {
}
type SelectField_Item struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
unknownFields protoimpl.UnknownFields
-
- DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
- Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *SelectField_Item) Reset() {
*x = SelectField_Item{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_config_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_config_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SelectField_Item) String() string {
@@ -578,7 +561,7 @@ func (*SelectField_Item) ProtoMessage() {}
func (x *SelectField_Item) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_config_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -609,7 +592,7 @@ func (x *SelectField_Item) GetValue() string {
var File_c1_connector_v2_config_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_config_proto_rawDesc = []byte{
+var file_c1_connector_v2_config_proto_rawDesc = string([]byte{
0x0a, 0x1c, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a,
@@ -701,22 +684,22 @@ var file_c1_connector_v2_config_proto_rawDesc = []byte{
0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70,
0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_v2_config_proto_rawDescOnce sync.Once
- file_c1_connector_v2_config_proto_rawDescData = file_c1_connector_v2_config_proto_rawDesc
+ file_c1_connector_v2_config_proto_rawDescData []byte
)
func file_c1_connector_v2_config_proto_rawDescGZIP() []byte {
file_c1_connector_v2_config_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_config_proto_rawDescData)
+ file_c1_connector_v2_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_config_proto_rawDesc), len(file_c1_connector_v2_config_proto_rawDesc)))
})
return file_c1_connector_v2_config_proto_rawDescData
}
var file_c1_connector_v2_config_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
-var file_c1_connector_v2_config_proto_goTypes = []interface{}{
+var file_c1_connector_v2_config_proto_goTypes = []any{
(*SchemaServiceGetSchemaRequest)(nil), // 0: c1.connector.v2.SchemaServiceGetSchemaRequest
(*SchemaServiceGetSchemaResponse)(nil), // 1: c1.connector.v2.SchemaServiceGetSchemaResponse
(*ConfigSchema)(nil), // 2: c1.connector.v2.ConfigSchema
@@ -756,117 +739,7 @@ func file_c1_connector_v2_config_proto_init() {
return
}
file_c1_connector_v2_asset_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SchemaServiceGetSchemaRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SchemaServiceGetSchemaResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConfigSchema); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Field); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*StringField); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SelectField); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RandomStringField); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*FileField); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SelectField_Item); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_c1_connector_v2_config_proto_msgTypes[3].OneofWrappers = []interface{}{
+ file_c1_connector_v2_config_proto_msgTypes[3].OneofWrappers = []any{
(*Field_Str)(nil),
(*Field_Select)(nil),
(*Field_Random)(nil),
@@ -876,7 +749,7 @@ func file_c1_connector_v2_config_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_config_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_config_proto_rawDesc), len(file_c1_connector_v2_config_proto_rawDesc)),
NumEnums: 0,
NumMessages: 9,
NumExtensions: 0,
@@ -887,7 +760,6 @@ func file_c1_connector_v2_config_proto_init() {
MessageInfos: file_c1_connector_v2_config_proto_msgTypes,
}.Build()
File_c1_connector_v2_config_proto = out.File
- file_c1_connector_v2_config_proto_rawDesc = nil
file_c1_connector_v2_config_proto_goTypes = nil
file_c1_connector_v2_config_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config.pb.validate.go
index f38d6c28..ebb5cdd1 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config.pb.validate.go
@@ -71,7 +71,7 @@ type SchemaServiceGetSchemaRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m SchemaServiceGetSchemaRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -205,7 +205,7 @@ type SchemaServiceGetSchemaResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m SchemaServiceGetSchemaResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -403,7 +403,7 @@ type ConfigSchemaMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConfigSchemaMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -678,7 +678,7 @@ type FieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m FieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -808,7 +808,7 @@ type StringFieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m StringFieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -941,7 +941,7 @@ type SelectFieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m SelectFieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1043,7 +1043,7 @@ type RandomStringFieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m RandomStringFieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1175,7 +1175,7 @@ type FileFieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m FileFieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1279,7 +1279,7 @@ type SelectField_ItemMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m SelectField_ItemMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config_grpc.pb.go
index aecf4c22..84f33266 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/config_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/connector/v2/config.proto
@@ -15,8 +15,12 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ SchemaService_GetSchema_FullMethodName = "/c1.connector.v2.SchemaService/GetSchema"
+)
// SchemaServiceClient is the client API for SchemaService service.
//
@@ -34,8 +38,9 @@ func NewSchemaServiceClient(cc grpc.ClientConnInterface) SchemaServiceClient {
}
func (c *schemaServiceClient) GetSchema(ctx context.Context, in *SchemaServiceGetSchemaRequest, opts ...grpc.CallOption) (*SchemaServiceGetSchemaResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SchemaServiceGetSchemaResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.SchemaService/GetSchema", in, out, opts...)
+ err := c.cc.Invoke(ctx, SchemaService_GetSchema_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -44,18 +49,22 @@ func (c *schemaServiceClient) GetSchema(ctx context.Context, in *SchemaServiceGe
// SchemaServiceServer is the server API for SchemaService service.
// All implementations should embed UnimplementedSchemaServiceServer
-// for forward compatibility
+// for forward compatibility.
type SchemaServiceServer interface {
GetSchema(context.Context, *SchemaServiceGetSchemaRequest) (*SchemaServiceGetSchemaResponse, error)
}
-// UnimplementedSchemaServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedSchemaServiceServer struct {
-}
+// UnimplementedSchemaServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedSchemaServiceServer struct{}
func (UnimplementedSchemaServiceServer) GetSchema(context.Context, *SchemaServiceGetSchemaRequest) (*SchemaServiceGetSchemaResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented")
}
+func (UnimplementedSchemaServiceServer) testEmbeddedByValue() {}
// UnsafeSchemaServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SchemaServiceServer will
@@ -65,6 +74,13 @@ type UnsafeSchemaServiceServer interface {
}
func RegisterSchemaServiceServer(s grpc.ServiceRegistrar, srv SchemaServiceServer) {
+ // If the following call pancis, it indicates UnimplementedSchemaServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&SchemaService_ServiceDesc, srv)
}
@@ -78,7 +94,7 @@ func _SchemaService_GetSchema_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.SchemaService/GetSchema",
+ FullMethod: SchemaService_GetSchema_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchemaServiceServer).GetSchema(ctx, req.(*SchemaServiceGetSchemaRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go
index e5d257d5..51436ad9 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/connector.proto
@@ -14,6 +14,7 @@ import (
structpb "google.golang.org/protobuf/types/known/structpb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -36,21 +37,23 @@ const (
Capability_CAPABILITY_RESOURCE_CREATE Capability = 7
Capability_CAPABILITY_RESOURCE_DELETE Capability = 8
Capability_CAPABILITY_SYNC_SECRETS Capability = 9
+ Capability_CAPABILITY_ACTIONS Capability = 10
)
// Enum value maps for Capability.
var (
Capability_name = map[int32]string{
- 0: "CAPABILITY_UNSPECIFIED",
- 1: "CAPABILITY_PROVISION",
- 2: "CAPABILITY_SYNC",
- 3: "CAPABILITY_EVENT_FEED",
- 4: "CAPABILITY_TICKETING",
- 5: "CAPABILITY_ACCOUNT_PROVISIONING",
- 6: "CAPABILITY_CREDENTIAL_ROTATION",
- 7: "CAPABILITY_RESOURCE_CREATE",
- 8: "CAPABILITY_RESOURCE_DELETE",
- 9: "CAPABILITY_SYNC_SECRETS",
+ 0: "CAPABILITY_UNSPECIFIED",
+ 1: "CAPABILITY_PROVISION",
+ 2: "CAPABILITY_SYNC",
+ 3: "CAPABILITY_EVENT_FEED",
+ 4: "CAPABILITY_TICKETING",
+ 5: "CAPABILITY_ACCOUNT_PROVISIONING",
+ 6: "CAPABILITY_CREDENTIAL_ROTATION",
+ 7: "CAPABILITY_RESOURCE_CREATE",
+ 8: "CAPABILITY_RESOURCE_DELETE",
+ 9: "CAPABILITY_SYNC_SECRETS",
+ 10: "CAPABILITY_ACTIONS",
}
Capability_value = map[string]int32{
"CAPABILITY_UNSPECIFIED": 0,
@@ -63,6 +66,7 @@ var (
"CAPABILITY_RESOURCE_CREATE": 7,
"CAPABILITY_RESOURCE_DELETE": 8,
"CAPABILITY_SYNC_SECRETS": 9,
+ "CAPABILITY_ACTIONS": 10,
}
)
@@ -146,20 +150,17 @@ func (CapabilityDetailCredentialOption) EnumDescriptor() ([]byte, []int) {
}
type ConnectorServiceCleanupRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorServiceCleanupRequest) Reset() {
*x = ConnectorServiceCleanupRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorServiceCleanupRequest) String() string {
@@ -170,7 +171,7 @@ func (*ConnectorServiceCleanupRequest) ProtoMessage() {}
func (x *ConnectorServiceCleanupRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -193,20 +194,17 @@ func (x *ConnectorServiceCleanupRequest) GetAnnotations() []*anypb.Any {
}
type ConnectorServiceCleanupResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorServiceCleanupResponse) Reset() {
*x = ConnectorServiceCleanupResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorServiceCleanupResponse) String() string {
@@ -217,7 +215,7 @@ func (*ConnectorServiceCleanupResponse) ProtoMessage() {}
func (x *ConnectorServiceCleanupResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -240,10 +238,7 @@ func (x *ConnectorServiceCleanupResponse) GetAnnotations() []*anypb.Any {
}
type ConnectorMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
HelpUrl string `protobuf:"bytes,2,opt,name=help_url,json=helpUrl,proto3" json:"help_url,omitempty"`
Icon *AssetRef `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"`
@@ -253,15 +248,15 @@ type ConnectorMetadata struct {
Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"`
Capabilities *ConnectorCapabilities `protobuf:"bytes,8,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
AccountCreationSchema *ConnectorAccountCreationSchema `protobuf:"bytes,9,opt,name=account_creation_schema,json=accountCreationSchema,proto3" json:"account_creation_schema,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorMetadata) Reset() {
*x = ConnectorMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorMetadata) String() string {
@@ -272,7 +267,7 @@ func (*ConnectorMetadata) ProtoMessage() {}
func (x *ConnectorMetadata) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -351,21 +346,18 @@ func (x *ConnectorMetadata) GetAccountCreationSchema() *ConnectorAccountCreation
}
type CredentialDetails struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
CapabilityAccountProvisioning *CredentialDetailsAccountProvisioning `protobuf:"bytes,1,opt,name=capability_account_provisioning,json=capabilityAccountProvisioning,proto3" json:"capability_account_provisioning,omitempty"`
CapabilityCredentialRotation *CredentialDetailsCredentialRotation `protobuf:"bytes,2,opt,name=capability_credential_rotation,json=capabilityCredentialRotation,proto3" json:"capability_credential_rotation,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CredentialDetails) Reset() {
*x = CredentialDetails{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CredentialDetails) String() string {
@@ -376,7 +368,7 @@ func (*CredentialDetails) ProtoMessage() {}
func (x *CredentialDetails) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -406,21 +398,18 @@ func (x *CredentialDetails) GetCapabilityCredentialRotation() *CredentialDetails
}
type CredentialDetailsAccountProvisioning struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
SupportedCredentialOptions []CapabilityDetailCredentialOption `protobuf:"varint,1,rep,packed,name=supported_credential_options,json=supportedCredentialOptions,proto3,enum=c1.connector.v2.CapabilityDetailCredentialOption" json:"supported_credential_options,omitempty"`
PreferredCredentialOption CapabilityDetailCredentialOption `protobuf:"varint,2,opt,name=preferred_credential_option,json=preferredCredentialOption,proto3,enum=c1.connector.v2.CapabilityDetailCredentialOption" json:"preferred_credential_option,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CredentialDetailsAccountProvisioning) Reset() {
*x = CredentialDetailsAccountProvisioning{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CredentialDetailsAccountProvisioning) String() string {
@@ -431,7 +420,7 @@ func (*CredentialDetailsAccountProvisioning) ProtoMessage() {}
func (x *CredentialDetailsAccountProvisioning) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -461,21 +450,18 @@ func (x *CredentialDetailsAccountProvisioning) GetPreferredCredentialOption() Ca
}
type CredentialDetailsCredentialRotation struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
SupportedCredentialOptions []CapabilityDetailCredentialOption `protobuf:"varint,1,rep,packed,name=supported_credential_options,json=supportedCredentialOptions,proto3,enum=c1.connector.v2.CapabilityDetailCredentialOption" json:"supported_credential_options,omitempty"`
PreferredCredentialOption CapabilityDetailCredentialOption `protobuf:"varint,2,opt,name=preferred_credential_option,json=preferredCredentialOption,proto3,enum=c1.connector.v2.CapabilityDetailCredentialOption" json:"preferred_credential_option,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CredentialDetailsCredentialRotation) Reset() {
*x = CredentialDetailsCredentialRotation{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CredentialDetailsCredentialRotation) String() string {
@@ -486,7 +472,7 @@ func (*CredentialDetailsCredentialRotation) ProtoMessage() {}
func (x *CredentialDetailsCredentialRotation) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -516,22 +502,19 @@ func (x *CredentialDetailsCredentialRotation) GetPreferredCredentialOption() Cap
}
type ConnectorCapabilities struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
ResourceTypeCapabilities []*ResourceTypeCapability `protobuf:"bytes,1,rep,name=resource_type_capabilities,json=resourceTypeCapabilities,proto3" json:"resource_type_capabilities,omitempty"`
ConnectorCapabilities []Capability `protobuf:"varint,2,rep,packed,name=connector_capabilities,json=connectorCapabilities,proto3,enum=c1.connector.v2.Capability" json:"connector_capabilities,omitempty"`
CredentialDetails *CredentialDetails `protobuf:"bytes,3,opt,name=credential_details,json=credentialDetails,proto3" json:"credential_details,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorCapabilities) Reset() {
*x = ConnectorCapabilities{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorCapabilities) String() string {
@@ -542,7 +525,7 @@ func (*ConnectorCapabilities) ProtoMessage() {}
func (x *ConnectorCapabilities) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -579,21 +562,18 @@ func (x *ConnectorCapabilities) GetCredentialDetails() *CredentialDetails {
}
type ResourceTypeCapability struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceType *ResourceType `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
+ Capabilities []Capability `protobuf:"varint,2,rep,packed,name=capabilities,proto3,enum=c1.connector.v2.Capability" json:"capabilities,omitempty"`
unknownFields protoimpl.UnknownFields
-
- ResourceType *ResourceType `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
- Capabilities []Capability `protobuf:"varint,2,rep,packed,name=capabilities,proto3,enum=c1.connector.v2.Capability" json:"capabilities,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ResourceTypeCapability) Reset() {
*x = ResourceTypeCapability{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourceTypeCapability) String() string {
@@ -604,7 +584,7 @@ func (*ResourceTypeCapability) ProtoMessage() {}
func (x *ResourceTypeCapability) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -634,18 +614,16 @@ func (x *ResourceTypeCapability) GetCapabilities() []Capability {
}
type ConnectorServiceGetMetadataRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorServiceGetMetadataRequest) Reset() {
*x = ConnectorServiceGetMetadataRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorServiceGetMetadataRequest) String() string {
@@ -656,7 +634,7 @@ func (*ConnectorServiceGetMetadataRequest) ProtoMessage() {}
func (x *ConnectorServiceGetMetadataRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -672,20 +650,17 @@ func (*ConnectorServiceGetMetadataRequest) Descriptor() ([]byte, []int) {
}
type ConnectorServiceGetMetadataResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Metadata *ConnectorMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Metadata *ConnectorMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorServiceGetMetadataResponse) Reset() {
*x = ConnectorServiceGetMetadataResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorServiceGetMetadataResponse) String() string {
@@ -696,7 +671,7 @@ func (*ConnectorServiceGetMetadataResponse) ProtoMessage() {}
func (x *ConnectorServiceGetMetadataResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -719,18 +694,16 @@ func (x *ConnectorServiceGetMetadataResponse) GetMetadata() *ConnectorMetadata {
}
type ConnectorServiceValidateRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorServiceValidateRequest) Reset() {
*x = ConnectorServiceValidateRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorServiceValidateRequest) String() string {
@@ -741,7 +714,7 @@ func (*ConnectorServiceValidateRequest) ProtoMessage() {}
func (x *ConnectorServiceValidateRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -759,20 +732,17 @@ func (*ConnectorServiceValidateRequest) Descriptor() ([]byte, []int) {
// NOTE(morgabra) We're expecting correct grpc.Status responses
// for things like 401/403/500, etc
type ConnectorServiceValidateResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorServiceValidateResponse) Reset() {
*x = ConnectorServiceValidateResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorServiceValidateResponse) String() string {
@@ -783,7 +753,7 @@ func (*ConnectorServiceValidateResponse) ProtoMessage() {}
func (x *ConnectorServiceValidateResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -806,20 +776,17 @@ func (x *ConnectorServiceValidateResponse) GetAnnotations() []*anypb.Any {
}
type ConnectorAccountCreationSchema struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ FieldMap map[string]*ConnectorAccountCreationSchema_Field `protobuf:"bytes,1,rep,name=field_map,json=fieldMap,proto3" json:"field_map,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
-
- FieldMap map[string]*ConnectorAccountCreationSchema_Field `protobuf:"bytes,1,rep,name=field_map,json=fieldMap,proto3" json:"field_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorAccountCreationSchema) Reset() {
*x = ConnectorAccountCreationSchema{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorAccountCreationSchema) String() string {
@@ -830,7 +797,7 @@ func (*ConnectorAccountCreationSchema) ProtoMessage() {}
func (x *ConnectorAccountCreationSchema) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -853,33 +820,30 @@ func (x *ConnectorAccountCreationSchema) GetFieldMap() map[string]*ConnectorAcco
}
type ConnectorAccountCreationSchema_Field struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
- Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"`
- Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
- Placeholder string `protobuf:"bytes,4,opt,name=placeholder,proto3" json:"placeholder,omitempty"`
- Order int32 `protobuf:"varint,5,opt,name=order,proto3" json:"order,omitempty"`
- Deprecated bool `protobuf:"varint,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
- // Types that are assignable to Field:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"`
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
+ Placeholder string `protobuf:"bytes,4,opt,name=placeholder,proto3" json:"placeholder,omitempty"`
+ Order int32 `protobuf:"varint,5,opt,name=order,proto3" json:"order,omitempty"`
+ Deprecated bool `protobuf:"varint,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ // Types that are valid to be assigned to Field:
//
// *ConnectorAccountCreationSchema_Field_StringField
// *ConnectorAccountCreationSchema_Field_BoolField
// *ConnectorAccountCreationSchema_Field_StringListField
// *ConnectorAccountCreationSchema_Field_IntField
// *ConnectorAccountCreationSchema_Field_MapField
- Field isConnectorAccountCreationSchema_Field_Field `protobuf_oneof:"field"`
+ Field isConnectorAccountCreationSchema_Field_Field `protobuf_oneof:"field"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorAccountCreationSchema_Field) Reset() {
*x = ConnectorAccountCreationSchema_Field{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorAccountCreationSchema_Field) String() string {
@@ -890,7 +854,7 @@ func (*ConnectorAccountCreationSchema_Field) ProtoMessage() {}
func (x *ConnectorAccountCreationSchema_Field) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[14]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -947,44 +911,54 @@ func (x *ConnectorAccountCreationSchema_Field) GetDeprecated() bool {
return false
}
-func (m *ConnectorAccountCreationSchema_Field) GetField() isConnectorAccountCreationSchema_Field_Field {
- if m != nil {
- return m.Field
+func (x *ConnectorAccountCreationSchema_Field) GetField() isConnectorAccountCreationSchema_Field_Field {
+ if x != nil {
+ return x.Field
}
return nil
}
func (x *ConnectorAccountCreationSchema_Field) GetStringField() *ConnectorAccountCreationSchema_StringField {
- if x, ok := x.GetField().(*ConnectorAccountCreationSchema_Field_StringField); ok {
- return x.StringField
+ if x != nil {
+ if x, ok := x.Field.(*ConnectorAccountCreationSchema_Field_StringField); ok {
+ return x.StringField
+ }
}
return nil
}
func (x *ConnectorAccountCreationSchema_Field) GetBoolField() *ConnectorAccountCreationSchema_BoolField {
- if x, ok := x.GetField().(*ConnectorAccountCreationSchema_Field_BoolField); ok {
- return x.BoolField
+ if x != nil {
+ if x, ok := x.Field.(*ConnectorAccountCreationSchema_Field_BoolField); ok {
+ return x.BoolField
+ }
}
return nil
}
func (x *ConnectorAccountCreationSchema_Field) GetStringListField() *ConnectorAccountCreationSchema_StringListField {
- if x, ok := x.GetField().(*ConnectorAccountCreationSchema_Field_StringListField); ok {
- return x.StringListField
+ if x != nil {
+ if x, ok := x.Field.(*ConnectorAccountCreationSchema_Field_StringListField); ok {
+ return x.StringListField
+ }
}
return nil
}
func (x *ConnectorAccountCreationSchema_Field) GetIntField() *ConnectorAccountCreationSchema_IntField {
- if x, ok := x.GetField().(*ConnectorAccountCreationSchema_Field_IntField); ok {
- return x.IntField
+ if x != nil {
+ if x, ok := x.Field.(*ConnectorAccountCreationSchema_Field_IntField); ok {
+ return x.IntField
+ }
}
return nil
}
func (x *ConnectorAccountCreationSchema_Field) GetMapField() *ConnectorAccountCreationSchema_MapField {
- if x, ok := x.GetField().(*ConnectorAccountCreationSchema_Field_MapField); ok {
- return x.MapField
+ if x != nil {
+ if x, ok := x.Field.(*ConnectorAccountCreationSchema_Field_MapField); ok {
+ return x.MapField
+ }
}
return nil
}
@@ -1029,20 +1003,17 @@ func (*ConnectorAccountCreationSchema_Field_MapField) isConnectorAccountCreation
}
type ConnectorAccountCreationSchema_StringField struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DefaultValue *string `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3,oneof" json:"default_value,omitempty"`
unknownFields protoimpl.UnknownFields
-
- DefaultValue *string `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3,oneof" json:"default_value,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorAccountCreationSchema_StringField) Reset() {
*x = ConnectorAccountCreationSchema_StringField{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorAccountCreationSchema_StringField) String() string {
@@ -1053,7 +1024,7 @@ func (*ConnectorAccountCreationSchema_StringField) ProtoMessage() {}
func (x *ConnectorAccountCreationSchema_StringField) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[15]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1076,20 +1047,17 @@ func (x *ConnectorAccountCreationSchema_StringField) GetDefaultValue() string {
}
type ConnectorAccountCreationSchema_BoolField struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DefaultValue *bool `protobuf:"varint,1,opt,name=default_value,json=defaultValue,proto3,oneof" json:"default_value,omitempty"`
unknownFields protoimpl.UnknownFields
-
- DefaultValue *bool `protobuf:"varint,1,opt,name=default_value,json=defaultValue,proto3,oneof" json:"default_value,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorAccountCreationSchema_BoolField) Reset() {
*x = ConnectorAccountCreationSchema_BoolField{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[16]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorAccountCreationSchema_BoolField) String() string {
@@ -1100,7 +1068,7 @@ func (*ConnectorAccountCreationSchema_BoolField) ProtoMessage() {}
func (x *ConnectorAccountCreationSchema_BoolField) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[16]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1123,20 +1091,17 @@ func (x *ConnectorAccountCreationSchema_BoolField) GetDefaultValue() bool {
}
type ConnectorAccountCreationSchema_StringListField struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DefaultValue []string `protobuf:"bytes,1,rep,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
unknownFields protoimpl.UnknownFields
-
- DefaultValue []string `protobuf:"bytes,1,rep,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorAccountCreationSchema_StringListField) Reset() {
*x = ConnectorAccountCreationSchema_StringListField{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[17]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorAccountCreationSchema_StringListField) String() string {
@@ -1147,7 +1112,7 @@ func (*ConnectorAccountCreationSchema_StringListField) ProtoMessage() {}
func (x *ConnectorAccountCreationSchema_StringListField) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[17]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1170,20 +1135,17 @@ func (x *ConnectorAccountCreationSchema_StringListField) GetDefaultValue() []str
}
type ConnectorAccountCreationSchema_IntField struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DefaultValue *int32 `protobuf:"varint,1,opt,name=default_value,json=defaultValue,proto3,oneof" json:"default_value,omitempty"`
unknownFields protoimpl.UnknownFields
-
- DefaultValue *int32 `protobuf:"varint,1,opt,name=default_value,json=defaultValue,proto3,oneof" json:"default_value,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorAccountCreationSchema_IntField) Reset() {
*x = ConnectorAccountCreationSchema_IntField{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorAccountCreationSchema_IntField) String() string {
@@ -1194,7 +1156,7 @@ func (*ConnectorAccountCreationSchema_IntField) ProtoMessage() {}
func (x *ConnectorAccountCreationSchema_IntField) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[18]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1217,20 +1179,17 @@ func (x *ConnectorAccountCreationSchema_IntField) GetDefaultValue() int32 {
}
type ConnectorAccountCreationSchema_MapField struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DefaultValue map[string]*ConnectorAccountCreationSchema_Field `protobuf:"bytes,1,rep,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
-
- DefaultValue map[string]*ConnectorAccountCreationSchema_Field `protobuf:"bytes,1,rep,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ sizeCache protoimpl.SizeCache
}
func (x *ConnectorAccountCreationSchema_MapField) Reset() {
*x = ConnectorAccountCreationSchema_MapField{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_connector_proto_msgTypes[19]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_connector_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ConnectorAccountCreationSchema_MapField) String() string {
@@ -1241,7 +1200,7 @@ func (*ConnectorAccountCreationSchema_MapField) ProtoMessage() {}
func (x *ConnectorAccountCreationSchema_MapField) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_connector_proto_msgTypes[19]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1265,7 +1224,7 @@ func (x *ConnectorAccountCreationSchema_MapField) GetDefaultValue() map[string]*
var File_c1_connector_v2_connector_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_connector_proto_rawDesc = []byte{
+var file_c1_connector_v2_connector_proto_rawDesc = string([]byte{
0x0a, 0x1f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
@@ -1511,7 +1470,7 @@ var file_c1_connector_v2_connector_proto_rawDesc = []byte{
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46,
0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a,
- 0xb2, 0x02, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a,
+ 0xca, 0x02, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a,
0x0a, 0x16, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53,
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41,
0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49,
@@ -1530,66 +1489,67 @@ var file_c1_connector_v2_connector_proto_rawDesc = []byte{
0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x44,
0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x08, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x41, 0x50, 0x41, 0x42,
0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45,
- 0x54, 0x53, 0x10, 0x09, 0x2a, 0xf2, 0x01, 0x0a, 0x20, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
- 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
- 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50,
- 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43,
- 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e,
- 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x33,
- 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54,
- 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f,
- 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52,
- 0x44, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54,
- 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54,
- 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x44, 0x4f,
- 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x27,
- 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49,
- 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54,
- 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4f, 0x10, 0x03, 0x32, 0xeb, 0x02, 0x0a, 0x10, 0x43, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78,
- 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x2e,
+ 0x54, 0x53, 0x10, 0x09, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49,
+ 0x54, 0x59, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x0a, 0x2a, 0xf2, 0x01, 0x0a,
+ 0x20, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69,
+ 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f,
+ 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41,
+ 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
+ 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49,
+ 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44,
+ 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f,
+ 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43,
+ 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c,
+ 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f,
+ 0x52, 0x44, 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49,
+ 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e,
+ 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4f, 0x10,
+ 0x03, 0x32, 0xeb, 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x6f, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x6c, 0x0a, 0x07, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43,
+ 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e,
0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69,
- 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
- 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x07, 0x43, 0x6c, 0x65,
- 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75,
- 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f,
- 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f,
- 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62,
- 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+ 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
+ 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
+ 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e,
+ 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
var (
file_c1_connector_v2_connector_proto_rawDescOnce sync.Once
- file_c1_connector_v2_connector_proto_rawDescData = file_c1_connector_v2_connector_proto_rawDesc
+ file_c1_connector_v2_connector_proto_rawDescData []byte
)
func file_c1_connector_v2_connector_proto_rawDescGZIP() []byte {
file_c1_connector_v2_connector_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_connector_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_connector_proto_rawDescData)
+ file_c1_connector_v2_connector_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_connector_proto_rawDesc), len(file_c1_connector_v2_connector_proto_rawDesc)))
})
return file_c1_connector_v2_connector_proto_rawDescData
}
var file_c1_connector_v2_connector_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_c1_connector_v2_connector_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
-var file_c1_connector_v2_connector_proto_goTypes = []interface{}{
+var file_c1_connector_v2_connector_proto_goTypes = []any{
(Capability)(0), // 0: c1.connector.v2.Capability
(CapabilityDetailCredentialOption)(0), // 1: c1.connector.v2.CapabilityDetailCredentialOption
(*ConnectorServiceCleanupRequest)(nil), // 2: c1.connector.v2.ConnectorServiceCleanupRequest
@@ -1669,251 +1629,21 @@ func file_c1_connector_v2_connector_proto_init() {
}
file_c1_connector_v2_asset_proto_init()
file_c1_connector_v2_resource_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_connector_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceCleanupRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceCleanupResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CredentialDetails); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CredentialDetailsAccountProvisioning); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CredentialDetailsCredentialRotation); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorCapabilities); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourceTypeCapability); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceGetMetadataRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceGetMetadataResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceValidateRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorServiceValidateResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorAccountCreationSchema); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorAccountCreationSchema_Field); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorAccountCreationSchema_StringField); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorAccountCreationSchema_BoolField); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorAccountCreationSchema_StringListField); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorAccountCreationSchema_IntField); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ConnectorAccountCreationSchema_MapField); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_c1_connector_v2_connector_proto_msgTypes[14].OneofWrappers = []interface{}{
+ file_c1_connector_v2_connector_proto_msgTypes[14].OneofWrappers = []any{
(*ConnectorAccountCreationSchema_Field_StringField)(nil),
(*ConnectorAccountCreationSchema_Field_BoolField)(nil),
(*ConnectorAccountCreationSchema_Field_StringListField)(nil),
(*ConnectorAccountCreationSchema_Field_IntField)(nil),
(*ConnectorAccountCreationSchema_Field_MapField)(nil),
}
- file_c1_connector_v2_connector_proto_msgTypes[15].OneofWrappers = []interface{}{}
- file_c1_connector_v2_connector_proto_msgTypes[16].OneofWrappers = []interface{}{}
- file_c1_connector_v2_connector_proto_msgTypes[18].OneofWrappers = []interface{}{}
+ file_c1_connector_v2_connector_proto_msgTypes[15].OneofWrappers = []any{}
+ file_c1_connector_v2_connector_proto_msgTypes[16].OneofWrappers = []any{}
+ file_c1_connector_v2_connector_proto_msgTypes[18].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_connector_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_connector_proto_rawDesc), len(file_c1_connector_v2_connector_proto_rawDesc)),
NumEnums: 2,
NumMessages: 21,
NumExtensions: 0,
@@ -1925,7 +1655,6 @@ func file_c1_connector_v2_connector_proto_init() {
MessageInfos: file_c1_connector_v2_connector_proto_msgTypes,
}.Build()
File_c1_connector_v2_connector_proto = out.File
- file_c1_connector_v2_connector_proto_rawDesc = nil
file_c1_connector_v2_connector_proto_goTypes = nil
file_c1_connector_v2_connector_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go
index ea53b24c..f84beed1 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.validate.go
@@ -105,7 +105,7 @@ type ConnectorServiceCleanupRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorServiceCleanupRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -242,7 +242,7 @@ type ConnectorServiceCleanupResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorServiceCleanupResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -597,7 +597,7 @@ type ConnectorMetadataMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorMetadataMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -757,7 +757,7 @@ type CredentialDetailsMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CredentialDetailsMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -863,7 +863,7 @@ type CredentialDetailsAccountProvisioningMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CredentialDetailsAccountProvisioningMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -970,7 +970,7 @@ type CredentialDetailsCredentialRotationMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CredentialDetailsCredentialRotationMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1136,7 +1136,7 @@ type ConnectorCapabilitiesMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorCapabilitiesMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1267,7 +1267,7 @@ type ResourceTypeCapabilityMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourceTypeCapabilityMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1371,7 +1371,7 @@ type ConnectorServiceGetMetadataRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorServiceGetMetadataRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1505,7 +1505,7 @@ type ConnectorServiceGetMetadataResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorServiceGetMetadataResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1608,7 +1608,7 @@ type ConnectorServiceValidateRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorServiceValidateRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1747,7 +1747,7 @@ type ConnectorServiceValidateResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorServiceValidateResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1896,7 +1896,7 @@ type ConnectorAccountCreationSchemaMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorAccountCreationSchemaMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2223,7 +2223,7 @@ type ConnectorAccountCreationSchema_FieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorAccountCreationSchema_FieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2333,7 +2333,7 @@ type ConnectorAccountCreationSchema_StringFieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorAccountCreationSchema_StringFieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2443,7 +2443,7 @@ type ConnectorAccountCreationSchema_BoolFieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorAccountCreationSchema_BoolFieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2549,7 +2549,7 @@ type ConnectorAccountCreationSchema_StringListFieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorAccountCreationSchema_StringListFieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2662,7 +2662,7 @@ type ConnectorAccountCreationSchema_IntFieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorAccountCreationSchema_IntFieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2814,7 +2814,7 @@ type ConnectorAccountCreationSchema_MapFieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorAccountCreationSchema_MapFieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector_grpc.pb.go
index cfc2822e..93b8f429 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/connector/v2/connector.proto
@@ -15,8 +15,14 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ ConnectorService_GetMetadata_FullMethodName = "/c1.connector.v2.ConnectorService/GetMetadata"
+ ConnectorService_Validate_FullMethodName = "/c1.connector.v2.ConnectorService/Validate"
+ ConnectorService_Cleanup_FullMethodName = "/c1.connector.v2.ConnectorService/Cleanup"
+)
// ConnectorServiceClient is the client API for ConnectorService service.
//
@@ -36,8 +42,9 @@ func NewConnectorServiceClient(cc grpc.ClientConnInterface) ConnectorServiceClie
}
func (c *connectorServiceClient) GetMetadata(ctx context.Context, in *ConnectorServiceGetMetadataRequest, opts ...grpc.CallOption) (*ConnectorServiceGetMetadataResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ConnectorServiceGetMetadataResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.ConnectorService/GetMetadata", in, out, opts...)
+ err := c.cc.Invoke(ctx, ConnectorService_GetMetadata_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -45,8 +52,9 @@ func (c *connectorServiceClient) GetMetadata(ctx context.Context, in *ConnectorS
}
func (c *connectorServiceClient) Validate(ctx context.Context, in *ConnectorServiceValidateRequest, opts ...grpc.CallOption) (*ConnectorServiceValidateResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ConnectorServiceValidateResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.ConnectorService/Validate", in, out, opts...)
+ err := c.cc.Invoke(ctx, ConnectorService_Validate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -54,8 +62,9 @@ func (c *connectorServiceClient) Validate(ctx context.Context, in *ConnectorServ
}
func (c *connectorServiceClient) Cleanup(ctx context.Context, in *ConnectorServiceCleanupRequest, opts ...grpc.CallOption) (*ConnectorServiceCleanupResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ConnectorServiceCleanupResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.ConnectorService/Cleanup", in, out, opts...)
+ err := c.cc.Invoke(ctx, ConnectorService_Cleanup_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -64,16 +73,19 @@ func (c *connectorServiceClient) Cleanup(ctx context.Context, in *ConnectorServi
// ConnectorServiceServer is the server API for ConnectorService service.
// All implementations should embed UnimplementedConnectorServiceServer
-// for forward compatibility
+// for forward compatibility.
type ConnectorServiceServer interface {
GetMetadata(context.Context, *ConnectorServiceGetMetadataRequest) (*ConnectorServiceGetMetadataResponse, error)
Validate(context.Context, *ConnectorServiceValidateRequest) (*ConnectorServiceValidateResponse, error)
Cleanup(context.Context, *ConnectorServiceCleanupRequest) (*ConnectorServiceCleanupResponse, error)
}
-// UnimplementedConnectorServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedConnectorServiceServer struct {
-}
+// UnimplementedConnectorServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedConnectorServiceServer struct{}
func (UnimplementedConnectorServiceServer) GetMetadata(context.Context, *ConnectorServiceGetMetadataRequest) (*ConnectorServiceGetMetadataResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented")
@@ -84,6 +96,7 @@ func (UnimplementedConnectorServiceServer) Validate(context.Context, *ConnectorS
func (UnimplementedConnectorServiceServer) Cleanup(context.Context, *ConnectorServiceCleanupRequest) (*ConnectorServiceCleanupResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Cleanup not implemented")
}
+func (UnimplementedConnectorServiceServer) testEmbeddedByValue() {}
// UnsafeConnectorServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ConnectorServiceServer will
@@ -93,6 +106,13 @@ type UnsafeConnectorServiceServer interface {
}
func RegisterConnectorServiceServer(s grpc.ServiceRegistrar, srv ConnectorServiceServer) {
+ // If the following call pancis, it indicates UnimplementedConnectorServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&ConnectorService_ServiceDesc, srv)
}
@@ -106,7 +126,7 @@ func _ConnectorService_GetMetadata_Handler(srv interface{}, ctx context.Context,
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.ConnectorService/GetMetadata",
+ FullMethod: ConnectorService_GetMetadata_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConnectorServiceServer).GetMetadata(ctx, req.(*ConnectorServiceGetMetadataRequest))
@@ -124,7 +144,7 @@ func _ConnectorService_Validate_Handler(srv interface{}, ctx context.Context, de
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.ConnectorService/Validate",
+ FullMethod: ConnectorService_Validate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConnectorServiceServer).Validate(ctx, req.(*ConnectorServiceValidateRequest))
@@ -142,7 +162,7 @@ func _ConnectorService_Cleanup_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.ConnectorService/Cleanup",
+ FullMethod: ConnectorService_Cleanup_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConnectorServiceServer).Cleanup(ctx, req.(*ConnectorServiceCleanupRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.go
index 4e9b2c65..ec6c1d0e 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/entitlement.proto
@@ -13,6 +13,7 @@ import (
anypb "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -72,27 +73,24 @@ func (Entitlement_PurposeValue) EnumDescriptor() ([]byte, []int) {
}
type Entitlement struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+ DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+ GrantableTo []*ResourceType `protobuf:"bytes,5,rep,name=grantable_to,json=grantableTo,proto3" json:"grantable_to,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Purpose Entitlement_PurposeValue `protobuf:"varint,7,opt,name=purpose,proto3,enum=c1.connector.v2.Entitlement_PurposeValue" json:"purpose,omitempty"`
+ Slug string `protobuf:"bytes,8,opt,name=slug,proto3" json:"slug,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
- Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
- DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
- Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
- GrantableTo []*ResourceType `protobuf:"bytes,5,rep,name=grantable_to,json=grantableTo,proto3" json:"grantable_to,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty"`
- Purpose Entitlement_PurposeValue `protobuf:"varint,7,opt,name=purpose,proto3,enum=c1.connector.v2.Entitlement_PurposeValue" json:"purpose,omitempty"`
- Slug string `protobuf:"bytes,8,opt,name=slug,proto3" json:"slug,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Entitlement) Reset() {
*x = Entitlement{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_entitlement_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_entitlement_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Entitlement) String() string {
@@ -103,7 +101,7 @@ func (*Entitlement) ProtoMessage() {}
func (x *Entitlement) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_entitlement_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -175,23 +173,20 @@ func (x *Entitlement) GetSlug() string {
}
type EntitlementsServiceListEntitlementsRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
- PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *EntitlementsServiceListEntitlementsRequest) Reset() {
*x = EntitlementsServiceListEntitlementsRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_entitlement_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_entitlement_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *EntitlementsServiceListEntitlementsRequest) String() string {
@@ -202,7 +197,7 @@ func (*EntitlementsServiceListEntitlementsRequest) ProtoMessage() {}
func (x *EntitlementsServiceListEntitlementsRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_entitlement_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -246,22 +241,19 @@ func (x *EntitlementsServiceListEntitlementsRequest) GetAnnotations() []*anypb.A
}
type EntitlementsServiceListEntitlementsResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ List []*Entitlement `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- List []*Entitlement `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *EntitlementsServiceListEntitlementsResponse) Reset() {
*x = EntitlementsServiceListEntitlementsResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_entitlement_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_entitlement_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *EntitlementsServiceListEntitlementsResponse) String() string {
@@ -272,7 +264,7 @@ func (*EntitlementsServiceListEntitlementsResponse) ProtoMessage() {}
func (x *EntitlementsServiceListEntitlementsResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_entitlement_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -310,7 +302,7 @@ func (x *EntitlementsServiceListEntitlementsResponse) GetAnnotations() []*anypb.
var File_c1_connector_v2_entitlement_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_entitlement_proto_rawDesc = []byte{
+var file_c1_connector_v2_entitlement_proto_rawDesc = string([]byte{
0x0a, 0x21, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
@@ -396,23 +388,23 @@ var file_c1_connector_v2_entitlement_proto_rawDesc = []byte{
0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f,
0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e,
0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_v2_entitlement_proto_rawDescOnce sync.Once
- file_c1_connector_v2_entitlement_proto_rawDescData = file_c1_connector_v2_entitlement_proto_rawDesc
+ file_c1_connector_v2_entitlement_proto_rawDescData []byte
)
func file_c1_connector_v2_entitlement_proto_rawDescGZIP() []byte {
file_c1_connector_v2_entitlement_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_entitlement_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_entitlement_proto_rawDescData)
+ file_c1_connector_v2_entitlement_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_entitlement_proto_rawDesc), len(file_c1_connector_v2_entitlement_proto_rawDesc)))
})
return file_c1_connector_v2_entitlement_proto_rawDescData
}
var file_c1_connector_v2_entitlement_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_c1_connector_v2_entitlement_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
-var file_c1_connector_v2_entitlement_proto_goTypes = []interface{}{
+var file_c1_connector_v2_entitlement_proto_goTypes = []any{
(Entitlement_PurposeValue)(0), // 0: c1.connector.v2.Entitlement.PurposeValue
(*Entitlement)(nil), // 1: c1.connector.v2.Entitlement
(*EntitlementsServiceListEntitlementsRequest)(nil), // 2: c1.connector.v2.EntitlementsServiceListEntitlementsRequest
@@ -445,49 +437,11 @@ func file_c1_connector_v2_entitlement_proto_init() {
return
}
file_c1_connector_v2_resource_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_entitlement_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Entitlement); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_entitlement_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*EntitlementsServiceListEntitlementsRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_entitlement_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*EntitlementsServiceListEntitlementsResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_entitlement_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_entitlement_proto_rawDesc), len(file_c1_connector_v2_entitlement_proto_rawDesc)),
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
@@ -499,7 +453,6 @@ func file_c1_connector_v2_entitlement_proto_init() {
MessageInfos: file_c1_connector_v2_entitlement_proto_msgTypes,
}.Build()
File_c1_connector_v2_entitlement_proto = out.File
- file_c1_connector_v2_entitlement_proto_rawDesc = nil
file_c1_connector_v2_entitlement_proto_goTypes = nil
file_c1_connector_v2_entitlement_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.validate.go
index 0d6527dd..4f979076 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement.pb.validate.go
@@ -232,7 +232,7 @@ type EntitlementMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m EntitlementMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -428,7 +428,7 @@ type EntitlementsServiceListEntitlementsRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m EntitlementsServiceListEntitlementsRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -617,7 +617,7 @@ type EntitlementsServiceListEntitlementsResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m EntitlementsServiceListEntitlementsResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement_grpc.pb.go
index 64fac307..821161d3 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/entitlement_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/connector/v2/entitlement.proto
@@ -15,8 +15,12 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ EntitlementsService_ListEntitlements_FullMethodName = "/c1.connector.v2.EntitlementsService/ListEntitlements"
+)
// EntitlementsServiceClient is the client API for EntitlementsService service.
//
@@ -34,8 +38,9 @@ func NewEntitlementsServiceClient(cc grpc.ClientConnInterface) EntitlementsServi
}
func (c *entitlementsServiceClient) ListEntitlements(ctx context.Context, in *EntitlementsServiceListEntitlementsRequest, opts ...grpc.CallOption) (*EntitlementsServiceListEntitlementsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(EntitlementsServiceListEntitlementsResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.EntitlementsService/ListEntitlements", in, out, opts...)
+ err := c.cc.Invoke(ctx, EntitlementsService_ListEntitlements_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -44,18 +49,22 @@ func (c *entitlementsServiceClient) ListEntitlements(ctx context.Context, in *En
// EntitlementsServiceServer is the server API for EntitlementsService service.
// All implementations should embed UnimplementedEntitlementsServiceServer
-// for forward compatibility
+// for forward compatibility.
type EntitlementsServiceServer interface {
ListEntitlements(context.Context, *EntitlementsServiceListEntitlementsRequest) (*EntitlementsServiceListEntitlementsResponse, error)
}
-// UnimplementedEntitlementsServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedEntitlementsServiceServer struct {
-}
+// UnimplementedEntitlementsServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedEntitlementsServiceServer struct{}
func (UnimplementedEntitlementsServiceServer) ListEntitlements(context.Context, *EntitlementsServiceListEntitlementsRequest) (*EntitlementsServiceListEntitlementsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListEntitlements not implemented")
}
+func (UnimplementedEntitlementsServiceServer) testEmbeddedByValue() {}
// UnsafeEntitlementsServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EntitlementsServiceServer will
@@ -65,6 +74,13 @@ type UnsafeEntitlementsServiceServer interface {
}
func RegisterEntitlementsServiceServer(s grpc.ServiceRegistrar, srv EntitlementsServiceServer) {
+ // If the following call pancis, it indicates UnimplementedEntitlementsServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&EntitlementsService_ServiceDesc, srv)
}
@@ -78,7 +94,7 @@ func _EntitlementsService_ListEntitlements_Handler(srv interface{}, ctx context.
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.EntitlementsService/ListEntitlements",
+ FullMethod: EntitlementsService_ListEntitlements_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EntitlementsServiceServer).ListEntitlements(ctx, req.(*EntitlementsServiceListEntitlementsRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go
index 5331f68a..aa8b9b60 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/event_feed.proto
@@ -14,6 +14,7 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -24,24 +25,21 @@ const (
)
type ListEventsRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// Can function like a page token but also can be arbitrary to resume a feed at any point
- Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"`
- StartAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"`
- PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"`
+ StartAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"`
+ PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ListEventsRequest) Reset() {
*x = ListEventsRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_event_feed_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_event_feed_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ListEventsRequest) String() string {
@@ -52,7 +50,7 @@ func (*ListEventsRequest) ProtoMessage() {}
func (x *ListEventsRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_event_feed_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -96,23 +94,20 @@ func (x *ListEventsRequest) GetAnnotations() []*anypb.Any {
}
type ListEventsResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
+ Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
+ HasMore bool `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
- Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
- HasMore bool `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ListEventsResponse) Reset() {
*x = ListEventsResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_event_feed_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_event_feed_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ListEventsResponse) String() string {
@@ -123,7 +118,7 @@ func (*ListEventsResponse) ProtoMessage() {}
func (x *ListEventsResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_event_feed_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -167,32 +162,29 @@ func (x *ListEventsResponse) GetAnnotations() []*anypb.Any {
}
type Event struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
OccurredAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=occurred_at,json=occurredAt,proto3" json:"occurred_at,omitempty"`
// Each event has structs that will usually be mostly empty.
// Stream consumer must be defensive about what it's reading
//
- // Types that are assignable to Event:
+ // Types that are valid to be assigned to Event:
//
// *Event_UsageEvent
// *Event_GrantEvent
// *Event_RevokeEvent
Event isEvent_Event `protobuf_oneof:"event"`
// May contain resources for targets, actor, or items referenced in events
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Event) Reset() {
*x = Event{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_event_feed_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_event_feed_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Event) String() string {
@@ -203,7 +195,7 @@ func (*Event) ProtoMessage() {}
func (x *Event) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_event_feed_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -232,30 +224,36 @@ func (x *Event) GetOccurredAt() *timestamppb.Timestamp {
return nil
}
-func (m *Event) GetEvent() isEvent_Event {
- if m != nil {
- return m.Event
+func (x *Event) GetEvent() isEvent_Event {
+ if x != nil {
+ return x.Event
}
return nil
}
func (x *Event) GetUsageEvent() *UsageEvent {
- if x, ok := x.GetEvent().(*Event_UsageEvent); ok {
- return x.UsageEvent
+ if x != nil {
+ if x, ok := x.Event.(*Event_UsageEvent); ok {
+ return x.UsageEvent
+ }
}
return nil
}
func (x *Event) GetGrantEvent() *GrantEvent {
- if x, ok := x.GetEvent().(*Event_GrantEvent); ok {
- return x.GrantEvent
+ if x != nil {
+ if x, ok := x.Event.(*Event_GrantEvent); ok {
+ return x.GrantEvent
+ }
}
return nil
}
func (x *Event) GetRevokeEvent() *RevokeEvent {
- if x, ok := x.GetEvent().(*Event_RevokeEvent); ok {
- return x.RevokeEvent
+ if x != nil {
+ if x, ok := x.Event.(*Event_RevokeEvent); ok {
+ return x.RevokeEvent
+ }
}
return nil
}
@@ -290,21 +288,18 @@ func (*Event_GrantEvent) isEvent_Event() {}
func (*Event_RevokeEvent) isEvent_Event() {}
type UsageEvent struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- TargetResource *Resource `protobuf:"bytes,1,opt,name=target_resource,json=targetResource,proto3" json:"target_resource,omitempty"`
- ActorResource *Resource `protobuf:"bytes,2,opt,name=actor_resource,json=actorResource,proto3" json:"actor_resource,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TargetResource *Resource `protobuf:"bytes,1,opt,name=target_resource,json=targetResource,proto3" json:"target_resource,omitempty"`
+ ActorResource *Resource `protobuf:"bytes,2,opt,name=actor_resource,json=actorResource,proto3" json:"actor_resource,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *UsageEvent) Reset() {
*x = UsageEvent{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_event_feed_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_event_feed_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *UsageEvent) String() string {
@@ -315,7 +310,7 @@ func (*UsageEvent) ProtoMessage() {}
func (x *UsageEvent) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_event_feed_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -346,20 +341,17 @@ func (x *UsageEvent) GetActorResource() *Resource {
// Unrelated to this effort, but valuable for other projects
type GrantEvent struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Grant *Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Grant *Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantEvent) Reset() {
*x = GrantEvent{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_event_feed_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_event_feed_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantEvent) String() string {
@@ -370,7 +362,7 @@ func (*GrantEvent) ProtoMessage() {}
func (x *GrantEvent) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_event_feed_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -393,21 +385,18 @@ func (x *GrantEvent) GetGrant() *Grant {
}
type RevokeEvent struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Entitlement *Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
+ Principal *Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Entitlement *Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
- Principal *Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *RevokeEvent) Reset() {
*x = RevokeEvent{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_event_feed_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_event_feed_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RevokeEvent) String() string {
@@ -418,7 +407,7 @@ func (*RevokeEvent) ProtoMessage() {}
func (x *RevokeEvent) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_event_feed_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -449,7 +438,7 @@ func (x *RevokeEvent) GetPrincipal() *Resource {
var File_c1_connector_v2_event_feed_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_event_feed_proto_rawDesc = []byte{
+var file_c1_connector_v2_event_feed_proto_rawDesc = string([]byte{
0x0a, 0x20, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
@@ -544,22 +533,22 @@ var file_c1_connector_v2_event_feed_proto_rawDesc = []byte{
0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f,
0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f,
0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_v2_event_feed_proto_rawDescOnce sync.Once
- file_c1_connector_v2_event_feed_proto_rawDescData = file_c1_connector_v2_event_feed_proto_rawDesc
+ file_c1_connector_v2_event_feed_proto_rawDescData []byte
)
func file_c1_connector_v2_event_feed_proto_rawDescGZIP() []byte {
file_c1_connector_v2_event_feed_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_event_feed_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_event_feed_proto_rawDescData)
+ file_c1_connector_v2_event_feed_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_event_feed_proto_rawDesc), len(file_c1_connector_v2_event_feed_proto_rawDesc)))
})
return file_c1_connector_v2_event_feed_proto_rawDescData
}
var file_c1_connector_v2_event_feed_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
-var file_c1_connector_v2_event_feed_proto_goTypes = []interface{}{
+var file_c1_connector_v2_event_feed_proto_goTypes = []any{
(*ListEventsRequest)(nil), // 0: c1.connector.v2.ListEventsRequest
(*ListEventsResponse)(nil), // 1: c1.connector.v2.ListEventsResponse
(*Event)(nil), // 2: c1.connector.v2.Event
@@ -604,81 +593,7 @@ func file_c1_connector_v2_event_feed_proto_init() {
file_c1_connector_v2_entitlement_proto_init()
file_c1_connector_v2_grant_proto_init()
file_c1_connector_v2_resource_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_event_feed_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListEventsRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_event_feed_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListEventsResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_event_feed_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Event); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_event_feed_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UsageEvent); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_event_feed_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantEvent); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_event_feed_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RevokeEvent); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_c1_connector_v2_event_feed_proto_msgTypes[2].OneofWrappers = []interface{}{
+ file_c1_connector_v2_event_feed_proto_msgTypes[2].OneofWrappers = []any{
(*Event_UsageEvent)(nil),
(*Event_GrantEvent)(nil),
(*Event_RevokeEvent)(nil),
@@ -687,7 +602,7 @@ func file_c1_connector_v2_event_feed_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_event_feed_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_event_feed_proto_rawDesc), len(file_c1_connector_v2_event_feed_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
@@ -698,7 +613,6 @@ func file_c1_connector_v2_event_feed_proto_init() {
MessageInfos: file_c1_connector_v2_event_feed_proto_msgTypes,
}.Build()
File_c1_connector_v2_event_feed_proto = out.File
- file_c1_connector_v2_event_feed_proto_rawDesc = nil
file_c1_connector_v2_event_feed_proto_goTypes = nil
file_c1_connector_v2_event_feed_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go
index fe975ea8..6bc19599 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go
@@ -164,7 +164,7 @@ type ListEventsRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ListEventsRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -351,7 +351,7 @@ type ListEventsResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ListEventsResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -644,7 +644,7 @@ type EventMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m EventMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -801,7 +801,7 @@ type UsageEventMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m UsageEventMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -929,7 +929,7 @@ type GrantEventMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantEventMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1086,7 +1086,7 @@ type RevokeEventMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m RevokeEventMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go
index 968aa0ed..e82c8c80 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/connector/v2/event_feed.proto
@@ -15,8 +15,12 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ EventService_ListEvents_FullMethodName = "/c1.connector.v2.EventService/ListEvents"
+)
// EventServiceClient is the client API for EventService service.
//
@@ -34,8 +38,9 @@ func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient {
}
func (c *eventServiceClient) ListEvents(ctx context.Context, in *ListEventsRequest, opts ...grpc.CallOption) (*ListEventsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListEventsResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.EventService/ListEvents", in, out, opts...)
+ err := c.cc.Invoke(ctx, EventService_ListEvents_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -44,18 +49,22 @@ func (c *eventServiceClient) ListEvents(ctx context.Context, in *ListEventsReque
// EventServiceServer is the server API for EventService service.
// All implementations should embed UnimplementedEventServiceServer
-// for forward compatibility
+// for forward compatibility.
type EventServiceServer interface {
ListEvents(context.Context, *ListEventsRequest) (*ListEventsResponse, error)
}
-// UnimplementedEventServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedEventServiceServer struct {
-}
+// UnimplementedEventServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedEventServiceServer struct{}
func (UnimplementedEventServiceServer) ListEvents(context.Context, *ListEventsRequest) (*ListEventsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListEvents not implemented")
}
+func (UnimplementedEventServiceServer) testEmbeddedByValue() {}
// UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EventServiceServer will
@@ -65,6 +74,13 @@ type UnsafeEventServiceServer interface {
}
func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer) {
+ // If the following call pancis, it indicates UnimplementedEventServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&EventService_ServiceDesc, srv)
}
@@ -78,7 +94,7 @@ func _EventService_ListEvents_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.EventService/ListEvents",
+ FullMethod: EventService_ListEvents_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EventServiceServer).ListEvents(ctx, req.(*ListEventsRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.go
index 164c96a8..2091c808 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/grant.proto
@@ -13,6 +13,7 @@ import (
anypb "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -23,20 +24,17 @@ const (
)
type GrantSources struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Sources map[string]*GrantSources_GrantSource `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
-
- Sources map[string]*GrantSources_GrantSource `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantSources) Reset() {
*x = GrantSources{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_grant_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_grant_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantSources) String() string {
@@ -47,7 +45,7 @@ func (*GrantSources) ProtoMessage() {}
func (x *GrantSources) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_grant_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -70,24 +68,21 @@ func (x *GrantSources) GetSources() map[string]*GrantSources_GrantSource {
}
type Grant struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Entitlement *Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
+ Principal *Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
+ Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
+ Sources *GrantSources `protobuf:"bytes,5,opt,name=sources,proto3" json:"sources,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Entitlement *Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
- Principal *Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
- Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
- Sources *GrantSources `protobuf:"bytes,5,opt,name=sources,proto3" json:"sources,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Grant) Reset() {
*x = Grant{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_grant_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_grant_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Grant) String() string {
@@ -98,7 +93,7 @@ func (*Grant) ProtoMessage() {}
func (x *Grant) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_grant_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -149,23 +144,20 @@ func (x *Grant) GetAnnotations() []*anypb.Any {
}
type GrantsServiceListGrantsRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
- PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantsServiceListGrantsRequest) Reset() {
*x = GrantsServiceListGrantsRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_grant_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_grant_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantsServiceListGrantsRequest) String() string {
@@ -176,7 +168,7 @@ func (*GrantsServiceListGrantsRequest) ProtoMessage() {}
func (x *GrantsServiceListGrantsRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_grant_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -220,22 +212,19 @@ func (x *GrantsServiceListGrantsRequest) GetAnnotations() []*anypb.Any {
}
type GrantsServiceListGrantsResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ List []*Grant `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- List []*Grant `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantsServiceListGrantsResponse) Reset() {
*x = GrantsServiceListGrantsResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_grant_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_grant_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantsServiceListGrantsResponse) String() string {
@@ -246,7 +235,7 @@ func (*GrantsServiceListGrantsResponse) ProtoMessage() {}
func (x *GrantsServiceListGrantsResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_grant_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -283,22 +272,19 @@ func (x *GrantsServiceListGrantsResponse) GetAnnotations() []*anypb.Any {
}
type GrantManagerServiceGrantRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Entitlement *Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
+ Principal *Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Entitlement *Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
- Principal *Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantManagerServiceGrantRequest) Reset() {
*x = GrantManagerServiceGrantRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_grant_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_grant_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantManagerServiceGrantRequest) String() string {
@@ -309,7 +295,7 @@ func (*GrantManagerServiceGrantRequest) ProtoMessage() {}
func (x *GrantManagerServiceGrantRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_grant_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -346,21 +332,18 @@ func (x *GrantManagerServiceGrantRequest) GetAnnotations() []*anypb.Any {
}
type GrantManagerServiceGrantResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Grants []*Grant `protobuf:"bytes,2,rep,name=grants,proto3" json:"grants,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
- Grants []*Grant `protobuf:"bytes,2,rep,name=grants,proto3" json:"grants,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantManagerServiceGrantResponse) Reset() {
*x = GrantManagerServiceGrantResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_grant_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_grant_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantManagerServiceGrantResponse) String() string {
@@ -371,7 +354,7 @@ func (*GrantManagerServiceGrantResponse) ProtoMessage() {}
func (x *GrantManagerServiceGrantResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_grant_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -401,21 +384,18 @@ func (x *GrantManagerServiceGrantResponse) GetGrants() []*Grant {
}
type GrantManagerServiceRevokeRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Grant *Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Grant *Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantManagerServiceRevokeRequest) Reset() {
*x = GrantManagerServiceRevokeRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_grant_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_grant_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantManagerServiceRevokeRequest) String() string {
@@ -426,7 +406,7 @@ func (*GrantManagerServiceRevokeRequest) ProtoMessage() {}
func (x *GrantManagerServiceRevokeRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_grant_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -456,20 +436,17 @@ func (x *GrantManagerServiceRevokeRequest) GetAnnotations() []*anypb.Any {
}
type GrantManagerServiceRevokeResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantManagerServiceRevokeResponse) Reset() {
*x = GrantManagerServiceRevokeResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_grant_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_grant_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantManagerServiceRevokeResponse) String() string {
@@ -480,7 +457,7 @@ func (*GrantManagerServiceRevokeResponse) ProtoMessage() {}
func (x *GrantManagerServiceRevokeResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_grant_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -503,18 +480,16 @@ func (x *GrantManagerServiceRevokeResponse) GetAnnotations() []*anypb.Any {
}
type GrantSources_GrantSource struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GrantSources_GrantSource) Reset() {
*x = GrantSources_GrantSource{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_grant_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_grant_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantSources_GrantSource) String() string {
@@ -525,7 +500,7 @@ func (*GrantSources_GrantSource) ProtoMessage() {}
func (x *GrantSources_GrantSource) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_grant_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -542,7 +517,7 @@ func (*GrantSources_GrantSource) Descriptor() ([]byte, []int) {
var File_c1_connector_v2_grant_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_grant_proto_rawDesc = []byte{
+var file_c1_connector_v2_grant_proto_rawDesc = string([]byte{
0x0a, 0x1b, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63,
0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x21,
@@ -679,22 +654,22 @@ var file_c1_connector_v2_grant_proto_rawDesc = []byte{
0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63,
0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_v2_grant_proto_rawDescOnce sync.Once
- file_c1_connector_v2_grant_proto_rawDescData = file_c1_connector_v2_grant_proto_rawDesc
+ file_c1_connector_v2_grant_proto_rawDescData []byte
)
func file_c1_connector_v2_grant_proto_rawDescGZIP() []byte {
file_c1_connector_v2_grant_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_grant_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_grant_proto_rawDescData)
+ file_c1_connector_v2_grant_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_grant_proto_rawDesc), len(file_c1_connector_v2_grant_proto_rawDesc)))
})
return file_c1_connector_v2_grant_proto_rawDescData
}
var file_c1_connector_v2_grant_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
-var file_c1_connector_v2_grant_proto_goTypes = []interface{}{
+var file_c1_connector_v2_grant_proto_goTypes = []any{
(*GrantSources)(nil), // 0: c1.connector.v2.GrantSources
(*Grant)(nil), // 1: c1.connector.v2.Grant
(*GrantsServiceListGrantsRequest)(nil), // 2: c1.connector.v2.GrantsServiceListGrantsRequest
@@ -748,121 +723,11 @@ func file_c1_connector_v2_grant_proto_init() {
}
file_c1_connector_v2_entitlement_proto_init()
file_c1_connector_v2_resource_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_grant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantSources); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_grant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Grant); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_grant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantsServiceListGrantsRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_grant_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantsServiceListGrantsResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_grant_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantManagerServiceGrantRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_grant_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantManagerServiceGrantResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_grant_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantManagerServiceRevokeRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_grant_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantManagerServiceRevokeResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_grant_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantSources_GrantSource); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_grant_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_grant_proto_rawDesc), len(file_c1_connector_v2_grant_proto_rawDesc)),
NumEnums: 0,
NumMessages: 10,
NumExtensions: 0,
@@ -873,7 +738,6 @@ func file_c1_connector_v2_grant_proto_init() {
MessageInfos: file_c1_connector_v2_grant_proto_msgTypes,
}.Build()
File_c1_connector_v2_grant_proto = out.File
- file_c1_connector_v2_grant_proto_rawDesc = nil
file_c1_connector_v2_grant_proto_goTypes = nil
file_c1_connector_v2_grant_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.validate.go
index 76079a38..7d252857 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant.pb.validate.go
@@ -116,7 +116,7 @@ type GrantSourcesMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantSourcesMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -368,7 +368,7 @@ type GrantMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -572,7 +572,7 @@ type GrantsServiceListGrantsRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantsServiceListGrantsRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -758,7 +758,7 @@ type GrantsServiceListGrantsResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantsServiceListGrantsResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -975,7 +975,7 @@ type GrantManagerServiceGrantRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantManagerServiceGrantRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1148,7 +1148,7 @@ type GrantManagerServiceGrantResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantManagerServiceGrantResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1327,7 +1327,7 @@ type GrantManagerServiceRevokeRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantManagerServiceRevokeRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1466,7 +1466,7 @@ type GrantManagerServiceRevokeResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantManagerServiceRevokeResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1569,7 +1569,7 @@ type GrantSources_GrantSourceMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantSources_GrantSourceMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant_grpc.pb.go
index aef058da..421c28d4 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/grant_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/connector/v2/grant.proto
@@ -15,8 +15,12 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ GrantsService_ListGrants_FullMethodName = "/c1.connector.v2.GrantsService/ListGrants"
+)
// GrantsServiceClient is the client API for GrantsService service.
//
@@ -34,8 +38,9 @@ func NewGrantsServiceClient(cc grpc.ClientConnInterface) GrantsServiceClient {
}
func (c *grantsServiceClient) ListGrants(ctx context.Context, in *GrantsServiceListGrantsRequest, opts ...grpc.CallOption) (*GrantsServiceListGrantsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GrantsServiceListGrantsResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.GrantsService/ListGrants", in, out, opts...)
+ err := c.cc.Invoke(ctx, GrantsService_ListGrants_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -44,18 +49,22 @@ func (c *grantsServiceClient) ListGrants(ctx context.Context, in *GrantsServiceL
// GrantsServiceServer is the server API for GrantsService service.
// All implementations should embed UnimplementedGrantsServiceServer
-// for forward compatibility
+// for forward compatibility.
type GrantsServiceServer interface {
ListGrants(context.Context, *GrantsServiceListGrantsRequest) (*GrantsServiceListGrantsResponse, error)
}
-// UnimplementedGrantsServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedGrantsServiceServer struct {
-}
+// UnimplementedGrantsServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedGrantsServiceServer struct{}
func (UnimplementedGrantsServiceServer) ListGrants(context.Context, *GrantsServiceListGrantsRequest) (*GrantsServiceListGrantsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListGrants not implemented")
}
+func (UnimplementedGrantsServiceServer) testEmbeddedByValue() {}
// UnsafeGrantsServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to GrantsServiceServer will
@@ -65,6 +74,13 @@ type UnsafeGrantsServiceServer interface {
}
func RegisterGrantsServiceServer(s grpc.ServiceRegistrar, srv GrantsServiceServer) {
+ // If the following call pancis, it indicates UnimplementedGrantsServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&GrantsService_ServiceDesc, srv)
}
@@ -78,7 +94,7 @@ func _GrantsService_ListGrants_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.GrantsService/ListGrants",
+ FullMethod: GrantsService_ListGrants_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GrantsServiceServer).ListGrants(ctx, req.(*GrantsServiceListGrantsRequest))
@@ -102,6 +118,11 @@ var GrantsService_ServiceDesc = grpc.ServiceDesc{
Metadata: "c1/connector/v2/grant.proto",
}
+const (
+ GrantManagerService_Grant_FullMethodName = "/c1.connector.v2.GrantManagerService/Grant"
+ GrantManagerService_Revoke_FullMethodName = "/c1.connector.v2.GrantManagerService/Revoke"
+)
+
// GrantManagerServiceClient is the client API for GrantManagerService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@@ -119,8 +140,9 @@ func NewGrantManagerServiceClient(cc grpc.ClientConnInterface) GrantManagerServi
}
func (c *grantManagerServiceClient) Grant(ctx context.Context, in *GrantManagerServiceGrantRequest, opts ...grpc.CallOption) (*GrantManagerServiceGrantResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GrantManagerServiceGrantResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.GrantManagerService/Grant", in, out, opts...)
+ err := c.cc.Invoke(ctx, GrantManagerService_Grant_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -128,8 +150,9 @@ func (c *grantManagerServiceClient) Grant(ctx context.Context, in *GrantManagerS
}
func (c *grantManagerServiceClient) Revoke(ctx context.Context, in *GrantManagerServiceRevokeRequest, opts ...grpc.CallOption) (*GrantManagerServiceRevokeResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GrantManagerServiceRevokeResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.GrantManagerService/Revoke", in, out, opts...)
+ err := c.cc.Invoke(ctx, GrantManagerService_Revoke_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -138,15 +161,18 @@ func (c *grantManagerServiceClient) Revoke(ctx context.Context, in *GrantManager
// GrantManagerServiceServer is the server API for GrantManagerService service.
// All implementations should embed UnimplementedGrantManagerServiceServer
-// for forward compatibility
+// for forward compatibility.
type GrantManagerServiceServer interface {
Grant(context.Context, *GrantManagerServiceGrantRequest) (*GrantManagerServiceGrantResponse, error)
Revoke(context.Context, *GrantManagerServiceRevokeRequest) (*GrantManagerServiceRevokeResponse, error)
}
-// UnimplementedGrantManagerServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedGrantManagerServiceServer struct {
-}
+// UnimplementedGrantManagerServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedGrantManagerServiceServer struct{}
func (UnimplementedGrantManagerServiceServer) Grant(context.Context, *GrantManagerServiceGrantRequest) (*GrantManagerServiceGrantResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Grant not implemented")
@@ -154,6 +180,7 @@ func (UnimplementedGrantManagerServiceServer) Grant(context.Context, *GrantManag
func (UnimplementedGrantManagerServiceServer) Revoke(context.Context, *GrantManagerServiceRevokeRequest) (*GrantManagerServiceRevokeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented")
}
+func (UnimplementedGrantManagerServiceServer) testEmbeddedByValue() {}
// UnsafeGrantManagerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to GrantManagerServiceServer will
@@ -163,6 +190,13 @@ type UnsafeGrantManagerServiceServer interface {
}
func RegisterGrantManagerServiceServer(s grpc.ServiceRegistrar, srv GrantManagerServiceServer) {
+ // If the following call pancis, it indicates UnimplementedGrantManagerServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&GrantManagerService_ServiceDesc, srv)
}
@@ -176,7 +210,7 @@ func _GrantManagerService_Grant_Handler(srv interface{}, ctx context.Context, de
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.GrantManagerService/Grant",
+ FullMethod: GrantManagerService_Grant_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GrantManagerServiceServer).Grant(ctx, req.(*GrantManagerServiceGrantRequest))
@@ -194,7 +228,7 @@ func _GrantManagerService_Revoke_Handler(srv interface{}, ctx context.Context, d
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.GrantManagerService/Revoke",
+ FullMethod: GrantManagerService_Revoke_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GrantManagerServiceServer).Revoke(ctx, req.(*GrantManagerServiceRevokeRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go
index b7949b66..1639a155 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/resource.proto
@@ -14,6 +14,7 @@ import (
structpb "google.golang.org/protobuf/types/known/structpb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -128,29 +129,26 @@ func (x Resource_CreationSource) Number() protoreflect.EnumNumber {
// Deprecated: Use Resource_CreationSource.Descriptor instead.
func (Resource_CreationSource) EnumDescriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{17, 0}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{19, 0}
}
type ResourceType struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
- Traits []ResourceType_Trait `protobuf:"varint,3,rep,packed,name=traits,proto3,enum=c1.connector.v2.ResourceType_Trait" json:"traits,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
- Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
- SourcedExternally bool `protobuf:"varint,6,opt,name=sourced_externally,json=sourcedExternally,proto3" json:"sourced_externally,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ Traits []ResourceType_Trait `protobuf:"varint,3,rep,packed,name=traits,proto3,enum=c1.connector.v2.ResourceType_Trait" json:"traits,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
+ SourcedExternally bool `protobuf:"varint,6,opt,name=sourced_externally,json=sourcedExternally,proto3" json:"sourced_externally,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ResourceType) Reset() {
*x = ResourceType{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourceType) String() string {
@@ -161,7 +159,7 @@ func (*ResourceType) ProtoMessage() {}
func (x *ResourceType) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_resource_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -219,23 +217,20 @@ func (x *ResourceType) GetSourcedExternally() bool {
}
type ResourceTypesServiceListResourceTypesRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Parent *Resource `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Parent *Resource `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
- PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ResourceTypesServiceListResourceTypesRequest) Reset() {
*x = ResourceTypesServiceListResourceTypesRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourceTypesServiceListResourceTypesRequest) String() string {
@@ -246,7 +241,7 @@ func (*ResourceTypesServiceListResourceTypesRequest) ProtoMessage() {}
func (x *ResourceTypesServiceListResourceTypesRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_resource_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -290,22 +285,19 @@ func (x *ResourceTypesServiceListResourceTypesRequest) GetAnnotations() []*anypb
}
type ResourceTypesServiceListResourceTypesResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ List []*ResourceType `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- List []*ResourceType `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ResourceTypesServiceListResourceTypesResponse) Reset() {
*x = ResourceTypesServiceListResourceTypesResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourceTypesServiceListResourceTypesResponse) String() string {
@@ -316,7 +308,7 @@ func (*ResourceTypesServiceListResourceTypesResponse) ProtoMessage() {}
func (x *ResourceTypesServiceListResourceTypesResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_resource_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -353,20 +345,17 @@ func (x *ResourceTypesServiceListResourceTypesResponse) GetAnnotations() []*anyp
}
type CreateResourceRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *CreateResourceRequest) Reset() {
*x = CreateResourceRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CreateResourceRequest) String() string {
@@ -377,7 +366,7 @@ func (*CreateResourceRequest) ProtoMessage() {}
func (x *CreateResourceRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_resource_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -400,21 +389,18 @@ func (x *CreateResourceRequest) GetResource() *Resource {
}
type CreateResourceResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Created *Resource `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Created *Resource `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *CreateResourceResponse) Reset() {
*x = CreateResourceResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CreateResourceResponse) String() string {
@@ -425,7 +411,7 @@ func (*CreateResourceResponse) ProtoMessage() {}
func (x *CreateResourceResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_resource_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -455,20 +441,17 @@ func (x *CreateResourceResponse) GetAnnotations() []*anypb.Any {
}
type DeleteResourceRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceId *ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
unknownFields protoimpl.UnknownFields
-
- ResourceId *ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *DeleteResourceRequest) Reset() {
*x = DeleteResourceRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *DeleteResourceRequest) String() string {
@@ -479,7 +462,7 @@ func (*DeleteResourceRequest) ProtoMessage() {}
func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_resource_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -502,20 +485,17 @@ func (x *DeleteResourceRequest) GetResourceId() *ResourceId {
}
type DeleteResourceResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *DeleteResourceResponse) Reset() {
*x = DeleteResourceResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *DeleteResourceResponse) String() string {
@@ -526,7 +506,7 @@ func (*DeleteResourceResponse) ProtoMessage() {}
func (x *DeleteResourceResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_resource_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -548,23 +528,108 @@ func (x *DeleteResourceResponse) GetAnnotations() []*anypb.Any {
return nil
}
-type RotateCredentialRequest struct {
- state protoimpl.MessageState
+type DeleteResourceV2Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceId *ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
+ unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
+}
+
+func (x *DeleteResourceV2Request) Reset() {
+ *x = DeleteResourceV2Request{}
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DeleteResourceV2Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteResourceV2Request) ProtoMessage() {}
+
+func (x *DeleteResourceV2Request) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteResourceV2Request.ProtoReflect.Descriptor instead.
+func (*DeleteResourceV2Request) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *DeleteResourceV2Request) GetResourceId() *ResourceId {
+ if x != nil {
+ return x.ResourceId
+ }
+ return nil
+}
+
+type DeleteResourceV2Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
- ResourceId *ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
- CredentialOptions *CredentialOptions `protobuf:"bytes,2,opt,name=credential_options,json=credentialOptions,proto3" json:"credential_options,omitempty"`
- EncryptionConfigs []*EncryptionConfig `protobuf:"bytes,3,rep,name=encryption_configs,json=encryptionConfigs,proto3" json:"encryption_configs,omitempty"`
+func (x *DeleteResourceV2Response) Reset() {
+ *x = DeleteResourceV2Response{}
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *RotateCredentialRequest) Reset() {
- *x = RotateCredentialRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[7]
+func (x *DeleteResourceV2Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteResourceV2Response) ProtoMessage() {}
+
+func (x *DeleteResourceV2Response) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[8]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteResourceV2Response.ProtoReflect.Descriptor instead.
+func (*DeleteResourceV2Response) Descriptor() ([]byte, []int) {
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *DeleteResourceV2Response) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type RotateCredentialRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceId *ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
+ CredentialOptions *CredentialOptions `protobuf:"bytes,2,opt,name=credential_options,json=credentialOptions,proto3" json:"credential_options,omitempty"`
+ EncryptionConfigs []*EncryptionConfig `protobuf:"bytes,3,rep,name=encryption_configs,json=encryptionConfigs,proto3" json:"encryption_configs,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *RotateCredentialRequest) Reset() {
+ *x = RotateCredentialRequest{}
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RotateCredentialRequest) String() string {
@@ -574,8 +639,8 @@ func (x *RotateCredentialRequest) String() string {
func (*RotateCredentialRequest) ProtoMessage() {}
func (x *RotateCredentialRequest) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[9]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -587,7 +652,7 @@ func (x *RotateCredentialRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use RotateCredentialRequest.ProtoReflect.Descriptor instead.
func (*RotateCredentialRequest) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{7}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{9}
}
func (x *RotateCredentialRequest) GetResourceId() *ResourceId {
@@ -612,22 +677,19 @@ func (x *RotateCredentialRequest) GetEncryptionConfigs() []*EncryptionConfig {
}
type RotateCredentialResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ EncryptedData []*EncryptedData `protobuf:"bytes,1,rep,name=encrypted_data,json=encryptedData,proto3" json:"encrypted_data,omitempty"`
+ ResourceId *ResourceId `protobuf:"bytes,2,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- EncryptedData []*EncryptedData `protobuf:"bytes,1,rep,name=encrypted_data,json=encryptedData,proto3" json:"encrypted_data,omitempty"`
- ResourceId *ResourceId `protobuf:"bytes,2,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *RotateCredentialResponse) Reset() {
*x = RotateCredentialResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RotateCredentialResponse) String() string {
@@ -637,8 +699,8 @@ func (x *RotateCredentialResponse) String() string {
func (*RotateCredentialResponse) ProtoMessage() {}
func (x *RotateCredentialResponse) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[10]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -650,7 +712,7 @@ func (x *RotateCredentialResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use RotateCredentialResponse.ProtoReflect.Descriptor instead.
func (*RotateCredentialResponse) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{8}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10}
}
func (x *RotateCredentialResponse) GetEncryptedData() []*EncryptedData {
@@ -675,25 +737,22 @@ func (x *RotateCredentialResponse) GetAnnotations() []*anypb.Any {
}
type AccountInfo struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Emails []*AccountInfo_Email `protobuf:"bytes,1,rep,name=emails,proto3" json:"emails,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Emails []*AccountInfo_Email `protobuf:"bytes,1,rep,name=emails,proto3" json:"emails,omitempty"`
// The user's login
Login string `protobuf:"bytes,2,opt,name=login,proto3" json:"login,omitempty"`
// Any additional login aliases for the user
- LoginAliases []string `protobuf:"bytes,3,rep,name=login_aliases,json=loginAliases,proto3" json:"login_aliases,omitempty"`
- Profile *structpb.Struct `protobuf:"bytes,4,opt,name=profile,proto3" json:"profile,omitempty"`
+ LoginAliases []string `protobuf:"bytes,3,rep,name=login_aliases,json=loginAliases,proto3" json:"login_aliases,omitempty"`
+ Profile *structpb.Struct `protobuf:"bytes,4,opt,name=profile,proto3" json:"profile,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *AccountInfo) Reset() {
*x = AccountInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AccountInfo) String() string {
@@ -703,8 +762,8 @@ func (x *AccountInfo) String() string {
func (*AccountInfo) ProtoMessage() {}
func (x *AccountInfo) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[11]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -716,7 +775,7 @@ func (x *AccountInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead.
func (*AccountInfo) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{9}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{11}
}
func (x *AccountInfo) GetEmails() []*AccountInfo_Email {
@@ -748,25 +807,22 @@ func (x *AccountInfo) GetProfile() *structpb.Struct {
}
type CredentialOptions struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Types that are assignable to Options:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Options:
//
// *CredentialOptions_RandomPassword_
// *CredentialOptions_NoPassword_
// *CredentialOptions_Sso
- Options isCredentialOptions_Options `protobuf_oneof:"options"`
+ Options isCredentialOptions_Options `protobuf_oneof:"options"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CredentialOptions) Reset() {
*x = CredentialOptions{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CredentialOptions) String() string {
@@ -776,8 +832,8 @@ func (x *CredentialOptions) String() string {
func (*CredentialOptions) ProtoMessage() {}
func (x *CredentialOptions) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[12]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -789,33 +845,39 @@ func (x *CredentialOptions) ProtoReflect() protoreflect.Message {
// Deprecated: Use CredentialOptions.ProtoReflect.Descriptor instead.
func (*CredentialOptions) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12}
}
-func (m *CredentialOptions) GetOptions() isCredentialOptions_Options {
- if m != nil {
- return m.Options
+func (x *CredentialOptions) GetOptions() isCredentialOptions_Options {
+ if x != nil {
+ return x.Options
}
return nil
}
func (x *CredentialOptions) GetRandomPassword() *CredentialOptions_RandomPassword {
- if x, ok := x.GetOptions().(*CredentialOptions_RandomPassword_); ok {
- return x.RandomPassword
+ if x != nil {
+ if x, ok := x.Options.(*CredentialOptions_RandomPassword_); ok {
+ return x.RandomPassword
+ }
}
return nil
}
func (x *CredentialOptions) GetNoPassword() *CredentialOptions_NoPassword {
- if x, ok := x.GetOptions().(*CredentialOptions_NoPassword_); ok {
- return x.NoPassword
+ if x != nil {
+ if x, ok := x.Options.(*CredentialOptions_NoPassword_); ok {
+ return x.NoPassword
+ }
}
return nil
}
func (x *CredentialOptions) GetSso() *CredentialOptions_SSO {
- if x, ok := x.GetOptions().(*CredentialOptions_Sso); ok {
- return x.Sso
+ if x != nil {
+ if x, ok := x.Options.(*CredentialOptions_Sso); ok {
+ return x.Sso
+ }
}
return nil
}
@@ -843,22 +905,19 @@ func (*CredentialOptions_NoPassword_) isCredentialOptions_Options() {}
func (*CredentialOptions_Sso) isCredentialOptions_Options() {}
type CreateAccountRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- AccountInfo *AccountInfo `protobuf:"bytes,1,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"`
- CredentialOptions *CredentialOptions `protobuf:"bytes,2,opt,name=credential_options,json=credentialOptions,proto3" json:"credential_options,omitempty"`
- EncryptionConfigs []*EncryptionConfig `protobuf:"bytes,3,rep,name=encryption_configs,json=encryptionConfigs,proto3" json:"encryption_configs,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AccountInfo *AccountInfo `protobuf:"bytes,1,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"`
+ CredentialOptions *CredentialOptions `protobuf:"bytes,2,opt,name=credential_options,json=credentialOptions,proto3" json:"credential_options,omitempty"`
+ EncryptionConfigs []*EncryptionConfig `protobuf:"bytes,3,rep,name=encryption_configs,json=encryptionConfigs,proto3" json:"encryption_configs,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CreateAccountRequest) Reset() {
*x = CreateAccountRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CreateAccountRequest) String() string {
@@ -868,8 +927,8 @@ func (x *CreateAccountRequest) String() string {
func (*CreateAccountRequest) ProtoMessage() {}
func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[13]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -881,7 +940,7 @@ func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateAccountRequest.ProtoReflect.Descriptor instead.
func (*CreateAccountRequest) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{11}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{13}
}
func (x *CreateAccountRequest) GetAccountInfo() *AccountInfo {
@@ -906,26 +965,23 @@ func (x *CreateAccountRequest) GetEncryptionConfigs() []*EncryptionConfig {
}
type CreateAccountResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Types that are assignable to Result:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Result:
//
// *CreateAccountResponse_Success
// *CreateAccountResponse_ActionRequired
Result isCreateAccountResponse_Result `protobuf_oneof:"result"`
EncryptedData []*EncryptedData `protobuf:"bytes,2,rep,name=encrypted_data,json=encryptedData,proto3" json:"encrypted_data,omitempty"`
Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CreateAccountResponse) Reset() {
*x = CreateAccountResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CreateAccountResponse) String() string {
@@ -935,8 +991,8 @@ func (x *CreateAccountResponse) String() string {
func (*CreateAccountResponse) ProtoMessage() {}
func (x *CreateAccountResponse) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[14]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -948,26 +1004,30 @@ func (x *CreateAccountResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateAccountResponse.ProtoReflect.Descriptor instead.
func (*CreateAccountResponse) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14}
}
-func (m *CreateAccountResponse) GetResult() isCreateAccountResponse_Result {
- if m != nil {
- return m.Result
+func (x *CreateAccountResponse) GetResult() isCreateAccountResponse_Result {
+ if x != nil {
+ return x.Result
}
return nil
}
func (x *CreateAccountResponse) GetSuccess() *CreateAccountResponse_SuccessResult {
- if x, ok := x.GetResult().(*CreateAccountResponse_Success); ok {
- return x.Success
+ if x != nil {
+ if x, ok := x.Result.(*CreateAccountResponse_Success); ok {
+ return x.Success
+ }
}
return nil
}
func (x *CreateAccountResponse) GetActionRequired() *CreateAccountResponse_ActionRequiredResult {
- if x, ok := x.GetResult().(*CreateAccountResponse_ActionRequired); ok {
- return x.ActionRequired
+ if x != nil {
+ if x, ok := x.Result.(*CreateAccountResponse_ActionRequired); ok {
+ return x.ActionRequired
+ }
}
return nil
}
@@ -1003,27 +1063,24 @@ func (*CreateAccountResponse_Success) isCreateAccountResponse_Result() {}
func (*CreateAccountResponse_ActionRequired) isCreateAccountResponse_Result() {}
type EncryptedData struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
- // Deprecated: Do not use.
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
+ // Deprecated: Marked as deprecated in c1/connector/v2/resource.proto.
KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
Schema string `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"` // optional
EncryptedBytes []byte `protobuf:"bytes,6,opt,name=encrypted_bytes,json=encryptedBytes,proto3" json:"encrypted_bytes,omitempty"` // if 'schema' is set, this should be JSON.
KeyIds []string `protobuf:"bytes,7,rep,name=key_ids,json=keyIds,proto3" json:"key_ids,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *EncryptedData) Reset() {
*x = EncryptedData{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[13]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *EncryptedData) String() string {
@@ -1033,8 +1090,8 @@ func (x *EncryptedData) String() string {
func (*EncryptedData) ProtoMessage() {}
func (x *EncryptedData) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[13]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[15]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1046,7 +1103,7 @@ func (x *EncryptedData) ProtoReflect() protoreflect.Message {
// Deprecated: Use EncryptedData.ProtoReflect.Descriptor instead.
func (*EncryptedData) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{13}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{15}
}
func (x *EncryptedData) GetProvider() string {
@@ -1056,7 +1113,7 @@ func (x *EncryptedData) GetProvider() string {
return ""
}
-// Deprecated: Do not use.
+// Deprecated: Marked as deprecated in c1/connector/v2/resource.proto.
func (x *EncryptedData) GetKeyId() string {
if x != nil {
return x.KeyId
@@ -1100,23 +1157,20 @@ func (x *EncryptedData) GetKeyIds() []string {
}
type PlaintextData struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ Schema string `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"` // optional
+ Bytes []byte `protobuf:"bytes,4,opt,name=bytes,proto3" json:"bytes,omitempty"` // if 'schema' is set, this should be JSON.
unknownFields protoimpl.UnknownFields
-
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
- Schema string `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"` // optional
- Bytes []byte `protobuf:"bytes,4,opt,name=bytes,proto3" json:"bytes,omitempty"` // if 'schema' is set, this should be JSON.
+ sizeCache protoimpl.SizeCache
}
func (x *PlaintextData) Reset() {
*x = PlaintextData{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *PlaintextData) String() string {
@@ -1126,8 +1180,8 @@ func (x *PlaintextData) String() string {
func (*PlaintextData) ProtoMessage() {}
func (x *PlaintextData) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[14]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[16]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1139,7 +1193,7 @@ func (x *PlaintextData) ProtoReflect() protoreflect.Message {
// Deprecated: Use PlaintextData.ProtoReflect.Descriptor instead.
func (*PlaintextData) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{16}
}
func (x *PlaintextData) GetName() string {
@@ -1171,26 +1225,23 @@ func (x *PlaintextData) GetBytes() []byte {
}
type EncryptionConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Principal *Resource `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"`
- Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`
- KeyId string `protobuf:"bytes,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
- // Types that are assignable to Config:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Principal *Resource `protobuf:"bytes,1,opt,name=principal,proto3" json:"principal,omitempty"`
+ Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"`
+ KeyId string `protobuf:"bytes,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
+ // Types that are valid to be assigned to Config:
//
// *EncryptionConfig_JwkPublicKeyConfig
- Config isEncryptionConfig_Config `protobuf_oneof:"config"`
+ Config isEncryptionConfig_Config `protobuf_oneof:"config"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *EncryptionConfig) Reset() {
*x = EncryptionConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *EncryptionConfig) String() string {
@@ -1200,8 +1251,8 @@ func (x *EncryptionConfig) String() string {
func (*EncryptionConfig) ProtoMessage() {}
func (x *EncryptionConfig) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[15]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[17]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1213,7 +1264,7 @@ func (x *EncryptionConfig) ProtoReflect() protoreflect.Message {
// Deprecated: Use EncryptionConfig.ProtoReflect.Descriptor instead.
func (*EncryptionConfig) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{15}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{17}
}
func (x *EncryptionConfig) GetPrincipal() *Resource {
@@ -1237,16 +1288,18 @@ func (x *EncryptionConfig) GetKeyId() string {
return ""
}
-func (m *EncryptionConfig) GetConfig() isEncryptionConfig_Config {
- if m != nil {
- return m.Config
+func (x *EncryptionConfig) GetConfig() isEncryptionConfig_Config {
+ if x != nil {
+ return x.Config
}
return nil
}
func (x *EncryptionConfig) GetJwkPublicKeyConfig() *EncryptionConfig_JWKPublicKeyConfig {
- if x, ok := x.GetConfig().(*EncryptionConfig_JwkPublicKeyConfig); ok {
- return x.JwkPublicKeyConfig
+ if x != nil {
+ if x, ok := x.Config.(*EncryptionConfig_JwkPublicKeyConfig); ok {
+ return x.JwkPublicKeyConfig
+ }
}
return nil
}
@@ -1262,22 +1315,19 @@ type EncryptionConfig_JwkPublicKeyConfig struct {
func (*EncryptionConfig_JwkPublicKeyConfig) isEncryptionConfig_Config() {}
type ResourceId struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
+ Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
+ BatonResource bool `protobuf:"varint,3,opt,name=baton_resource,json=batonResource,proto3" json:"baton_resource,omitempty"`
unknownFields protoimpl.UnknownFields
-
- ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
- Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
- BatonResource bool `protobuf:"varint,3,opt,name=baton_resource,json=batonResource,proto3" json:"baton_resource,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ResourceId) Reset() {
*x = ResourceId{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[16]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourceId) String() string {
@@ -1287,8 +1337,8 @@ func (x *ResourceId) String() string {
func (*ResourceId) ProtoMessage() {}
func (x *ResourceId) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[16]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[18]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1300,7 +1350,7 @@ func (x *ResourceId) ProtoReflect() protoreflect.Message {
// Deprecated: Use ResourceId.ProtoReflect.Descriptor instead.
func (*ResourceId) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{16}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{18}
}
func (x *ResourceId) GetResourceType() string {
@@ -1325,10 +1375,7 @@ func (x *ResourceId) GetBatonResource() bool {
}
type Resource struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
Id *ResourceId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
ParentResourceId *ResourceId `protobuf:"bytes,2,opt,name=parent_resource_id,json=parentResourceId,proto3" json:"parent_resource_id,omitempty"`
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
@@ -1337,15 +1384,15 @@ type Resource struct {
BatonResource bool `protobuf:"varint,6,opt,name=baton_resource,json=batonResource,proto3" json:"baton_resource,omitempty"`
ExternalId *ExternalId `protobuf:"bytes,7,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
CreationSource Resource_CreationSource `protobuf:"varint,8,opt,name=creation_source,json=creationSource,proto3,enum=c1.connector.v2.Resource_CreationSource" json:"creation_source,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Resource) Reset() {
*x = Resource{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[17]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Resource) String() string {
@@ -1355,8 +1402,8 @@ func (x *Resource) String() string {
func (*Resource) ProtoMessage() {}
func (x *Resource) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[17]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[19]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1368,7 +1415,7 @@ func (x *Resource) ProtoReflect() protoreflect.Message {
// Deprecated: Use Resource.ProtoReflect.Descriptor instead.
func (*Resource) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{17}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{19}
}
func (x *Resource) GetId() *ResourceId {
@@ -1428,24 +1475,21 @@ func (x *Resource) GetCreationSource() Resource_CreationSource {
}
type ResourcesServiceListResourcesRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- ResourceTypeId string `protobuf:"bytes,1,opt,name=resource_type_id,json=resourceTypeId,proto3" json:"resource_type_id,omitempty"`
- ParentResourceId *ResourceId `protobuf:"bytes,2,opt,name=parent_resource_id,json=parentResourceId,proto3" json:"parent_resource_id,omitempty"`
- PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceTypeId string `protobuf:"bytes,1,opt,name=resource_type_id,json=resourceTypeId,proto3" json:"resource_type_id,omitempty"`
+ ParentResourceId *ResourceId `protobuf:"bytes,2,opt,name=parent_resource_id,json=parentResourceId,proto3" json:"parent_resource_id,omitempty"`
+ PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ResourcesServiceListResourcesRequest) Reset() {
*x = ResourcesServiceListResourcesRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourcesServiceListResourcesRequest) String() string {
@@ -1455,8 +1499,8 @@ func (x *ResourcesServiceListResourcesRequest) String() string {
func (*ResourcesServiceListResourcesRequest) ProtoMessage() {}
func (x *ResourcesServiceListResourcesRequest) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[18]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[20]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1468,7 +1512,7 @@ func (x *ResourcesServiceListResourcesRequest) ProtoReflect() protoreflect.Messa
// Deprecated: Use ResourcesServiceListResourcesRequest.ProtoReflect.Descriptor instead.
func (*ResourcesServiceListResourcesRequest) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{18}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{20}
}
func (x *ResourcesServiceListResourcesRequest) GetResourceTypeId() string {
@@ -1507,22 +1551,19 @@ func (x *ResourcesServiceListResourcesRequest) GetAnnotations() []*anypb.Any {
}
type ResourcesServiceListResourcesResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ List []*Resource `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- List []*Resource `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ResourcesServiceListResourcesResponse) Reset() {
*x = ResourcesServiceListResourcesResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[19]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourcesServiceListResourcesResponse) String() string {
@@ -1532,8 +1573,8 @@ func (x *ResourcesServiceListResourcesResponse) String() string {
func (*ResourcesServiceListResourcesResponse) ProtoMessage() {}
func (x *ResourcesServiceListResourcesResponse) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[19]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[21]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1545,7 +1586,7 @@ func (x *ResourcesServiceListResourcesResponse) ProtoReflect() protoreflect.Mess
// Deprecated: Use ResourcesServiceListResourcesResponse.ProtoReflect.Descriptor instead.
func (*ResourcesServiceListResourcesResponse) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{19}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{21}
}
func (x *ResourcesServiceListResourcesResponse) GetList() []*Resource {
@@ -1570,22 +1611,19 @@ func (x *ResourcesServiceListResourcesResponse) GetAnnotations() []*anypb.Any {
}
type ExternalId struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Link string `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"`
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Link string `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"`
- Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ExternalId) Reset() {
*x = ExternalId{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[20]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ExternalId) String() string {
@@ -1595,8 +1633,8 @@ func (x *ExternalId) String() string {
func (*ExternalId) ProtoMessage() {}
func (x *ExternalId) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[20]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[22]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1608,7 +1646,7 @@ func (x *ExternalId) ProtoReflect() protoreflect.Message {
// Deprecated: Use ExternalId.ProtoReflect.Descriptor instead.
func (*ExternalId) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{20}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{22}
}
func (x *ExternalId) GetId() string {
@@ -1633,22 +1671,19 @@ func (x *ExternalId) GetDescription() string {
}
type AccountInfo_Email struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
// Indicates if this is the user's primary email. Only one entry can be marked as primary.
- IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"`
+ IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *AccountInfo_Email) Reset() {
*x = AccountInfo_Email{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[21]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *AccountInfo_Email) String() string {
@@ -1658,8 +1693,8 @@ func (x *AccountInfo_Email) String() string {
func (*AccountInfo_Email) ProtoMessage() {}
func (x *AccountInfo_Email) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[21]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[23]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1671,7 +1706,7 @@ func (x *AccountInfo_Email) ProtoReflect() protoreflect.Message {
// Deprecated: Use AccountInfo_Email.ProtoReflect.Descriptor instead.
func (*AccountInfo_Email) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{9, 0}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{11, 0}
}
func (x *AccountInfo_Email) GetAddress() string {
@@ -1689,20 +1724,17 @@ func (x *AccountInfo_Email) GetIsPrimary() bool {
}
type CredentialOptions_RandomPassword struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Length int64 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Length int64 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *CredentialOptions_RandomPassword) Reset() {
*x = CredentialOptions_RandomPassword{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[22]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CredentialOptions_RandomPassword) String() string {
@@ -1712,8 +1744,8 @@ func (x *CredentialOptions_RandomPassword) String() string {
func (*CredentialOptions_RandomPassword) ProtoMessage() {}
func (x *CredentialOptions_RandomPassword) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[22]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[24]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1725,7 +1757,7 @@ func (x *CredentialOptions_RandomPassword) ProtoReflect() protoreflect.Message {
// Deprecated: Use CredentialOptions_RandomPassword.ProtoReflect.Descriptor instead.
func (*CredentialOptions_RandomPassword) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10, 0}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12, 0}
}
func (x *CredentialOptions_RandomPassword) GetLength() int64 {
@@ -1736,18 +1768,16 @@ func (x *CredentialOptions_RandomPassword) GetLength() int64 {
}
type CredentialOptions_NoPassword struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CredentialOptions_NoPassword) Reset() {
*x = CredentialOptions_NoPassword{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[23]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CredentialOptions_NoPassword) String() string {
@@ -1757,8 +1787,8 @@ func (x *CredentialOptions_NoPassword) String() string {
func (*CredentialOptions_NoPassword) ProtoMessage() {}
func (x *CredentialOptions_NoPassword) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[23]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[25]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1770,24 +1800,21 @@ func (x *CredentialOptions_NoPassword) ProtoReflect() protoreflect.Message {
// Deprecated: Use CredentialOptions_NoPassword.ProtoReflect.Descriptor instead.
func (*CredentialOptions_NoPassword) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10, 1}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12, 1}
}
type CredentialOptions_SSO struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SsoProvider string `protobuf:"bytes,1,opt,name=sso_provider,json=ssoProvider,proto3" json:"sso_provider,omitempty"`
unknownFields protoimpl.UnknownFields
-
- SsoProvider string `protobuf:"bytes,1,opt,name=sso_provider,json=ssoProvider,proto3" json:"sso_provider,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *CredentialOptions_SSO) Reset() {
*x = CredentialOptions_SSO{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[24]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CredentialOptions_SSO) String() string {
@@ -1797,8 +1824,8 @@ func (x *CredentialOptions_SSO) String() string {
func (*CredentialOptions_SSO) ProtoMessage() {}
func (x *CredentialOptions_SSO) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[24]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[26]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1810,7 +1837,7 @@ func (x *CredentialOptions_SSO) ProtoReflect() protoreflect.Message {
// Deprecated: Use CredentialOptions_SSO.ProtoReflect.Descriptor instead.
func (*CredentialOptions_SSO) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10, 2}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12, 2}
}
func (x *CredentialOptions_SSO) GetSsoProvider() string {
@@ -1821,21 +1848,18 @@ func (x *CredentialOptions_SSO) GetSsoProvider() string {
}
type CreateAccountResponse_SuccessResult struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
- IsCreateAccountResult bool `protobuf:"varint,2,opt,name=is_create_account_result,json=isCreateAccountResult,proto3" json:"is_create_account_result,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ IsCreateAccountResult bool `protobuf:"varint,2,opt,name=is_create_account_result,json=isCreateAccountResult,proto3" json:"is_create_account_result,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CreateAccountResponse_SuccessResult) Reset() {
*x = CreateAccountResponse_SuccessResult{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[25]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CreateAccountResponse_SuccessResult) String() string {
@@ -1845,8 +1869,8 @@ func (x *CreateAccountResponse_SuccessResult) String() string {
func (*CreateAccountResponse_SuccessResult) ProtoMessage() {}
func (x *CreateAccountResponse_SuccessResult) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[25]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[27]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1858,7 +1882,7 @@ func (x *CreateAccountResponse_SuccessResult) ProtoReflect() protoreflect.Messag
// Deprecated: Use CreateAccountResponse_SuccessResult.ProtoReflect.Descriptor instead.
func (*CreateAccountResponse_SuccessResult) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12, 0}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14, 0}
}
func (x *CreateAccountResponse_SuccessResult) GetResource() *Resource {
@@ -1876,22 +1900,19 @@ func (x *CreateAccountResponse_SuccessResult) GetIsCreateAccountResult() bool {
}
type CreateAccountResponse_ActionRequiredResult struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
- Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
- IsCreateAccountResult bool `protobuf:"varint,3,opt,name=is_create_account_result,json=isCreateAccountResult,proto3" json:"is_create_account_result,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
+ IsCreateAccountResult bool `protobuf:"varint,3,opt,name=is_create_account_result,json=isCreateAccountResult,proto3" json:"is_create_account_result,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *CreateAccountResponse_ActionRequiredResult) Reset() {
*x = CreateAccountResponse_ActionRequiredResult{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[26]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *CreateAccountResponse_ActionRequiredResult) String() string {
@@ -1901,8 +1922,8 @@ func (x *CreateAccountResponse_ActionRequiredResult) String() string {
func (*CreateAccountResponse_ActionRequiredResult) ProtoMessage() {}
func (x *CreateAccountResponse_ActionRequiredResult) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[26]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[28]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1914,7 +1935,7 @@ func (x *CreateAccountResponse_ActionRequiredResult) ProtoReflect() protoreflect
// Deprecated: Use CreateAccountResponse_ActionRequiredResult.ProtoReflect.Descriptor instead.
func (*CreateAccountResponse_ActionRequiredResult) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12, 1}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14, 1}
}
func (x *CreateAccountResponse_ActionRequiredResult) GetResource() *Resource {
@@ -1939,20 +1960,17 @@ func (x *CreateAccountResponse_ActionRequiredResult) GetIsCreateAccountResult()
}
type EncryptionConfig_JWKPublicKeyConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ PubKey []byte `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
unknownFields protoimpl.UnknownFields
-
- PubKey []byte `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *EncryptionConfig_JWKPublicKeyConfig) Reset() {
*x = EncryptionConfig_JWKPublicKeyConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[27]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *EncryptionConfig_JWKPublicKeyConfig) String() string {
@@ -1962,8 +1980,8 @@ func (x *EncryptionConfig_JWKPublicKeyConfig) String() string {
func (*EncryptionConfig_JWKPublicKeyConfig) ProtoMessage() {}
func (x *EncryptionConfig_JWKPublicKeyConfig) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connector_v2_resource_proto_msgTypes[27]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connector_v2_resource_proto_msgTypes[29]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1975,7 +1993,7 @@ func (x *EncryptionConfig_JWKPublicKeyConfig) ProtoReflect() protoreflect.Messag
// Deprecated: Use EncryptionConfig_JWKPublicKeyConfig.ProtoReflect.Descriptor instead.
func (*EncryptionConfig_JWKPublicKeyConfig) Descriptor() ([]byte, []int) {
- return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{15, 0}
+ return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{17, 0}
}
func (x *EncryptionConfig_JWKPublicKeyConfig) GetPubKey() []byte {
@@ -1987,7 +2005,7 @@ func (x *EncryptionConfig_JWKPublicKeyConfig) GetPubKey() []byte {
var File_c1_connector_v2_resource_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_resource_proto_rawDesc = []byte{
+var file_c1_connector_v2_resource_proto_rawDesc = string([]byte{
0x0a, 0x1e, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
@@ -2076,329 +2094,348 @@ var file_c1_connector_v2_resource_proto_rawDesc = []byte{
0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x17, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43,
- 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51,
- 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65,
- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11,
- 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x73, 0x22, 0xd7, 0x01, 0x0a, 0x18, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72,
- 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x45, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61,
- 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79,
- 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70,
- 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
- 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x82, 0x02,
- 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a,
- 0x06, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6d, 0x61, 0x69,
- 0x6c, 0x52, 0x06, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67,
- 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12,
- 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73,
- 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x6c, 0x69,
- 0x61, 0x73, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07,
- 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x49, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c,
- 0x12, 0x21, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72,
- 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72,
- 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61,
- 0x72, 0x79, 0x22, 0xf7, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
- 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64,
- 0x6f, 0x6d, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73,
- 0x77, 0x6f, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61,
- 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x50, 0x0a, 0x0b, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x73,
- 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72,
- 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
- 0x4e, 0x6f, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x6f,
- 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3a, 0x0a, 0x03, 0x73, 0x73, 0x6f, 0x18,
- 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x53, 0x4f, 0x48, 0x00, 0x52,
- 0x03, 0x73, 0x73, 0x6f, 0x1a, 0x33, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61,
- 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x18, 0x40, 0x28,
- 0x08, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x1a, 0x0c, 0x0a, 0x0a, 0x4e, 0x6f, 0x50,
- 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x28, 0x0a, 0x03, 0x53, 0x53, 0x4f, 0x12, 0x21,
- 0x0a, 0x0c, 0x73, 0x73, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x73, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
- 0x72, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a,
- 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
- 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63,
- 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75,
- 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e,
- 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x57, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49,
+ 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x52, 0x0a,
+ 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56,
+ 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x17, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a,
+ 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52,
+ 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, 0x63,
+ 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65,
+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50,
+ 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63,
+ 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65,
+ 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73,
+ 0x22, 0xd7, 0x01, 0x0a, 0x18, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a,
+ 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65,
+ 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64,
+ 0x44, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x82, 0x02, 0x0a, 0x0b, 0x41,
+ 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, 0x06, 0x65, 0x6d,
+ 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x06,
+ 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d,
+ 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20,
+ 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65,
+ 0x73, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f,
+ 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x49, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a,
+ 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07,
+ 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22,
+ 0xf7, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f,
+ 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
+ 0x64, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77,
+ 0x6f, 0x72, 0x64, 0x12, 0x50, 0x0a, 0x0b, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
+ 0x72, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4e, 0x6f, 0x50,
+ 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x6f, 0x50, 0x61, 0x73,
+ 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3a, 0x0a, 0x03, 0x73, 0x73, 0x6f, 0x18, 0x66, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
- 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63,
- 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18,
- 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xfe, 0x04, 0x0a, 0x15,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x53, 0x4f, 0x48, 0x00, 0x52, 0x03, 0x73, 0x73,
+ 0x6f, 0x1a, 0x33, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77,
+ 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x18, 0x40, 0x28, 0x08, 0x52, 0x06,
+ 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x1a, 0x0c, 0x0a, 0x0a, 0x4e, 0x6f, 0x50, 0x61, 0x73, 0x73,
+ 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x28, 0x0a, 0x03, 0x53, 0x53, 0x4f, 0x12, 0x21, 0x0a, 0x0c, 0x73,
+ 0x73, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0b, 0x73, 0x73, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x09,
+ 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e,
+ 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75,
+ 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49,
+ 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
+ 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xfe, 0x04, 0x0a, 0x15, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x64, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f,
+ 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x63, 0x63,
+ 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63,
+ 0x63, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72,
+ 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e,
+ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
- 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
- 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53,
- 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07,
- 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f,
- 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x3b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52,
- 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52,
- 0x0e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12,
- 0x45, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74,
- 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70,
- 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
- 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
- 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7f,
- 0x0a, 0x0d, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12,
- 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61,
- 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a,
- 0xa0, 0x01, 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72,
- 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
- 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f,
- 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72,
- 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd6, 0x01, 0x0a,
- 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a,
- 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x06, 0x6b, 0x65,
- 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05,
- 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
- 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
- 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68,
- 0x65, 0x6d, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64,
- 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x6e,
- 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07,
- 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6b,
- 0x65, 0x79, 0x49, 0x64, 0x73, 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65,
- 0x78, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
- 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06,
- 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63,
- 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20,
- 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x45,
- 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
- 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70,
- 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x15, 0x6a,
- 0x77, 0x6b, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63,
- 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x57,
- 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x48, 0x00, 0x52, 0x12, 0x6a, 0x77, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62,
- 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07,
- 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70,
- 0x75, 0x62, 0x4b, 0x65, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22,
- 0x8c, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f,
- 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80,
- 0x08, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
- 0x26, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x08, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e,
- 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
- 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xf0,
- 0x04, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x02, 0x69,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
+ 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x0e,
+ 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64,
+ 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44,
+ 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7f, 0x0a, 0x0d, 0x53,
+ 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
+ 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0xa0, 0x01, 0x0a,
+ 0x14, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52,
+ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65,
- 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02,
+ 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07,
+ 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75,
+ 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42,
+ 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd6, 0x01, 0x0a, 0x0d, 0x45, 0x6e,
+ 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x70,
+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69,
+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x6b, 0x65, 0x79,
+ 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
+ 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79,
+ 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79,
+ 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x65, 0x79,
+ 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x49,
+ 0x64, 0x73, 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44,
+ 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c,
+ 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72,
+ 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x09,
+ 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e,
+ 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
+ 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
+ 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x15, 0x6a, 0x77, 0x6b, 0x5f,
+ 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x57, 0x4b, 0x50, 0x75,
+ 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52,
+ 0x12, 0x6a, 0x77, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x1a, 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
+ 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62,
+ 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b,
+ 0x65, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, 0x01, 0x0a,
+ 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0d, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0c,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x08,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
+ 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61,
+ 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xf0, 0x04, 0x0a, 0x08,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49,
- 0x64, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e,
- 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08,
- 0x20, 0x01, 0x28, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61,
- 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
- 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a,
- 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01,
- 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25,
- 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
- 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74,
- 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
- 0x6c, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x52, 0x45,
- 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53,
- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x52,
- 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f,
- 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x53,
- 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, 0x45, 0x41,
- 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e,
- 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54,
- 0x53, 0x5f, 0x50, 0x52, 0x49, 0x4e, 0x43, 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, 0x54, 0x10,
- 0x02, 0x22, 0xc1, 0x02, 0x0a, 0x24, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08,
- 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64,
- 0x12, 0x53, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01,
- 0x02, 0x10, 0x00, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69,
- 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18,
- 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d,
- 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0,
- 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a,
- 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x2d, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36,
- 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
- 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01,
- 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67,
- 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
- 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52,
- 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02,
- 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
- 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b,
- 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x32, 0xab, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
- 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x11,
- 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
- 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
- 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x3e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73,
+ 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x10,
+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64,
+ 0x12, 0x30, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28,
+ 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61,
+ 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0b,
+ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x62,
+ 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69,
+ 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e,
+ 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64,
+ 0x12, 0x51, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
+ 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x52, 0x45, 0x41, 0x54,
+ 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45,
+ 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52,
+ 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f,
+ 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54,
+ 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x50,
+ 0x52, 0x49, 0x4e, 0x43, 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, 0x54, 0x10, 0x02, 0x22, 0xc1,
+ 0x02, 0x0a, 0x24, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0e, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x53, 0x0a,
+ 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00,
+ 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40,
+ 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x70,
+ 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52,
+ 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x32, 0x92, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e,
+ 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04,
+ 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0f, 0x6e,
+ 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80,
+ 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x0a, 0x45,
+ 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e,
+ 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x20, 0x0a,
+ 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32,
+ 0xab, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
+ 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73,
+ 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x3d,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e,
0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x12, 0x61, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x92, 0x01,
+ 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73,
+ 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
+ 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a,
+ 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
+ 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x64, 0x65,
- 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65,
- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65,
- 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
- 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x77, 0x0a, 0x15,
- 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65,
- 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
- 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
- 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
- 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65,
- 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31,
- 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c,
+ 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x32, 0x81, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67,
+ 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x56, 0x32, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x32, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x64,
+ 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72,
+ 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74,
+ 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65,
+ 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x77, 0x0a,
+ 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e,
+ 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63,
+ 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
var (
file_c1_connector_v2_resource_proto_rawDescOnce sync.Once
- file_c1_connector_v2_resource_proto_rawDescData = file_c1_connector_v2_resource_proto_rawDesc
+ file_c1_connector_v2_resource_proto_rawDescData []byte
)
func file_c1_connector_v2_resource_proto_rawDescGZIP() []byte {
file_c1_connector_v2_resource_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_resource_proto_rawDescData)
+ file_c1_connector_v2_resource_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_resource_proto_rawDesc), len(file_c1_connector_v2_resource_proto_rawDesc)))
})
return file_c1_connector_v2_resource_proto_rawDescData
}
var file_c1_connector_v2_resource_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_c1_connector_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 28)
-var file_c1_connector_v2_resource_proto_goTypes = []interface{}{
+var file_c1_connector_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 30)
+var file_c1_connector_v2_resource_proto_goTypes = []any{
(ResourceType_Trait)(0), // 0: c1.connector.v2.ResourceType.Trait
(Resource_CreationSource)(0), // 1: c1.connector.v2.Resource.CreationSource
(*ResourceType)(nil), // 2: c1.connector.v2.ResourceType
@@ -2408,90 +2445,96 @@ var file_c1_connector_v2_resource_proto_goTypes = []interface{}{
(*CreateResourceResponse)(nil), // 6: c1.connector.v2.CreateResourceResponse
(*DeleteResourceRequest)(nil), // 7: c1.connector.v2.DeleteResourceRequest
(*DeleteResourceResponse)(nil), // 8: c1.connector.v2.DeleteResourceResponse
- (*RotateCredentialRequest)(nil), // 9: c1.connector.v2.RotateCredentialRequest
- (*RotateCredentialResponse)(nil), // 10: c1.connector.v2.RotateCredentialResponse
- (*AccountInfo)(nil), // 11: c1.connector.v2.AccountInfo
- (*CredentialOptions)(nil), // 12: c1.connector.v2.CredentialOptions
- (*CreateAccountRequest)(nil), // 13: c1.connector.v2.CreateAccountRequest
- (*CreateAccountResponse)(nil), // 14: c1.connector.v2.CreateAccountResponse
- (*EncryptedData)(nil), // 15: c1.connector.v2.EncryptedData
- (*PlaintextData)(nil), // 16: c1.connector.v2.PlaintextData
- (*EncryptionConfig)(nil), // 17: c1.connector.v2.EncryptionConfig
- (*ResourceId)(nil), // 18: c1.connector.v2.ResourceId
- (*Resource)(nil), // 19: c1.connector.v2.Resource
- (*ResourcesServiceListResourcesRequest)(nil), // 20: c1.connector.v2.ResourcesServiceListResourcesRequest
- (*ResourcesServiceListResourcesResponse)(nil), // 21: c1.connector.v2.ResourcesServiceListResourcesResponse
- (*ExternalId)(nil), // 22: c1.connector.v2.ExternalId
- (*AccountInfo_Email)(nil), // 23: c1.connector.v2.AccountInfo.Email
- (*CredentialOptions_RandomPassword)(nil), // 24: c1.connector.v2.CredentialOptions.RandomPassword
- (*CredentialOptions_NoPassword)(nil), // 25: c1.connector.v2.CredentialOptions.NoPassword
- (*CredentialOptions_SSO)(nil), // 26: c1.connector.v2.CredentialOptions.SSO
- (*CreateAccountResponse_SuccessResult)(nil), // 27: c1.connector.v2.CreateAccountResponse.SuccessResult
- (*CreateAccountResponse_ActionRequiredResult)(nil), // 28: c1.connector.v2.CreateAccountResponse.ActionRequiredResult
- (*EncryptionConfig_JWKPublicKeyConfig)(nil), // 29: c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig
- (*anypb.Any)(nil), // 30: google.protobuf.Any
- (*structpb.Struct)(nil), // 31: google.protobuf.Struct
+ (*DeleteResourceV2Request)(nil), // 9: c1.connector.v2.DeleteResourceV2Request
+ (*DeleteResourceV2Response)(nil), // 10: c1.connector.v2.DeleteResourceV2Response
+ (*RotateCredentialRequest)(nil), // 11: c1.connector.v2.RotateCredentialRequest
+ (*RotateCredentialResponse)(nil), // 12: c1.connector.v2.RotateCredentialResponse
+ (*AccountInfo)(nil), // 13: c1.connector.v2.AccountInfo
+ (*CredentialOptions)(nil), // 14: c1.connector.v2.CredentialOptions
+ (*CreateAccountRequest)(nil), // 15: c1.connector.v2.CreateAccountRequest
+ (*CreateAccountResponse)(nil), // 16: c1.connector.v2.CreateAccountResponse
+ (*EncryptedData)(nil), // 17: c1.connector.v2.EncryptedData
+ (*PlaintextData)(nil), // 18: c1.connector.v2.PlaintextData
+ (*EncryptionConfig)(nil), // 19: c1.connector.v2.EncryptionConfig
+ (*ResourceId)(nil), // 20: c1.connector.v2.ResourceId
+ (*Resource)(nil), // 21: c1.connector.v2.Resource
+ (*ResourcesServiceListResourcesRequest)(nil), // 22: c1.connector.v2.ResourcesServiceListResourcesRequest
+ (*ResourcesServiceListResourcesResponse)(nil), // 23: c1.connector.v2.ResourcesServiceListResourcesResponse
+ (*ExternalId)(nil), // 24: c1.connector.v2.ExternalId
+ (*AccountInfo_Email)(nil), // 25: c1.connector.v2.AccountInfo.Email
+ (*CredentialOptions_RandomPassword)(nil), // 26: c1.connector.v2.CredentialOptions.RandomPassword
+ (*CredentialOptions_NoPassword)(nil), // 27: c1.connector.v2.CredentialOptions.NoPassword
+ (*CredentialOptions_SSO)(nil), // 28: c1.connector.v2.CredentialOptions.SSO
+ (*CreateAccountResponse_SuccessResult)(nil), // 29: c1.connector.v2.CreateAccountResponse.SuccessResult
+ (*CreateAccountResponse_ActionRequiredResult)(nil), // 30: c1.connector.v2.CreateAccountResponse.ActionRequiredResult
+ (*EncryptionConfig_JWKPublicKeyConfig)(nil), // 31: c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig
+ (*anypb.Any)(nil), // 32: google.protobuf.Any
+ (*structpb.Struct)(nil), // 33: google.protobuf.Struct
}
var file_c1_connector_v2_resource_proto_depIdxs = []int32{
0, // 0: c1.connector.v2.ResourceType.traits:type_name -> c1.connector.v2.ResourceType.Trait
- 30, // 1: c1.connector.v2.ResourceType.annotations:type_name -> google.protobuf.Any
- 19, // 2: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.parent:type_name -> c1.connector.v2.Resource
- 30, // 3: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.annotations:type_name -> google.protobuf.Any
+ 32, // 1: c1.connector.v2.ResourceType.annotations:type_name -> google.protobuf.Any
+ 21, // 2: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.parent:type_name -> c1.connector.v2.Resource
+ 32, // 3: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.annotations:type_name -> google.protobuf.Any
2, // 4: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.list:type_name -> c1.connector.v2.ResourceType
- 30, // 5: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.annotations:type_name -> google.protobuf.Any
- 19, // 6: c1.connector.v2.CreateResourceRequest.resource:type_name -> c1.connector.v2.Resource
- 19, // 7: c1.connector.v2.CreateResourceResponse.created:type_name -> c1.connector.v2.Resource
- 30, // 8: c1.connector.v2.CreateResourceResponse.annotations:type_name -> google.protobuf.Any
- 18, // 9: c1.connector.v2.DeleteResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId
- 30, // 10: c1.connector.v2.DeleteResourceResponse.annotations:type_name -> google.protobuf.Any
- 18, // 11: c1.connector.v2.RotateCredentialRequest.resource_id:type_name -> c1.connector.v2.ResourceId
- 12, // 12: c1.connector.v2.RotateCredentialRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions
- 17, // 13: c1.connector.v2.RotateCredentialRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
- 15, // 14: c1.connector.v2.RotateCredentialResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData
- 18, // 15: c1.connector.v2.RotateCredentialResponse.resource_id:type_name -> c1.connector.v2.ResourceId
- 30, // 16: c1.connector.v2.RotateCredentialResponse.annotations:type_name -> google.protobuf.Any
- 23, // 17: c1.connector.v2.AccountInfo.emails:type_name -> c1.connector.v2.AccountInfo.Email
- 31, // 18: c1.connector.v2.AccountInfo.profile:type_name -> google.protobuf.Struct
- 24, // 19: c1.connector.v2.CredentialOptions.random_password:type_name -> c1.connector.v2.CredentialOptions.RandomPassword
- 25, // 20: c1.connector.v2.CredentialOptions.no_password:type_name -> c1.connector.v2.CredentialOptions.NoPassword
- 26, // 21: c1.connector.v2.CredentialOptions.sso:type_name -> c1.connector.v2.CredentialOptions.SSO
- 11, // 22: c1.connector.v2.CreateAccountRequest.account_info:type_name -> c1.connector.v2.AccountInfo
- 12, // 23: c1.connector.v2.CreateAccountRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions
- 17, // 24: c1.connector.v2.CreateAccountRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
- 27, // 25: c1.connector.v2.CreateAccountResponse.success:type_name -> c1.connector.v2.CreateAccountResponse.SuccessResult
- 28, // 26: c1.connector.v2.CreateAccountResponse.action_required:type_name -> c1.connector.v2.CreateAccountResponse.ActionRequiredResult
- 15, // 27: c1.connector.v2.CreateAccountResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData
- 30, // 28: c1.connector.v2.CreateAccountResponse.annotations:type_name -> google.protobuf.Any
- 19, // 29: c1.connector.v2.EncryptionConfig.principal:type_name -> c1.connector.v2.Resource
- 29, // 30: c1.connector.v2.EncryptionConfig.jwk_public_key_config:type_name -> c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig
- 18, // 31: c1.connector.v2.Resource.id:type_name -> c1.connector.v2.ResourceId
- 18, // 32: c1.connector.v2.Resource.parent_resource_id:type_name -> c1.connector.v2.ResourceId
- 30, // 33: c1.connector.v2.Resource.annotations:type_name -> google.protobuf.Any
- 22, // 34: c1.connector.v2.Resource.external_id:type_name -> c1.connector.v2.ExternalId
- 1, // 35: c1.connector.v2.Resource.creation_source:type_name -> c1.connector.v2.Resource.CreationSource
- 18, // 36: c1.connector.v2.ResourcesServiceListResourcesRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId
- 30, // 37: c1.connector.v2.ResourcesServiceListResourcesRequest.annotations:type_name -> google.protobuf.Any
- 19, // 38: c1.connector.v2.ResourcesServiceListResourcesResponse.list:type_name -> c1.connector.v2.Resource
- 30, // 39: c1.connector.v2.ResourcesServiceListResourcesResponse.annotations:type_name -> google.protobuf.Any
- 19, // 40: c1.connector.v2.CreateAccountResponse.SuccessResult.resource:type_name -> c1.connector.v2.Resource
- 19, // 41: c1.connector.v2.CreateAccountResponse.ActionRequiredResult.resource:type_name -> c1.connector.v2.Resource
- 3, // 42: c1.connector.v2.ResourceTypesService.ListResourceTypes:input_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesRequest
- 20, // 43: c1.connector.v2.ResourcesService.ListResources:input_type -> c1.connector.v2.ResourcesServiceListResourcesRequest
- 5, // 44: c1.connector.v2.ResourceManagerService.CreateResource:input_type -> c1.connector.v2.CreateResourceRequest
- 7, // 45: c1.connector.v2.ResourceManagerService.DeleteResource:input_type -> c1.connector.v2.DeleteResourceRequest
- 9, // 46: c1.connector.v2.CredentialManagerService.RotateCredential:input_type -> c1.connector.v2.RotateCredentialRequest
- 13, // 47: c1.connector.v2.AccountManagerService.CreateAccount:input_type -> c1.connector.v2.CreateAccountRequest
- 4, // 48: c1.connector.v2.ResourceTypesService.ListResourceTypes:output_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesResponse
- 21, // 49: c1.connector.v2.ResourcesService.ListResources:output_type -> c1.connector.v2.ResourcesServiceListResourcesResponse
- 6, // 50: c1.connector.v2.ResourceManagerService.CreateResource:output_type -> c1.connector.v2.CreateResourceResponse
- 8, // 51: c1.connector.v2.ResourceManagerService.DeleteResource:output_type -> c1.connector.v2.DeleteResourceResponse
- 10, // 52: c1.connector.v2.CredentialManagerService.RotateCredential:output_type -> c1.connector.v2.RotateCredentialResponse
- 14, // 53: c1.connector.v2.AccountManagerService.CreateAccount:output_type -> c1.connector.v2.CreateAccountResponse
- 48, // [48:54] is the sub-list for method output_type
- 42, // [42:48] is the sub-list for method input_type
- 42, // [42:42] is the sub-list for extension type_name
- 42, // [42:42] is the sub-list for extension extendee
- 0, // [0:42] is the sub-list for field type_name
+ 32, // 5: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.annotations:type_name -> google.protobuf.Any
+ 21, // 6: c1.connector.v2.CreateResourceRequest.resource:type_name -> c1.connector.v2.Resource
+ 21, // 7: c1.connector.v2.CreateResourceResponse.created:type_name -> c1.connector.v2.Resource
+ 32, // 8: c1.connector.v2.CreateResourceResponse.annotations:type_name -> google.protobuf.Any
+ 20, // 9: c1.connector.v2.DeleteResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId
+ 32, // 10: c1.connector.v2.DeleteResourceResponse.annotations:type_name -> google.protobuf.Any
+ 20, // 11: c1.connector.v2.DeleteResourceV2Request.resource_id:type_name -> c1.connector.v2.ResourceId
+ 32, // 12: c1.connector.v2.DeleteResourceV2Response.annotations:type_name -> google.protobuf.Any
+ 20, // 13: c1.connector.v2.RotateCredentialRequest.resource_id:type_name -> c1.connector.v2.ResourceId
+ 14, // 14: c1.connector.v2.RotateCredentialRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions
+ 19, // 15: c1.connector.v2.RotateCredentialRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
+ 17, // 16: c1.connector.v2.RotateCredentialResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData
+ 20, // 17: c1.connector.v2.RotateCredentialResponse.resource_id:type_name -> c1.connector.v2.ResourceId
+ 32, // 18: c1.connector.v2.RotateCredentialResponse.annotations:type_name -> google.protobuf.Any
+ 25, // 19: c1.connector.v2.AccountInfo.emails:type_name -> c1.connector.v2.AccountInfo.Email
+ 33, // 20: c1.connector.v2.AccountInfo.profile:type_name -> google.protobuf.Struct
+ 26, // 21: c1.connector.v2.CredentialOptions.random_password:type_name -> c1.connector.v2.CredentialOptions.RandomPassword
+ 27, // 22: c1.connector.v2.CredentialOptions.no_password:type_name -> c1.connector.v2.CredentialOptions.NoPassword
+ 28, // 23: c1.connector.v2.CredentialOptions.sso:type_name -> c1.connector.v2.CredentialOptions.SSO
+ 13, // 24: c1.connector.v2.CreateAccountRequest.account_info:type_name -> c1.connector.v2.AccountInfo
+ 14, // 25: c1.connector.v2.CreateAccountRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions
+ 19, // 26: c1.connector.v2.CreateAccountRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
+ 29, // 27: c1.connector.v2.CreateAccountResponse.success:type_name -> c1.connector.v2.CreateAccountResponse.SuccessResult
+ 30, // 28: c1.connector.v2.CreateAccountResponse.action_required:type_name -> c1.connector.v2.CreateAccountResponse.ActionRequiredResult
+ 17, // 29: c1.connector.v2.CreateAccountResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData
+ 32, // 30: c1.connector.v2.CreateAccountResponse.annotations:type_name -> google.protobuf.Any
+ 21, // 31: c1.connector.v2.EncryptionConfig.principal:type_name -> c1.connector.v2.Resource
+ 31, // 32: c1.connector.v2.EncryptionConfig.jwk_public_key_config:type_name -> c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig
+ 20, // 33: c1.connector.v2.Resource.id:type_name -> c1.connector.v2.ResourceId
+ 20, // 34: c1.connector.v2.Resource.parent_resource_id:type_name -> c1.connector.v2.ResourceId
+ 32, // 35: c1.connector.v2.Resource.annotations:type_name -> google.protobuf.Any
+ 24, // 36: c1.connector.v2.Resource.external_id:type_name -> c1.connector.v2.ExternalId
+ 1, // 37: c1.connector.v2.Resource.creation_source:type_name -> c1.connector.v2.Resource.CreationSource
+ 20, // 38: c1.connector.v2.ResourcesServiceListResourcesRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId
+ 32, // 39: c1.connector.v2.ResourcesServiceListResourcesRequest.annotations:type_name -> google.protobuf.Any
+ 21, // 40: c1.connector.v2.ResourcesServiceListResourcesResponse.list:type_name -> c1.connector.v2.Resource
+ 32, // 41: c1.connector.v2.ResourcesServiceListResourcesResponse.annotations:type_name -> google.protobuf.Any
+ 21, // 42: c1.connector.v2.CreateAccountResponse.SuccessResult.resource:type_name -> c1.connector.v2.Resource
+ 21, // 43: c1.connector.v2.CreateAccountResponse.ActionRequiredResult.resource:type_name -> c1.connector.v2.Resource
+ 3, // 44: c1.connector.v2.ResourceTypesService.ListResourceTypes:input_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesRequest
+ 22, // 45: c1.connector.v2.ResourcesService.ListResources:input_type -> c1.connector.v2.ResourcesServiceListResourcesRequest
+ 5, // 46: c1.connector.v2.ResourceManagerService.CreateResource:input_type -> c1.connector.v2.CreateResourceRequest
+ 7, // 47: c1.connector.v2.ResourceManagerService.DeleteResource:input_type -> c1.connector.v2.DeleteResourceRequest
+ 9, // 48: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:input_type -> c1.connector.v2.DeleteResourceV2Request
+ 11, // 49: c1.connector.v2.CredentialManagerService.RotateCredential:input_type -> c1.connector.v2.RotateCredentialRequest
+ 15, // 50: c1.connector.v2.AccountManagerService.CreateAccount:input_type -> c1.connector.v2.CreateAccountRequest
+ 4, // 51: c1.connector.v2.ResourceTypesService.ListResourceTypes:output_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesResponse
+ 23, // 52: c1.connector.v2.ResourcesService.ListResources:output_type -> c1.connector.v2.ResourcesServiceListResourcesResponse
+ 6, // 53: c1.connector.v2.ResourceManagerService.CreateResource:output_type -> c1.connector.v2.CreateResourceResponse
+ 8, // 54: c1.connector.v2.ResourceManagerService.DeleteResource:output_type -> c1.connector.v2.DeleteResourceResponse
+ 10, // 55: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:output_type -> c1.connector.v2.DeleteResourceV2Response
+ 12, // 56: c1.connector.v2.CredentialManagerService.RotateCredential:output_type -> c1.connector.v2.RotateCredentialResponse
+ 16, // 57: c1.connector.v2.AccountManagerService.CreateAccount:output_type -> c1.connector.v2.CreateAccountResponse
+ 51, // [51:58] is the sub-list for method output_type
+ 44, // [44:51] is the sub-list for method input_type
+ 44, // [44:44] is the sub-list for extension type_name
+ 44, // [44:44] is the sub-list for extension extendee
+ 0, // [0:44] is the sub-list for field type_name
}
func init() { file_c1_connector_v2_resource_proto_init() }
@@ -2499,365 +2542,27 @@ func file_c1_connector_v2_resource_proto_init() {
if File_c1_connector_v2_resource_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourceType); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourceTypesServiceListResourceTypesRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourceTypesServiceListResourceTypesResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateResourceRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateResourceResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteResourceRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteResourceResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RotateCredentialRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RotateCredentialResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AccountInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CredentialOptions); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateAccountRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateAccountResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*EncryptedData); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PlaintextData); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*EncryptionConfig); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourceId); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Resource); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourcesServiceListResourcesRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourcesServiceListResourcesResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ExternalId); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AccountInfo_Email); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CredentialOptions_RandomPassword); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CredentialOptions_NoPassword); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CredentialOptions_SSO); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateAccountResponse_SuccessResult); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateAccountResponse_ActionRequiredResult); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*EncryptionConfig_JWKPublicKeyConfig); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_c1_connector_v2_resource_proto_msgTypes[10].OneofWrappers = []interface{}{
+ file_c1_connector_v2_resource_proto_msgTypes[12].OneofWrappers = []any{
(*CredentialOptions_RandomPassword_)(nil),
(*CredentialOptions_NoPassword_)(nil),
(*CredentialOptions_Sso)(nil),
}
- file_c1_connector_v2_resource_proto_msgTypes[12].OneofWrappers = []interface{}{
+ file_c1_connector_v2_resource_proto_msgTypes[14].OneofWrappers = []any{
(*CreateAccountResponse_Success)(nil),
(*CreateAccountResponse_ActionRequired)(nil),
}
- file_c1_connector_v2_resource_proto_msgTypes[15].OneofWrappers = []interface{}{
+ file_c1_connector_v2_resource_proto_msgTypes[17].OneofWrappers = []any{
(*EncryptionConfig_JwkPublicKeyConfig)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_resource_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_resource_proto_rawDesc), len(file_c1_connector_v2_resource_proto_rawDesc)),
NumEnums: 2,
- NumMessages: 28,
+ NumMessages: 30,
NumExtensions: 0,
- NumServices: 5,
+ NumServices: 6,
},
GoTypes: file_c1_connector_v2_resource_proto_goTypes,
DependencyIndexes: file_c1_connector_v2_resource_proto_depIdxs,
@@ -2865,7 +2570,6 @@ func file_c1_connector_v2_resource_proto_init() {
MessageInfos: file_c1_connector_v2_resource_proto_msgTypes,
}.Build()
File_c1_connector_v2_resource_proto = out.File
- file_c1_connector_v2_resource_proto_rawDesc = nil
file_c1_connector_v2_resource_proto_goTypes = nil
file_c1_connector_v2_resource_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go
index 0bb151b4..ca9162e8 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go
@@ -178,7 +178,7 @@ type ResourceTypeMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourceTypeMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -374,7 +374,7 @@ type ResourceTypesServiceListResourceTypesRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourceTypesServiceListResourceTypesRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -564,7 +564,7 @@ type ResourceTypesServiceListResourceTypesResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourceTypesServiceListResourceTypesResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -699,7 +699,7 @@ type CreateResourceRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CreateResourceRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -864,7 +864,7 @@ type CreateResourceResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CreateResourceResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -995,7 +995,7 @@ type DeleteResourceRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m DeleteResourceRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1131,7 +1131,7 @@ type DeleteResourceResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m DeleteResourceResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1197,6 +1197,273 @@ var _ interface {
ErrorName() string
} = DeleteResourceResponseValidationError{}
+// Validate checks the field values on DeleteResourceV2Request with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *DeleteResourceV2Request) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DeleteResourceV2Request with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// DeleteResourceV2RequestMultiError, or nil if none found.
+func (m *DeleteResourceV2Request) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DeleteResourceV2Request) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetResourceId()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeleteResourceV2RequestValidationError{
+ field: "ResourceId",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeleteResourceV2RequestValidationError{
+ field: "ResourceId",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetResourceId()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeleteResourceV2RequestValidationError{
+ field: "ResourceId",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return DeleteResourceV2RequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// DeleteResourceV2RequestMultiError is an error wrapping multiple validation
+// errors returned by DeleteResourceV2Request.ValidateAll() if the designated
+// constraints aren't met.
+type DeleteResourceV2RequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DeleteResourceV2RequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DeleteResourceV2RequestMultiError) AllErrors() []error { return m }
+
+// DeleteResourceV2RequestValidationError is the validation error returned by
+// DeleteResourceV2Request.Validate if the designated constraints aren't met.
+type DeleteResourceV2RequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DeleteResourceV2RequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DeleteResourceV2RequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DeleteResourceV2RequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DeleteResourceV2RequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DeleteResourceV2RequestValidationError) ErrorName() string {
+ return "DeleteResourceV2RequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DeleteResourceV2RequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDeleteResourceV2Request.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DeleteResourceV2RequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DeleteResourceV2RequestValidationError{}
+
+// Validate checks the field values on DeleteResourceV2Response with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *DeleteResourceV2Response) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DeleteResourceV2Response with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// DeleteResourceV2ResponseMultiError, or nil if none found.
+func (m *DeleteResourceV2Response) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DeleteResourceV2Response) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeleteResourceV2ResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeleteResourceV2ResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeleteResourceV2ResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return DeleteResourceV2ResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// DeleteResourceV2ResponseMultiError is an error wrapping multiple validation
+// errors returned by DeleteResourceV2Response.ValidateAll() if the designated
+// constraints aren't met.
+type DeleteResourceV2ResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DeleteResourceV2ResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DeleteResourceV2ResponseMultiError) AllErrors() []error { return m }
+
+// DeleteResourceV2ResponseValidationError is the validation error returned by
+// DeleteResourceV2Response.Validate if the designated constraints aren't met.
+type DeleteResourceV2ResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DeleteResourceV2ResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DeleteResourceV2ResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DeleteResourceV2ResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DeleteResourceV2ResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DeleteResourceV2ResponseValidationError) ErrorName() string {
+ return "DeleteResourceV2ResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DeleteResourceV2ResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDeleteResourceV2Response.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DeleteResourceV2ResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DeleteResourceV2ResponseValidationError{}
+
// Validate checks the field values on RotateCredentialRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
@@ -1325,7 +1592,7 @@ type RotateCredentialRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m RotateCredentialRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1524,7 +1791,7 @@ type RotateCredentialResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m RotateCredentialResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1690,7 +1957,7 @@ type AccountInfoMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m AccountInfoMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1918,7 +2185,7 @@ type CredentialOptionsMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CredentialOptionsMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2112,7 +2379,7 @@ type CreateAccountRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CreateAccountRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2369,7 +2636,7 @@ type CreateAccountResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CreateAccountResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2483,7 +2750,7 @@ type EncryptedDataMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m EncryptedDataMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2591,7 +2858,7 @@ type PlaintextDataMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m PlaintextDataMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2770,7 +3037,7 @@ type EncryptionConfigMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m EncryptionConfigMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2893,7 +3160,7 @@ type ResourceIdMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourceIdMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3147,7 +3414,7 @@ type ResourceMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourceMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3353,7 +3620,7 @@ type ResourcesServiceListResourcesRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourcesServiceListResourcesRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3541,7 +3808,7 @@ type ResourcesServiceListResourcesResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourcesServiceListResourcesResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3649,7 +3916,7 @@ type ExternalIdMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ExternalIdMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3813,7 +4080,7 @@ type AccountInfo_EmailMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m AccountInfo_EmailMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3928,7 +4195,7 @@ type CredentialOptions_RandomPasswordMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CredentialOptions_RandomPasswordMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4031,7 +4298,7 @@ type CredentialOptions_NoPasswordMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CredentialOptions_NoPasswordMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4136,7 +4403,7 @@ type CredentialOptions_SSOMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CredentialOptions_SSOMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4271,7 +4538,7 @@ type CreateAccountResponse_SuccessResultMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CreateAccountResponse_SuccessResultMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4410,7 +4677,7 @@ type CreateAccountResponse_ActionRequiredResultMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CreateAccountResponse_ActionRequiredResultMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4517,7 +4784,7 @@ type EncryptionConfig_JWKPublicKeyConfigMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m EncryptionConfig_JWKPublicKeyConfigMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go
index 17f2df2c..a3718142 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/connector/v2/resource.proto
@@ -15,8 +15,12 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ ResourceTypesService_ListResourceTypes_FullMethodName = "/c1.connector.v2.ResourceTypesService/ListResourceTypes"
+)
// ResourceTypesServiceClient is the client API for ResourceTypesService service.
//
@@ -34,8 +38,9 @@ func NewResourceTypesServiceClient(cc grpc.ClientConnInterface) ResourceTypesSer
}
func (c *resourceTypesServiceClient) ListResourceTypes(ctx context.Context, in *ResourceTypesServiceListResourceTypesRequest, opts ...grpc.CallOption) (*ResourceTypesServiceListResourceTypesResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ResourceTypesServiceListResourceTypesResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.ResourceTypesService/ListResourceTypes", in, out, opts...)
+ err := c.cc.Invoke(ctx, ResourceTypesService_ListResourceTypes_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -44,18 +49,22 @@ func (c *resourceTypesServiceClient) ListResourceTypes(ctx context.Context, in *
// ResourceTypesServiceServer is the server API for ResourceTypesService service.
// All implementations should embed UnimplementedResourceTypesServiceServer
-// for forward compatibility
+// for forward compatibility.
type ResourceTypesServiceServer interface {
ListResourceTypes(context.Context, *ResourceTypesServiceListResourceTypesRequest) (*ResourceTypesServiceListResourceTypesResponse, error)
}
-// UnimplementedResourceTypesServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedResourceTypesServiceServer struct {
-}
+// UnimplementedResourceTypesServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedResourceTypesServiceServer struct{}
func (UnimplementedResourceTypesServiceServer) ListResourceTypes(context.Context, *ResourceTypesServiceListResourceTypesRequest) (*ResourceTypesServiceListResourceTypesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListResourceTypes not implemented")
}
+func (UnimplementedResourceTypesServiceServer) testEmbeddedByValue() {}
// UnsafeResourceTypesServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ResourceTypesServiceServer will
@@ -65,6 +74,13 @@ type UnsafeResourceTypesServiceServer interface {
}
func RegisterResourceTypesServiceServer(s grpc.ServiceRegistrar, srv ResourceTypesServiceServer) {
+ // If the following call pancis, it indicates UnimplementedResourceTypesServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&ResourceTypesService_ServiceDesc, srv)
}
@@ -78,7 +94,7 @@ func _ResourceTypesService_ListResourceTypes_Handler(srv interface{}, ctx contex
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.ResourceTypesService/ListResourceTypes",
+ FullMethod: ResourceTypesService_ListResourceTypes_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceTypesServiceServer).ListResourceTypes(ctx, req.(*ResourceTypesServiceListResourceTypesRequest))
@@ -102,6 +118,10 @@ var ResourceTypesService_ServiceDesc = grpc.ServiceDesc{
Metadata: "c1/connector/v2/resource.proto",
}
+const (
+ ResourcesService_ListResources_FullMethodName = "/c1.connector.v2.ResourcesService/ListResources"
+)
+
// ResourcesServiceClient is the client API for ResourcesService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@@ -118,8 +138,9 @@ func NewResourcesServiceClient(cc grpc.ClientConnInterface) ResourcesServiceClie
}
func (c *resourcesServiceClient) ListResources(ctx context.Context, in *ResourcesServiceListResourcesRequest, opts ...grpc.CallOption) (*ResourcesServiceListResourcesResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ResourcesServiceListResourcesResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.ResourcesService/ListResources", in, out, opts...)
+ err := c.cc.Invoke(ctx, ResourcesService_ListResources_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -128,18 +149,22 @@ func (c *resourcesServiceClient) ListResources(ctx context.Context, in *Resource
// ResourcesServiceServer is the server API for ResourcesService service.
// All implementations should embed UnimplementedResourcesServiceServer
-// for forward compatibility
+// for forward compatibility.
type ResourcesServiceServer interface {
ListResources(context.Context, *ResourcesServiceListResourcesRequest) (*ResourcesServiceListResourcesResponse, error)
}
-// UnimplementedResourcesServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedResourcesServiceServer struct {
-}
+// UnimplementedResourcesServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedResourcesServiceServer struct{}
func (UnimplementedResourcesServiceServer) ListResources(context.Context, *ResourcesServiceListResourcesRequest) (*ResourcesServiceListResourcesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListResources not implemented")
}
+func (UnimplementedResourcesServiceServer) testEmbeddedByValue() {}
// UnsafeResourcesServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ResourcesServiceServer will
@@ -149,6 +174,13 @@ type UnsafeResourcesServiceServer interface {
}
func RegisterResourcesServiceServer(s grpc.ServiceRegistrar, srv ResourcesServiceServer) {
+ // If the following call pancis, it indicates UnimplementedResourcesServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&ResourcesService_ServiceDesc, srv)
}
@@ -162,7 +194,7 @@ func _ResourcesService_ListResources_Handler(srv interface{}, ctx context.Contex
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.ResourcesService/ListResources",
+ FullMethod: ResourcesService_ListResources_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourcesServiceServer).ListResources(ctx, req.(*ResourcesServiceListResourcesRequest))
@@ -186,6 +218,11 @@ var ResourcesService_ServiceDesc = grpc.ServiceDesc{
Metadata: "c1/connector/v2/resource.proto",
}
+const (
+ ResourceManagerService_CreateResource_FullMethodName = "/c1.connector.v2.ResourceManagerService/CreateResource"
+ ResourceManagerService_DeleteResource_FullMethodName = "/c1.connector.v2.ResourceManagerService/DeleteResource"
+)
+
// ResourceManagerServiceClient is the client API for ResourceManagerService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@@ -203,8 +240,9 @@ func NewResourceManagerServiceClient(cc grpc.ClientConnInterface) ResourceManage
}
func (c *resourceManagerServiceClient) CreateResource(ctx context.Context, in *CreateResourceRequest, opts ...grpc.CallOption) (*CreateResourceResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CreateResourceResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.ResourceManagerService/CreateResource", in, out, opts...)
+ err := c.cc.Invoke(ctx, ResourceManagerService_CreateResource_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -212,8 +250,9 @@ func (c *resourceManagerServiceClient) CreateResource(ctx context.Context, in *C
}
func (c *resourceManagerServiceClient) DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*DeleteResourceResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteResourceResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.ResourceManagerService/DeleteResource", in, out, opts...)
+ err := c.cc.Invoke(ctx, ResourceManagerService_DeleteResource_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -222,15 +261,18 @@ func (c *resourceManagerServiceClient) DeleteResource(ctx context.Context, in *D
// ResourceManagerServiceServer is the server API for ResourceManagerService service.
// All implementations should embed UnimplementedResourceManagerServiceServer
-// for forward compatibility
+// for forward compatibility.
type ResourceManagerServiceServer interface {
CreateResource(context.Context, *CreateResourceRequest) (*CreateResourceResponse, error)
DeleteResource(context.Context, *DeleteResourceRequest) (*DeleteResourceResponse, error)
}
-// UnimplementedResourceManagerServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedResourceManagerServiceServer struct {
-}
+// UnimplementedResourceManagerServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedResourceManagerServiceServer struct{}
func (UnimplementedResourceManagerServiceServer) CreateResource(context.Context, *CreateResourceRequest) (*CreateResourceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateResource not implemented")
@@ -238,6 +280,7 @@ func (UnimplementedResourceManagerServiceServer) CreateResource(context.Context,
func (UnimplementedResourceManagerServiceServer) DeleteResource(context.Context, *DeleteResourceRequest) (*DeleteResourceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteResource not implemented")
}
+func (UnimplementedResourceManagerServiceServer) testEmbeddedByValue() {}
// UnsafeResourceManagerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ResourceManagerServiceServer will
@@ -247,6 +290,13 @@ type UnsafeResourceManagerServiceServer interface {
}
func RegisterResourceManagerServiceServer(s grpc.ServiceRegistrar, srv ResourceManagerServiceServer) {
+ // If the following call pancis, it indicates UnimplementedResourceManagerServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&ResourceManagerService_ServiceDesc, srv)
}
@@ -260,7 +310,7 @@ func _ResourceManagerService_CreateResource_Handler(srv interface{}, ctx context
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.ResourceManagerService/CreateResource",
+ FullMethod: ResourceManagerService_CreateResource_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceManagerServiceServer).CreateResource(ctx, req.(*CreateResourceRequest))
@@ -278,7 +328,7 @@ func _ResourceManagerService_DeleteResource_Handler(srv interface{}, ctx context
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.ResourceManagerService/DeleteResource",
+ FullMethod: ResourceManagerService_DeleteResource_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceManagerServiceServer).DeleteResource(ctx, req.(*DeleteResourceRequest))
@@ -306,6 +356,110 @@ var ResourceManagerService_ServiceDesc = grpc.ServiceDesc{
Metadata: "c1/connector/v2/resource.proto",
}
+const (
+ ResourceDeleterService_DeleteResourceV2_FullMethodName = "/c1.connector.v2.ResourceDeleterService/DeleteResourceV2"
+)
+
+// ResourceDeleterServiceClient is the client API for ResourceDeleterService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type ResourceDeleterServiceClient interface {
+ DeleteResourceV2(ctx context.Context, in *DeleteResourceV2Request, opts ...grpc.CallOption) (*DeleteResourceV2Response, error)
+}
+
+type resourceDeleterServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewResourceDeleterServiceClient(cc grpc.ClientConnInterface) ResourceDeleterServiceClient {
+ return &resourceDeleterServiceClient{cc}
+}
+
+func (c *resourceDeleterServiceClient) DeleteResourceV2(ctx context.Context, in *DeleteResourceV2Request, opts ...grpc.CallOption) (*DeleteResourceV2Response, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(DeleteResourceV2Response)
+ err := c.cc.Invoke(ctx, ResourceDeleterService_DeleteResourceV2_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// ResourceDeleterServiceServer is the server API for ResourceDeleterService service.
+// All implementations should embed UnimplementedResourceDeleterServiceServer
+// for forward compatibility.
+type ResourceDeleterServiceServer interface {
+ DeleteResourceV2(context.Context, *DeleteResourceV2Request) (*DeleteResourceV2Response, error)
+}
+
+// UnimplementedResourceDeleterServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedResourceDeleterServiceServer struct{}
+
+func (UnimplementedResourceDeleterServiceServer) DeleteResourceV2(context.Context, *DeleteResourceV2Request) (*DeleteResourceV2Response, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteResourceV2 not implemented")
+}
+func (UnimplementedResourceDeleterServiceServer) testEmbeddedByValue() {}
+
+// UnsafeResourceDeleterServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to ResourceDeleterServiceServer will
+// result in compilation errors.
+type UnsafeResourceDeleterServiceServer interface {
+ mustEmbedUnimplementedResourceDeleterServiceServer()
+}
+
+func RegisterResourceDeleterServiceServer(s grpc.ServiceRegistrar, srv ResourceDeleterServiceServer) {
+ // If the following call pancis, it indicates UnimplementedResourceDeleterServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&ResourceDeleterService_ServiceDesc, srv)
+}
+
+func _ResourceDeleterService_DeleteResourceV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteResourceV2Request)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ResourceDeleterServiceServer).DeleteResourceV2(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ResourceDeleterService_DeleteResourceV2_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ResourceDeleterServiceServer).DeleteResourceV2(ctx, req.(*DeleteResourceV2Request))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// ResourceDeleterService_ServiceDesc is the grpc.ServiceDesc for ResourceDeleterService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ResourceDeleterService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "c1.connector.v2.ResourceDeleterService",
+ HandlerType: (*ResourceDeleterServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "DeleteResourceV2",
+ Handler: _ResourceDeleterService_DeleteResourceV2_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "c1/connector/v2/resource.proto",
+}
+
+const (
+ CredentialManagerService_RotateCredential_FullMethodName = "/c1.connector.v2.CredentialManagerService/RotateCredential"
+)
+
// CredentialManagerServiceClient is the client API for CredentialManagerService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@@ -322,8 +476,9 @@ func NewCredentialManagerServiceClient(cc grpc.ClientConnInterface) CredentialMa
}
func (c *credentialManagerServiceClient) RotateCredential(ctx context.Context, in *RotateCredentialRequest, opts ...grpc.CallOption) (*RotateCredentialResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RotateCredentialResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.CredentialManagerService/RotateCredential", in, out, opts...)
+ err := c.cc.Invoke(ctx, CredentialManagerService_RotateCredential_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -332,18 +487,22 @@ func (c *credentialManagerServiceClient) RotateCredential(ctx context.Context, i
// CredentialManagerServiceServer is the server API for CredentialManagerService service.
// All implementations should embed UnimplementedCredentialManagerServiceServer
-// for forward compatibility
+// for forward compatibility.
type CredentialManagerServiceServer interface {
RotateCredential(context.Context, *RotateCredentialRequest) (*RotateCredentialResponse, error)
}
-// UnimplementedCredentialManagerServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedCredentialManagerServiceServer struct {
-}
+// UnimplementedCredentialManagerServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedCredentialManagerServiceServer struct{}
func (UnimplementedCredentialManagerServiceServer) RotateCredential(context.Context, *RotateCredentialRequest) (*RotateCredentialResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RotateCredential not implemented")
}
+func (UnimplementedCredentialManagerServiceServer) testEmbeddedByValue() {}
// UnsafeCredentialManagerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CredentialManagerServiceServer will
@@ -353,6 +512,13 @@ type UnsafeCredentialManagerServiceServer interface {
}
func RegisterCredentialManagerServiceServer(s grpc.ServiceRegistrar, srv CredentialManagerServiceServer) {
+ // If the following call pancis, it indicates UnimplementedCredentialManagerServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&CredentialManagerService_ServiceDesc, srv)
}
@@ -366,7 +532,7 @@ func _CredentialManagerService_RotateCredential_Handler(srv interface{}, ctx con
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.CredentialManagerService/RotateCredential",
+ FullMethod: CredentialManagerService_RotateCredential_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CredentialManagerServiceServer).RotateCredential(ctx, req.(*RotateCredentialRequest))
@@ -390,6 +556,10 @@ var CredentialManagerService_ServiceDesc = grpc.ServiceDesc{
Metadata: "c1/connector/v2/resource.proto",
}
+const (
+ AccountManagerService_CreateAccount_FullMethodName = "/c1.connector.v2.AccountManagerService/CreateAccount"
+)
+
// AccountManagerServiceClient is the client API for AccountManagerService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@@ -406,8 +576,9 @@ func NewAccountManagerServiceClient(cc grpc.ClientConnInterface) AccountManagerS
}
func (c *accountManagerServiceClient) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CreateAccountResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.AccountManagerService/CreateAccount", in, out, opts...)
+ err := c.cc.Invoke(ctx, AccountManagerService_CreateAccount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -416,18 +587,22 @@ func (c *accountManagerServiceClient) CreateAccount(ctx context.Context, in *Cre
// AccountManagerServiceServer is the server API for AccountManagerService service.
// All implementations should embed UnimplementedAccountManagerServiceServer
-// for forward compatibility
+// for forward compatibility.
type AccountManagerServiceServer interface {
CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)
}
-// UnimplementedAccountManagerServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedAccountManagerServiceServer struct {
-}
+// UnimplementedAccountManagerServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedAccountManagerServiceServer struct{}
func (UnimplementedAccountManagerServiceServer) CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateAccount not implemented")
}
+func (UnimplementedAccountManagerServiceServer) testEmbeddedByValue() {}
// UnsafeAccountManagerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AccountManagerServiceServer will
@@ -437,6 +612,13 @@ type UnsafeAccountManagerServiceServer interface {
}
func RegisterAccountManagerServiceServer(s grpc.ServiceRegistrar, srv AccountManagerServiceServer) {
+ // If the following call pancis, it indicates UnimplementedAccountManagerServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&AccountManagerService_ServiceDesc, srv)
}
@@ -450,7 +632,7 @@ func _AccountManagerService_CreateAccount_Handler(srv interface{}, ctx context.C
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.AccountManagerService/CreateAccount",
+ FullMethod: AccountManagerService_CreateAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountManagerServiceServer).CreateAccount(ctx, req.(*CreateAccountRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.go
index f1f2b7c9..f659e0d8 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector/v2/ticket.proto
@@ -15,6 +15,7 @@ import (
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -25,25 +26,22 @@ const (
)
type TicketSchema struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ Types []*TicketType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
+ Statuses []*TicketStatus `protobuf:"bytes,4,rep,name=statuses,proto3" json:"statuses,omitempty"`
+ CustomFields map[string]*TicketCustomField `protobuf:"bytes,5,rep,name=custom_fields,json=customFields,proto3" json:"custom_fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ Annotations []*anypb.Any `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
- Types []*TicketType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"`
- Statuses []*TicketStatus `protobuf:"bytes,4,rep,name=statuses,proto3" json:"statuses,omitempty"`
- CustomFields map[string]*TicketCustomField `protobuf:"bytes,5,rep,name=custom_fields,json=customFields,proto3" json:"custom_fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- Annotations []*anypb.Any `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketSchema) Reset() {
*x = TicketSchema{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketSchema) String() string {
@@ -54,7 +52,7 @@ func (*TicketSchema) ProtoMessage() {}
func (x *TicketSchema) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -112,14 +110,11 @@ func (x *TicketSchema) GetAnnotations() []*anypb.Any {
}
type TicketCustomField struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
- Required bool `protobuf:"varint,3,opt,name=required,proto3" json:"required,omitempty"`
- // Types that are assignable to Value:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ Required bool `protobuf:"varint,3,opt,name=required,proto3" json:"required,omitempty"`
+ // Types that are valid to be assigned to Value:
//
// *TicketCustomField_StringValue
// *TicketCustomField_StringValues
@@ -130,17 +125,17 @@ type TicketCustomField struct {
// *TicketCustomField_PickObjectValue
// *TicketCustomField_PickMultipleObjectValues
// *TicketCustomField_NumberValue
- Value isTicketCustomField_Value `protobuf_oneof:"value"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Value isTicketCustomField_Value `protobuf_oneof:"value"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *TicketCustomField) Reset() {
*x = TicketCustomField{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketCustomField) String() string {
@@ -151,7 +146,7 @@ func (*TicketCustomField) ProtoMessage() {}
func (x *TicketCustomField) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -187,72 +182,90 @@ func (x *TicketCustomField) GetRequired() bool {
return false
}
-func (m *TicketCustomField) GetValue() isTicketCustomField_Value {
- if m != nil {
- return m.Value
+func (x *TicketCustomField) GetValue() isTicketCustomField_Value {
+ if x != nil {
+ return x.Value
}
return nil
}
func (x *TicketCustomField) GetStringValue() *TicketCustomFieldStringValue {
- if x, ok := x.GetValue().(*TicketCustomField_StringValue); ok {
- return x.StringValue
+ if x != nil {
+ if x, ok := x.Value.(*TicketCustomField_StringValue); ok {
+ return x.StringValue
+ }
}
return nil
}
func (x *TicketCustomField) GetStringValues() *TicketCustomFieldStringValues {
- if x, ok := x.GetValue().(*TicketCustomField_StringValues); ok {
- return x.StringValues
+ if x != nil {
+ if x, ok := x.Value.(*TicketCustomField_StringValues); ok {
+ return x.StringValues
+ }
}
return nil
}
func (x *TicketCustomField) GetBoolValue() *TicketCustomFieldBoolValue {
- if x, ok := x.GetValue().(*TicketCustomField_BoolValue); ok {
- return x.BoolValue
+ if x != nil {
+ if x, ok := x.Value.(*TicketCustomField_BoolValue); ok {
+ return x.BoolValue
+ }
}
return nil
}
func (x *TicketCustomField) GetTimestampValue() *TicketCustomFieldTimestampValue {
- if x, ok := x.GetValue().(*TicketCustomField_TimestampValue); ok {
- return x.TimestampValue
+ if x != nil {
+ if x, ok := x.Value.(*TicketCustomField_TimestampValue); ok {
+ return x.TimestampValue
+ }
}
return nil
}
func (x *TicketCustomField) GetPickStringValue() *TicketCustomFieldPickStringValue {
- if x, ok := x.GetValue().(*TicketCustomField_PickStringValue); ok {
- return x.PickStringValue
+ if x != nil {
+ if x, ok := x.Value.(*TicketCustomField_PickStringValue); ok {
+ return x.PickStringValue
+ }
}
return nil
}
func (x *TicketCustomField) GetPickMultipleStringValues() *TicketCustomFieldPickMultipleStringValues {
- if x, ok := x.GetValue().(*TicketCustomField_PickMultipleStringValues); ok {
- return x.PickMultipleStringValues
+ if x != nil {
+ if x, ok := x.Value.(*TicketCustomField_PickMultipleStringValues); ok {
+ return x.PickMultipleStringValues
+ }
}
return nil
}
func (x *TicketCustomField) GetPickObjectValue() *TicketCustomFieldPickObjectValue {
- if x, ok := x.GetValue().(*TicketCustomField_PickObjectValue); ok {
- return x.PickObjectValue
+ if x != nil {
+ if x, ok := x.Value.(*TicketCustomField_PickObjectValue); ok {
+ return x.PickObjectValue
+ }
}
return nil
}
func (x *TicketCustomField) GetPickMultipleObjectValues() *TicketCustomFieldPickMultipleObjectValues {
- if x, ok := x.GetValue().(*TicketCustomField_PickMultipleObjectValues); ok {
- return x.PickMultipleObjectValues
+ if x != nil {
+ if x, ok := x.Value.(*TicketCustomField_PickMultipleObjectValues); ok {
+ return x.PickMultipleObjectValues
+ }
}
return nil
}
func (x *TicketCustomField) GetNumberValue() *TicketCustomFieldNumberValue {
- if x, ok := x.GetValue().(*TicketCustomField_NumberValue); ok {
- return x.NumberValue
+ if x != nil {
+ if x, ok := x.Value.(*TicketCustomField_NumberValue); ok {
+ return x.NumberValue
+ }
}
return nil
}
@@ -323,21 +336,18 @@ func (*TicketCustomField_PickMultipleObjectValues) isTicketCustomField_Value() {
func (*TicketCustomField_NumberValue) isTicketCustomField_Value() {}
type TicketCustomFieldStringValue struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ DefaultValue string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
- DefaultValue string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketCustomFieldStringValue) Reset() {
*x = TicketCustomFieldStringValue{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketCustomFieldStringValue) String() string {
@@ -348,7 +358,7 @@ func (*TicketCustomFieldStringValue) ProtoMessage() {}
func (x *TicketCustomFieldStringValue) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -378,21 +388,18 @@ func (x *TicketCustomFieldStringValue) GetDefaultValue() string {
}
type TicketCustomFieldStringValues struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
+ DefaultValues []string `protobuf:"bytes,2,rep,name=default_values,json=defaultValues,proto3" json:"default_values,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
- DefaultValues []string `protobuf:"bytes,2,rep,name=default_values,json=defaultValues,proto3" json:"default_values,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketCustomFieldStringValues) Reset() {
*x = TicketCustomFieldStringValues{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketCustomFieldStringValues) String() string {
@@ -403,7 +410,7 @@ func (*TicketCustomFieldStringValues) ProtoMessage() {}
func (x *TicketCustomFieldStringValues) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -433,20 +440,17 @@ func (x *TicketCustomFieldStringValues) GetDefaultValues() []string {
}
type TicketCustomFieldBoolValue struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketCustomFieldBoolValue) Reset() {
*x = TicketCustomFieldBoolValue{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketCustomFieldBoolValue) String() string {
@@ -457,7 +461,7 @@ func (*TicketCustomFieldBoolValue) ProtoMessage() {}
func (x *TicketCustomFieldBoolValue) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -480,21 +484,18 @@ func (x *TicketCustomFieldBoolValue) GetValue() bool {
}
type TicketCustomFieldNumberValue struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Value *wrapperspb.FloatValue `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ DefaultValue *wrapperspb.FloatValue `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Value *wrapperspb.FloatValue `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
- DefaultValue *wrapperspb.FloatValue `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketCustomFieldNumberValue) Reset() {
*x = TicketCustomFieldNumberValue{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketCustomFieldNumberValue) String() string {
@@ -505,7 +506,7 @@ func (*TicketCustomFieldNumberValue) ProtoMessage() {}
func (x *TicketCustomFieldNumberValue) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -535,21 +536,18 @@ func (x *TicketCustomFieldNumberValue) GetDefaultValue() *wrapperspb.FloatValue
}
type TicketCustomFieldTimestampValue struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Value *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ DefaultValue *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Value *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
- DefaultValue *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketCustomFieldTimestampValue) Reset() {
*x = TicketCustomFieldTimestampValue{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketCustomFieldTimestampValue) String() string {
@@ -560,7 +558,7 @@ func (*TicketCustomFieldTimestampValue) ProtoMessage() {}
func (x *TicketCustomFieldTimestampValue) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -590,22 +588,19 @@ func (x *TicketCustomFieldTimestampValue) GetDefaultValue() *timestamppb.Timesta
}
type TicketCustomFieldPickStringValue struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ AllowedValues []string `protobuf:"bytes,2,rep,name=allowed_values,json=allowedValues,proto3" json:"allowed_values,omitempty"`
+ DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
- AllowedValues []string `protobuf:"bytes,2,rep,name=allowed_values,json=allowedValues,proto3" json:"allowed_values,omitempty"`
- DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketCustomFieldPickStringValue) Reset() {
*x = TicketCustomFieldPickStringValue{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketCustomFieldPickStringValue) String() string {
@@ -616,7 +611,7 @@ func (*TicketCustomFieldPickStringValue) ProtoMessage() {}
func (x *TicketCustomFieldPickStringValue) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -653,22 +648,19 @@ func (x *TicketCustomFieldPickStringValue) GetDefaultValue() string {
}
type TicketCustomFieldPickMultipleStringValues struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
+ AllowedValues []string `protobuf:"bytes,2,rep,name=allowed_values,json=allowedValues,proto3" json:"allowed_values,omitempty"`
+ DefaultValues []string `protobuf:"bytes,3,rep,name=default_values,json=defaultValues,proto3" json:"default_values,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
- AllowedValues []string `protobuf:"bytes,2,rep,name=allowed_values,json=allowedValues,proto3" json:"allowed_values,omitempty"`
- DefaultValues []string `protobuf:"bytes,3,rep,name=default_values,json=defaultValues,proto3" json:"default_values,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketCustomFieldPickMultipleStringValues) Reset() {
*x = TicketCustomFieldPickMultipleStringValues{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketCustomFieldPickMultipleStringValues) String() string {
@@ -679,7 +671,7 @@ func (*TicketCustomFieldPickMultipleStringValues) ProtoMessage() {}
func (x *TicketCustomFieldPickMultipleStringValues) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -716,22 +708,19 @@ func (x *TicketCustomFieldPickMultipleStringValues) GetDefaultValues() []string
}
type TicketCustomFieldPickObjectValue struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
Value *TicketCustomFieldObjectValue `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
AllowedValues []*TicketCustomFieldObjectValue `protobuf:"bytes,2,rep,name=allowed_values,json=allowedValues,proto3" json:"allowed_values,omitempty"`
DefaultValue *TicketCustomFieldObjectValue `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *TicketCustomFieldPickObjectValue) Reset() {
*x = TicketCustomFieldPickObjectValue{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketCustomFieldPickObjectValue) String() string {
@@ -742,7 +731,7 @@ func (*TicketCustomFieldPickObjectValue) ProtoMessage() {}
func (x *TicketCustomFieldPickObjectValue) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -779,22 +768,19 @@ func (x *TicketCustomFieldPickObjectValue) GetDefaultValue() *TicketCustomFieldO
}
type TicketCustomFieldPickMultipleObjectValues struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
Values []*TicketCustomFieldObjectValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
AllowedValues []*TicketCustomFieldObjectValue `protobuf:"bytes,2,rep,name=allowed_values,json=allowedValues,proto3" json:"allowed_values,omitempty"`
DefaultValues []*TicketCustomFieldObjectValue `protobuf:"bytes,3,rep,name=default_values,json=defaultValues,proto3" json:"default_values,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *TicketCustomFieldPickMultipleObjectValues) Reset() {
*x = TicketCustomFieldPickMultipleObjectValues{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketCustomFieldPickMultipleObjectValues) String() string {
@@ -805,7 +791,7 @@ func (*TicketCustomFieldPickMultipleObjectValues) ProtoMessage() {}
func (x *TicketCustomFieldPickMultipleObjectValues) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -842,21 +828,18 @@ func (x *TicketCustomFieldPickMultipleObjectValues) GetDefaultValues() []*Ticket
}
type TicketCustomFieldObjectValue struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketCustomFieldObjectValue) Reset() {
*x = TicketCustomFieldObjectValue{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketCustomFieldObjectValue) String() string {
@@ -867,7 +850,7 @@ func (*TicketCustomFieldObjectValue) ProtoMessage() {}
func (x *TicketCustomFieldObjectValue) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -897,21 +880,18 @@ func (x *TicketCustomFieldObjectValue) GetDisplayName() string {
}
type TicketStatus struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketStatus) Reset() {
*x = TicketStatus{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketStatus) String() string {
@@ -922,7 +902,7 @@ func (*TicketStatus) ProtoMessage() {}
func (x *TicketStatus) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -952,21 +932,18 @@ func (x *TicketStatus) GetDisplayName() string {
}
type TicketsServiceGetTicketSchemaRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceGetTicketSchemaRequest) Reset() {
*x = TicketsServiceGetTicketSchemaRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[13]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceGetTicketSchemaRequest) String() string {
@@ -977,7 +954,7 @@ func (*TicketsServiceGetTicketSchemaRequest) ProtoMessage() {}
func (x *TicketsServiceGetTicketSchemaRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[13]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1007,21 +984,18 @@ func (x *TicketsServiceGetTicketSchemaRequest) GetAnnotations() []*anypb.Any {
}
type TicketsServiceGetTicketSchemaResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Schema *TicketSchema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Schema *TicketSchema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceGetTicketSchemaResponse) Reset() {
*x = TicketsServiceGetTicketSchemaResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceGetTicketSchemaResponse) String() string {
@@ -1032,7 +1006,7 @@ func (*TicketsServiceGetTicketSchemaResponse) ProtoMessage() {}
func (x *TicketsServiceGetTicketSchemaResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[14]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1062,22 +1036,19 @@ func (x *TicketsServiceGetTicketSchemaResponse) GetAnnotations() []*anypb.Any {
}
type TicketsServiceListTicketSchemasRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceListTicketSchemasRequest) Reset() {
*x = TicketsServiceListTicketSchemasRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceListTicketSchemasRequest) String() string {
@@ -1088,7 +1059,7 @@ func (*TicketsServiceListTicketSchemasRequest) ProtoMessage() {}
func (x *TicketsServiceListTicketSchemasRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[15]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1125,22 +1096,19 @@ func (x *TicketsServiceListTicketSchemasRequest) GetAnnotations() []*anypb.Any {
}
type TicketsServiceListTicketSchemasResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ List []*TicketSchema `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- List []*TicketSchema `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceListTicketSchemasResponse) Reset() {
*x = TicketsServiceListTicketSchemasResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[16]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceListTicketSchemasResponse) String() string {
@@ -1151,7 +1119,7 @@ func (*TicketsServiceListTicketSchemasResponse) ProtoMessage() {}
func (x *TicketsServiceListTicketSchemasResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[16]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1188,33 +1156,30 @@ func (x *TicketsServiceListTicketSchemasResponse) GetAnnotations() []*anypb.Any
}
type Ticket struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
+ Assignees []*Resource `protobuf:"bytes,4,rep,name=assignees,proto3" json:"assignees,omitempty"`
+ Reporter *Resource `protobuf:"bytes,5,opt,name=reporter,proto3" json:"reporter,omitempty"`
+ Status *TicketStatus `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
+ Type *TicketType `protobuf:"bytes,8,opt,name=type,proto3" json:"type,omitempty"`
+ Labels []string `protobuf:"bytes,9,rep,name=labels,proto3" json:"labels,omitempty"`
+ Url string `protobuf:"bytes,10,opt,name=url,proto3" json:"url,omitempty"`
+ CustomFields map[string]*TicketCustomField `protobuf:"bytes,11,rep,name=custom_fields,json=customFields,proto3" json:"custom_fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ CreatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
+ UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
+ CompletedAt *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"`
+ RequestedFor *Resource `protobuf:"bytes,15,opt,name=requested_for,json=requestedFor,proto3" json:"requested_for,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
- Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
- Assignees []*Resource `protobuf:"bytes,4,rep,name=assignees,proto3" json:"assignees,omitempty"`
- Reporter *Resource `protobuf:"bytes,5,opt,name=reporter,proto3" json:"reporter,omitempty"`
- Status *TicketStatus `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
- Type *TicketType `protobuf:"bytes,8,opt,name=type,proto3" json:"type,omitempty"`
- Labels []string `protobuf:"bytes,9,rep,name=labels,proto3" json:"labels,omitempty"`
- Url string `protobuf:"bytes,10,opt,name=url,proto3" json:"url,omitempty"`
- CustomFields map[string]*TicketCustomField `protobuf:"bytes,11,rep,name=custom_fields,json=customFields,proto3" json:"custom_fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- CreatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
- UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
- CompletedAt *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"`
- RequestedFor *Resource `protobuf:"bytes,15,opt,name=requested_for,json=requestedFor,proto3" json:"requested_for,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Ticket) Reset() {
*x = Ticket{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[17]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Ticket) String() string {
@@ -1225,7 +1190,7 @@ func (*Ticket) ProtoMessage() {}
func (x *Ticket) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[17]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1339,21 +1304,18 @@ func (x *Ticket) GetRequestedFor() *Resource {
}
type TicketType struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketType) Reset() {
*x = TicketType{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketType) String() string {
@@ -1364,7 +1326,7 @@ func (*TicketType) ProtoMessage() {}
func (x *TicketType) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[18]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1394,26 +1356,23 @@ func (x *TicketType) GetDisplayName() string {
}
type TicketRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ Status *TicketStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
+ Type *TicketType `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
+ Labels []string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty"`
+ CustomFields map[string]*TicketCustomField `protobuf:"bytes,6,rep,name=custom_fields,json=customFields,proto3" json:"custom_fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ RequestedFor *Resource `protobuf:"bytes,7,opt,name=requested_for,json=requestedFor,proto3" json:"requested_for,omitempty"`
unknownFields protoimpl.UnknownFields
-
- DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
- Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
- Status *TicketStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
- Type *TicketType `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
- Labels []string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty"`
- CustomFields map[string]*TicketCustomField `protobuf:"bytes,6,rep,name=custom_fields,json=customFields,proto3" json:"custom_fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- RequestedFor *Resource `protobuf:"bytes,7,opt,name=requested_for,json=requestedFor,proto3" json:"requested_for,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketRequest) Reset() {
*x = TicketRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[19]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketRequest) String() string {
@@ -1424,7 +1383,7 @@ func (*TicketRequest) ProtoMessage() {}
func (x *TicketRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[19]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1489,22 +1448,19 @@ func (x *TicketRequest) GetRequestedFor() *Resource {
}
type TicketsServiceCreateTicketRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Request *TicketRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
+ Schema *TicketSchema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,8,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Request *TicketRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
- Schema *TicketSchema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,8,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceCreateTicketRequest) Reset() {
*x = TicketsServiceCreateTicketRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[20]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceCreateTicketRequest) String() string {
@@ -1515,7 +1471,7 @@ func (*TicketsServiceCreateTicketRequest) ProtoMessage() {}
func (x *TicketsServiceCreateTicketRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[20]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1553,22 +1509,19 @@ func (x *TicketsServiceCreateTicketRequest) GetAnnotations() []*anypb.Any {
// TODO(lauren) maybe the error should be a separate proto so we can store retryable error
type TicketsServiceCreateTicketResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Ticket *Ticket `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Ticket *Ticket `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
- Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceCreateTicketResponse) Reset() {
*x = TicketsServiceCreateTicketResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[21]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceCreateTicketResponse) String() string {
@@ -1579,7 +1532,7 @@ func (*TicketsServiceCreateTicketResponse) ProtoMessage() {}
func (x *TicketsServiceCreateTicketResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[21]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1616,21 +1569,18 @@ func (x *TicketsServiceCreateTicketResponse) GetError() string {
}
type TicketsServiceGetTicketRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceGetTicketRequest) Reset() {
*x = TicketsServiceGetTicketRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[22]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceGetTicketRequest) String() string {
@@ -1641,7 +1591,7 @@ func (*TicketsServiceGetTicketRequest) ProtoMessage() {}
func (x *TicketsServiceGetTicketRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[22]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1671,22 +1621,19 @@ func (x *TicketsServiceGetTicketRequest) GetAnnotations() []*anypb.Any {
}
type TicketsServiceGetTicketResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Ticket *Ticket `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Ticket *Ticket `protobuf:"bytes,1,opt,name=ticket,proto3" json:"ticket,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
- Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceGetTicketResponse) Reset() {
*x = TicketsServiceGetTicketResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[23]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceGetTicketResponse) String() string {
@@ -1697,7 +1644,7 @@ func (*TicketsServiceGetTicketResponse) ProtoMessage() {}
func (x *TicketsServiceGetTicketResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[23]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1734,20 +1681,17 @@ func (x *TicketsServiceGetTicketResponse) GetError() string {
}
type TicketsServiceBulkCreateTicketsRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
TicketRequests []*TicketsServiceCreateTicketRequest `protobuf:"bytes,1,rep,name=ticket_requests,json=ticketRequests,proto3" json:"ticket_requests,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceBulkCreateTicketsRequest) Reset() {
*x = TicketsServiceBulkCreateTicketsRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[24]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceBulkCreateTicketsRequest) String() string {
@@ -1758,7 +1702,7 @@ func (*TicketsServiceBulkCreateTicketsRequest) ProtoMessage() {}
func (x *TicketsServiceBulkCreateTicketsRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[24]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1781,20 +1725,17 @@ func (x *TicketsServiceBulkCreateTicketsRequest) GetTicketRequests() []*TicketsS
}
type TicketsServiceBulkCreateTicketsResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Tickets []*TicketsServiceCreateTicketResponse `protobuf:"bytes,1,rep,name=tickets,proto3" json:"tickets,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Tickets []*TicketsServiceCreateTicketResponse `protobuf:"bytes,1,rep,name=tickets,proto3" json:"tickets,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceBulkCreateTicketsResponse) Reset() {
*x = TicketsServiceBulkCreateTicketsResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[25]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceBulkCreateTicketsResponse) String() string {
@@ -1805,7 +1746,7 @@ func (*TicketsServiceBulkCreateTicketsResponse) ProtoMessage() {}
func (x *TicketsServiceBulkCreateTicketsResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[25]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1828,20 +1769,17 @@ func (x *TicketsServiceBulkCreateTicketsResponse) GetTickets() []*TicketsService
}
type TicketsServiceBulkGetTicketsRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
TicketRequests []*TicketsServiceGetTicketRequest `protobuf:"bytes,1,rep,name=ticket_requests,json=ticketRequests,proto3" json:"ticket_requests,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceBulkGetTicketsRequest) Reset() {
*x = TicketsServiceBulkGetTicketsRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[26]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceBulkGetTicketsRequest) String() string {
@@ -1852,7 +1790,7 @@ func (*TicketsServiceBulkGetTicketsRequest) ProtoMessage() {}
func (x *TicketsServiceBulkGetTicketsRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[26]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1875,20 +1813,17 @@ func (x *TicketsServiceBulkGetTicketsRequest) GetTicketRequests() []*TicketsServ
}
type TicketsServiceBulkGetTicketsResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Tickets []*TicketsServiceGetTicketResponse `protobuf:"bytes,1,rep,name=tickets,proto3" json:"tickets,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Tickets []*TicketsServiceGetTicketResponse `protobuf:"bytes,1,rep,name=tickets,proto3" json:"tickets,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *TicketsServiceBulkGetTicketsResponse) Reset() {
*x = TicketsServiceBulkGetTicketsResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_v2_ticket_proto_msgTypes[27]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_v2_ticket_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *TicketsServiceBulkGetTicketsResponse) String() string {
@@ -1899,7 +1834,7 @@ func (*TicketsServiceBulkGetTicketsResponse) ProtoMessage() {}
func (x *TicketsServiceBulkGetTicketsResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_v2_ticket_proto_msgTypes[27]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1923,7 +1858,7 @@ func (x *TicketsServiceBulkGetTicketsResponse) GetTickets() []*TicketsServiceGet
var File_c1_connector_v2_ticket_proto protoreflect.FileDescriptor
-var file_c1_connector_v2_ticket_proto_rawDesc = []byte{
+var file_c1_connector_v2_ticket_proto_rawDesc = string([]byte{
0x0a, 0x1c, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76,
0x32, 0x2f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a,
@@ -2372,22 +2307,22 @@ var file_c1_connector_v2_ticket_proto_rawDesc = []byte{
0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e,
0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
-}
+})
var (
file_c1_connector_v2_ticket_proto_rawDescOnce sync.Once
- file_c1_connector_v2_ticket_proto_rawDescData = file_c1_connector_v2_ticket_proto_rawDesc
+ file_c1_connector_v2_ticket_proto_rawDescData []byte
)
func file_c1_connector_v2_ticket_proto_rawDescGZIP() []byte {
file_c1_connector_v2_ticket_proto_rawDescOnce.Do(func() {
- file_c1_connector_v2_ticket_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_v2_ticket_proto_rawDescData)
+ file_c1_connector_v2_ticket_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_ticket_proto_rawDesc), len(file_c1_connector_v2_ticket_proto_rawDesc)))
})
return file_c1_connector_v2_ticket_proto_rawDescData
}
var file_c1_connector_v2_ticket_proto_msgTypes = make([]protoimpl.MessageInfo, 31)
-var file_c1_connector_v2_ticket_proto_goTypes = []interface{}{
+var file_c1_connector_v2_ticket_proto_goTypes = []any{
(*TicketSchema)(nil), // 0: c1.connector.v2.TicketSchema
(*TicketCustomField)(nil), // 1: c1.connector.v2.TicketCustomField
(*TicketCustomFieldStringValue)(nil), // 2: c1.connector.v2.TicketCustomFieldStringValue
@@ -2508,345 +2443,7 @@ func file_c1_connector_v2_ticket_proto_init() {
return
}
file_c1_connector_v2_resource_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_v2_ticket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketSchema); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketCustomField); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketCustomFieldStringValue); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketCustomFieldStringValues); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketCustomFieldBoolValue); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketCustomFieldNumberValue); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketCustomFieldTimestampValue); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketCustomFieldPickStringValue); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketCustomFieldPickMultipleStringValues); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketCustomFieldPickObjectValue); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketCustomFieldPickMultipleObjectValues); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketCustomFieldObjectValue); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketStatus); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceGetTicketSchemaRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceGetTicketSchemaResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceListTicketSchemasRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceListTicketSchemasResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Ticket); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketType); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceCreateTicketRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceCreateTicketResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceGetTicketRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceGetTicketResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceBulkCreateTicketsRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceBulkCreateTicketsResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceBulkGetTicketsRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TicketsServiceBulkGetTicketsResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_c1_connector_v2_ticket_proto_msgTypes[1].OneofWrappers = []interface{}{
+ file_c1_connector_v2_ticket_proto_msgTypes[1].OneofWrappers = []any{
(*TicketCustomField_StringValue)(nil),
(*TicketCustomField_StringValues)(nil),
(*TicketCustomField_BoolValue)(nil),
@@ -2861,7 +2458,7 @@ func file_c1_connector_v2_ticket_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_v2_ticket_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_ticket_proto_rawDesc), len(file_c1_connector_v2_ticket_proto_rawDesc)),
NumEnums: 0,
NumMessages: 31,
NumExtensions: 0,
@@ -2872,7 +2469,6 @@ func file_c1_connector_v2_ticket_proto_init() {
MessageInfos: file_c1_connector_v2_ticket_proto_msgTypes,
}.Build()
File_c1_connector_v2_ticket_proto = out.File
- file_c1_connector_v2_ticket_proto_rawDesc = nil
file_c1_connector_v2_ticket_proto_goTypes = nil
file_c1_connector_v2_ticket_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.validate.go
index a39776d8..335123e3 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket.pb.validate.go
@@ -222,7 +222,7 @@ type TicketSchemaMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketSchemaMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -736,7 +736,7 @@ type TicketCustomFieldMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketCustomFieldMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -842,7 +842,7 @@ type TicketCustomFieldStringValueMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketCustomFieldStringValueMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -945,7 +945,7 @@ type TicketCustomFieldStringValuesMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketCustomFieldStringValuesMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1050,7 +1050,7 @@ type TicketCustomFieldBoolValueMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketCustomFieldBoolValueMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1210,7 +1210,7 @@ type TicketCustomFieldNumberValueMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketCustomFieldNumberValueMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1371,7 +1371,7 @@ type TicketCustomFieldTimestampValueMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketCustomFieldTimestampValueMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1480,7 +1480,7 @@ type TicketCustomFieldPickStringValueMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketCustomFieldPickStringValueMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1586,7 +1586,7 @@ type TicketCustomFieldPickMultipleStringValuesMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketCustomFieldPickMultipleStringValuesMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1783,7 +1783,7 @@ type TicketCustomFieldPickObjectValueMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketCustomFieldPickObjectValueMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1991,7 +1991,7 @@ type TicketCustomFieldPickMultipleObjectValuesMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketCustomFieldPickMultipleObjectValuesMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2098,7 +2098,7 @@ type TicketCustomFieldObjectValueMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketCustomFieldObjectValueMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2204,7 +2204,7 @@ type TicketStatusMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketStatusMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2342,7 +2342,7 @@ type TicketsServiceGetTicketSchemaRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceGetTicketSchemaRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2510,7 +2510,7 @@ type TicketsServiceGetTicketSchemaResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceGetTicketSchemaResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2680,7 +2680,7 @@ type TicketsServiceListTicketSchemasRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceListTicketSchemasRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2869,7 +2869,7 @@ type TicketsServiceListTicketSchemasResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceListTicketSchemasResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3261,7 +3261,7 @@ type TicketMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3364,7 +3364,7 @@ type TicketTypeMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketTypeMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3601,7 +3601,7 @@ type TicketRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3795,7 +3795,7 @@ type TicketsServiceCreateTicketRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceCreateTicketRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3965,7 +3965,7 @@ type TicketsServiceCreateTicketResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceCreateTicketResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4104,7 +4104,7 @@ type TicketsServiceGetTicketRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceGetTicketRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4272,7 +4272,7 @@ type TicketsServiceGetTicketResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceGetTicketResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4412,7 +4412,7 @@ type TicketsServiceBulkCreateTicketsRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceBulkCreateTicketsRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4552,7 +4552,7 @@ type TicketsServiceBulkCreateTicketsResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceBulkCreateTicketsResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4691,7 +4691,7 @@ type TicketsServiceBulkGetTicketsRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceBulkGetTicketsRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4830,7 +4830,7 @@ type TicketsServiceBulkGetTicketsResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TicketsServiceBulkGetTicketsResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket_grpc.pb.go
index 6601b037..17a22e45 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/ticket_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/connector/v2/ticket.proto
@@ -15,8 +15,17 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ TicketsService_CreateTicket_FullMethodName = "/c1.connector.v2.TicketsService/CreateTicket"
+ TicketsService_GetTicket_FullMethodName = "/c1.connector.v2.TicketsService/GetTicket"
+ TicketsService_ListTicketSchemas_FullMethodName = "/c1.connector.v2.TicketsService/ListTicketSchemas"
+ TicketsService_GetTicketSchema_FullMethodName = "/c1.connector.v2.TicketsService/GetTicketSchema"
+ TicketsService_BulkCreateTickets_FullMethodName = "/c1.connector.v2.TicketsService/BulkCreateTickets"
+ TicketsService_BulkGetTickets_FullMethodName = "/c1.connector.v2.TicketsService/BulkGetTickets"
+)
// TicketsServiceClient is the client API for TicketsService service.
//
@@ -39,8 +48,9 @@ func NewTicketsServiceClient(cc grpc.ClientConnInterface) TicketsServiceClient {
}
func (c *ticketsServiceClient) CreateTicket(ctx context.Context, in *TicketsServiceCreateTicketRequest, opts ...grpc.CallOption) (*TicketsServiceCreateTicketResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(TicketsServiceCreateTicketResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.TicketsService/CreateTicket", in, out, opts...)
+ err := c.cc.Invoke(ctx, TicketsService_CreateTicket_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -48,8 +58,9 @@ func (c *ticketsServiceClient) CreateTicket(ctx context.Context, in *TicketsServ
}
func (c *ticketsServiceClient) GetTicket(ctx context.Context, in *TicketsServiceGetTicketRequest, opts ...grpc.CallOption) (*TicketsServiceGetTicketResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(TicketsServiceGetTicketResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.TicketsService/GetTicket", in, out, opts...)
+ err := c.cc.Invoke(ctx, TicketsService_GetTicket_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -57,8 +68,9 @@ func (c *ticketsServiceClient) GetTicket(ctx context.Context, in *TicketsService
}
func (c *ticketsServiceClient) ListTicketSchemas(ctx context.Context, in *TicketsServiceListTicketSchemasRequest, opts ...grpc.CallOption) (*TicketsServiceListTicketSchemasResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(TicketsServiceListTicketSchemasResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.TicketsService/ListTicketSchemas", in, out, opts...)
+ err := c.cc.Invoke(ctx, TicketsService_ListTicketSchemas_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -66,8 +78,9 @@ func (c *ticketsServiceClient) ListTicketSchemas(ctx context.Context, in *Ticket
}
func (c *ticketsServiceClient) GetTicketSchema(ctx context.Context, in *TicketsServiceGetTicketSchemaRequest, opts ...grpc.CallOption) (*TicketsServiceGetTicketSchemaResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(TicketsServiceGetTicketSchemaResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.TicketsService/GetTicketSchema", in, out, opts...)
+ err := c.cc.Invoke(ctx, TicketsService_GetTicketSchema_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -75,8 +88,9 @@ func (c *ticketsServiceClient) GetTicketSchema(ctx context.Context, in *TicketsS
}
func (c *ticketsServiceClient) BulkCreateTickets(ctx context.Context, in *TicketsServiceBulkCreateTicketsRequest, opts ...grpc.CallOption) (*TicketsServiceBulkCreateTicketsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(TicketsServiceBulkCreateTicketsResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.TicketsService/BulkCreateTickets", in, out, opts...)
+ err := c.cc.Invoke(ctx, TicketsService_BulkCreateTickets_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -84,8 +98,9 @@ func (c *ticketsServiceClient) BulkCreateTickets(ctx context.Context, in *Ticket
}
func (c *ticketsServiceClient) BulkGetTickets(ctx context.Context, in *TicketsServiceBulkGetTicketsRequest, opts ...grpc.CallOption) (*TicketsServiceBulkGetTicketsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(TicketsServiceBulkGetTicketsResponse)
- err := c.cc.Invoke(ctx, "/c1.connector.v2.TicketsService/BulkGetTickets", in, out, opts...)
+ err := c.cc.Invoke(ctx, TicketsService_BulkGetTickets_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -94,7 +109,7 @@ func (c *ticketsServiceClient) BulkGetTickets(ctx context.Context, in *TicketsSe
// TicketsServiceServer is the server API for TicketsService service.
// All implementations should embed UnimplementedTicketsServiceServer
-// for forward compatibility
+// for forward compatibility.
type TicketsServiceServer interface {
CreateTicket(context.Context, *TicketsServiceCreateTicketRequest) (*TicketsServiceCreateTicketResponse, error)
GetTicket(context.Context, *TicketsServiceGetTicketRequest) (*TicketsServiceGetTicketResponse, error)
@@ -104,9 +119,12 @@ type TicketsServiceServer interface {
BulkGetTickets(context.Context, *TicketsServiceBulkGetTicketsRequest) (*TicketsServiceBulkGetTicketsResponse, error)
}
-// UnimplementedTicketsServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedTicketsServiceServer struct {
-}
+// UnimplementedTicketsServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedTicketsServiceServer struct{}
func (UnimplementedTicketsServiceServer) CreateTicket(context.Context, *TicketsServiceCreateTicketRequest) (*TicketsServiceCreateTicketResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateTicket not implemented")
@@ -126,6 +144,7 @@ func (UnimplementedTicketsServiceServer) BulkCreateTickets(context.Context, *Tic
func (UnimplementedTicketsServiceServer) BulkGetTickets(context.Context, *TicketsServiceBulkGetTicketsRequest) (*TicketsServiceBulkGetTicketsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BulkGetTickets not implemented")
}
+func (UnimplementedTicketsServiceServer) testEmbeddedByValue() {}
// UnsafeTicketsServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TicketsServiceServer will
@@ -135,6 +154,13 @@ type UnsafeTicketsServiceServer interface {
}
func RegisterTicketsServiceServer(s grpc.ServiceRegistrar, srv TicketsServiceServer) {
+ // If the following call pancis, it indicates UnimplementedTicketsServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&TicketsService_ServiceDesc, srv)
}
@@ -148,7 +174,7 @@ func _TicketsService_CreateTicket_Handler(srv interface{}, ctx context.Context,
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.TicketsService/CreateTicket",
+ FullMethod: TicketsService_CreateTicket_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TicketsServiceServer).CreateTicket(ctx, req.(*TicketsServiceCreateTicketRequest))
@@ -166,7 +192,7 @@ func _TicketsService_GetTicket_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.TicketsService/GetTicket",
+ FullMethod: TicketsService_GetTicket_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TicketsServiceServer).GetTicket(ctx, req.(*TicketsServiceGetTicketRequest))
@@ -184,7 +210,7 @@ func _TicketsService_ListTicketSchemas_Handler(srv interface{}, ctx context.Cont
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.TicketsService/ListTicketSchemas",
+ FullMethod: TicketsService_ListTicketSchemas_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TicketsServiceServer).ListTicketSchemas(ctx, req.(*TicketsServiceListTicketSchemasRequest))
@@ -202,7 +228,7 @@ func _TicketsService_GetTicketSchema_Handler(srv interface{}, ctx context.Contex
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.TicketsService/GetTicketSchema",
+ FullMethod: TicketsService_GetTicketSchema_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TicketsServiceServer).GetTicketSchema(ctx, req.(*TicketsServiceGetTicketSchemaRequest))
@@ -220,7 +246,7 @@ func _TicketsService_BulkCreateTickets_Handler(srv interface{}, ctx context.Cont
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.TicketsService/BulkCreateTickets",
+ FullMethod: TicketsService_BulkCreateTickets_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TicketsServiceServer).BulkCreateTickets(ctx, req.(*TicketsServiceBulkCreateTicketsRequest))
@@ -238,7 +264,7 @@ func _TicketsService_BulkGetTickets_Handler(srv interface{}, ctx context.Context
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connector.v2.TicketsService/BulkGetTickets",
+ FullMethod: TicketsService_BulkGetTickets_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TicketsServiceServer).BulkGetTickets(ctx, req.(*TicketsServiceBulkGetTicketsRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector_wrapper/v1/connector_wrapper.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector_wrapper/v1/connector_wrapper.pb.go
index bed34ff9..ce416ac6 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector_wrapper/v1/connector_wrapper.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector_wrapper/v1/connector_wrapper.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connector_wrapper/v1/connector_wrapper.proto
@@ -13,6 +13,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -23,22 +24,19 @@ const (
)
type ServerConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
Credential *v1.Credential `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"`
RateLimiterConfig *v11.RateLimiterConfig `protobuf:"bytes,2,opt,name=rate_limiter_config,json=rateLimiterConfig,proto3" json:"rate_limiter_config,omitempty"`
ListenPort uint32 `protobuf:"varint,3,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ServerConfig) Reset() {
*x = ServerConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connector_wrapper_v1_connector_wrapper_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connector_wrapper_v1_connector_wrapper_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ServerConfig) String() string {
@@ -49,7 +47,7 @@ func (*ServerConfig) ProtoMessage() {}
func (x *ServerConfig) ProtoReflect() protoreflect.Message {
mi := &file_c1_connector_wrapper_v1_connector_wrapper_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -87,7 +85,7 @@ func (x *ServerConfig) GetListenPort() uint32 {
var File_c1_connector_wrapper_v1_connector_wrapper_proto protoreflect.FileDescriptor
-var file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDesc = []byte{
+var file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDesc = string([]byte{
0x0a, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x77,
0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
0x74, 0x6f, 0x72, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
@@ -113,22 +111,22 @@ var file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDesc = []byte{
0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
0x63, 0x74, 0x6f, 0x72, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDescOnce sync.Once
- file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDescData = file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDesc
+ file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDescData []byte
)
func file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDescGZIP() []byte {
file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDescOnce.Do(func() {
- file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDescData)
+ file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDesc), len(file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDesc)))
})
return file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDescData
}
var file_c1_connector_wrapper_v1_connector_wrapper_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_c1_connector_wrapper_v1_connector_wrapper_proto_goTypes = []interface{}{
+var file_c1_connector_wrapper_v1_connector_wrapper_proto_goTypes = []any{
(*ServerConfig)(nil), // 0: c1.connector_wrapper.v1.ServerConfig
(*v1.Credential)(nil), // 1: c1.utls.v1.Credential
(*v11.RateLimiterConfig)(nil), // 2: c1.ratelimit.v1.RateLimiterConfig
@@ -148,25 +146,11 @@ func file_c1_connector_wrapper_v1_connector_wrapper_proto_init() {
if File_c1_connector_wrapper_v1_connector_wrapper_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connector_wrapper_v1_connector_wrapper_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ServerConfig); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDesc), len(file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -177,7 +161,6 @@ func file_c1_connector_wrapper_v1_connector_wrapper_proto_init() {
MessageInfos: file_c1_connector_wrapper_v1_connector_wrapper_proto_msgTypes,
}.Build()
File_c1_connector_wrapper_v1_connector_wrapper_proto = out.File
- file_c1_connector_wrapper_v1_connector_wrapper_proto_rawDesc = nil
file_c1_connector_wrapper_v1_connector_wrapper_proto_goTypes = nil
file_c1_connector_wrapper_v1_connector_wrapper_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector_wrapper/v1/connector_wrapper.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector_wrapper/v1/connector_wrapper.pb.validate.go
index a8876fa2..35cc1f0d 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector_wrapper/v1/connector_wrapper.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector_wrapper/v1/connector_wrapper.pb.validate.go
@@ -130,7 +130,7 @@ type ServerConfigMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ServerConfigMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go
index 480e36f3..94fee00f 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/connectorapi/baton/v1/baton.proto
@@ -14,9 +14,11 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
durationpb "google.golang.org/protobuf/types/known/durationpb"
+ structpb "google.golang.org/protobuf/types/known/structpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -82,13 +84,10 @@ func (Task_Status) EnumDescriptor() ([]byte, []int) {
}
type Task struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Status Task_Status `protobuf:"varint,2,opt,name=status,proto3,enum=c1.connectorapi.baton.v1.Task_Status" json:"status,omitempty"`
- // Types that are assignable to TaskType:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Status Task_Status `protobuf:"varint,2,opt,name=status,proto3,enum=c1.connectorapi.baton.v1.Task_Status" json:"status,omitempty"`
+ // Types that are valid to be assigned to TaskType:
//
// *Task_None
// *Task_Hello
@@ -105,17 +104,21 @@ type Task struct {
// *Task_GetTicket
// *Task_BulkCreateTickets
// *Task_BulkGetTickets
- TaskType isTask_TaskType `protobuf_oneof:"task_type"`
- Debug bool `protobuf:"varint,3,opt,name=debug,proto3" json:"debug,omitempty"`
+ // *Task_ActionListSchemas
+ // *Task_ActionGetSchema
+ // *Task_ActionInvoke
+ // *Task_ActionStatus
+ TaskType isTask_TaskType `protobuf_oneof:"task_type"`
+ Debug bool `protobuf:"varint,3,opt,name=debug,proto3" json:"debug,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Task) Reset() {
*x = Task{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task) String() string {
@@ -126,7 +129,7 @@ func (*Task) ProtoMessage() {}
func (x *Task) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -155,114 +158,180 @@ func (x *Task) GetStatus() Task_Status {
return Task_STATUS_UNSPECIFIED
}
-func (m *Task) GetTaskType() isTask_TaskType {
- if m != nil {
- return m.TaskType
+func (x *Task) GetTaskType() isTask_TaskType {
+ if x != nil {
+ return x.TaskType
}
return nil
}
func (x *Task) GetNone() *Task_NoneTask {
- if x, ok := x.GetTaskType().(*Task_None); ok {
- return x.None
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_None); ok {
+ return x.None
+ }
}
return nil
}
func (x *Task) GetHello() *Task_HelloTask {
- if x, ok := x.GetTaskType().(*Task_Hello); ok {
- return x.Hello
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_Hello); ok {
+ return x.Hello
+ }
}
return nil
}
func (x *Task) GetSyncFull() *Task_SyncFullTask {
- if x, ok := x.GetTaskType().(*Task_SyncFull); ok {
- return x.SyncFull
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_SyncFull); ok {
+ return x.SyncFull
+ }
}
return nil
}
func (x *Task) GetGrant() *Task_GrantTask {
- if x, ok := x.GetTaskType().(*Task_Grant); ok {
- return x.Grant
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_Grant); ok {
+ return x.Grant
+ }
}
return nil
}
func (x *Task) GetRevoke() *Task_RevokeTask {
- if x, ok := x.GetTaskType().(*Task_Revoke); ok {
- return x.Revoke
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_Revoke); ok {
+ return x.Revoke
+ }
}
return nil
}
func (x *Task) GetCreateAccount() *Task_CreateAccountTask {
- if x, ok := x.GetTaskType().(*Task_CreateAccount); ok {
- return x.CreateAccount
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_CreateAccount); ok {
+ return x.CreateAccount
+ }
}
return nil
}
func (x *Task) GetCreateResource() *Task_CreateResourceTask {
- if x, ok := x.GetTaskType().(*Task_CreateResource); ok {
- return x.CreateResource
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_CreateResource); ok {
+ return x.CreateResource
+ }
}
return nil
}
func (x *Task) GetDeleteResource() *Task_DeleteResourceTask {
- if x, ok := x.GetTaskType().(*Task_DeleteResource); ok {
- return x.DeleteResource
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_DeleteResource); ok {
+ return x.DeleteResource
+ }
}
return nil
}
func (x *Task) GetRotateCredentials() *Task_RotateCredentialsTask {
- if x, ok := x.GetTaskType().(*Task_RotateCredentials); ok {
- return x.RotateCredentials
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_RotateCredentials); ok {
+ return x.RotateCredentials
+ }
}
return nil
}
func (x *Task) GetEventFeed() *Task_EventFeedTask {
- if x, ok := x.GetTaskType().(*Task_EventFeed); ok {
- return x.EventFeed
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_EventFeed); ok {
+ return x.EventFeed
+ }
}
return nil
}
func (x *Task) GetCreateTicketTask() *Task_CreateTicketTask {
- if x, ok := x.GetTaskType().(*Task_CreateTicketTask_); ok {
- return x.CreateTicketTask
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_CreateTicketTask_); ok {
+ return x.CreateTicketTask
+ }
}
return nil
}
func (x *Task) GetListTicketSchemas() *Task_ListTicketSchemasTask {
- if x, ok := x.GetTaskType().(*Task_ListTicketSchemas); ok {
- return x.ListTicketSchemas
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_ListTicketSchemas); ok {
+ return x.ListTicketSchemas
+ }
}
return nil
}
func (x *Task) GetGetTicket() *Task_GetTicketTask {
- if x, ok := x.GetTaskType().(*Task_GetTicket); ok {
- return x.GetTicket
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_GetTicket); ok {
+ return x.GetTicket
+ }
}
return nil
}
func (x *Task) GetBulkCreateTickets() *Task_BulkCreateTicketsTask {
- if x, ok := x.GetTaskType().(*Task_BulkCreateTickets); ok {
- return x.BulkCreateTickets
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_BulkCreateTickets); ok {
+ return x.BulkCreateTickets
+ }
}
return nil
}
func (x *Task) GetBulkGetTickets() *Task_BulkGetTicketsTask {
- if x, ok := x.GetTaskType().(*Task_BulkGetTickets); ok {
- return x.BulkGetTickets
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_BulkGetTickets); ok {
+ return x.BulkGetTickets
+ }
+ }
+ return nil
+}
+
+func (x *Task) GetActionListSchemas() *Task_ActionListSchemasTask {
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_ActionListSchemas); ok {
+ return x.ActionListSchemas
+ }
+ }
+ return nil
+}
+
+func (x *Task) GetActionGetSchema() *Task_ActionGetSchemaTask {
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_ActionGetSchema); ok {
+ return x.ActionGetSchema
+ }
+ }
+ return nil
+}
+
+func (x *Task) GetActionInvoke() *Task_ActionInvokeTask {
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_ActionInvoke); ok {
+ return x.ActionInvoke
+ }
+ }
+ return nil
+}
+
+func (x *Task) GetActionStatus() *Task_ActionStatusTask {
+ if x != nil {
+ if x, ok := x.TaskType.(*Task_ActionStatus); ok {
+ return x.ActionStatus
+ }
}
return nil
}
@@ -338,6 +407,22 @@ type Task_BulkGetTickets struct {
BulkGetTickets *Task_BulkGetTicketsTask `protobuf:"bytes,114,opt,name=bulk_get_tickets,json=bulkGetTickets,proto3,oneof"`
}
+type Task_ActionListSchemas struct {
+ ActionListSchemas *Task_ActionListSchemasTask `protobuf:"bytes,115,opt,name=action_list_schemas,json=actionListSchemas,proto3,oneof"`
+}
+
+type Task_ActionGetSchema struct {
+ ActionGetSchema *Task_ActionGetSchemaTask `protobuf:"bytes,116,opt,name=action_get_schema,json=actionGetSchema,proto3,oneof"`
+}
+
+type Task_ActionInvoke struct {
+ ActionInvoke *Task_ActionInvokeTask `protobuf:"bytes,117,opt,name=action_invoke,json=actionInvoke,proto3,oneof"`
+}
+
+type Task_ActionStatus struct {
+ ActionStatus *Task_ActionStatusTask `protobuf:"bytes,118,opt,name=action_status,json=actionStatus,proto3,oneof"`
+}
+
func (*Task_None) isTask_TaskType() {}
func (*Task_Hello) isTask_TaskType() {}
@@ -368,26 +453,31 @@ func (*Task_BulkCreateTickets) isTask_TaskType() {}
func (*Task_BulkGetTickets) isTask_TaskType() {}
-type BatonServiceHelloRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
+func (*Task_ActionListSchemas) isTask_TaskType() {}
+func (*Task_ActionGetSchema) isTask_TaskType() {}
+
+func (*Task_ActionInvoke) isTask_TaskType() {}
+
+func (*Task_ActionStatus) isTask_TaskType() {}
+
+type BatonServiceHelloRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // You may say Hello anytime, but if you are responding to a task, you must provide the task_id
BuildInfo *BatonServiceHelloRequest_BuildInfo `protobuf:"bytes,3,opt,name=build_info,json=buildInfo,proto3" json:"build_info,omitempty"`
OsInfo *BatonServiceHelloRequest_OSInfo `protobuf:"bytes,4,opt,name=os_info,json=osInfo,proto3" json:"os_info,omitempty"`
ConnectorMetadata *v2.ConnectorMetadata `protobuf:"bytes,5,opt,name=connector_metadata,json=connectorMetadata,proto3" json:"connector_metadata,omitempty"`
Annotations []*anypb.Any `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceHelloRequest) Reset() {
*x = BatonServiceHelloRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceHelloRequest) String() string {
@@ -398,7 +488,7 @@ func (*BatonServiceHelloRequest) ProtoMessage() {}
func (x *BatonServiceHelloRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -456,20 +546,17 @@ func (x *BatonServiceHelloRequest) GetAnnotations() []*anypb.Any {
}
type BatonServiceHelloResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceHelloResponse) Reset() {
*x = BatonServiceHelloResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceHelloResponse) String() string {
@@ -480,7 +567,7 @@ func (*BatonServiceHelloResponse) ProtoMessage() {}
func (x *BatonServiceHelloResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -503,20 +590,17 @@ func (x *BatonServiceHelloResponse) GetAnnotations() []*anypb.Any {
}
type BatonServiceGetTaskRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
unknownFields protoimpl.UnknownFields
-
- HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceGetTaskRequest) Reset() {
*x = BatonServiceGetTaskRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceGetTaskRequest) String() string {
@@ -527,7 +611,7 @@ func (*BatonServiceGetTaskRequest) ProtoMessage() {}
func (x *BatonServiceGetTaskRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -550,23 +634,20 @@ func (x *BatonServiceGetTaskRequest) GetHostId() string {
}
type BatonServiceGetTaskResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"`
+ NextPoll *durationpb.Duration `protobuf:"bytes,2,opt,name=next_poll,json=nextPoll,proto3" json:"next_poll,omitempty"`
+ NextHeartbeat *durationpb.Duration `protobuf:"bytes,3,opt,name=next_heartbeat,json=nextHeartbeat,proto3" json:"next_heartbeat,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"`
- NextPoll *durationpb.Duration `protobuf:"bytes,2,opt,name=next_poll,json=nextPoll,proto3" json:"next_poll,omitempty"`
- NextHeartbeat *durationpb.Duration `protobuf:"bytes,3,opt,name=next_heartbeat,json=nextHeartbeat,proto3" json:"next_heartbeat,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceGetTaskResponse) Reset() {
*x = BatonServiceGetTaskResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceGetTaskResponse) String() string {
@@ -577,7 +658,7 @@ func (*BatonServiceGetTaskResponse) ProtoMessage() {}
func (x *BatonServiceGetTaskResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -621,22 +702,19 @@ func (x *BatonServiceGetTaskResponse) GetAnnotations() []*anypb.Any {
}
type BatonServiceHeartbeatRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
+ TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` // Useful for returning status updates on the task
unknownFields protoimpl.UnknownFields
-
- HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
- TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` // Useful for returning status updates on the task
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceHeartbeatRequest) Reset() {
*x = BatonServiceHeartbeatRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceHeartbeatRequest) String() string {
@@ -647,7 +725,7 @@ func (*BatonServiceHeartbeatRequest) ProtoMessage() {}
func (x *BatonServiceHeartbeatRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -684,22 +762,19 @@ func (x *BatonServiceHeartbeatRequest) GetAnnotations() []*anypb.Any {
}
type BatonServiceHeartbeatResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NextHeartbeat *durationpb.Duration `protobuf:"bytes,1,opt,name=next_heartbeat,json=nextHeartbeat,proto3" json:"next_heartbeat,omitempty"`
+ Cancelled bool `protobuf:"varint,2,opt,name=cancelled,proto3" json:"cancelled,omitempty"` // Backend has decided that we should stop working on this
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- NextHeartbeat *durationpb.Duration `protobuf:"bytes,1,opt,name=next_heartbeat,json=nextHeartbeat,proto3" json:"next_heartbeat,omitempty"`
- Cancelled bool `protobuf:"varint,2,opt,name=cancelled,proto3" json:"cancelled,omitempty"` // Backend has decided that we should stop working on this
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceHeartbeatResponse) Reset() {
*x = BatonServiceHeartbeatResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceHeartbeatResponse) String() string {
@@ -710,7 +785,7 @@ func (*BatonServiceHeartbeatResponse) ProtoMessage() {}
func (x *BatonServiceHeartbeatResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -747,25 +822,22 @@ func (x *BatonServiceHeartbeatResponse) GetAnnotations() []*anypb.Any {
}
type BatonServiceUploadAssetRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Types that are assignable to Msg:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Msg:
//
// *BatonServiceUploadAssetRequest_Metadata
// *BatonServiceUploadAssetRequest_Data
// *BatonServiceUploadAssetRequest_Eof
- Msg isBatonServiceUploadAssetRequest_Msg `protobuf_oneof:"msg"`
+ Msg isBatonServiceUploadAssetRequest_Msg `protobuf_oneof:"msg"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceUploadAssetRequest) Reset() {
*x = BatonServiceUploadAssetRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceUploadAssetRequest) String() string {
@@ -776,7 +848,7 @@ func (*BatonServiceUploadAssetRequest) ProtoMessage() {}
func (x *BatonServiceUploadAssetRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -791,30 +863,36 @@ func (*BatonServiceUploadAssetRequest) Descriptor() ([]byte, []int) {
return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{7}
}
-func (m *BatonServiceUploadAssetRequest) GetMsg() isBatonServiceUploadAssetRequest_Msg {
- if m != nil {
- return m.Msg
+func (x *BatonServiceUploadAssetRequest) GetMsg() isBatonServiceUploadAssetRequest_Msg {
+ if x != nil {
+ return x.Msg
}
return nil
}
func (x *BatonServiceUploadAssetRequest) GetMetadata() *BatonServiceUploadAssetRequest_UploadMetadata {
- if x, ok := x.GetMsg().(*BatonServiceUploadAssetRequest_Metadata); ok {
- return x.Metadata
+ if x != nil {
+ if x, ok := x.Msg.(*BatonServiceUploadAssetRequest_Metadata); ok {
+ return x.Metadata
+ }
}
return nil
}
func (x *BatonServiceUploadAssetRequest) GetData() *BatonServiceUploadAssetRequest_UploadData {
- if x, ok := x.GetMsg().(*BatonServiceUploadAssetRequest_Data); ok {
- return x.Data
+ if x != nil {
+ if x, ok := x.Msg.(*BatonServiceUploadAssetRequest_Data); ok {
+ return x.Data
+ }
}
return nil
}
func (x *BatonServiceUploadAssetRequest) GetEof() *BatonServiceUploadAssetRequest_UploadEOF {
- if x, ok := x.GetMsg().(*BatonServiceUploadAssetRequest_Eof); ok {
- return x.Eof
+ if x != nil {
+ if x, ok := x.Msg.(*BatonServiceUploadAssetRequest_Eof); ok {
+ return x.Eof
+ }
}
return nil
}
@@ -842,20 +920,17 @@ func (*BatonServiceUploadAssetRequest_Data) isBatonServiceUploadAssetRequest_Msg
func (*BatonServiceUploadAssetRequest_Eof) isBatonServiceUploadAssetRequest_Msg() {}
type BatonServiceUploadAssetResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceUploadAssetResponse) Reset() {
*x = BatonServiceUploadAssetResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceUploadAssetResponse) String() string {
@@ -866,7 +941,7 @@ func (*BatonServiceUploadAssetResponse) ProtoMessage() {}
func (x *BatonServiceUploadAssetResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -890,27 +965,24 @@ func (x *BatonServiceUploadAssetResponse) GetAnnotations() []*anypb.Any {
// Connector submits a task has been finished. It should always be removed from the queue, and if it isn't a fatal error, we should re-add it to the queue to try again.
type BatonServiceFinishTaskRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
- TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
- Status *status.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
- // Types that are assignable to FinalState:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
+ TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
+ Status *status.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
+ // Types that are valid to be assigned to FinalState:
//
// *BatonServiceFinishTaskRequest_Error_
// *BatonServiceFinishTaskRequest_Success_
- FinalState isBatonServiceFinishTaskRequest_FinalState `protobuf_oneof:"final_state"`
+ FinalState isBatonServiceFinishTaskRequest_FinalState `protobuf_oneof:"final_state"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceFinishTaskRequest) Reset() {
*x = BatonServiceFinishTaskRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceFinishTaskRequest) String() string {
@@ -921,7 +993,7 @@ func (*BatonServiceFinishTaskRequest) ProtoMessage() {}
func (x *BatonServiceFinishTaskRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -957,23 +1029,27 @@ func (x *BatonServiceFinishTaskRequest) GetStatus() *status.Status {
return nil
}
-func (m *BatonServiceFinishTaskRequest) GetFinalState() isBatonServiceFinishTaskRequest_FinalState {
- if m != nil {
- return m.FinalState
+func (x *BatonServiceFinishTaskRequest) GetFinalState() isBatonServiceFinishTaskRequest_FinalState {
+ if x != nil {
+ return x.FinalState
}
return nil
}
func (x *BatonServiceFinishTaskRequest) GetError() *BatonServiceFinishTaskRequest_Error {
- if x, ok := x.GetFinalState().(*BatonServiceFinishTaskRequest_Error_); ok {
- return x.Error
+ if x != nil {
+ if x, ok := x.FinalState.(*BatonServiceFinishTaskRequest_Error_); ok {
+ return x.Error
+ }
}
return nil
}
func (x *BatonServiceFinishTaskRequest) GetSuccess() *BatonServiceFinishTaskRequest_Success {
- if x, ok := x.GetFinalState().(*BatonServiceFinishTaskRequest_Success_); ok {
- return x.Success
+ if x != nil {
+ if x, ok := x.FinalState.(*BatonServiceFinishTaskRequest_Success_); ok {
+ return x.Success
+ }
}
return nil
}
@@ -995,20 +1071,17 @@ func (*BatonServiceFinishTaskRequest_Error_) isBatonServiceFinishTaskRequest_Fin
func (*BatonServiceFinishTaskRequest_Success_) isBatonServiceFinishTaskRequest_FinalState() {}
type BatonServiceFinishTaskResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceFinishTaskResponse) Reset() {
*x = BatonServiceFinishTaskResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceFinishTaskResponse) String() string {
@@ -1019,7 +1092,7 @@ func (*BatonServiceFinishTaskResponse) ProtoMessage() {}
func (x *BatonServiceFinishTaskResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1042,18 +1115,16 @@ func (x *BatonServiceFinishTaskResponse) GetAnnotations() []*anypb.Any {
}
type StartDebuggingRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *StartDebuggingRequest) Reset() {
*x = StartDebuggingRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *StartDebuggingRequest) String() string {
@@ -1064,7 +1135,7 @@ func (*StartDebuggingRequest) ProtoMessage() {}
func (x *StartDebuggingRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1080,20 +1151,17 @@ func (*StartDebuggingRequest) Descriptor() ([]byte, []int) {
}
type StartDebuggingResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *StartDebuggingResponse) Reset() {
*x = StartDebuggingResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *StartDebuggingResponse) String() string {
@@ -1104,7 +1172,7 @@ func (*StartDebuggingResponse) ProtoMessage() {}
func (x *StartDebuggingResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[12]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1127,20 +1195,17 @@ func (x *StartDebuggingResponse) GetStatus() bool {
}
type Task_NoneTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Task_NoneTask) Reset() {
*x = Task_NoneTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[13]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_NoneTask) String() string {
@@ -1151,7 +1216,7 @@ func (*Task_NoneTask) ProtoMessage() {}
func (x *Task_NoneTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[13]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1174,20 +1239,17 @@ func (x *Task_NoneTask) GetAnnotations() []*anypb.Any {
}
type Task_HelloTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Task_HelloTask) Reset() {
*x = Task_HelloTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_HelloTask) String() string {
@@ -1198,7 +1260,7 @@ func (*Task_HelloTask) ProtoMessage() {}
func (x *Task_HelloTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[14]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1221,20 +1283,17 @@ func (x *Task_HelloTask) GetAnnotations() []*anypb.Any {
}
type Task_SyncFullTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Task_SyncFullTask) Reset() {
*x = Task_SyncFullTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_SyncFullTask) String() string {
@@ -1245,7 +1304,7 @@ func (*Task_SyncFullTask) ProtoMessage() {}
func (x *Task_SyncFullTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[15]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1268,21 +1327,18 @@ func (x *Task_SyncFullTask) GetAnnotations() []*anypb.Any {
}
type Task_EventFeedTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ StartAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
- StartAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Task_EventFeedTask) Reset() {
*x = Task_EventFeedTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[16]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_EventFeedTask) String() string {
@@ -1293,7 +1349,7 @@ func (*Task_EventFeedTask) ProtoMessage() {}
func (x *Task_EventFeedTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[16]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1323,23 +1379,20 @@ func (x *Task_EventFeedTask) GetStartAt() *timestamppb.Timestamp {
}
type Task_GrantTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Entitlement *v2.Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
+ Principal *v2.Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ Duration *durationpb.Duration `protobuf:"bytes,4,opt,name=duration,proto3" json:"duration,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Entitlement *v2.Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
- Principal *v2.Resource `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
- Duration *durationpb.Duration `protobuf:"bytes,4,opt,name=duration,proto3" json:"duration,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Task_GrantTask) Reset() {
*x = Task_GrantTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[17]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_GrantTask) String() string {
@@ -1350,7 +1403,7 @@ func (*Task_GrantTask) ProtoMessage() {}
func (x *Task_GrantTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[17]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1394,21 +1447,18 @@ func (x *Task_GrantTask) GetDuration() *durationpb.Duration {
}
type Task_RevokeTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Grant *v2.Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Grant *v2.Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Task_RevokeTask) Reset() {
*x = Task_RevokeTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_RevokeTask) String() string {
@@ -1419,7 +1469,7 @@ func (*Task_RevokeTask) ProtoMessage() {}
func (x *Task_RevokeTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[18]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1449,22 +1499,19 @@ func (x *Task_RevokeTask) GetAnnotations() []*anypb.Any {
}
type Task_CreateAccountTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
AccountInfo *v2.AccountInfo `protobuf:"bytes,1,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"`
CredentialOptions *v2.CredentialOptions `protobuf:"bytes,2,opt,name=credential_options,json=credentialOptions,proto3" json:"credential_options,omitempty"`
EncryptionConfigs []*v2.EncryptionConfig `protobuf:"bytes,3,rep,name=encryption_configs,json=encryptionConfigs,proto3" json:"encryption_configs,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Task_CreateAccountTask) Reset() {
*x = Task_CreateAccountTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[19]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_CreateAccountTask) String() string {
@@ -1475,7 +1522,7 @@ func (*Task_CreateAccountTask) ProtoMessage() {}
func (x *Task_CreateAccountTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[19]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1512,20 +1559,17 @@ func (x *Task_CreateAccountTask) GetEncryptionConfigs() []*v2.EncryptionConfig {
}
type Task_CreateResourceTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resource *v2.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Resource *v2.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Task_CreateResourceTask) Reset() {
*x = Task_CreateResourceTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[20]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_CreateResourceTask) String() string {
@@ -1536,7 +1580,7 @@ func (*Task_CreateResourceTask) ProtoMessage() {}
func (x *Task_CreateResourceTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[20]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1559,20 +1603,17 @@ func (x *Task_CreateResourceTask) GetResource() *v2.Resource {
}
type Task_DeleteResourceTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceId *v2.ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
unknownFields protoimpl.UnknownFields
-
- ResourceId *v2.ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Task_DeleteResourceTask) Reset() {
*x = Task_DeleteResourceTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[21]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_DeleteResourceTask) String() string {
@@ -1583,7 +1624,7 @@ func (*Task_DeleteResourceTask) ProtoMessage() {}
func (x *Task_DeleteResourceTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[21]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1606,22 +1647,19 @@ func (x *Task_DeleteResourceTask) GetResourceId() *v2.ResourceId {
}
type Task_RotateCredentialsTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
ResourceId *v2.ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
CredentialOptions *v2.CredentialOptions `protobuf:"bytes,2,opt,name=credential_options,json=credentialOptions,proto3" json:"credential_options,omitempty"`
EncryptionConfigs []*v2.EncryptionConfig `protobuf:"bytes,3,rep,name=encryption_configs,json=encryptionConfigs,proto3" json:"encryption_configs,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Task_RotateCredentialsTask) Reset() {
*x = Task_RotateCredentialsTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[22]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_RotateCredentialsTask) String() string {
@@ -1632,7 +1670,7 @@ func (*Task_RotateCredentialsTask) ProtoMessage() {}
func (x *Task_RotateCredentialsTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[22]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1669,22 +1707,19 @@ func (x *Task_RotateCredentialsTask) GetEncryptionConfigs() []*v2.EncryptionConf
}
type Task_CreateTicketTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TicketRequest *v2.TicketRequest `protobuf:"bytes,1,opt,name=ticket_request,json=ticketRequest,proto3" json:"ticket_request,omitempty"`
+ TicketSchema *v2.TicketSchema `protobuf:"bytes,2,opt,name=ticket_schema,json=ticketSchema,proto3" json:"ticket_schema,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TicketRequest *v2.TicketRequest `protobuf:"bytes,1,opt,name=ticket_request,json=ticketRequest,proto3" json:"ticket_request,omitempty"`
- TicketSchema *v2.TicketSchema `protobuf:"bytes,2,opt,name=ticket_schema,json=ticketSchema,proto3" json:"ticket_schema,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Task_CreateTicketTask) Reset() {
*x = Task_CreateTicketTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[23]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_CreateTicketTask) String() string {
@@ -1695,7 +1730,7 @@ func (*Task_CreateTicketTask) ProtoMessage() {}
func (x *Task_CreateTicketTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[23]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1732,20 +1767,17 @@ func (x *Task_CreateTicketTask) GetAnnotations() []*anypb.Any {
}
type Task_BulkCreateTicketsTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
TicketRequests []*Task_CreateTicketTask `protobuf:"bytes,1,rep,name=ticket_requests,json=ticketRequests,proto3" json:"ticket_requests,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Task_BulkCreateTicketsTask) Reset() {
*x = Task_BulkCreateTicketsTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[24]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_BulkCreateTicketsTask) String() string {
@@ -1756,7 +1788,7 @@ func (*Task_BulkCreateTicketsTask) ProtoMessage() {}
func (x *Task_BulkCreateTicketsTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[24]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1779,20 +1811,17 @@ func (x *Task_BulkCreateTicketsTask) GetTicketRequests() []*Task_CreateTicketTas
}
type Task_BulkGetTicketsTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- TicketRequests []*Task_GetTicketTask `protobuf:"bytes,1,rep,name=ticket_requests,json=ticketRequests,proto3" json:"ticket_requests,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TicketRequests []*Task_GetTicketTask `protobuf:"bytes,1,rep,name=ticket_requests,json=ticketRequests,proto3" json:"ticket_requests,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Task_BulkGetTicketsTask) Reset() {
*x = Task_BulkGetTicketsTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[25]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_BulkGetTicketsTask) String() string {
@@ -1803,7 +1832,7 @@ func (*Task_BulkGetTicketsTask) ProtoMessage() {}
func (x *Task_BulkGetTicketsTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[25]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1826,20 +1855,17 @@ func (x *Task_BulkGetTicketsTask) GetTicketRequests() []*Task_GetTicketTask {
}
type Task_ListTicketSchemasTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Task_ListTicketSchemasTask) Reset() {
*x = Task_ListTicketSchemasTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[26]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_ListTicketSchemasTask) String() string {
@@ -1850,7 +1876,7 @@ func (*Task_ListTicketSchemasTask) ProtoMessage() {}
func (x *Task_ListTicketSchemasTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[26]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1873,21 +1899,18 @@ func (x *Task_ListTicketSchemasTask) GetAnnotations() []*anypb.Any {
}
type Task_GetTicketTask struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ TicketId string `protobuf:"bytes,1,opt,name=ticket_id,json=ticketId,proto3" json:"ticket_id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- TicketId string `protobuf:"bytes,1,opt,name=ticket_id,json=ticketId,proto3" json:"ticket_id,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Task_GetTicketTask) Reset() {
*x = Task_GetTicketTask{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[27]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Task_GetTicketTask) String() string {
@@ -1898,7 +1921,7 @@ func (*Task_GetTicketTask) ProtoMessage() {}
func (x *Task_GetTicketTask) ProtoReflect() protoreflect.Message {
mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[27]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1927,23 +1950,236 @@ func (x *Task_GetTicketTask) GetAnnotations() []*anypb.Any {
return nil
}
-type BatonServiceHelloRequest_BuildInfo struct {
- state protoimpl.MessageState
+type Task_ActionListSchemasTask struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Task_ActionListSchemasTask) Reset() {
+ *x = Task_ActionListSchemasTask{}
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Task_ActionListSchemasTask) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Task_ActionListSchemasTask) ProtoMessage() {}
+
+func (x *Task_ActionListSchemasTask) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Task_ActionListSchemasTask.ProtoReflect.Descriptor instead.
+func (*Task_ActionListSchemasTask) Descriptor() ([]byte, []int) {
+ return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 15}
+}
+
+func (x *Task_ActionListSchemasTask) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type Task_ActionGetSchemaTask struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
+}
+
+func (x *Task_ActionGetSchemaTask) Reset() {
+ *x = Task_ActionGetSchemaTask{}
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Task_ActionGetSchemaTask) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Task_ActionGetSchemaTask) ProtoMessage() {}
+
+func (x *Task_ActionGetSchemaTask) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Task_ActionGetSchemaTask.ProtoReflect.Descriptor instead.
+func (*Task_ActionGetSchemaTask) Descriptor() ([]byte, []int) {
+ return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 16}
+}
+
+func (x *Task_ActionGetSchemaTask) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Task_ActionGetSchemaTask) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type Task_ActionInvokeTask struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Args *structpb.Struct `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
- LangVersion string `protobuf:"bytes,1,opt,name=lang_version,json=langVersion,proto3" json:"lang_version,omitempty"`
- Package string `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"`
- PackageVersion string `protobuf:"bytes,3,opt,name=package_version,json=packageVersion,proto3" json:"package_version,omitempty"`
+func (x *Task_ActionInvokeTask) Reset() {
+ *x = Task_ActionInvokeTask{}
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
-func (x *BatonServiceHelloRequest_BuildInfo) Reset() {
- *x = BatonServiceHelloRequest_BuildInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28]
+func (x *Task_ActionInvokeTask) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Task_ActionInvokeTask) ProtoMessage() {}
+
+func (x *Task_ActionInvokeTask) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Task_ActionInvokeTask.ProtoReflect.Descriptor instead.
+func (*Task_ActionInvokeTask) Descriptor() ([]byte, []int) {
+ return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 17}
+}
+
+func (x *Task_ActionInvokeTask) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Task_ActionInvokeTask) GetArgs() *structpb.Struct {
+ if x != nil {
+ return x.Args
+ }
+ return nil
+}
+
+func (x *Task_ActionInvokeTask) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type Task_ActionStatusTask struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Task_ActionStatusTask) Reset() {
+ *x = Task_ActionStatusTask{}
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Task_ActionStatusTask) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Task_ActionStatusTask) ProtoMessage() {}
+
+func (x *Task_ActionStatusTask) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Task_ActionStatusTask.ProtoReflect.Descriptor instead.
+func (*Task_ActionStatusTask) Descriptor() ([]byte, []int) {
+ return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 18}
+}
+
+func (x *Task_ActionStatusTask) GetName() string {
+ if x != nil {
+ return x.Name
}
+ return ""
+}
+
+func (x *Task_ActionStatusTask) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *Task_ActionStatusTask) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type BatonServiceHelloRequest_BuildInfo struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ LangVersion string `protobuf:"bytes,1,opt,name=lang_version,json=langVersion,proto3" json:"lang_version,omitempty"`
+ Package string `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"`
+ PackageVersion string `protobuf:"bytes,3,opt,name=package_version,json=packageVersion,proto3" json:"package_version,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BatonServiceHelloRequest_BuildInfo) Reset() {
+ *x = BatonServiceHelloRequest_BuildInfo{}
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceHelloRequest_BuildInfo) String() string {
@@ -1953,8 +2189,8 @@ func (x *BatonServiceHelloRequest_BuildInfo) String() string {
func (*BatonServiceHelloRequest_BuildInfo) ProtoMessage() {}
func (x *BatonServiceHelloRequest_BuildInfo) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1991,27 +2227,24 @@ func (x *BatonServiceHelloRequest_BuildInfo) GetPackageVersion() string {
}
type BatonServiceHelloRequest_OSInfo struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
- Os string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"`
- Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
- PlatformVersion string `protobuf:"bytes,4,opt,name=platform_version,json=platformVersion,proto3" json:"platform_version,omitempty"`
- PlatformFamily string `protobuf:"bytes,5,opt,name=platform_family,json=platformFamily,proto3" json:"platform_family,omitempty"`
- KernelVersion string `protobuf:"bytes,6,opt,name=kernel_version,json=kernelVersion,proto3" json:"kernel_version,omitempty"`
- KernelArch string `protobuf:"bytes,7,opt,name=kernel_arch,json=kernelArch,proto3" json:"kernel_arch,omitempty"`
- VirtualizationSystem string `protobuf:"bytes,8,opt,name=virtualization_system,json=virtualizationSystem,proto3" json:"virtualization_system,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
+ Os string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"`
+ Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
+ PlatformVersion string `protobuf:"bytes,4,opt,name=platform_version,json=platformVersion,proto3" json:"platform_version,omitempty"`
+ PlatformFamily string `protobuf:"bytes,5,opt,name=platform_family,json=platformFamily,proto3" json:"platform_family,omitempty"`
+ KernelVersion string `protobuf:"bytes,6,opt,name=kernel_version,json=kernelVersion,proto3" json:"kernel_version,omitempty"`
+ KernelArch string `protobuf:"bytes,7,opt,name=kernel_arch,json=kernelArch,proto3" json:"kernel_arch,omitempty"`
+ VirtualizationSystem string `protobuf:"bytes,8,opt,name=virtualization_system,json=virtualizationSystem,proto3" json:"virtualization_system,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceHelloRequest_OSInfo) Reset() {
*x = BatonServiceHelloRequest_OSInfo{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceHelloRequest_OSInfo) String() string {
@@ -2021,8 +2254,8 @@ func (x *BatonServiceHelloRequest_OSInfo) String() string {
func (*BatonServiceHelloRequest_OSInfo) ProtoMessage() {}
func (x *BatonServiceHelloRequest_OSInfo) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2094,22 +2327,19 @@ func (x *BatonServiceHelloRequest_OSInfo) GetVirtualizationSystem() string {
}
type BatonServiceUploadAssetRequest_UploadMetadata struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
+ TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
- TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceUploadAssetRequest_UploadMetadata) Reset() {
*x = BatonServiceUploadAssetRequest_UploadMetadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceUploadAssetRequest_UploadMetadata) String() string {
@@ -2119,8 +2349,8 @@ func (x *BatonServiceUploadAssetRequest_UploadMetadata) String() string {
func (*BatonServiceUploadAssetRequest_UploadMetadata) ProtoMessage() {}
func (x *BatonServiceUploadAssetRequest_UploadMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2157,21 +2387,18 @@ func (x *BatonServiceUploadAssetRequest_UploadMetadata) GetAnnotations() []*anyp
}
type BatonServiceUploadAssetRequest_UploadData struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
+ state protoimpl.MessageState `protogen:"open.v1"`
// 1MB limit
- Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
+ Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceUploadAssetRequest_UploadData) Reset() {
*x = BatonServiceUploadAssetRequest_UploadData{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceUploadAssetRequest_UploadData) String() string {
@@ -2181,8 +2408,8 @@ func (x *BatonServiceUploadAssetRequest_UploadData) String() string {
func (*BatonServiceUploadAssetRequest_UploadData) ProtoMessage() {}
func (x *BatonServiceUploadAssetRequest_UploadData) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[35]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2205,21 +2432,18 @@ func (x *BatonServiceUploadAssetRequest_UploadData) GetData() []byte {
}
type BatonServiceUploadAssetRequest_UploadEOF struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Sha256Checksum []byte `protobuf:"bytes,1,opt,name=sha256_checksum,json=sha256Checksum,proto3" json:"sha256_checksum,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Sha256Checksum []byte `protobuf:"bytes,1,opt,name=sha256_checksum,json=sha256Checksum,proto3" json:"sha256_checksum,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceUploadAssetRequest_UploadEOF) Reset() {
*x = BatonServiceUploadAssetRequest_UploadEOF{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[36]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceUploadAssetRequest_UploadEOF) String() string {
@@ -2229,8 +2453,8 @@ func (x *BatonServiceUploadAssetRequest_UploadEOF) String() string {
func (*BatonServiceUploadAssetRequest_UploadEOF) ProtoMessage() {}
func (x *BatonServiceUploadAssetRequest_UploadEOF) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[36]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2260,23 +2484,20 @@ func (x *BatonServiceUploadAssetRequest_UploadEOF) GetAnnotations() []*anypb.Any
}
type BatonServiceFinishTaskRequest_Error struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- NonRetryable bool `protobuf:"varint,1,opt,name=non_retryable,json=nonRetryable,proto3" json:"non_retryable,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NonRetryable bool `protobuf:"varint,1,opt,name=non_retryable,json=nonRetryable,proto3" json:"non_retryable,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
// The response from the connector, if any.
- Response *anypb.Any `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"`
+ Response *anypb.Any `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceFinishTaskRequest_Error) Reset() {
*x = BatonServiceFinishTaskRequest_Error{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[37]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceFinishTaskRequest_Error) String() string {
@@ -2286,8 +2507,8 @@ func (x *BatonServiceFinishTaskRequest_Error) String() string {
func (*BatonServiceFinishTaskRequest_Error) ProtoMessage() {}
func (x *BatonServiceFinishTaskRequest_Error) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[37]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2324,22 +2545,19 @@ func (x *BatonServiceFinishTaskRequest_Error) GetResponse() *anypb.Any {
}
type BatonServiceFinishTaskRequest_Success struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
// The response from the connector, if any.
- Response *anypb.Any `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
+ Response *anypb.Any `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *BatonServiceFinishTaskRequest_Success) Reset() {
*x = BatonServiceFinishTaskRequest_Success{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[38]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *BatonServiceFinishTaskRequest_Success) String() string {
@@ -2349,8 +2567,8 @@ func (x *BatonServiceFinishTaskRequest_Success) String() string {
func (*BatonServiceFinishTaskRequest_Success) ProtoMessage() {}
func (x *BatonServiceFinishTaskRequest_Success) ProtoReflect() protoreflect.Message {
- mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34]
- if protoimpl.UnsafeEnabled && x != nil {
+ mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[38]
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -2381,7 +2599,7 @@ func (x *BatonServiceFinishTaskRequest_Success) GetResponse() *anypb.Any {
var File_c1_connectorapi_baton_v1_baton_proto protoreflect.FileDescriptor
-var file_c1_connectorapi_baton_v1_baton_proto_rawDesc = []byte{
+var file_c1_connectorapi_baton_v1_baton_proto_rawDesc = string([]byte{
0x0a, 0x24, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
0x69, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
@@ -2399,513 +2617,565 @@ var file_c1_connectorapi_baton_v1_baton_proto_rawDesc = []byte{
0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65,
- 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76,
- 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x1b,
- 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
- 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76,
- 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73,
- 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x64, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54,
- 0x61, 0x73, 0x6b, 0x2e, 0x4e, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x04,
- 0x6e, 0x6f, 0x6e, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x18, 0x65, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54,
- 0x61, 0x73, 0x6b, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52,
- 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x4a, 0x0a, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66,
- 0x75, 0x6c, 0x6c, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x31, 0x2e, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f,
- 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x75,
- 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x75,
- 0x6c, 0x6c, 0x12, 0x40, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x67, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73,
- 0x6b, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x67,
- 0x72, 0x61, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x18, 0x68,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75,
+ 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
+ 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x21, 0x0a, 0x04,
+ 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
- 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48,
- 0x00, 0x52, 0x06, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x59, 0x0a, 0x0e, 0x63, 0x72, 0x65,
- 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x69, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73,
- 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54,
- 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e,
- 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b,
- 0x48, 0x00, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x31,
+ 0x6b, 0x2e, 0x4e, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x6f,
+ 0x6e, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x18, 0x65, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73,
+ 0x6b, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x68,
+ 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x4a, 0x0a, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66, 0x75, 0x6c,
+ 0x6c, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e,
+ 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x75, 0x6c, 0x6c,
+ 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x75, 0x6c, 0x6c,
+ 0x12, 0x40, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
+ 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e,
+ 0x47, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x67, 0x72, 0x61,
+ 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x18, 0x68, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61,
+ 0x73, 0x6b, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52,
+ 0x06, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x59, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x69, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
+ 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x61, 0x73,
+ 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
+ 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x31,
0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61,
- 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00,
- 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x12, 0x65, 0x0a, 0x12, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65,
- 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62,
- 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x52, 0x6f, 0x74,
- 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x54, 0x61,
- 0x73, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64,
- 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x4d, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74,
- 0x5f, 0x66, 0x65, 0x65, 0x64, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61,
- 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x45, 0x76, 0x65, 0x6e,
- 0x74, 0x46, 0x65, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x09, 0x65, 0x76, 0x65,
- 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x12, 0x5f, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x6e, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x12, 0x5c, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f,
+ 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0e,
+ 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x65,
+ 0x0a, 0x12, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x61, 0x6c, 0x73, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74,
+ 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74,
+ 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x54, 0x61, 0x73, 0x6b,
+ 0x48, 0x00, 0x52, 0x11, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
+ 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x4d, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x66,
+ 0x65, 0x65, 0x64, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f,
+ 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46,
+ 0x65, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74,
+ 0x46, 0x65, 0x65, 0x64, 0x12, 0x5f, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74,
+ 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61,
+ 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b,
+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73,
+ 0x6b, 0x48, 0x00, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65,
+ 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x66, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x6f, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61,
- 0x73, 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54,
- 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63,
- 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x66, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x5f,
- 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x6f,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
- 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53,
- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x6c, 0x69,
- 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12,
- 0x4d, 0x0a, 0x0a, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x70, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54,
- 0x61, 0x73, 0x6b, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73,
- 0x6b, 0x48, 0x00, 0x52, 0x09, 0x67, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x66,
- 0x0a, 0x13, 0x62, 0x75, 0x6c, 0x6b, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,
- 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61,
- 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x42, 0x75, 0x6c, 0x6b,
- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73,
- 0x6b, 0x48, 0x00, 0x52, 0x11, 0x62, 0x75, 0x6c, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
- 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x5d, 0x0a, 0x10, 0x62, 0x75, 0x6c, 0x6b, 0x5f, 0x67,
- 0x65, 0x74, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61,
+ 0x73, 0x6b, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x6c, 0x69, 0x73, 0x74,
+ 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x4d, 0x0a,
+ 0x0a, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x70, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73,
+ 0x6b, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x48,
+ 0x00, 0x52, 0x09, 0x67, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x66, 0x0a, 0x13,
+ 0x62, 0x75, 0x6c, 0x6b, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x63, 0x6b,
+ 0x65, 0x74, 0x73, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f,
+ 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x48,
+ 0x00, 0x52, 0x11, 0x62, 0x75, 0x6c, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x12, 0x5d, 0x0a, 0x10, 0x62, 0x75, 0x6c, 0x6b, 0x5f, 0x67, 0x65, 0x74,
+ 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31,
+ 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69,
+ 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x42,
+ 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73,
+ 0x6b, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b,
+ 0x65, 0x74, 0x73, 0x12, 0x66, 0x0a, 0x13, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69,
+ 0x73, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x73, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61,
0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b,
- 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54,
- 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69,
- 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x1a, 0x42, 0x0a, 0x08, 0x4e,
- 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
- 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a,
- 0x43, 0x0a, 0x09, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x46, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x75, 0x6c, 0x6c,
+ 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x60, 0x0a, 0x11, 0x61,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
+ 0x18, 0x74, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76,
+ 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x56, 0x0a,
+ 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x18, 0x75,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
+ 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x76, 0x6f, 0x6b,
+ 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49,
+ 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x76, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62,
+ 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x41, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52,
+ 0x0c, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a,
+ 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x64, 0x65,
+ 0x62, 0x75, 0x67, 0x1a, 0x42, 0x0a, 0x08, 0x4e, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12,
+ 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x43, 0x0a, 0x09, 0x48, 0x65, 0x6c, 0x6c, 0x6f,
0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
- 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7e, 0x0a, 0x0d,
- 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a,
- 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61,
- 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
- 0x61, 0x6d, 0x70, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x74, 0x1a, 0xf3, 0x01, 0x0a,
- 0x09, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e,
- 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
- 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65,
- 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72,
- 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69,
- 0x70, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x64,
- 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
- 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x1a, 0x72, 0x0a, 0x0a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x61, 0x73, 0x6b,
- 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
- 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x36,
- 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xf9, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74,
- 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3f, 0x0a, 0x0c,
- 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f,
- 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a,
- 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64,
- 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63,
- 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45,
- 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
- 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x73, 0x1a, 0x4b, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a,
- 0x52, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x49, 0x64, 0x1a, 0xfa, 0x01, 0x0a, 0x15, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72,
- 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3c, 0x0a,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x46, 0x0a, 0x0c,
+ 0x53, 0x79, 0x6e, 0x63, 0x46, 0x75, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7e, 0x0a, 0x0d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65,
+ 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
+ 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a,
+ 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x73, 0x74, 0x61,
+ 0x72, 0x74, 0x41, 0x74, 0x1a, 0xf3, 0x01, 0x0a, 0x09, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x61,
+ 0x73, 0x6b, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
+ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c,
+ 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65,
+ 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x0b, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x72, 0x0a, 0x0a, 0x52, 0x65,
+ 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e,
+ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52,
+ 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
+ 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xf9,
+ 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
+ 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
+ 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
+ 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
+ 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72,
+ 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x4b, 0x0a, 0x12, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b,
+ 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x52, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3c, 0x0a,
0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52,
- 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, 0x63,
- 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
- 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65,
- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50,
- 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63,
- 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65,
- 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73,
- 0x1a, 0xd5, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65,
- 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x45, 0x0a, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f,
- 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e,
- 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x74,
- 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0d,
- 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65,
- 0x6d, 0x61, 0x52, 0x0c, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,
+ 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x1a, 0xfa, 0x01, 0x0a, 0x15,
+ 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
+ 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
+ 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xd5, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x45, 0x0a,
+ 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0d, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0c, 0x74, 0x69, 0x63, 0x6b,
+ 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x1a, 0x71, 0x0a, 0x15, 0x42, 0x75, 0x6c, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x58, 0x0a, 0x0f, 0x74, 0x69, 0x63,
+ 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61,
+ 0x73, 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54,
+ 0x61, 0x73, 0x6b, 0x52, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x73, 0x1a, 0x6b, 0x0a, 0x12, 0x42, 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x55, 0x0a, 0x0f, 0x74, 0x69, 0x63,
+ 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61,
+ 0x73, 0x6b, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b,
+ 0x52, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,
+ 0x1a, 0x4f, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x1a, 0x64, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61,
+ 0x73, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12,
+ 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x4f, 0x0a, 0x15, 0x41, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b,
0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
- 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e,
- 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x15, 0x42, 0x75, 0x6c, 0x6b,
- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73,
- 0x6b, 0x12, 0x58, 0x0a, 0x0f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74,
- 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
- 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0e, 0x74, 0x69, 0x63,
- 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a, 0x6b, 0x0a, 0x12, 0x42,
- 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73,
- 0x6b, 0x12, 0x55, 0x0a, 0x0f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74,
- 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69,
- 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a, 0x4f, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74,
- 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x54, 0x61, 0x73,
- 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x61, 0x0a, 0x13, 0x41, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, 0x73, 0x6b, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x8b, 0x01, 0x0a, 0x10,
+ 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x61, 0x73, 0x6b,
+ 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x61, 0x72, 0x67,
+ 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6e, 0x0a, 0x10, 0x41, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
+ 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e,
- 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x64, 0x0a, 0x0d, 0x47, 0x65, 0x74,
- 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x69,
- 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74,
- 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x73, 0x0a, 0x06, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e,
+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53,
+ 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12,
+ 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55,
+ 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f,
+ 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41,
+ 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x04, 0x42, 0x0b,
+ 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xf3, 0x07, 0x0a, 0x18,
+ 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c,
+ 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74,
+ 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05,
+ 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x32, 0x0a,
+ 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19,
+ 0xfa, 0x42, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30,
+ 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x7c, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49,
+ 0x64, 0x12, 0x65, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
+ 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c,
+ 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49,
+ 0x6e, 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x62,
+ 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5c, 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x69,
+ 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f,
+ 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x53,
+ 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06,
+ 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5b, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01,
+ 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08,
+ 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x95, 0x01, 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49,
+ 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05,
+ 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0b, 0x6c, 0x61, 0x6e, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52,
+ 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b,
+ 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0e, 0x70,
+ 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x81, 0x03,
+ 0x0a, 0x06, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72,
+ 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
+ 0x12, 0x1a, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42,
+ 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x26, 0x0a, 0x08,
+ 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
+ 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74,
+ 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x35, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
+ 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
+ 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x74,
+ 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x0f, 0x70,
+ 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02,
+ 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79,
+ 0x12, 0x31, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10,
+ 0x01, 0x18, 0x80, 0x02, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x0b, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x72,
+ 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10,
+ 0x01, 0x18, 0x80, 0x02, 0x52, 0x0a, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68,
+ 0x12, 0x3f, 0x0a, 0x15, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x14, 0x76, 0x69, 0x72,
+ 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x79, 0x73, 0x74, 0x65,
+ 0x6d, 0x22, 0x53, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36,
+ 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x41, 0x0a, 0x1a, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80,
+ 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x83, 0x02, 0x0a, 0x1b, 0x42, 0x61,
+ 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73,
+ 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x61, 0x73,
+ 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e,
+ 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a,
+ 0x09, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6e, 0x65, 0x78,
+ 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x12, 0x40, 0x0a, 0x0e, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65,
+ 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65,
+ 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22,
- 0x73, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41,
- 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
- 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44,
- 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f,
- 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53,
- 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12,
- 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48,
- 0x45, 0x44, 0x10, 0x04, 0x42, 0x0b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70,
- 0x65, 0x22, 0xf3, 0x07, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23,
- 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73,
- 0x74, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xfa, 0x42, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61,
- 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x7c, 0x24, 0x52,
- 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x65, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64,
- 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x31,
- 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61,
- 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
- 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01,
- 0x02, 0x10, 0x01, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5c,
- 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
- 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a,
- 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5b, 0x0a, 0x12,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
- 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42,
- 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e,
- 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x95, 0x01, 0x0a, 0x09,
- 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x0c, 0x6c, 0x61, 0x6e,
- 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0b, 0x6c, 0x61, 0x6e,
- 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b,
- 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05,
- 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x33,
- 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
- 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01,
- 0x18, 0x80, 0x02, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73,
- 0x69, 0x6f, 0x6e, 0x1a, 0x81, 0x03, 0x0a, 0x06, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26,
- 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x08, 0x68, 0x6f,
- 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x02,
- 0x6f, 0x73, 0x12, 0x26, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02,
- 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x35, 0x0a, 0x10, 0x70, 0x6c,
- 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02,
- 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
- 0x6e, 0x12, 0x33, 0x0a, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x61,
- 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72,
- 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
- 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c,
- 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
- 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e,
- 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x0b, 0x6b, 0x65, 0x72,
- 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
- 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0a, 0x6b, 0x65, 0x72, 0x6e,
- 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x12, 0x3f, 0x0a, 0x15, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61,
- 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18,
- 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80,
- 0x02, 0x52, 0x14, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x53, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x6f, 0x6e,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
- 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x41, 0x0a, 0x1a,
- 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54,
- 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f,
- 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07,
- 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22,
- 0x83, 0x02, 0x0a, 0x1b, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x32, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
- 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e,
- 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74,
- 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x6c,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x52, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x12, 0x40, 0x0a, 0x0e, 0x6e,
- 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d,
- 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x0a,
- 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03,
+ 0xb8, 0x01, 0x0a, 0x1c, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68,
+ 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e,
+ 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24,
+ 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x1d, 0x42,
+ 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74,
+ 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e,
+ 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x1c,
+ 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa3, 0x05, 0x0a, 0x1e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f,
+ 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x59,
+ 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x63,
+ 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62,
+ 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74,
+ 0x61, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x56, 0x0a, 0x03, 0x65, 0x6f, 0x66,
+ 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76,
+ 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70,
+ 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46, 0x48, 0x00, 0x52, 0x03, 0x65, 0x6f,
+ 0x66, 0x1a, 0xaa, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80,
+ 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73,
+ 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72,
+ 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b,
+ 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10,
+ 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2d,
+ 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x04,
+ 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x7a,
+ 0x06, 0x10, 0x01, 0x18, 0x80, 0x80, 0x40, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x7f, 0x0a,
+ 0x09, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46, 0x12, 0x30, 0x0a, 0x0f, 0x73, 0x68,
+ 0x61, 0x32, 0x35, 0x36, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, 0x68, 0x20, 0x52, 0x0e, 0x73, 0x68,
+ 0x61, 0x32, 0x35, 0x36, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x40, 0x0a, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10,
+ 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0a,
+ 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x59, 0x0a, 0x1f, 0x42, 0x61,
+ 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
+ 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x1c, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01,
- 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74,
- 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42,
- 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39,
- 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x40,
- 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x05, 0x0a, 0x1d, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10,
+ 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07,
+ 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa,
+ 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d,
+ 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12,
+ 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x55, 0x0a, 0x05, 0x65,
+ 0x72, 0x72, 0x6f, 0x72, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74,
+ 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72,
+ 0x6f, 0x72, 0x12, 0x5b, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x65, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42,
+ 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73,
+ 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x63,
+ 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a,
+ 0xa0, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e,
+ 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x40,
+ 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01,
0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x22, 0xb7, 0x01, 0x0a, 0x1d, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74,
- 0x62, 0x65, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74,
- 0x62, 0x65, 0x61, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65,
- 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c,
- 0x65, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61,
- 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa3, 0x05, 0x0a, 0x1e, 0x42,
- 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61,
- 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, 0x0a,
- 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x47, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
- 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73,
- 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
- 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61,
- 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61,
- 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
- 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c,
- 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12,
- 0x56, 0x0a, 0x03, 0x65, 0x6f, 0x66, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62,
- 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46,
- 0x48, 0x00, 0x52, 0x03, 0x65, 0x6f, 0x66, 0x1a, 0xaa, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f,
- 0x61, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f,
- 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07,
- 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12,
- 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d,
- 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b,
- 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa,
- 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2d, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61,
- 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
- 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x7a, 0x06, 0x10, 0x01, 0x18, 0x80, 0x80, 0x40, 0x52, 0x04, 0x64,
- 0x61, 0x74, 0x61, 0x1a, 0x7f, 0x0a, 0x09, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46,
- 0x12, 0x30, 0x0a, 0x0f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b,
- 0x73, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02,
- 0x68, 0x20, 0x52, 0x0e, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73,
- 0x75, 0x6d, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa,
- 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0a, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01,
- 0x22, 0x59, 0x0a, 0x1f, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x05, 0x0a, 0x1d,
- 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69,
- 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a,
- 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
- 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74,
- 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d,
- 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74,
- 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
- 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
- 0x73, 0x12, 0x55, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61,
- 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f,
- 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61,
- 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48,
- 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x5b, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63,
- 0x65, 0x73, 0x73, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x63, 0x31, 0x2e, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f,
- 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75,
- 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a, 0xa0, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12,
- 0x23, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x61, 0x62, 0x6c, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79,
- 0x61, 0x62, 0x6c, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42,
- 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08,
- 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x7d, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63,
- 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08,
- 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x12, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x61, 0x6c,
- 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x58, 0x0a, 0x1e, 0x42,
- 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73,
- 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a,
+ 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x1a, 0x7d, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a,
0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65,
- 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x30,
- 0x0a, 0x16, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
- 0x32, 0x80, 0x06, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x12, 0x72, 0x0a, 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x32, 0x2e, 0x63, 0x31, 0x2e,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02,
+ 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
+ 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x42, 0x12, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65,
+ 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x58, 0x0a, 0x1e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
+ 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22,
+ 0x17, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e,
+ 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x72,
+ 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x80, 0x06, 0x0a, 0x0c, 0x42,
+ 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x05, 0x48,
+ 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x32, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
+ 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c,
+ 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e,
+ 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
+ 0x78, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x34, 0x2e, 0x63, 0x31, 0x2e,
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74,
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69,
- 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33,
- 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69,
- 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x78, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b,
- 0x12, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61,
+ 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61,
0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f,
0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7e, 0x0a, 0x09, 0x48, 0x65, 0x61,
+ 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76,
- 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65,
- 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
- 0x7e, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x2e, 0x63,
- 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62,
- 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
- 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
- 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72,
- 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
- 0x81, 0x01, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x37,
+ 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65,
+ 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37,
0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69,
0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e,
- 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46,
- 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x22, 0x00, 0x12, 0x86, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73,
- 0x73, 0x65, 0x74, 0x12, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
- 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42,
- 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61,
- 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x81, 0x01, 0x0a, 0x0a, 0x46, 0x69,
+ 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e,
+ 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74,
+ 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54,
+ 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x86, 0x01,
+ 0x0a, 0x0b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x38, 0x2e,
0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e,
0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x0e,
- 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x2f,
- 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69,
- 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44,
- 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
- 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74,
- 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x22, 0x00, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f,
- 0x6d, 0x2f, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x6e, 0x65, 0x2f, 0x63, 0x31, 0x2f, 0x70, 0x6b, 0x67,
- 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
- 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x33,
-}
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e,
+ 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55,
+ 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44,
+ 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e,
+ 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69,
+ 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f,
+ 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67,
+ 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x37, 0x5a,
+ 0x35, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x75, 0x63, 0x74,
+ 0x6f, 0x6e, 0x65, 0x2f, 0x63, 0x31, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31,
+ 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61,
+ 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
var (
file_c1_connectorapi_baton_v1_baton_proto_rawDescOnce sync.Once
- file_c1_connectorapi_baton_v1_baton_proto_rawDescData = file_c1_connectorapi_baton_v1_baton_proto_rawDesc
+ file_c1_connectorapi_baton_v1_baton_proto_rawDescData []byte
)
func file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP() []byte {
file_c1_connectorapi_baton_v1_baton_proto_rawDescOnce.Do(func() {
- file_c1_connectorapi_baton_v1_baton_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_connectorapi_baton_v1_baton_proto_rawDescData)
+ file_c1_connectorapi_baton_v1_baton_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connectorapi_baton_v1_baton_proto_rawDesc), len(file_c1_connectorapi_baton_v1_baton_proto_rawDesc)))
})
return file_c1_connectorapi_baton_v1_baton_proto_rawDescData
}
var file_c1_connectorapi_baton_v1_baton_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_c1_connectorapi_baton_v1_baton_proto_msgTypes = make([]protoimpl.MessageInfo, 35)
-var file_c1_connectorapi_baton_v1_baton_proto_goTypes = []interface{}{
+var file_c1_connectorapi_baton_v1_baton_proto_msgTypes = make([]protoimpl.MessageInfo, 39)
+var file_c1_connectorapi_baton_v1_baton_proto_goTypes = []any{
(Task_Status)(0), // 0: c1.connectorapi.baton.v1.Task.Status
(*Task)(nil), // 1: c1.connectorapi.baton.v1.Task
(*BatonServiceHelloRequest)(nil), // 2: c1.connectorapi.baton.v1.BatonServiceHelloRequest
@@ -2935,27 +3205,32 @@ var file_c1_connectorapi_baton_v1_baton_proto_goTypes = []interface{}{
(*Task_BulkGetTicketsTask)(nil), // 26: c1.connectorapi.baton.v1.Task.BulkGetTicketsTask
(*Task_ListTicketSchemasTask)(nil), // 27: c1.connectorapi.baton.v1.Task.ListTicketSchemasTask
(*Task_GetTicketTask)(nil), // 28: c1.connectorapi.baton.v1.Task.GetTicketTask
- (*BatonServiceHelloRequest_BuildInfo)(nil), // 29: c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo
- (*BatonServiceHelloRequest_OSInfo)(nil), // 30: c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo
- (*BatonServiceUploadAssetRequest_UploadMetadata)(nil), // 31: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata
- (*BatonServiceUploadAssetRequest_UploadData)(nil), // 32: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData
- (*BatonServiceUploadAssetRequest_UploadEOF)(nil), // 33: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF
- (*BatonServiceFinishTaskRequest_Error)(nil), // 34: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error
- (*BatonServiceFinishTaskRequest_Success)(nil), // 35: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success
- (*v2.ConnectorMetadata)(nil), // 36: c1.connector.v2.ConnectorMetadata
- (*anypb.Any)(nil), // 37: google.protobuf.Any
- (*durationpb.Duration)(nil), // 38: google.protobuf.Duration
- (*status.Status)(nil), // 39: google.rpc.Status
- (*timestamppb.Timestamp)(nil), // 40: google.protobuf.Timestamp
- (*v2.Entitlement)(nil), // 41: c1.connector.v2.Entitlement
- (*v2.Resource)(nil), // 42: c1.connector.v2.Resource
- (*v2.Grant)(nil), // 43: c1.connector.v2.Grant
- (*v2.AccountInfo)(nil), // 44: c1.connector.v2.AccountInfo
- (*v2.CredentialOptions)(nil), // 45: c1.connector.v2.CredentialOptions
- (*v2.EncryptionConfig)(nil), // 46: c1.connector.v2.EncryptionConfig
- (*v2.ResourceId)(nil), // 47: c1.connector.v2.ResourceId
- (*v2.TicketRequest)(nil), // 48: c1.connector.v2.TicketRequest
- (*v2.TicketSchema)(nil), // 49: c1.connector.v2.TicketSchema
+ (*Task_ActionListSchemasTask)(nil), // 29: c1.connectorapi.baton.v1.Task.ActionListSchemasTask
+ (*Task_ActionGetSchemaTask)(nil), // 30: c1.connectorapi.baton.v1.Task.ActionGetSchemaTask
+ (*Task_ActionInvokeTask)(nil), // 31: c1.connectorapi.baton.v1.Task.ActionInvokeTask
+ (*Task_ActionStatusTask)(nil), // 32: c1.connectorapi.baton.v1.Task.ActionStatusTask
+ (*BatonServiceHelloRequest_BuildInfo)(nil), // 33: c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo
+ (*BatonServiceHelloRequest_OSInfo)(nil), // 34: c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo
+ (*BatonServiceUploadAssetRequest_UploadMetadata)(nil), // 35: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata
+ (*BatonServiceUploadAssetRequest_UploadData)(nil), // 36: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData
+ (*BatonServiceUploadAssetRequest_UploadEOF)(nil), // 37: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF
+ (*BatonServiceFinishTaskRequest_Error)(nil), // 38: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error
+ (*BatonServiceFinishTaskRequest_Success)(nil), // 39: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success
+ (*v2.ConnectorMetadata)(nil), // 40: c1.connector.v2.ConnectorMetadata
+ (*anypb.Any)(nil), // 41: google.protobuf.Any
+ (*durationpb.Duration)(nil), // 42: google.protobuf.Duration
+ (*status.Status)(nil), // 43: google.rpc.Status
+ (*timestamppb.Timestamp)(nil), // 44: google.protobuf.Timestamp
+ (*v2.Entitlement)(nil), // 45: c1.connector.v2.Entitlement
+ (*v2.Resource)(nil), // 46: c1.connector.v2.Resource
+ (*v2.Grant)(nil), // 47: c1.connector.v2.Grant
+ (*v2.AccountInfo)(nil), // 48: c1.connector.v2.AccountInfo
+ (*v2.CredentialOptions)(nil), // 49: c1.connector.v2.CredentialOptions
+ (*v2.EncryptionConfig)(nil), // 50: c1.connector.v2.EncryptionConfig
+ (*v2.ResourceId)(nil), // 51: c1.connector.v2.ResourceId
+ (*v2.TicketRequest)(nil), // 52: c1.connector.v2.TicketRequest
+ (*v2.TicketSchema)(nil), // 53: c1.connector.v2.TicketSchema
+ (*structpb.Struct)(nil), // 54: google.protobuf.Struct
}
var file_c1_connectorapi_baton_v1_baton_proto_depIdxs = []int32{
0, // 0: c1.connectorapi.baton.v1.Task.status:type_name -> c1.connectorapi.baton.v1.Task.Status
@@ -2974,75 +3249,84 @@ var file_c1_connectorapi_baton_v1_baton_proto_depIdxs = []int32{
28, // 13: c1.connectorapi.baton.v1.Task.get_ticket:type_name -> c1.connectorapi.baton.v1.Task.GetTicketTask
25, // 14: c1.connectorapi.baton.v1.Task.bulk_create_tickets:type_name -> c1.connectorapi.baton.v1.Task.BulkCreateTicketsTask
26, // 15: c1.connectorapi.baton.v1.Task.bulk_get_tickets:type_name -> c1.connectorapi.baton.v1.Task.BulkGetTicketsTask
- 29, // 16: c1.connectorapi.baton.v1.BatonServiceHelloRequest.build_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo
- 30, // 17: c1.connectorapi.baton.v1.BatonServiceHelloRequest.os_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo
- 36, // 18: c1.connectorapi.baton.v1.BatonServiceHelloRequest.connector_metadata:type_name -> c1.connector.v2.ConnectorMetadata
- 37, // 19: c1.connectorapi.baton.v1.BatonServiceHelloRequest.annotations:type_name -> google.protobuf.Any
- 37, // 20: c1.connectorapi.baton.v1.BatonServiceHelloResponse.annotations:type_name -> google.protobuf.Any
- 1, // 21: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.task:type_name -> c1.connectorapi.baton.v1.Task
- 38, // 22: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_poll:type_name -> google.protobuf.Duration
- 38, // 23: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_heartbeat:type_name -> google.protobuf.Duration
- 37, // 24: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.annotations:type_name -> google.protobuf.Any
- 37, // 25: c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest.annotations:type_name -> google.protobuf.Any
- 38, // 26: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.next_heartbeat:type_name -> google.protobuf.Duration
- 37, // 27: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.annotations:type_name -> google.protobuf.Any
- 31, // 28: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.metadata:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata
- 32, // 29: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.data:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData
- 33, // 30: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.eof:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF
- 37, // 31: c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse.annotations:type_name -> google.protobuf.Any
- 39, // 32: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.status:type_name -> google.rpc.Status
- 34, // 33: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.error:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error
- 35, // 34: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.success:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success
- 37, // 35: c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse.annotations:type_name -> google.protobuf.Any
- 37, // 36: c1.connectorapi.baton.v1.Task.NoneTask.annotations:type_name -> google.protobuf.Any
- 37, // 37: c1.connectorapi.baton.v1.Task.HelloTask.annotations:type_name -> google.protobuf.Any
- 37, // 38: c1.connectorapi.baton.v1.Task.SyncFullTask.annotations:type_name -> google.protobuf.Any
- 37, // 39: c1.connectorapi.baton.v1.Task.EventFeedTask.annotations:type_name -> google.protobuf.Any
- 40, // 40: c1.connectorapi.baton.v1.Task.EventFeedTask.start_at:type_name -> google.protobuf.Timestamp
- 41, // 41: c1.connectorapi.baton.v1.Task.GrantTask.entitlement:type_name -> c1.connector.v2.Entitlement
- 42, // 42: c1.connectorapi.baton.v1.Task.GrantTask.principal:type_name -> c1.connector.v2.Resource
- 37, // 43: c1.connectorapi.baton.v1.Task.GrantTask.annotations:type_name -> google.protobuf.Any
- 38, // 44: c1.connectorapi.baton.v1.Task.GrantTask.duration:type_name -> google.protobuf.Duration
- 43, // 45: c1.connectorapi.baton.v1.Task.RevokeTask.grant:type_name -> c1.connector.v2.Grant
- 37, // 46: c1.connectorapi.baton.v1.Task.RevokeTask.annotations:type_name -> google.protobuf.Any
- 44, // 47: c1.connectorapi.baton.v1.Task.CreateAccountTask.account_info:type_name -> c1.connector.v2.AccountInfo
- 45, // 48: c1.connectorapi.baton.v1.Task.CreateAccountTask.credential_options:type_name -> c1.connector.v2.CredentialOptions
- 46, // 49: c1.connectorapi.baton.v1.Task.CreateAccountTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
- 42, // 50: c1.connectorapi.baton.v1.Task.CreateResourceTask.resource:type_name -> c1.connector.v2.Resource
- 47, // 51: c1.connectorapi.baton.v1.Task.DeleteResourceTask.resource_id:type_name -> c1.connector.v2.ResourceId
- 47, // 52: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.resource_id:type_name -> c1.connector.v2.ResourceId
- 45, // 53: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.credential_options:type_name -> c1.connector.v2.CredentialOptions
- 46, // 54: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
- 48, // 55: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_request:type_name -> c1.connector.v2.TicketRequest
- 49, // 56: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_schema:type_name -> c1.connector.v2.TicketSchema
- 37, // 57: c1.connectorapi.baton.v1.Task.CreateTicketTask.annotations:type_name -> google.protobuf.Any
- 24, // 58: c1.connectorapi.baton.v1.Task.BulkCreateTicketsTask.ticket_requests:type_name -> c1.connectorapi.baton.v1.Task.CreateTicketTask
- 28, // 59: c1.connectorapi.baton.v1.Task.BulkGetTicketsTask.ticket_requests:type_name -> c1.connectorapi.baton.v1.Task.GetTicketTask
- 37, // 60: c1.connectorapi.baton.v1.Task.ListTicketSchemasTask.annotations:type_name -> google.protobuf.Any
- 37, // 61: c1.connectorapi.baton.v1.Task.GetTicketTask.annotations:type_name -> google.protobuf.Any
- 37, // 62: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata.annotations:type_name -> google.protobuf.Any
- 37, // 63: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF.annotations:type_name -> google.protobuf.Any
- 37, // 64: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.annotations:type_name -> google.protobuf.Any
- 37, // 65: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.response:type_name -> google.protobuf.Any
- 37, // 66: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.annotations:type_name -> google.protobuf.Any
- 37, // 67: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.response:type_name -> google.protobuf.Any
- 2, // 68: c1.connectorapi.baton.v1.BatonService.Hello:input_type -> c1.connectorapi.baton.v1.BatonServiceHelloRequest
- 4, // 69: c1.connectorapi.baton.v1.BatonService.GetTask:input_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskRequest
- 6, // 70: c1.connectorapi.baton.v1.BatonService.Heartbeat:input_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest
- 10, // 71: c1.connectorapi.baton.v1.BatonService.FinishTask:input_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest
- 8, // 72: c1.connectorapi.baton.v1.BatonService.UploadAsset:input_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest
- 12, // 73: c1.connectorapi.baton.v1.BatonService.StartDebugging:input_type -> c1.connectorapi.baton.v1.StartDebuggingRequest
- 3, // 74: c1.connectorapi.baton.v1.BatonService.Hello:output_type -> c1.connectorapi.baton.v1.BatonServiceHelloResponse
- 5, // 75: c1.connectorapi.baton.v1.BatonService.GetTask:output_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskResponse
- 7, // 76: c1.connectorapi.baton.v1.BatonService.Heartbeat:output_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse
- 11, // 77: c1.connectorapi.baton.v1.BatonService.FinishTask:output_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse
- 9, // 78: c1.connectorapi.baton.v1.BatonService.UploadAsset:output_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse
- 13, // 79: c1.connectorapi.baton.v1.BatonService.StartDebugging:output_type -> c1.connectorapi.baton.v1.StartDebuggingResponse
- 74, // [74:80] is the sub-list for method output_type
- 68, // [68:74] is the sub-list for method input_type
- 68, // [68:68] is the sub-list for extension type_name
- 68, // [68:68] is the sub-list for extension extendee
- 0, // [0:68] is the sub-list for field type_name
+ 29, // 16: c1.connectorapi.baton.v1.Task.action_list_schemas:type_name -> c1.connectorapi.baton.v1.Task.ActionListSchemasTask
+ 30, // 17: c1.connectorapi.baton.v1.Task.action_get_schema:type_name -> c1.connectorapi.baton.v1.Task.ActionGetSchemaTask
+ 31, // 18: c1.connectorapi.baton.v1.Task.action_invoke:type_name -> c1.connectorapi.baton.v1.Task.ActionInvokeTask
+ 32, // 19: c1.connectorapi.baton.v1.Task.action_status:type_name -> c1.connectorapi.baton.v1.Task.ActionStatusTask
+ 33, // 20: c1.connectorapi.baton.v1.BatonServiceHelloRequest.build_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo
+ 34, // 21: c1.connectorapi.baton.v1.BatonServiceHelloRequest.os_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo
+ 40, // 22: c1.connectorapi.baton.v1.BatonServiceHelloRequest.connector_metadata:type_name -> c1.connector.v2.ConnectorMetadata
+ 41, // 23: c1.connectorapi.baton.v1.BatonServiceHelloRequest.annotations:type_name -> google.protobuf.Any
+ 41, // 24: c1.connectorapi.baton.v1.BatonServiceHelloResponse.annotations:type_name -> google.protobuf.Any
+ 1, // 25: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.task:type_name -> c1.connectorapi.baton.v1.Task
+ 42, // 26: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_poll:type_name -> google.protobuf.Duration
+ 42, // 27: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_heartbeat:type_name -> google.protobuf.Duration
+ 41, // 28: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.annotations:type_name -> google.protobuf.Any
+ 41, // 29: c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest.annotations:type_name -> google.protobuf.Any
+ 42, // 30: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.next_heartbeat:type_name -> google.protobuf.Duration
+ 41, // 31: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.annotations:type_name -> google.protobuf.Any
+ 35, // 32: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.metadata:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata
+ 36, // 33: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.data:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData
+ 37, // 34: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.eof:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF
+ 41, // 35: c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse.annotations:type_name -> google.protobuf.Any
+ 43, // 36: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.status:type_name -> google.rpc.Status
+ 38, // 37: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.error:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error
+ 39, // 38: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.success:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success
+ 41, // 39: c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse.annotations:type_name -> google.protobuf.Any
+ 41, // 40: c1.connectorapi.baton.v1.Task.NoneTask.annotations:type_name -> google.protobuf.Any
+ 41, // 41: c1.connectorapi.baton.v1.Task.HelloTask.annotations:type_name -> google.protobuf.Any
+ 41, // 42: c1.connectorapi.baton.v1.Task.SyncFullTask.annotations:type_name -> google.protobuf.Any
+ 41, // 43: c1.connectorapi.baton.v1.Task.EventFeedTask.annotations:type_name -> google.protobuf.Any
+ 44, // 44: c1.connectorapi.baton.v1.Task.EventFeedTask.start_at:type_name -> google.protobuf.Timestamp
+ 45, // 45: c1.connectorapi.baton.v1.Task.GrantTask.entitlement:type_name -> c1.connector.v2.Entitlement
+ 46, // 46: c1.connectorapi.baton.v1.Task.GrantTask.principal:type_name -> c1.connector.v2.Resource
+ 41, // 47: c1.connectorapi.baton.v1.Task.GrantTask.annotations:type_name -> google.protobuf.Any
+ 42, // 48: c1.connectorapi.baton.v1.Task.GrantTask.duration:type_name -> google.protobuf.Duration
+ 47, // 49: c1.connectorapi.baton.v1.Task.RevokeTask.grant:type_name -> c1.connector.v2.Grant
+ 41, // 50: c1.connectorapi.baton.v1.Task.RevokeTask.annotations:type_name -> google.protobuf.Any
+ 48, // 51: c1.connectorapi.baton.v1.Task.CreateAccountTask.account_info:type_name -> c1.connector.v2.AccountInfo
+ 49, // 52: c1.connectorapi.baton.v1.Task.CreateAccountTask.credential_options:type_name -> c1.connector.v2.CredentialOptions
+ 50, // 53: c1.connectorapi.baton.v1.Task.CreateAccountTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
+ 46, // 54: c1.connectorapi.baton.v1.Task.CreateResourceTask.resource:type_name -> c1.connector.v2.Resource
+ 51, // 55: c1.connectorapi.baton.v1.Task.DeleteResourceTask.resource_id:type_name -> c1.connector.v2.ResourceId
+ 51, // 56: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.resource_id:type_name -> c1.connector.v2.ResourceId
+ 49, // 57: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.credential_options:type_name -> c1.connector.v2.CredentialOptions
+ 50, // 58: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig
+ 52, // 59: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_request:type_name -> c1.connector.v2.TicketRequest
+ 53, // 60: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_schema:type_name -> c1.connector.v2.TicketSchema
+ 41, // 61: c1.connectorapi.baton.v1.Task.CreateTicketTask.annotations:type_name -> google.protobuf.Any
+ 24, // 62: c1.connectorapi.baton.v1.Task.BulkCreateTicketsTask.ticket_requests:type_name -> c1.connectorapi.baton.v1.Task.CreateTicketTask
+ 28, // 63: c1.connectorapi.baton.v1.Task.BulkGetTicketsTask.ticket_requests:type_name -> c1.connectorapi.baton.v1.Task.GetTicketTask
+ 41, // 64: c1.connectorapi.baton.v1.Task.ListTicketSchemasTask.annotations:type_name -> google.protobuf.Any
+ 41, // 65: c1.connectorapi.baton.v1.Task.GetTicketTask.annotations:type_name -> google.protobuf.Any
+ 41, // 66: c1.connectorapi.baton.v1.Task.ActionListSchemasTask.annotations:type_name -> google.protobuf.Any
+ 41, // 67: c1.connectorapi.baton.v1.Task.ActionGetSchemaTask.annotations:type_name -> google.protobuf.Any
+ 54, // 68: c1.connectorapi.baton.v1.Task.ActionInvokeTask.args:type_name -> google.protobuf.Struct
+ 41, // 69: c1.connectorapi.baton.v1.Task.ActionInvokeTask.annotations:type_name -> google.protobuf.Any
+ 41, // 70: c1.connectorapi.baton.v1.Task.ActionStatusTask.annotations:type_name -> google.protobuf.Any
+ 41, // 71: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata.annotations:type_name -> google.protobuf.Any
+ 41, // 72: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF.annotations:type_name -> google.protobuf.Any
+ 41, // 73: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.annotations:type_name -> google.protobuf.Any
+ 41, // 74: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.response:type_name -> google.protobuf.Any
+ 41, // 75: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.annotations:type_name -> google.protobuf.Any
+ 41, // 76: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.response:type_name -> google.protobuf.Any
+ 2, // 77: c1.connectorapi.baton.v1.BatonService.Hello:input_type -> c1.connectorapi.baton.v1.BatonServiceHelloRequest
+ 4, // 78: c1.connectorapi.baton.v1.BatonService.GetTask:input_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskRequest
+ 6, // 79: c1.connectorapi.baton.v1.BatonService.Heartbeat:input_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest
+ 10, // 80: c1.connectorapi.baton.v1.BatonService.FinishTask:input_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest
+ 8, // 81: c1.connectorapi.baton.v1.BatonService.UploadAsset:input_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest
+ 12, // 82: c1.connectorapi.baton.v1.BatonService.StartDebugging:input_type -> c1.connectorapi.baton.v1.StartDebuggingRequest
+ 3, // 83: c1.connectorapi.baton.v1.BatonService.Hello:output_type -> c1.connectorapi.baton.v1.BatonServiceHelloResponse
+ 5, // 84: c1.connectorapi.baton.v1.BatonService.GetTask:output_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskResponse
+ 7, // 85: c1.connectorapi.baton.v1.BatonService.Heartbeat:output_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse
+ 11, // 86: c1.connectorapi.baton.v1.BatonService.FinishTask:output_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse
+ 9, // 87: c1.connectorapi.baton.v1.BatonService.UploadAsset:output_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse
+ 13, // 88: c1.connectorapi.baton.v1.BatonService.StartDebugging:output_type -> c1.connectorapi.baton.v1.StartDebuggingResponse
+ 83, // [83:89] is the sub-list for method output_type
+ 77, // [77:83] is the sub-list for method input_type
+ 77, // [77:77] is the sub-list for extension type_name
+ 77, // [77:77] is the sub-list for extension extendee
+ 0, // [0:77] is the sub-list for field type_name
}
func init() { file_c1_connectorapi_baton_v1_baton_proto_init() }
@@ -3050,429 +3334,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
if File_c1_connectorapi_baton_v1_baton_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceHelloRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceHelloResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceGetTaskRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceGetTaskResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceHeartbeatRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceHeartbeatResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceUploadAssetRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceUploadAssetResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceFinishTaskRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceFinishTaskResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*StartDebuggingRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*StartDebuggingResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_NoneTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_HelloTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_SyncFullTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_EventFeedTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_GrantTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_RevokeTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_CreateAccountTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_CreateResourceTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_DeleteResourceTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_RotateCredentialsTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_CreateTicketTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_BulkCreateTicketsTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_BulkGetTicketsTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_ListTicketSchemasTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Task_GetTicketTask); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceHelloRequest_BuildInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceHelloRequest_OSInfo); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceUploadAssetRequest_UploadMetadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceUploadAssetRequest_UploadData); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceUploadAssetRequest_UploadEOF); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceFinishTaskRequest_Error); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*BatonServiceFinishTaskRequest_Success); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[0].OneofWrappers = []interface{}{
+ file_c1_connectorapi_baton_v1_baton_proto_msgTypes[0].OneofWrappers = []any{
(*Task_None)(nil),
(*Task_Hello)(nil),
(*Task_SyncFull)(nil),
@@ -3488,13 +3350,17 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
(*Task_GetTicket)(nil),
(*Task_BulkCreateTickets)(nil),
(*Task_BulkGetTickets)(nil),
+ (*Task_ActionListSchemas)(nil),
+ (*Task_ActionGetSchema)(nil),
+ (*Task_ActionInvoke)(nil),
+ (*Task_ActionStatus)(nil),
}
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[7].OneofWrappers = []interface{}{
+ file_c1_connectorapi_baton_v1_baton_proto_msgTypes[7].OneofWrappers = []any{
(*BatonServiceUploadAssetRequest_Metadata)(nil),
(*BatonServiceUploadAssetRequest_Data)(nil),
(*BatonServiceUploadAssetRequest_Eof)(nil),
}
- file_c1_connectorapi_baton_v1_baton_proto_msgTypes[9].OneofWrappers = []interface{}{
+ file_c1_connectorapi_baton_v1_baton_proto_msgTypes[9].OneofWrappers = []any{
(*BatonServiceFinishTaskRequest_Error_)(nil),
(*BatonServiceFinishTaskRequest_Success_)(nil),
}
@@ -3502,9 +3368,9 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_connectorapi_baton_v1_baton_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connectorapi_baton_v1_baton_proto_rawDesc), len(file_c1_connectorapi_baton_v1_baton_proto_rawDesc)),
NumEnums: 1,
- NumMessages: 35,
+ NumMessages: 39,
NumExtensions: 0,
NumServices: 1,
},
@@ -3514,7 +3380,6 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() {
MessageInfos: file_c1_connectorapi_baton_v1_baton_proto_msgTypes,
}.Build()
File_c1_connectorapi_baton_v1_baton_proto = out.File
- file_c1_connectorapi_baton_v1_baton_proto_rawDesc = nil
file_c1_connectorapi_baton_v1_baton_proto_goTypes = nil
file_c1_connectorapi_baton_v1_baton_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go
index ea260418..da7fa9c8 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go
@@ -678,6 +678,170 @@ func (m *Task) validate(all bool) error {
}
}
+ case *Task_ActionListSchemas:
+ if v == nil {
+ err := TaskValidationError{
+ field: "TaskType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetActionListSchemas()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "ActionListSchemas",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "ActionListSchemas",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetActionListSchemas()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TaskValidationError{
+ field: "ActionListSchemas",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Task_ActionGetSchema:
+ if v == nil {
+ err := TaskValidationError{
+ field: "TaskType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetActionGetSchema()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "ActionGetSchema",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "ActionGetSchema",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetActionGetSchema()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TaskValidationError{
+ field: "ActionGetSchema",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Task_ActionInvoke:
+ if v == nil {
+ err := TaskValidationError{
+ field: "TaskType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetActionInvoke()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "ActionInvoke",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "ActionInvoke",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetActionInvoke()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TaskValidationError{
+ field: "ActionInvoke",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Task_ActionStatus:
+ if v == nil {
+ err := TaskValidationError{
+ field: "TaskType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetActionStatus()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "ActionStatus",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TaskValidationError{
+ field: "ActionStatus",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetActionStatus()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TaskValidationError{
+ field: "ActionStatus",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
default:
_ = v // ensures v is used
}
@@ -695,7 +859,7 @@ type TaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m TaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -982,7 +1146,7 @@ type BatonServiceHelloRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceHelloRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1120,7 +1284,7 @@ type BatonServiceHelloResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceHelloResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1233,7 +1397,7 @@ type BatonServiceGetTaskRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceGetTaskRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1456,7 +1620,7 @@ type BatonServiceGetTaskResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceGetTaskResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1626,7 +1790,7 @@ type BatonServiceHeartbeatRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceHeartbeatRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1796,7 +1960,7 @@ type BatonServiceHeartbeatResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceHeartbeatResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2041,7 +2205,7 @@ type BatonServiceUploadAssetRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceUploadAssetRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2178,7 +2342,7 @@ type BatonServiceUploadAssetResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceUploadAssetResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2432,7 +2596,7 @@ type BatonServiceFinishTaskRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceFinishTaskRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2571,7 +2735,7 @@ type BatonServiceFinishTaskResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceFinishTaskResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2674,7 +2838,7 @@ type StartDebuggingRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m StartDebuggingRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2778,7 +2942,7 @@ type StartDebuggingResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m StartDebuggingResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -2914,7 +3078,7 @@ type Task_NoneTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_NoneTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3048,7 +3212,7 @@ type Task_HelloTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_HelloTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3182,7 +3346,7 @@ type Task_SyncFullTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_SyncFullTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3347,7 +3511,7 @@ type Task_EventFeedTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_EventFeedTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3570,7 +3734,7 @@ type Task_GrantTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_GrantTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3733,7 +3897,7 @@ type Task_RevokeTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_RevokeTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -3925,7 +4089,7 @@ type Task_CreateAccountTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_CreateAccountTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4056,7 +4220,7 @@ type Task_CreateResourceTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_CreateResourceTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4187,7 +4351,7 @@ type Task_DeleteResourceTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_DeleteResourceTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4381,7 +4545,7 @@ type Task_RotateCredentialsTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_RotateCredentialsTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4575,7 +4739,7 @@ type Task_CreateTicketTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_CreateTicketTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4711,7 +4875,7 @@ type Task_BulkCreateTicketsTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_BulkCreateTicketsTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4847,7 +5011,7 @@ type Task_BulkGetTicketsTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_BulkGetTicketsTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -4983,7 +5147,7 @@ type Task_ListTicketSchemasTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_ListTicketSchemasTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -5121,7 +5285,7 @@ type Task_GetTicketTaskMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m Task_GetTicketTaskMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -5187,6 +5351,587 @@ var _ interface {
ErrorName() string
} = Task_GetTicketTaskValidationError{}
+// Validate checks the field values on Task_ActionListSchemasTask with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Task_ActionListSchemasTask) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Task_ActionListSchemasTask with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Task_ActionListSchemasTaskMultiError, or nil if none found.
+func (m *Task_ActionListSchemasTask) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Task_ActionListSchemasTask) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Task_ActionListSchemasTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Task_ActionListSchemasTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Task_ActionListSchemasTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return Task_ActionListSchemasTaskMultiError(errors)
+ }
+
+ return nil
+}
+
+// Task_ActionListSchemasTaskMultiError is an error wrapping multiple
+// validation errors returned by Task_ActionListSchemasTask.ValidateAll() if
+// the designated constraints aren't met.
+type Task_ActionListSchemasTaskMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Task_ActionListSchemasTaskMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Task_ActionListSchemasTaskMultiError) AllErrors() []error { return m }
+
+// Task_ActionListSchemasTaskValidationError is the validation error returned
+// by Task_ActionListSchemasTask.Validate if the designated constraints aren't met.
+type Task_ActionListSchemasTaskValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Task_ActionListSchemasTaskValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Task_ActionListSchemasTaskValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Task_ActionListSchemasTaskValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Task_ActionListSchemasTaskValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Task_ActionListSchemasTaskValidationError) ErrorName() string {
+ return "Task_ActionListSchemasTaskValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Task_ActionListSchemasTaskValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTask_ActionListSchemasTask.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Task_ActionListSchemasTaskValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Task_ActionListSchemasTaskValidationError{}
+
+// Validate checks the field values on Task_ActionGetSchemaTask with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Task_ActionGetSchemaTask) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Task_ActionGetSchemaTask with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Task_ActionGetSchemaTaskMultiError, or nil if none found.
+func (m *Task_ActionGetSchemaTask) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Task_ActionGetSchemaTask) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Task_ActionGetSchemaTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Task_ActionGetSchemaTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Task_ActionGetSchemaTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return Task_ActionGetSchemaTaskMultiError(errors)
+ }
+
+ return nil
+}
+
+// Task_ActionGetSchemaTaskMultiError is an error wrapping multiple validation
+// errors returned by Task_ActionGetSchemaTask.ValidateAll() if the designated
+// constraints aren't met.
+type Task_ActionGetSchemaTaskMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Task_ActionGetSchemaTaskMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Task_ActionGetSchemaTaskMultiError) AllErrors() []error { return m }
+
+// Task_ActionGetSchemaTaskValidationError is the validation error returned by
+// Task_ActionGetSchemaTask.Validate if the designated constraints aren't met.
+type Task_ActionGetSchemaTaskValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Task_ActionGetSchemaTaskValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Task_ActionGetSchemaTaskValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Task_ActionGetSchemaTaskValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Task_ActionGetSchemaTaskValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Task_ActionGetSchemaTaskValidationError) ErrorName() string {
+ return "Task_ActionGetSchemaTaskValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Task_ActionGetSchemaTaskValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTask_ActionGetSchemaTask.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Task_ActionGetSchemaTaskValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Task_ActionGetSchemaTaskValidationError{}
+
+// Validate checks the field values on Task_ActionInvokeTask with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Task_ActionInvokeTask) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Task_ActionInvokeTask with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Task_ActionInvokeTaskMultiError, or nil if none found.
+func (m *Task_ActionInvokeTask) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Task_ActionInvokeTask) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ if all {
+ switch v := interface{}(m.GetArgs()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Task_ActionInvokeTaskValidationError{
+ field: "Args",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Task_ActionInvokeTaskValidationError{
+ field: "Args",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetArgs()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Task_ActionInvokeTaskValidationError{
+ field: "Args",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Task_ActionInvokeTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Task_ActionInvokeTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Task_ActionInvokeTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return Task_ActionInvokeTaskMultiError(errors)
+ }
+
+ return nil
+}
+
+// Task_ActionInvokeTaskMultiError is an error wrapping multiple validation
+// errors returned by Task_ActionInvokeTask.ValidateAll() if the designated
+// constraints aren't met.
+type Task_ActionInvokeTaskMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Task_ActionInvokeTaskMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Task_ActionInvokeTaskMultiError) AllErrors() []error { return m }
+
+// Task_ActionInvokeTaskValidationError is the validation error returned by
+// Task_ActionInvokeTask.Validate if the designated constraints aren't met.
+type Task_ActionInvokeTaskValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Task_ActionInvokeTaskValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Task_ActionInvokeTaskValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Task_ActionInvokeTaskValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Task_ActionInvokeTaskValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Task_ActionInvokeTaskValidationError) ErrorName() string {
+ return "Task_ActionInvokeTaskValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Task_ActionInvokeTaskValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTask_ActionInvokeTask.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Task_ActionInvokeTaskValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Task_ActionInvokeTaskValidationError{}
+
+// Validate checks the field values on Task_ActionStatusTask with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Task_ActionStatusTask) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Task_ActionStatusTask with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Task_ActionStatusTaskMultiError, or nil if none found.
+func (m *Task_ActionStatusTask) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Task_ActionStatusTask) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Id
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Task_ActionStatusTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Task_ActionStatusTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Task_ActionStatusTaskValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return Task_ActionStatusTaskMultiError(errors)
+ }
+
+ return nil
+}
+
+// Task_ActionStatusTaskMultiError is an error wrapping multiple validation
+// errors returned by Task_ActionStatusTask.ValidateAll() if the designated
+// constraints aren't met.
+type Task_ActionStatusTaskMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Task_ActionStatusTaskMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Task_ActionStatusTaskMultiError) AllErrors() []error { return m }
+
+// Task_ActionStatusTaskValidationError is the validation error returned by
+// Task_ActionStatusTask.Validate if the designated constraints aren't met.
+type Task_ActionStatusTaskValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Task_ActionStatusTaskValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Task_ActionStatusTaskValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Task_ActionStatusTaskValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Task_ActionStatusTaskValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Task_ActionStatusTaskValidationError) ErrorName() string {
+ return "Task_ActionStatusTaskValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Task_ActionStatusTaskValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTask_ActionStatusTask.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Task_ActionStatusTaskValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Task_ActionStatusTaskValidationError{}
+
// Validate checks the field values on BatonServiceHelloRequest_BuildInfo with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
@@ -5258,7 +6003,7 @@ type BatonServiceHelloRequest_BuildInfoMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceHelloRequest_BuildInfoMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -5449,7 +6194,7 @@ type BatonServiceHelloRequest_OSInfoMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceHelloRequest_OSInfoMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -5622,7 +6367,7 @@ type BatonServiceUploadAssetRequest_UploadMetadataMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceUploadAssetRequest_UploadMetadataMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -5744,7 +6489,7 @@ type BatonServiceUploadAssetRequest_UploadDataMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceUploadAssetRequest_UploadDataMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -5906,7 +6651,7 @@ type BatonServiceUploadAssetRequest_UploadEOFMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceUploadAssetRequest_UploadEOFMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -6087,7 +6832,7 @@ type BatonServiceFinishTaskRequest_ErrorMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceFinishTaskRequest_ErrorMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -6266,7 +7011,7 @@ type BatonServiceFinishTaskRequest_SuccessMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m BatonServiceFinishTaskRequest_SuccessMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton_grpc.pb.go
index 3529de4f..a1cf60df 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/connectorapi/baton/v1/baton.proto
@@ -15,8 +15,17 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ BatonService_Hello_FullMethodName = "/c1.connectorapi.baton.v1.BatonService/Hello"
+ BatonService_GetTask_FullMethodName = "/c1.connectorapi.baton.v1.BatonService/GetTask"
+ BatonService_Heartbeat_FullMethodName = "/c1.connectorapi.baton.v1.BatonService/Heartbeat"
+ BatonService_FinishTask_FullMethodName = "/c1.connectorapi.baton.v1.BatonService/FinishTask"
+ BatonService_UploadAsset_FullMethodName = "/c1.connectorapi.baton.v1.BatonService/UploadAsset"
+ BatonService_StartDebugging_FullMethodName = "/c1.connectorapi.baton.v1.BatonService/StartDebugging"
+)
// BatonServiceClient is the client API for BatonService service.
//
@@ -26,7 +35,7 @@ type BatonServiceClient interface {
GetTask(ctx context.Context, in *BatonServiceGetTaskRequest, opts ...grpc.CallOption) (*BatonServiceGetTaskResponse, error)
Heartbeat(ctx context.Context, in *BatonServiceHeartbeatRequest, opts ...grpc.CallOption) (*BatonServiceHeartbeatResponse, error)
FinishTask(ctx context.Context, in *BatonServiceFinishTaskRequest, opts ...grpc.CallOption) (*BatonServiceFinishTaskResponse, error)
- UploadAsset(ctx context.Context, opts ...grpc.CallOption) (BatonService_UploadAssetClient, error)
+ UploadAsset(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[BatonServiceUploadAssetRequest, BatonServiceUploadAssetResponse], error)
StartDebugging(ctx context.Context, in *StartDebuggingRequest, opts ...grpc.CallOption) (*StartDebuggingResponse, error)
}
@@ -39,8 +48,9 @@ func NewBatonServiceClient(cc grpc.ClientConnInterface) BatonServiceClient {
}
func (c *batonServiceClient) Hello(ctx context.Context, in *BatonServiceHelloRequest, opts ...grpc.CallOption) (*BatonServiceHelloResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(BatonServiceHelloResponse)
- err := c.cc.Invoke(ctx, "/c1.connectorapi.baton.v1.BatonService/Hello", in, out, opts...)
+ err := c.cc.Invoke(ctx, BatonService_Hello_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -48,8 +58,9 @@ func (c *batonServiceClient) Hello(ctx context.Context, in *BatonServiceHelloReq
}
func (c *batonServiceClient) GetTask(ctx context.Context, in *BatonServiceGetTaskRequest, opts ...grpc.CallOption) (*BatonServiceGetTaskResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(BatonServiceGetTaskResponse)
- err := c.cc.Invoke(ctx, "/c1.connectorapi.baton.v1.BatonService/GetTask", in, out, opts...)
+ err := c.cc.Invoke(ctx, BatonService_GetTask_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -57,8 +68,9 @@ func (c *batonServiceClient) GetTask(ctx context.Context, in *BatonServiceGetTas
}
func (c *batonServiceClient) Heartbeat(ctx context.Context, in *BatonServiceHeartbeatRequest, opts ...grpc.CallOption) (*BatonServiceHeartbeatResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(BatonServiceHeartbeatResponse)
- err := c.cc.Invoke(ctx, "/c1.connectorapi.baton.v1.BatonService/Heartbeat", in, out, opts...)
+ err := c.cc.Invoke(ctx, BatonService_Heartbeat_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -66,51 +78,32 @@ func (c *batonServiceClient) Heartbeat(ctx context.Context, in *BatonServiceHear
}
func (c *batonServiceClient) FinishTask(ctx context.Context, in *BatonServiceFinishTaskRequest, opts ...grpc.CallOption) (*BatonServiceFinishTaskResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(BatonServiceFinishTaskResponse)
- err := c.cc.Invoke(ctx, "/c1.connectorapi.baton.v1.BatonService/FinishTask", in, out, opts...)
+ err := c.cc.Invoke(ctx, BatonService_FinishTask_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *batonServiceClient) UploadAsset(ctx context.Context, opts ...grpc.CallOption) (BatonService_UploadAssetClient, error) {
- stream, err := c.cc.NewStream(ctx, &BatonService_ServiceDesc.Streams[0], "/c1.connectorapi.baton.v1.BatonService/UploadAsset", opts...)
+func (c *batonServiceClient) UploadAsset(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[BatonServiceUploadAssetRequest, BatonServiceUploadAssetResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &BatonService_ServiceDesc.Streams[0], BatonService_UploadAsset_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
- x := &batonServiceUploadAssetClient{stream}
+ x := &grpc.GenericClientStream[BatonServiceUploadAssetRequest, BatonServiceUploadAssetResponse]{ClientStream: stream}
return x, nil
}
-type BatonService_UploadAssetClient interface {
- Send(*BatonServiceUploadAssetRequest) error
- CloseAndRecv() (*BatonServiceUploadAssetResponse, error)
- grpc.ClientStream
-}
-
-type batonServiceUploadAssetClient struct {
- grpc.ClientStream
-}
-
-func (x *batonServiceUploadAssetClient) Send(m *BatonServiceUploadAssetRequest) error {
- return x.ClientStream.SendMsg(m)
-}
-
-func (x *batonServiceUploadAssetClient) CloseAndRecv() (*BatonServiceUploadAssetResponse, error) {
- if err := x.ClientStream.CloseSend(); err != nil {
- return nil, err
- }
- m := new(BatonServiceUploadAssetResponse)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type BatonService_UploadAssetClient = grpc.ClientStreamingClient[BatonServiceUploadAssetRequest, BatonServiceUploadAssetResponse]
func (c *batonServiceClient) StartDebugging(ctx context.Context, in *StartDebuggingRequest, opts ...grpc.CallOption) (*StartDebuggingResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StartDebuggingResponse)
- err := c.cc.Invoke(ctx, "/c1.connectorapi.baton.v1.BatonService/StartDebugging", in, out, opts...)
+ err := c.cc.Invoke(ctx, BatonService_StartDebugging_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -119,19 +112,22 @@ func (c *batonServiceClient) StartDebugging(ctx context.Context, in *StartDebugg
// BatonServiceServer is the server API for BatonService service.
// All implementations should embed UnimplementedBatonServiceServer
-// for forward compatibility
+// for forward compatibility.
type BatonServiceServer interface {
Hello(context.Context, *BatonServiceHelloRequest) (*BatonServiceHelloResponse, error)
GetTask(context.Context, *BatonServiceGetTaskRequest) (*BatonServiceGetTaskResponse, error)
Heartbeat(context.Context, *BatonServiceHeartbeatRequest) (*BatonServiceHeartbeatResponse, error)
FinishTask(context.Context, *BatonServiceFinishTaskRequest) (*BatonServiceFinishTaskResponse, error)
- UploadAsset(BatonService_UploadAssetServer) error
+ UploadAsset(grpc.ClientStreamingServer[BatonServiceUploadAssetRequest, BatonServiceUploadAssetResponse]) error
StartDebugging(context.Context, *StartDebuggingRequest) (*StartDebuggingResponse, error)
}
-// UnimplementedBatonServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedBatonServiceServer struct {
-}
+// UnimplementedBatonServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedBatonServiceServer struct{}
func (UnimplementedBatonServiceServer) Hello(context.Context, *BatonServiceHelloRequest) (*BatonServiceHelloResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Hello not implemented")
@@ -145,12 +141,13 @@ func (UnimplementedBatonServiceServer) Heartbeat(context.Context, *BatonServiceH
func (UnimplementedBatonServiceServer) FinishTask(context.Context, *BatonServiceFinishTaskRequest) (*BatonServiceFinishTaskResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FinishTask not implemented")
}
-func (UnimplementedBatonServiceServer) UploadAsset(BatonService_UploadAssetServer) error {
+func (UnimplementedBatonServiceServer) UploadAsset(grpc.ClientStreamingServer[BatonServiceUploadAssetRequest, BatonServiceUploadAssetResponse]) error {
return status.Errorf(codes.Unimplemented, "method UploadAsset not implemented")
}
func (UnimplementedBatonServiceServer) StartDebugging(context.Context, *StartDebuggingRequest) (*StartDebuggingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method StartDebugging not implemented")
}
+func (UnimplementedBatonServiceServer) testEmbeddedByValue() {}
// UnsafeBatonServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BatonServiceServer will
@@ -160,6 +157,13 @@ type UnsafeBatonServiceServer interface {
}
func RegisterBatonServiceServer(s grpc.ServiceRegistrar, srv BatonServiceServer) {
+ // If the following call pancis, it indicates UnimplementedBatonServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&BatonService_ServiceDesc, srv)
}
@@ -173,7 +177,7 @@ func _BatonService_Hello_Handler(srv interface{}, ctx context.Context, dec func(
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connectorapi.baton.v1.BatonService/Hello",
+ FullMethod: BatonService_Hello_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BatonServiceServer).Hello(ctx, req.(*BatonServiceHelloRequest))
@@ -191,7 +195,7 @@ func _BatonService_GetTask_Handler(srv interface{}, ctx context.Context, dec fun
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connectorapi.baton.v1.BatonService/GetTask",
+ FullMethod: BatonService_GetTask_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BatonServiceServer).GetTask(ctx, req.(*BatonServiceGetTaskRequest))
@@ -209,7 +213,7 @@ func _BatonService_Heartbeat_Handler(srv interface{}, ctx context.Context, dec f
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connectorapi.baton.v1.BatonService/Heartbeat",
+ FullMethod: BatonService_Heartbeat_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BatonServiceServer).Heartbeat(ctx, req.(*BatonServiceHeartbeatRequest))
@@ -227,7 +231,7 @@ func _BatonService_FinishTask_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connectorapi.baton.v1.BatonService/FinishTask",
+ FullMethod: BatonService_FinishTask_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BatonServiceServer).FinishTask(ctx, req.(*BatonServiceFinishTaskRequest))
@@ -236,30 +240,11 @@ func _BatonService_FinishTask_Handler(srv interface{}, ctx context.Context, dec
}
func _BatonService_UploadAsset_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(BatonServiceServer).UploadAsset(&batonServiceUploadAssetServer{stream})
-}
-
-type BatonService_UploadAssetServer interface {
- SendAndClose(*BatonServiceUploadAssetResponse) error
- Recv() (*BatonServiceUploadAssetRequest, error)
- grpc.ServerStream
-}
-
-type batonServiceUploadAssetServer struct {
- grpc.ServerStream
-}
-
-func (x *batonServiceUploadAssetServer) SendAndClose(m *BatonServiceUploadAssetResponse) error {
- return x.ServerStream.SendMsg(m)
+ return srv.(BatonServiceServer).UploadAsset(&grpc.GenericServerStream[BatonServiceUploadAssetRequest, BatonServiceUploadAssetResponse]{ServerStream: stream})
}
-func (x *batonServiceUploadAssetServer) Recv() (*BatonServiceUploadAssetRequest, error) {
- m := new(BatonServiceUploadAssetRequest)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
-}
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type BatonService_UploadAssetServer = grpc.ClientStreamingServer[BatonServiceUploadAssetRequest, BatonServiceUploadAssetResponse]
func _BatonService_StartDebugging_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StartDebuggingRequest)
@@ -271,7 +256,7 @@ func _BatonService_StartDebugging_Handler(srv interface{}, ctx context.Context,
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.connectorapi.baton.v1.BatonService/StartDebugging",
+ FullMethod: BatonService_StartDebugging_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BatonServiceServer).StartDebugging(ctx, req.(*StartDebuggingRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.go
new file mode 100644
index 00000000..337af311
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.go
@@ -0,0 +1,343 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.4
+// protoc (unknown)
+// source: c1/connectorapi/baton/v1/config.proto
+
+package v1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type GetConnectorConfigRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetConnectorConfigRequest) Reset() {
+ *x = GetConnectorConfigRequest{}
+ mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetConnectorConfigRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetConnectorConfigRequest) ProtoMessage() {}
+
+func (x *GetConnectorConfigRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetConnectorConfigRequest.ProtoReflect.Descriptor instead.
+func (*GetConnectorConfigRequest) Descriptor() ([]byte, []int) {
+ return file_c1_connectorapi_baton_v1_config_proto_rawDescGZIP(), []int{0}
+}
+
+type GetConnectorConfigResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Config *structpb.Struct `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
+ LastUpdated *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetConnectorConfigResponse) Reset() {
+ *x = GetConnectorConfigResponse{}
+ mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetConnectorConfigResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetConnectorConfigResponse) ProtoMessage() {}
+
+func (x *GetConnectorConfigResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetConnectorConfigResponse.ProtoReflect.Descriptor instead.
+func (*GetConnectorConfigResponse) Descriptor() ([]byte, []int) {
+ return file_c1_connectorapi_baton_v1_config_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GetConnectorConfigResponse) GetConfig() *structpb.Struct {
+ if x != nil {
+ return x.Config
+ }
+ return nil
+}
+
+func (x *GetConnectorConfigResponse) GetLastUpdated() *timestamppb.Timestamp {
+ if x != nil {
+ return x.LastUpdated
+ }
+ return nil
+}
+
+type SignedHeader struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SignedHeader) Reset() {
+ *x = SignedHeader{}
+ mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SignedHeader) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SignedHeader) ProtoMessage() {}
+
+func (x *SignedHeader) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SignedHeader.ProtoReflect.Descriptor instead.
+func (*SignedHeader) Descriptor() ([]byte, []int) {
+ return file_c1_connectorapi_baton_v1_config_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *SignedHeader) GetKey() string {
+ if x != nil {
+ return x.Key
+ }
+ return ""
+}
+
+func (x *SignedHeader) GetValue() []string {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+type Sigv4SignedRequestSTSGetCallerIdentity struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
+ Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
+ Headers []*SignedHeader `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"`
+ Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Sigv4SignedRequestSTSGetCallerIdentity) Reset() {
+ *x = Sigv4SignedRequestSTSGetCallerIdentity{}
+ mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Sigv4SignedRequestSTSGetCallerIdentity) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Sigv4SignedRequestSTSGetCallerIdentity) ProtoMessage() {}
+
+func (x *Sigv4SignedRequestSTSGetCallerIdentity) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Sigv4SignedRequestSTSGetCallerIdentity.ProtoReflect.Descriptor instead.
+func (*Sigv4SignedRequestSTSGetCallerIdentity) Descriptor() ([]byte, []int) {
+ return file_c1_connectorapi_baton_v1_config_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *Sigv4SignedRequestSTSGetCallerIdentity) GetMethod() string {
+ if x != nil {
+ return x.Method
+ }
+ return ""
+}
+
+func (x *Sigv4SignedRequestSTSGetCallerIdentity) GetEndpoint() string {
+ if x != nil {
+ return x.Endpoint
+ }
+ return ""
+}
+
+func (x *Sigv4SignedRequestSTSGetCallerIdentity) GetHeaders() []*SignedHeader {
+ if x != nil {
+ return x.Headers
+ }
+ return nil
+}
+
+func (x *Sigv4SignedRequestSTSGetCallerIdentity) GetBody() []byte {
+ if x != nil {
+ return x.Body
+ }
+ return nil
+}
+
+var File_c1_connectorapi_baton_v1_config_proto protoreflect.FileDescriptor
+
+var file_c1_connectorapi_baton_v1_config_proto_rawDesc = string([]byte{
+ 0x0a, 0x25, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
+ 0x69, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76,
+ 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x8c, 0x01,
+ 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53,
+ 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a,
+ 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
+ 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0x36, 0x0a, 0x0c,
+ 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03,
+ 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
+ 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb2, 0x01, 0x0a, 0x26, 0x53, 0x69, 0x67, 0x76, 0x34, 0x53, 0x69,
+ 0x67, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x54, 0x53, 0x47, 0x65,
+ 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12,
+ 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f,
+ 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f,
+ 0x69, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
+ 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65,
+ 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x32, 0x99, 0x01, 0x0a, 0x16, 0x43, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x33, 0x2e, 0x63, 0x31, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74,
+ 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70,
+ 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x6e, 0x65, 0x2f, 0x63, 0x31, 0x2f, 0x70,
+ 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
+
+var (
+ file_c1_connectorapi_baton_v1_config_proto_rawDescOnce sync.Once
+ file_c1_connectorapi_baton_v1_config_proto_rawDescData []byte
+)
+
+func file_c1_connectorapi_baton_v1_config_proto_rawDescGZIP() []byte {
+ file_c1_connectorapi_baton_v1_config_proto_rawDescOnce.Do(func() {
+ file_c1_connectorapi_baton_v1_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connectorapi_baton_v1_config_proto_rawDesc), len(file_c1_connectorapi_baton_v1_config_proto_rawDesc)))
+ })
+ return file_c1_connectorapi_baton_v1_config_proto_rawDescData
+}
+
+var file_c1_connectorapi_baton_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_c1_connectorapi_baton_v1_config_proto_goTypes = []any{
+ (*GetConnectorConfigRequest)(nil), // 0: c1.connectorapi.baton.v1.GetConnectorConfigRequest
+ (*GetConnectorConfigResponse)(nil), // 1: c1.connectorapi.baton.v1.GetConnectorConfigResponse
+ (*SignedHeader)(nil), // 2: c1.connectorapi.baton.v1.SignedHeader
+ (*Sigv4SignedRequestSTSGetCallerIdentity)(nil), // 3: c1.connectorapi.baton.v1.Sigv4SignedRequestSTSGetCallerIdentity
+ (*structpb.Struct)(nil), // 4: google.protobuf.Struct
+ (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
+}
+var file_c1_connectorapi_baton_v1_config_proto_depIdxs = []int32{
+ 4, // 0: c1.connectorapi.baton.v1.GetConnectorConfigResponse.config:type_name -> google.protobuf.Struct
+ 5, // 1: c1.connectorapi.baton.v1.GetConnectorConfigResponse.last_updated:type_name -> google.protobuf.Timestamp
+ 2, // 2: c1.connectorapi.baton.v1.Sigv4SignedRequestSTSGetCallerIdentity.headers:type_name -> c1.connectorapi.baton.v1.SignedHeader
+ 0, // 3: c1.connectorapi.baton.v1.ConnectorConfigService.GetConnectorConfig:input_type -> c1.connectorapi.baton.v1.GetConnectorConfigRequest
+ 1, // 4: c1.connectorapi.baton.v1.ConnectorConfigService.GetConnectorConfig:output_type -> c1.connectorapi.baton.v1.GetConnectorConfigResponse
+ 4, // [4:5] is the sub-list for method output_type
+ 3, // [3:4] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_c1_connectorapi_baton_v1_config_proto_init() }
+func file_c1_connectorapi_baton_v1_config_proto_init() {
+ if File_c1_connectorapi_baton_v1_config_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connectorapi_baton_v1_config_proto_rawDesc), len(file_c1_connectorapi_baton_v1_config_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 4,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_c1_connectorapi_baton_v1_config_proto_goTypes,
+ DependencyIndexes: file_c1_connectorapi_baton_v1_config_proto_depIdxs,
+ MessageInfos: file_c1_connectorapi_baton_v1_config_proto_msgTypes,
+ }.Build()
+ File_c1_connectorapi_baton_v1_config_proto = out.File
+ file_c1_connectorapi_baton_v1_config_proto_goTypes = nil
+ file_c1_connectorapi_baton_v1_config_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.validate.go
new file mode 100644
index 00000000..98bbeb35
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.validate.go
@@ -0,0 +1,545 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: c1/connectorapi/baton/v1/config.proto
+
+package v1
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on GetConnectorConfigRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *GetConnectorConfigRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GetConnectorConfigRequest with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// GetConnectorConfigRequestMultiError, or nil if none found.
+func (m *GetConnectorConfigRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GetConnectorConfigRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return GetConnectorConfigRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// GetConnectorConfigRequestMultiError is an error wrapping multiple validation
+// errors returned by GetConnectorConfigRequest.ValidateAll() if the
+// designated constraints aren't met.
+type GetConnectorConfigRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GetConnectorConfigRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m GetConnectorConfigRequestMultiError) AllErrors() []error { return m }
+
+// GetConnectorConfigRequestValidationError is the validation error returned by
+// GetConnectorConfigRequest.Validate if the designated constraints aren't met.
+type GetConnectorConfigRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GetConnectorConfigRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GetConnectorConfigRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GetConnectorConfigRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GetConnectorConfigRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GetConnectorConfigRequestValidationError) ErrorName() string {
+ return "GetConnectorConfigRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GetConnectorConfigRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sGetConnectorConfigRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GetConnectorConfigRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GetConnectorConfigRequestValidationError{}
+
+// Validate checks the field values on GetConnectorConfigResponse with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *GetConnectorConfigResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GetConnectorConfigResponse with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// GetConnectorConfigResponseMultiError, or nil if none found.
+func (m *GetConnectorConfigResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GetConnectorConfigResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GetConnectorConfigResponseValidationError{
+ field: "Config",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GetConnectorConfigResponseValidationError{
+ field: "Config",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GetConnectorConfigResponseValidationError{
+ field: "Config",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetLastUpdated()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GetConnectorConfigResponseValidationError{
+ field: "LastUpdated",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GetConnectorConfigResponseValidationError{
+ field: "LastUpdated",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GetConnectorConfigResponseValidationError{
+ field: "LastUpdated",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return GetConnectorConfigResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// GetConnectorConfigResponseMultiError is an error wrapping multiple
+// validation errors returned by GetConnectorConfigResponse.ValidateAll() if
+// the designated constraints aren't met.
+type GetConnectorConfigResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GetConnectorConfigResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m GetConnectorConfigResponseMultiError) AllErrors() []error { return m }
+
+// GetConnectorConfigResponseValidationError is the validation error returned
+// by GetConnectorConfigResponse.Validate if the designated constraints aren't met.
+type GetConnectorConfigResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GetConnectorConfigResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GetConnectorConfigResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GetConnectorConfigResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GetConnectorConfigResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GetConnectorConfigResponseValidationError) ErrorName() string {
+ return "GetConnectorConfigResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e GetConnectorConfigResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sGetConnectorConfigResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GetConnectorConfigResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GetConnectorConfigResponseValidationError{}
+
+// Validate checks the field values on SignedHeader with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *SignedHeader) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SignedHeader with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in SignedHeaderMultiError, or
+// nil if none found.
+func (m *SignedHeader) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SignedHeader) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Key
+
+ if len(errors) > 0 {
+ return SignedHeaderMultiError(errors)
+ }
+
+ return nil
+}
+
+// SignedHeaderMultiError is an error wrapping multiple validation errors
+// returned by SignedHeader.ValidateAll() if the designated constraints aren't met.
+type SignedHeaderMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SignedHeaderMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SignedHeaderMultiError) AllErrors() []error { return m }
+
+// SignedHeaderValidationError is the validation error returned by
+// SignedHeader.Validate if the designated constraints aren't met.
+type SignedHeaderValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SignedHeaderValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SignedHeaderValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SignedHeaderValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SignedHeaderValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SignedHeaderValidationError) ErrorName() string { return "SignedHeaderValidationError" }
+
+// Error satisfies the builtin error interface
+func (e SignedHeaderValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSignedHeader.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SignedHeaderValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SignedHeaderValidationError{}
+
+// Validate checks the field values on Sigv4SignedRequestSTSGetCallerIdentity
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the first error encountered is returned, or nil if
+// there are no violations.
+func (m *Sigv4SignedRequestSTSGetCallerIdentity) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// Sigv4SignedRequestSTSGetCallerIdentity with the rules defined in the proto
+// definition for this message. If any rules are violated, the result is a
+// list of violation errors wrapped in
+// Sigv4SignedRequestSTSGetCallerIdentityMultiError, or nil if none found.
+func (m *Sigv4SignedRequestSTSGetCallerIdentity) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Sigv4SignedRequestSTSGetCallerIdentity) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Method
+
+ // no validation rules for Endpoint
+
+ for idx, item := range m.GetHeaders() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Sigv4SignedRequestSTSGetCallerIdentityValidationError{
+ field: fmt.Sprintf("Headers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Sigv4SignedRequestSTSGetCallerIdentityValidationError{
+ field: fmt.Sprintf("Headers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Sigv4SignedRequestSTSGetCallerIdentityValidationError{
+ field: fmt.Sprintf("Headers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for Body
+
+ if len(errors) > 0 {
+ return Sigv4SignedRequestSTSGetCallerIdentityMultiError(errors)
+ }
+
+ return nil
+}
+
+// Sigv4SignedRequestSTSGetCallerIdentityMultiError is an error wrapping
+// multiple validation errors returned by
+// Sigv4SignedRequestSTSGetCallerIdentity.ValidateAll() if the designated
+// constraints aren't met.
+type Sigv4SignedRequestSTSGetCallerIdentityMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Sigv4SignedRequestSTSGetCallerIdentityMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Sigv4SignedRequestSTSGetCallerIdentityMultiError) AllErrors() []error { return m }
+
+// Sigv4SignedRequestSTSGetCallerIdentityValidationError is the validation
+// error returned by Sigv4SignedRequestSTSGetCallerIdentity.Validate if the
+// designated constraints aren't met.
+type Sigv4SignedRequestSTSGetCallerIdentityValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) ErrorName() string {
+ return "Sigv4SignedRequestSTSGetCallerIdentityValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSigv4SignedRequestSTSGetCallerIdentity.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Sigv4SignedRequestSTSGetCallerIdentityValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Sigv4SignedRequestSTSGetCallerIdentityValidationError{}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config_grpc.pb.go
new file mode 100644
index 00000000..985a23de
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config_grpc.pb.go
@@ -0,0 +1,119 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc (unknown)
+// source: c1/connectorapi/baton/v1/config.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ ConnectorConfigService_GetConnectorConfig_FullMethodName = "/c1.connectorapi.baton.v1.ConnectorConfigService/GetConnectorConfig"
+)
+
+// ConnectorConfigServiceClient is the client API for ConnectorConfigService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type ConnectorConfigServiceClient interface {
+ GetConnectorConfig(ctx context.Context, in *GetConnectorConfigRequest, opts ...grpc.CallOption) (*GetConnectorConfigResponse, error)
+}
+
+type connectorConfigServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewConnectorConfigServiceClient(cc grpc.ClientConnInterface) ConnectorConfigServiceClient {
+ return &connectorConfigServiceClient{cc}
+}
+
+func (c *connectorConfigServiceClient) GetConnectorConfig(ctx context.Context, in *GetConnectorConfigRequest, opts ...grpc.CallOption) (*GetConnectorConfigResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(GetConnectorConfigResponse)
+ err := c.cc.Invoke(ctx, ConnectorConfigService_GetConnectorConfig_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// ConnectorConfigServiceServer is the server API for ConnectorConfigService service.
+// All implementations should embed UnimplementedConnectorConfigServiceServer
+// for forward compatibility.
+type ConnectorConfigServiceServer interface {
+ GetConnectorConfig(context.Context, *GetConnectorConfigRequest) (*GetConnectorConfigResponse, error)
+}
+
+// UnimplementedConnectorConfigServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedConnectorConfigServiceServer struct{}
+
+func (UnimplementedConnectorConfigServiceServer) GetConnectorConfig(context.Context, *GetConnectorConfigRequest) (*GetConnectorConfigResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetConnectorConfig not implemented")
+}
+func (UnimplementedConnectorConfigServiceServer) testEmbeddedByValue() {}
+
+// UnsafeConnectorConfigServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to ConnectorConfigServiceServer will
+// result in compilation errors.
+type UnsafeConnectorConfigServiceServer interface {
+ mustEmbedUnimplementedConnectorConfigServiceServer()
+}
+
+func RegisterConnectorConfigServiceServer(s grpc.ServiceRegistrar, srv ConnectorConfigServiceServer) {
+ // If the following call pancis, it indicates UnimplementedConnectorConfigServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&ConnectorConfigService_ServiceDesc, srv)
+}
+
+func _ConnectorConfigService_GetConnectorConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetConnectorConfigRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ConnectorConfigServiceServer).GetConnectorConfig(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ConnectorConfigService_GetConnectorConfig_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ConnectorConfigServiceServer).GetConnectorConfig(ctx, req.(*GetConnectorConfigRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// ConnectorConfigService_ServiceDesc is the grpc.ServiceDesc for ConnectorConfigService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ConnectorConfigService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "c1.connectorapi.baton.v1.ConnectorConfigService",
+ HandlerType: (*ConnectorConfigServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "GetConnectorConfig",
+ Handler: _ConnectorConfigService_GetConnectorConfig_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "c1/connectorapi/baton/v1/config.proto",
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit.pb.go
index 63cf4cca..664980eb 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/ratelimit/v1/ratelimit.proto
@@ -14,6 +14,7 @@ import (
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -81,24 +82,21 @@ func (RateLimitDescription_Status) EnumDescriptor() ([]byte, []int) {
// https://tools.ietf.org/html/draft-ietf-httpapi-ratelimit-headers-00#section-1.1
// RateLimitDescription is a minimal representation of a rate limit.
type RateLimitDescription struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Status RateLimitDescription_Status `protobuf:"varint,1,opt,name=status,proto3,enum=c1.ratelimit.v1.RateLimitDescription_Status" json:"status,omitempty"`
+ Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
+ Remaining int64 `protobuf:"varint,3,opt,name=remaining,proto3" json:"remaining,omitempty"`
+ Count int64 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
+ ResetAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=reset_at,json=resetAt,proto3" json:"reset_at,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Status RateLimitDescription_Status `protobuf:"varint,1,opt,name=status,proto3,enum=c1.ratelimit.v1.RateLimitDescription_Status" json:"status,omitempty"`
- Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
- Remaining int64 `protobuf:"varint,3,opt,name=remaining,proto3" json:"remaining,omitempty"`
- Count int64 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
- ResetAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=reset_at,json=resetAt,proto3" json:"reset_at,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *RateLimitDescription) Reset() {
*x = RateLimitDescription{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RateLimitDescription) String() string {
@@ -109,7 +107,7 @@ func (*RateLimitDescription) ProtoMessage() {}
func (x *RateLimitDescription) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -160,23 +158,20 @@ func (x *RateLimitDescription) GetResetAt() *timestamppb.Timestamp {
}
type ReportRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ RequestToken string `protobuf:"bytes,1,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"`
+ Description *RateLimitDescription `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ Service string `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"`
+ Descriptors *RateLimitDescriptors `protobuf:"bytes,4,opt,name=descriptors,proto3" json:"descriptors,omitempty"`
unknownFields protoimpl.UnknownFields
-
- RequestToken string `protobuf:"bytes,1,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"`
- Description *RateLimitDescription `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
- Service string `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"`
- Descriptors *RateLimitDescriptors `protobuf:"bytes,4,opt,name=descriptors,proto3" json:"descriptors,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ReportRequest) Reset() {
*x = ReportRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ReportRequest) String() string {
@@ -187,7 +182,7 @@ func (*ReportRequest) ProtoMessage() {}
func (x *ReportRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -231,18 +226,16 @@ func (x *ReportRequest) GetDescriptors() *RateLimitDescriptors {
}
type ReportResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ReportResponse) Reset() {
*x = ReportResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ReportResponse) String() string {
@@ -253,7 +246,7 @@ func (*ReportResponse) ProtoMessage() {}
func (x *ReportResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -269,20 +262,17 @@ func (*ReportResponse) Descriptor() ([]byte, []int) {
}
type RateLimitDescriptors struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Entries []*RateLimitDescriptors_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Entries []*RateLimitDescriptors_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *RateLimitDescriptors) Reset() {
*x = RateLimitDescriptors{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RateLimitDescriptors) String() string {
@@ -293,7 +283,7 @@ func (*RateLimitDescriptors) ProtoMessage() {}
func (x *RateLimitDescriptors) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -316,22 +306,19 @@ func (x *RateLimitDescriptors) GetEntries() []*RateLimitDescriptors_Entry {
}
type DoRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ RequestToken string `protobuf:"bytes,1,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"`
+ Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
+ Descriptors *RateLimitDescriptors `protobuf:"bytes,3,opt,name=descriptors,proto3" json:"descriptors,omitempty"`
unknownFields protoimpl.UnknownFields
-
- RequestToken string `protobuf:"bytes,1,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"`
- Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
- Descriptors *RateLimitDescriptors `protobuf:"bytes,3,opt,name=descriptors,proto3" json:"descriptors,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *DoRequest) Reset() {
*x = DoRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *DoRequest) String() string {
@@ -342,7 +329,7 @@ func (*DoRequest) ProtoMessage() {}
func (x *DoRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -379,21 +366,18 @@ func (x *DoRequest) GetDescriptors() *RateLimitDescriptors {
}
type DoResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ RequestToken string `protobuf:"bytes,1,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"`
+ Description *RateLimitDescription `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
unknownFields protoimpl.UnknownFields
-
- RequestToken string `protobuf:"bytes,1,opt,name=request_token,json=requestToken,proto3" json:"request_token,omitempty"`
- Description *RateLimitDescription `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *DoResponse) Reset() {
*x = DoResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *DoResponse) String() string {
@@ -404,7 +388,7 @@ func (*DoResponse) ProtoMessage() {}
func (x *DoResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -434,18 +418,16 @@ func (x *DoResponse) GetDescription() *RateLimitDescription {
}
type DisabledLimiter struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *DisabledLimiter) Reset() {
*x = DisabledLimiter{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *DisabledLimiter) String() string {
@@ -456,7 +438,7 @@ func (*DisabledLimiter) ProtoMessage() {}
func (x *DisabledLimiter) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -472,20 +454,17 @@ func (*DisabledLimiter) Descriptor() ([]byte, []int) {
}
type SlidingMemoryLimiter struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ UsePercent float64 `protobuf:"fixed64,1,opt,name=use_percent,json=usePercent,proto3" json:"use_percent,omitempty"`
unknownFields protoimpl.UnknownFields
-
- UsePercent float64 `protobuf:"fixed64,1,opt,name=use_percent,json=usePercent,proto3" json:"use_percent,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *SlidingMemoryLimiter) Reset() {
*x = SlidingMemoryLimiter{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *SlidingMemoryLimiter) String() string {
@@ -496,7 +475,7 @@ func (*SlidingMemoryLimiter) ProtoMessage() {}
func (x *SlidingMemoryLimiter) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -519,21 +498,18 @@ func (x *SlidingMemoryLimiter) GetUsePercent() float64 {
}
type FixedMemoryLimiter struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Rate int64 `protobuf:"varint,1,opt,name=rate,proto3" json:"rate,omitempty"`
+ Period *durationpb.Duration `protobuf:"bytes,2,opt,name=period,proto3" json:"period,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Rate int64 `protobuf:"varint,1,opt,name=rate,proto3" json:"rate,omitempty"`
- Period *durationpb.Duration `protobuf:"bytes,2,opt,name=period,proto3" json:"period,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *FixedMemoryLimiter) Reset() {
*x = FixedMemoryLimiter{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *FixedMemoryLimiter) String() string {
@@ -544,7 +520,7 @@ func (*FixedMemoryLimiter) ProtoMessage() {}
func (x *FixedMemoryLimiter) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[8]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -574,21 +550,18 @@ func (x *FixedMemoryLimiter) GetPeriod() *durationpb.Duration {
}
type ExternalLimiter struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
+ Options map[string]string `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
-
- Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
- Options map[string]string `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ sizeCache protoimpl.SizeCache
}
func (x *ExternalLimiter) Reset() {
*x = ExternalLimiter{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ExternalLimiter) String() string {
@@ -599,7 +572,7 @@ func (*ExternalLimiter) ProtoMessage() {}
func (x *ExternalLimiter) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[9]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -629,26 +602,23 @@ func (x *ExternalLimiter) GetOptions() map[string]string {
}
type RateLimiterConfig struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Types that are assignable to Type:
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Type:
//
// *RateLimiterConfig_Disabled
// *RateLimiterConfig_SlidingMem
// *RateLimiterConfig_FixedMem
// *RateLimiterConfig_External
- Type isRateLimiterConfig_Type `protobuf_oneof:"type"`
+ Type isRateLimiterConfig_Type `protobuf_oneof:"type"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *RateLimiterConfig) Reset() {
*x = RateLimiterConfig{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RateLimiterConfig) String() string {
@@ -659,7 +629,7 @@ func (*RateLimiterConfig) ProtoMessage() {}
func (x *RateLimiterConfig) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[10]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -674,37 +644,45 @@ func (*RateLimiterConfig) Descriptor() ([]byte, []int) {
return file_c1_ratelimit_v1_ratelimit_proto_rawDescGZIP(), []int{10}
}
-func (m *RateLimiterConfig) GetType() isRateLimiterConfig_Type {
- if m != nil {
- return m.Type
+func (x *RateLimiterConfig) GetType() isRateLimiterConfig_Type {
+ if x != nil {
+ return x.Type
}
return nil
}
func (x *RateLimiterConfig) GetDisabled() *DisabledLimiter {
- if x, ok := x.GetType().(*RateLimiterConfig_Disabled); ok {
- return x.Disabled
+ if x != nil {
+ if x, ok := x.Type.(*RateLimiterConfig_Disabled); ok {
+ return x.Disabled
+ }
}
return nil
}
func (x *RateLimiterConfig) GetSlidingMem() *SlidingMemoryLimiter {
- if x, ok := x.GetType().(*RateLimiterConfig_SlidingMem); ok {
- return x.SlidingMem
+ if x != nil {
+ if x, ok := x.Type.(*RateLimiterConfig_SlidingMem); ok {
+ return x.SlidingMem
+ }
}
return nil
}
func (x *RateLimiterConfig) GetFixedMem() *FixedMemoryLimiter {
- if x, ok := x.GetType().(*RateLimiterConfig_FixedMem); ok {
- return x.FixedMem
+ if x != nil {
+ if x, ok := x.Type.(*RateLimiterConfig_FixedMem); ok {
+ return x.FixedMem
+ }
}
return nil
}
func (x *RateLimiterConfig) GetExternal() *ExternalLimiter {
- if x, ok := x.GetType().(*RateLimiterConfig_External); ok {
- return x.External
+ if x != nil {
+ if x, ok := x.Type.(*RateLimiterConfig_External); ok {
+ return x.External
+ }
}
return nil
}
@@ -738,21 +716,18 @@ func (*RateLimiterConfig_FixedMem) isRateLimiterConfig_Type() {}
func (*RateLimiterConfig_External) isRateLimiterConfig_Type() {}
type RateLimitDescriptors_Entry struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
- Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *RateLimitDescriptors_Entry) Reset() {
*x = RateLimitDescriptors_Entry{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *RateLimitDescriptors_Entry) String() string {
@@ -763,7 +738,7 @@ func (*RateLimitDescriptors_Entry) ProtoMessage() {}
func (x *RateLimitDescriptors_Entry) ProtoReflect() protoreflect.Message {
mi := &file_c1_ratelimit_v1_ratelimit_proto_msgTypes[11]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -794,7 +769,7 @@ func (x *RateLimitDescriptors_Entry) GetValue() string {
var File_c1_ratelimit_v1_ratelimit_proto protoreflect.FileDescriptor
-var file_c1_ratelimit_v1_ratelimit_proto_rawDesc = []byte{
+var file_c1_ratelimit_v1_ratelimit_proto_rawDesc = string([]byte{
0x0a, 0x1f, 0x63, 0x31, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76,
0x31, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e,
@@ -923,23 +898,23 @@ var file_c1_ratelimit_v1_ratelimit_proto_rawDesc = []byte{
0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f,
0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_ratelimit_v1_ratelimit_proto_rawDescOnce sync.Once
- file_c1_ratelimit_v1_ratelimit_proto_rawDescData = file_c1_ratelimit_v1_ratelimit_proto_rawDesc
+ file_c1_ratelimit_v1_ratelimit_proto_rawDescData []byte
)
func file_c1_ratelimit_v1_ratelimit_proto_rawDescGZIP() []byte {
file_c1_ratelimit_v1_ratelimit_proto_rawDescOnce.Do(func() {
- file_c1_ratelimit_v1_ratelimit_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_ratelimit_v1_ratelimit_proto_rawDescData)
+ file_c1_ratelimit_v1_ratelimit_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_ratelimit_v1_ratelimit_proto_rawDesc), len(file_c1_ratelimit_v1_ratelimit_proto_rawDesc)))
})
return file_c1_ratelimit_v1_ratelimit_proto_rawDescData
}
var file_c1_ratelimit_v1_ratelimit_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_c1_ratelimit_v1_ratelimit_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
-var file_c1_ratelimit_v1_ratelimit_proto_goTypes = []interface{}{
+var file_c1_ratelimit_v1_ratelimit_proto_goTypes = []any{
(RateLimitDescription_Status)(0), // 0: c1.ratelimit.v1.RateLimitDescription.Status
(*RateLimitDescription)(nil), // 1: c1.ratelimit.v1.RateLimitDescription
(*ReportRequest)(nil), // 2: c1.ratelimit.v1.ReportRequest
@@ -987,153 +962,7 @@ func file_c1_ratelimit_v1_ratelimit_proto_init() {
if File_c1_ratelimit_v1_ratelimit_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RateLimitDescription); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReportRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReportResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RateLimitDescriptors); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DoRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DoResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DisabledLimiter); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SlidingMemoryLimiter); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*FixedMemoryLimiter); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ExternalLimiter); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RateLimiterConfig); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RateLimitDescriptors_Entry); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- file_c1_ratelimit_v1_ratelimit_proto_msgTypes[10].OneofWrappers = []interface{}{
+ file_c1_ratelimit_v1_ratelimit_proto_msgTypes[10].OneofWrappers = []any{
(*RateLimiterConfig_Disabled)(nil),
(*RateLimiterConfig_SlidingMem)(nil),
(*RateLimiterConfig_FixedMem)(nil),
@@ -1143,7 +972,7 @@ func file_c1_ratelimit_v1_ratelimit_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_ratelimit_v1_ratelimit_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_ratelimit_v1_ratelimit_proto_rawDesc), len(file_c1_ratelimit_v1_ratelimit_proto_rawDesc)),
NumEnums: 1,
NumMessages: 13,
NumExtensions: 0,
@@ -1155,7 +984,6 @@ func file_c1_ratelimit_v1_ratelimit_proto_init() {
MessageInfos: file_c1_ratelimit_v1_ratelimit_proto_msgTypes,
}.Build()
File_c1_ratelimit_v1_ratelimit_proto = out.File
- file_c1_ratelimit_v1_ratelimit_proto_rawDesc = nil
file_c1_ratelimit_v1_ratelimit_proto_goTypes = nil
file_c1_ratelimit_v1_ratelimit_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit.pb.validate.go
index 330bb6fe..3d40aa69 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit.pb.validate.go
@@ -108,7 +108,7 @@ type RateLimitDescriptionMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m RateLimitDescriptionMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -272,7 +272,7 @@ type ReportRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ReportRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -372,7 +372,7 @@ type ReportResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ReportResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -517,7 +517,7 @@ type RateLimitDescriptorsMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m RateLimitDescriptorsMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -651,7 +651,7 @@ type DoRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m DoRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -781,7 +781,7 @@ type DoResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m DoResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -881,7 +881,7 @@ type DisabledLimiterMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m DisabledLimiterMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -983,7 +983,7 @@ type SlidingMemoryLimiterMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m SlidingMemoryLimiterMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1116,7 +1116,7 @@ type FixedMemoryLimiterMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m FixedMemoryLimiterMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1222,7 +1222,7 @@ type ExternalLimiterMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ExternalLimiterMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1491,7 +1491,7 @@ type RateLimiterConfigMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m RateLimiterConfigMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -1615,7 +1615,7 @@ type RateLimitDescriptors_EntryMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m RateLimitDescriptors_EntryMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit_grpc.pb.go
index e482f954..30f230e6 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1/ratelimit_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/ratelimit/v1/ratelimit.proto
@@ -15,8 +15,13 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ RateLimiterService_Do_FullMethodName = "/c1.ratelimit.v1.RateLimiterService/Do"
+ RateLimiterService_Report_FullMethodName = "/c1.ratelimit.v1.RateLimiterService/Report"
+)
// RateLimiterServiceClient is the client API for RateLimiterService service.
//
@@ -35,8 +40,9 @@ func NewRateLimiterServiceClient(cc grpc.ClientConnInterface) RateLimiterService
}
func (c *rateLimiterServiceClient) Do(ctx context.Context, in *DoRequest, opts ...grpc.CallOption) (*DoResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DoResponse)
- err := c.cc.Invoke(ctx, "/c1.ratelimit.v1.RateLimiterService/Do", in, out, opts...)
+ err := c.cc.Invoke(ctx, RateLimiterService_Do_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -44,8 +50,9 @@ func (c *rateLimiterServiceClient) Do(ctx context.Context, in *DoRequest, opts .
}
func (c *rateLimiterServiceClient) Report(ctx context.Context, in *ReportRequest, opts ...grpc.CallOption) (*ReportResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ReportResponse)
- err := c.cc.Invoke(ctx, "/c1.ratelimit.v1.RateLimiterService/Report", in, out, opts...)
+ err := c.cc.Invoke(ctx, RateLimiterService_Report_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -54,15 +61,18 @@ func (c *rateLimiterServiceClient) Report(ctx context.Context, in *ReportRequest
// RateLimiterServiceServer is the server API for RateLimiterService service.
// All implementations should embed UnimplementedRateLimiterServiceServer
-// for forward compatibility
+// for forward compatibility.
type RateLimiterServiceServer interface {
Do(context.Context, *DoRequest) (*DoResponse, error)
Report(context.Context, *ReportRequest) (*ReportResponse, error)
}
-// UnimplementedRateLimiterServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedRateLimiterServiceServer struct {
-}
+// UnimplementedRateLimiterServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedRateLimiterServiceServer struct{}
func (UnimplementedRateLimiterServiceServer) Do(context.Context, *DoRequest) (*DoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Do not implemented")
@@ -70,6 +80,7 @@ func (UnimplementedRateLimiterServiceServer) Do(context.Context, *DoRequest) (*D
func (UnimplementedRateLimiterServiceServer) Report(context.Context, *ReportRequest) (*ReportResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Report not implemented")
}
+func (UnimplementedRateLimiterServiceServer) testEmbeddedByValue() {}
// UnsafeRateLimiterServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RateLimiterServiceServer will
@@ -79,6 +90,13 @@ type UnsafeRateLimiterServiceServer interface {
}
func RegisterRateLimiterServiceServer(s grpc.ServiceRegistrar, srv RateLimiterServiceServer) {
+ // If the following call pancis, it indicates UnimplementedRateLimiterServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&RateLimiterService_ServiceDesc, srv)
}
@@ -92,7 +110,7 @@ func _RateLimiterService_Do_Handler(srv interface{}, ctx context.Context, dec fu
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.ratelimit.v1.RateLimiterService/Do",
+ FullMethod: RateLimiterService_Do_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RateLimiterServiceServer).Do(ctx, req.(*DoRequest))
@@ -110,7 +128,7 @@ func _RateLimiterService_Report_Handler(srv interface{}, ctx context.Context, de
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.ratelimit.v1.RateLimiterService/Report",
+ FullMethod: RateLimiterService_Report_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RateLimiterServiceServer).Report(ctx, req.(*ReportRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.go
index e4affa4c..1cf92ff9 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/reader/v2/entitlement.proto
@@ -11,8 +11,10 @@ import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -23,20 +25,18 @@ const (
)
type EntitlementsReaderServiceGetEntitlementRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ EntitlementId string `protobuf:"bytes,1,opt,name=entitlement_id,json=entitlementId,proto3" json:"entitlement_id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- EntitlementId string `protobuf:"bytes,1,opt,name=entitlement_id,json=entitlementId,proto3" json:"entitlement_id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *EntitlementsReaderServiceGetEntitlementRequest) Reset() {
*x = EntitlementsReaderServiceGetEntitlementRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_entitlement_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_entitlement_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *EntitlementsReaderServiceGetEntitlementRequest) String() string {
@@ -47,7 +47,7 @@ func (*EntitlementsReaderServiceGetEntitlementRequest) ProtoMessage() {}
func (x *EntitlementsReaderServiceGetEntitlementRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_entitlement_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -69,21 +69,25 @@ func (x *EntitlementsReaderServiceGetEntitlementRequest) GetEntitlementId() stri
return ""
}
+func (x *EntitlementsReaderServiceGetEntitlementRequest) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
type EntitlementsReaderServiceGetEntitlementResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Entitlement *v2.Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Entitlement *v2.Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *EntitlementsReaderServiceGetEntitlementResponse) Reset() {
*x = EntitlementsReaderServiceGetEntitlementResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_entitlement_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_entitlement_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *EntitlementsReaderServiceGetEntitlementResponse) String() string {
@@ -94,7 +98,7 @@ func (*EntitlementsReaderServiceGetEntitlementResponse) ProtoMessage() {}
func (x *EntitlementsReaderServiceGetEntitlementResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_entitlement_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -118,71 +122,79 @@ func (x *EntitlementsReaderServiceGetEntitlementResponse) GetEntitlement() *v2.E
var File_c1_reader_v2_entitlement_proto protoreflect.FileDescriptor
-var file_c1_reader_v2_entitlement_proto_rawDesc = []byte{
+var file_c1_reader_v2_entitlement_proto_rawDesc = string([]byte{
0x0a, 0x1e, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x65,
0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x0c, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x21,
0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f,
0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69,
- 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a, 0x2e, 0x45, 0x6e,
- 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c,
- 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x0e,
- 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08,
- 0x52, 0x0d, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22,
- 0x71, 0x0a, 0x2f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52,
- 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x45,
- 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
- 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c,
- 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65,
- 0x6e, 0x74, 0x32, 0xab, 0x01, 0x0a, 0x19, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65,
+ 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61,
+ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x01, 0x0a, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c,
+ 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x0e, 0x65, 0x6e, 0x74, 0x69,
+ 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0d, 0x65, 0x6e,
+ 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x22, 0x71, 0x0a, 0x2f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65,
0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x12, 0x8d, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d,
- 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52,
- 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x45,
- 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32,
- 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61,
- 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74,
- 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
- 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f,
- 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64,
- 0x65, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+ 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c,
+ 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e,
+ 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74,
+ 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0xab, 0x01, 0x0a, 0x19, 0x45, 0x6e, 0x74, 0x69, 0x74,
+ 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69,
+ 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61,
+ 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65,
+ 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65,
+ 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f,
+ 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f,
+ 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
+})
var (
file_c1_reader_v2_entitlement_proto_rawDescOnce sync.Once
- file_c1_reader_v2_entitlement_proto_rawDescData = file_c1_reader_v2_entitlement_proto_rawDesc
+ file_c1_reader_v2_entitlement_proto_rawDescData []byte
)
func file_c1_reader_v2_entitlement_proto_rawDescGZIP() []byte {
file_c1_reader_v2_entitlement_proto_rawDescOnce.Do(func() {
- file_c1_reader_v2_entitlement_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_reader_v2_entitlement_proto_rawDescData)
+ file_c1_reader_v2_entitlement_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_reader_v2_entitlement_proto_rawDesc), len(file_c1_reader_v2_entitlement_proto_rawDesc)))
})
return file_c1_reader_v2_entitlement_proto_rawDescData
}
var file_c1_reader_v2_entitlement_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_c1_reader_v2_entitlement_proto_goTypes = []interface{}{
+var file_c1_reader_v2_entitlement_proto_goTypes = []any{
(*EntitlementsReaderServiceGetEntitlementRequest)(nil), // 0: c1.reader.v2.EntitlementsReaderServiceGetEntitlementRequest
(*EntitlementsReaderServiceGetEntitlementResponse)(nil), // 1: c1.reader.v2.EntitlementsReaderServiceGetEntitlementResponse
- (*v2.Entitlement)(nil), // 2: c1.connector.v2.Entitlement
+ (*anypb.Any)(nil), // 2: google.protobuf.Any
+ (*v2.Entitlement)(nil), // 3: c1.connector.v2.Entitlement
}
var file_c1_reader_v2_entitlement_proto_depIdxs = []int32{
- 2, // 0: c1.reader.v2.EntitlementsReaderServiceGetEntitlementResponse.entitlement:type_name -> c1.connector.v2.Entitlement
- 0, // 1: c1.reader.v2.EntitlementsReaderService.GetEntitlement:input_type -> c1.reader.v2.EntitlementsReaderServiceGetEntitlementRequest
- 1, // 2: c1.reader.v2.EntitlementsReaderService.GetEntitlement:output_type -> c1.reader.v2.EntitlementsReaderServiceGetEntitlementResponse
- 2, // [2:3] is the sub-list for method output_type
- 1, // [1:2] is the sub-list for method input_type
- 1, // [1:1] is the sub-list for extension type_name
- 1, // [1:1] is the sub-list for extension extendee
- 0, // [0:1] is the sub-list for field type_name
+ 2, // 0: c1.reader.v2.EntitlementsReaderServiceGetEntitlementRequest.annotations:type_name -> google.protobuf.Any
+ 3, // 1: c1.reader.v2.EntitlementsReaderServiceGetEntitlementResponse.entitlement:type_name -> c1.connector.v2.Entitlement
+ 0, // 2: c1.reader.v2.EntitlementsReaderService.GetEntitlement:input_type -> c1.reader.v2.EntitlementsReaderServiceGetEntitlementRequest
+ 1, // 3: c1.reader.v2.EntitlementsReaderService.GetEntitlement:output_type -> c1.reader.v2.EntitlementsReaderServiceGetEntitlementResponse
+ 3, // [3:4] is the sub-list for method output_type
+ 2, // [2:3] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
}
func init() { file_c1_reader_v2_entitlement_proto_init() }
@@ -190,37 +202,11 @@ func file_c1_reader_v2_entitlement_proto_init() {
if File_c1_reader_v2_entitlement_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_reader_v2_entitlement_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*EntitlementsReaderServiceGetEntitlementRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_reader_v2_entitlement_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*EntitlementsReaderServiceGetEntitlementResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_reader_v2_entitlement_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_reader_v2_entitlement_proto_rawDesc), len(file_c1_reader_v2_entitlement_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
@@ -231,7 +217,6 @@ func file_c1_reader_v2_entitlement_proto_init() {
MessageInfos: file_c1_reader_v2_entitlement_proto_msgTypes,
}.Build()
File_c1_reader_v2_entitlement_proto = out.File
- file_c1_reader_v2_entitlement_proto_rawDesc = nil
file_c1_reader_v2_entitlement_proto_goTypes = nil
file_c1_reader_v2_entitlement_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.validate.go
index 3e1ed2a9..b0b290a5 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.validate.go
@@ -70,6 +70,40 @@ func (m *EntitlementsReaderServiceGetEntitlementRequest) validate(all bool) erro
errors = append(errors, err)
}
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, EntitlementsReaderServiceGetEntitlementRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, EntitlementsReaderServiceGetEntitlementRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return EntitlementsReaderServiceGetEntitlementRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
if len(errors) > 0 {
return EntitlementsReaderServiceGetEntitlementRequestMultiError(errors)
}
@@ -85,7 +119,7 @@ type EntitlementsReaderServiceGetEntitlementRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m EntitlementsReaderServiceGetEntitlementRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -223,7 +257,7 @@ type EntitlementsReaderServiceGetEntitlementResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m EntitlementsReaderServiceGetEntitlementResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement_grpc.pb.go
index 85ff2da7..b57b37e6 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/reader/v2/entitlement.proto
@@ -15,8 +15,12 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ EntitlementsReaderService_GetEntitlement_FullMethodName = "/c1.reader.v2.EntitlementsReaderService/GetEntitlement"
+)
// EntitlementsReaderServiceClient is the client API for EntitlementsReaderService service.
//
@@ -34,8 +38,9 @@ func NewEntitlementsReaderServiceClient(cc grpc.ClientConnInterface) Entitlement
}
func (c *entitlementsReaderServiceClient) GetEntitlement(ctx context.Context, in *EntitlementsReaderServiceGetEntitlementRequest, opts ...grpc.CallOption) (*EntitlementsReaderServiceGetEntitlementResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(EntitlementsReaderServiceGetEntitlementResponse)
- err := c.cc.Invoke(ctx, "/c1.reader.v2.EntitlementsReaderService/GetEntitlement", in, out, opts...)
+ err := c.cc.Invoke(ctx, EntitlementsReaderService_GetEntitlement_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -44,18 +49,22 @@ func (c *entitlementsReaderServiceClient) GetEntitlement(ctx context.Context, in
// EntitlementsReaderServiceServer is the server API for EntitlementsReaderService service.
// All implementations should embed UnimplementedEntitlementsReaderServiceServer
-// for forward compatibility
+// for forward compatibility.
type EntitlementsReaderServiceServer interface {
GetEntitlement(context.Context, *EntitlementsReaderServiceGetEntitlementRequest) (*EntitlementsReaderServiceGetEntitlementResponse, error)
}
-// UnimplementedEntitlementsReaderServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedEntitlementsReaderServiceServer struct {
-}
+// UnimplementedEntitlementsReaderServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedEntitlementsReaderServiceServer struct{}
func (UnimplementedEntitlementsReaderServiceServer) GetEntitlement(context.Context, *EntitlementsReaderServiceGetEntitlementRequest) (*EntitlementsReaderServiceGetEntitlementResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetEntitlement not implemented")
}
+func (UnimplementedEntitlementsReaderServiceServer) testEmbeddedByValue() {}
// UnsafeEntitlementsReaderServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EntitlementsReaderServiceServer will
@@ -65,6 +74,13 @@ type UnsafeEntitlementsReaderServiceServer interface {
}
func RegisterEntitlementsReaderServiceServer(s grpc.ServiceRegistrar, srv EntitlementsReaderServiceServer) {
+ // If the following call pancis, it indicates UnimplementedEntitlementsReaderServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&EntitlementsReaderService_ServiceDesc, srv)
}
@@ -78,7 +94,7 @@ func _EntitlementsReaderService_GetEntitlement_Handler(srv interface{}, ctx cont
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.reader.v2.EntitlementsReaderService/GetEntitlement",
+ FullMethod: EntitlementsReaderService_GetEntitlement_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EntitlementsReaderServiceServer).GetEntitlement(ctx, req.(*EntitlementsReaderServiceGetEntitlementRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.go
index c8b5d2e6..13690bcd 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/reader/v2/grant.proto
@@ -14,6 +14,7 @@ import (
anypb "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -24,20 +25,18 @@ const (
)
type GrantsReaderServiceGetGrantRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ GrantId string `protobuf:"bytes,1,opt,name=grant_id,json=grantId,proto3" json:"grant_id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- GrantId string `protobuf:"bytes,1,opt,name=grant_id,json=grantId,proto3" json:"grant_id,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantsReaderServiceGetGrantRequest) Reset() {
*x = GrantsReaderServiceGetGrantRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_grant_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_grant_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantsReaderServiceGetGrantRequest) String() string {
@@ -48,7 +47,7 @@ func (*GrantsReaderServiceGetGrantRequest) ProtoMessage() {}
func (x *GrantsReaderServiceGetGrantRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_grant_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -70,21 +69,25 @@ func (x *GrantsReaderServiceGetGrantRequest) GetGrantId() string {
return ""
}
+func (x *GrantsReaderServiceGetGrantRequest) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
type GrantsReaderServiceGetGrantResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Grant *v2.Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Grant *v2.Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantsReaderServiceGetGrantResponse) Reset() {
*x = GrantsReaderServiceGetGrantResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_grant_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_grant_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantsReaderServiceGetGrantResponse) String() string {
@@ -95,7 +98,7 @@ func (*GrantsReaderServiceGetGrantResponse) ProtoMessage() {}
func (x *GrantsReaderServiceGetGrantResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_grant_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -118,24 +121,21 @@ func (x *GrantsReaderServiceGetGrantResponse) GetGrant() *v2.Grant {
}
type GrantsReaderServiceListGrantsForEntitlementRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Entitlement *v2.Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
+ PrincipalId *v2.ResourceId `protobuf:"bytes,5,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Entitlement *v2.Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"`
- PrincipalId *v2.ResourceId `protobuf:"bytes,5,opt,name=principal_id,json=principalId,proto3" json:"principal_id,omitempty"`
- PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantsReaderServiceListGrantsForEntitlementRequest) Reset() {
*x = GrantsReaderServiceListGrantsForEntitlementRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_grant_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_grant_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantsReaderServiceListGrantsForEntitlementRequest) String() string {
@@ -146,7 +146,7 @@ func (*GrantsReaderServiceListGrantsForEntitlementRequest) ProtoMessage() {}
func (x *GrantsReaderServiceListGrantsForEntitlementRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_grant_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -197,21 +197,18 @@ func (x *GrantsReaderServiceListGrantsForEntitlementRequest) GetAnnotations() []
}
type GrantsReaderServiceListGrantsForEntitlementResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ List []*v2.Grant `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
unknownFields protoimpl.UnknownFields
-
- List []*v2.Grant `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantsReaderServiceListGrantsForEntitlementResponse) Reset() {
*x = GrantsReaderServiceListGrantsForEntitlementResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_grant_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_grant_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantsReaderServiceListGrantsForEntitlementResponse) String() string {
@@ -222,7 +219,7 @@ func (*GrantsReaderServiceListGrantsForEntitlementResponse) ProtoMessage() {}
func (x *GrantsReaderServiceListGrantsForEntitlementResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_grant_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -252,23 +249,20 @@ func (x *GrantsReaderServiceListGrantsForEntitlementResponse) GetNextPageToken()
}
type GrantsReaderServiceListGrantsForResourceTypeRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- ResourceTypeId string `protobuf:"bytes,1,opt,name=resource_type_id,json=resourceTypeId,proto3" json:"resource_type_id,omitempty"`
- PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
- PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceTypeId string `protobuf:"bytes,1,opt,name=resource_type_id,json=resourceTypeId,proto3" json:"resource_type_id,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *GrantsReaderServiceListGrantsForResourceTypeRequest) Reset() {
*x = GrantsReaderServiceListGrantsForResourceTypeRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_grant_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_grant_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantsReaderServiceListGrantsForResourceTypeRequest) String() string {
@@ -279,7 +273,7 @@ func (*GrantsReaderServiceListGrantsForResourceTypeRequest) ProtoMessage() {}
func (x *GrantsReaderServiceListGrantsForResourceTypeRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_grant_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -323,21 +317,18 @@ func (x *GrantsReaderServiceListGrantsForResourceTypeRequest) GetAnnotations() [
}
type GrantsReaderServiceListGrantsForResourceTypeResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ List []*v2.Grant `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
unknownFields protoimpl.UnknownFields
-
- List []*v2.Grant `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *GrantsReaderServiceListGrantsForResourceTypeResponse) Reset() {
*x = GrantsReaderServiceListGrantsForResourceTypeResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_grant_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_grant_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrantsReaderServiceListGrantsForResourceTypeResponse) String() string {
@@ -348,7 +339,7 @@ func (*GrantsReaderServiceListGrantsForResourceTypeResponse) ProtoMessage() {}
func (x *GrantsReaderServiceListGrantsForResourceTypeResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_grant_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -379,7 +370,7 @@ func (x *GrantsReaderServiceListGrantsForResourceTypeResponse) GetNextPageToken(
var File_c1_reader_v2_grant_proto protoreflect.FileDescriptor
-var file_c1_reader_v2_grant_proto_rawDesc = []byte{
+var file_c1_reader_v2_grant_proto_rawDesc = string([]byte{
0x0a, 0x18, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x67,
0x72, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x63, 0x31, 0x2e, 0x72,
0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x21, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e,
@@ -391,153 +382,158 @@ var file_c1_reader_v2_grant_proto_rawDesc = []byte{
0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61,
- 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x22,
- 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x12, 0x25, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08,
- 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x53, 0x0a, 0x23, 0x47, 0x72, 0x61,
- 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76,
- 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0xd7,
- 0x02, 0x0a, 0x32, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73,
- 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65,
- 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74,
- 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02,
- 0x10, 0x01, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12,
- 0x48, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18,
- 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x0b, 0x70, 0x72,
- 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67,
- 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42,
- 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
- 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28,
- 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
- 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
- 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e,
- 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x33, 0x47, 0x72, 0x61,
- 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74,
- 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x2a, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16,
+ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a,
+ 0x22, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80,
+ 0x08, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x22, 0x53, 0x0a, 0x23, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64,
+ 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61,
+ 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74,
+ 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0xd7, 0x02, 0x0a, 0x32, 0x47, 0x72, 0x61, 0x6e,
+ 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c,
+ 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69,
+ 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48,
+ 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
+ 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, 0x6e, 0x74,
+ 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6e,
+ 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32,
- 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0f,
- 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80,
- 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f,
- 0x6b, 0x65, 0x6e, 0x22, 0xfd, 0x01, 0x0a, 0x33, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65,
- 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47,
- 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x10, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80,
- 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79,
- 0x70, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa,
- 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a,
- 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01,
- 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61,
- 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x34, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65,
- 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47,
- 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04,
- 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61,
- 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74,
- 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01,
- 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32,
- 0xcd, 0x03, 0x0a, 0x13, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72,
- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72,
- 0x61, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e,
- 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65,
- 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73,
- 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c,
- 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65,
- 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e,
- 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61,
- 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61,
- 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72,
- 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65,
- 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x19, 0x4c,
- 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65,
- 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65,
- 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47,
- 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x63, 0x31,
- 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74,
- 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69,
- 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
- 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
- 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e,
- 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65,
- 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+ 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05,
+ 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c,
+ 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40,
+ 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70,
+ 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x09,
+ 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x22, 0x98, 0x01, 0x0a, 0x33, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64,
+ 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61,
+ 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x6c, 0x69, 0x73,
+ 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52,
+ 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61,
+ 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d,
+ 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e,
+ 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xfd, 0x01, 0x0a,
+ 0x33, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f,
+ 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d,
+ 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0e, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a,
+ 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d,
+ 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61,
+ 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72,
+ 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x99, 0x01, 0x0a,
+ 0x34, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f,
+ 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73,
+ 0x74, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72,
+ 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50,
+ 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xcd, 0x03, 0x0a, 0x13, 0x47, 0x72, 0x61,
+ 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x12, 0x6f, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x63,
+ 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e,
+ 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47,
+ 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31,
+ 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72,
+ 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73,
+ 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40,
+ 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72,
+ 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e,
+ 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x41, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e,
+ 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72,
+ 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e,
+ 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x41, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f,
+ 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74,
+ 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72,
+ 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62,
+ 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
var (
file_c1_reader_v2_grant_proto_rawDescOnce sync.Once
- file_c1_reader_v2_grant_proto_rawDescData = file_c1_reader_v2_grant_proto_rawDesc
+ file_c1_reader_v2_grant_proto_rawDescData []byte
)
func file_c1_reader_v2_grant_proto_rawDescGZIP() []byte {
file_c1_reader_v2_grant_proto_rawDescOnce.Do(func() {
- file_c1_reader_v2_grant_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_reader_v2_grant_proto_rawDescData)
+ file_c1_reader_v2_grant_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_reader_v2_grant_proto_rawDesc), len(file_c1_reader_v2_grant_proto_rawDesc)))
})
return file_c1_reader_v2_grant_proto_rawDescData
}
var file_c1_reader_v2_grant_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
-var file_c1_reader_v2_grant_proto_goTypes = []interface{}{
+var file_c1_reader_v2_grant_proto_goTypes = []any{
(*GrantsReaderServiceGetGrantRequest)(nil), // 0: c1.reader.v2.GrantsReaderServiceGetGrantRequest
(*GrantsReaderServiceGetGrantResponse)(nil), // 1: c1.reader.v2.GrantsReaderServiceGetGrantResponse
(*GrantsReaderServiceListGrantsForEntitlementRequest)(nil), // 2: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest
(*GrantsReaderServiceListGrantsForEntitlementResponse)(nil), // 3: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementResponse
(*GrantsReaderServiceListGrantsForResourceTypeRequest)(nil), // 4: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeRequest
(*GrantsReaderServiceListGrantsForResourceTypeResponse)(nil), // 5: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeResponse
- (*v2.Grant)(nil), // 6: c1.connector.v2.Grant
- (*v2.Entitlement)(nil), // 7: c1.connector.v2.Entitlement
- (*v2.ResourceId)(nil), // 8: c1.connector.v2.ResourceId
- (*anypb.Any)(nil), // 9: google.protobuf.Any
+ (*anypb.Any)(nil), // 6: google.protobuf.Any
+ (*v2.Grant)(nil), // 7: c1.connector.v2.Grant
+ (*v2.Entitlement)(nil), // 8: c1.connector.v2.Entitlement
+ (*v2.ResourceId)(nil), // 9: c1.connector.v2.ResourceId
}
var file_c1_reader_v2_grant_proto_depIdxs = []int32{
- 6, // 0: c1.reader.v2.GrantsReaderServiceGetGrantResponse.grant:type_name -> c1.connector.v2.Grant
- 7, // 1: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.entitlement:type_name -> c1.connector.v2.Entitlement
- 8, // 2: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.principal_id:type_name -> c1.connector.v2.ResourceId
- 9, // 3: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.annotations:type_name -> google.protobuf.Any
- 6, // 4: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementResponse.list:type_name -> c1.connector.v2.Grant
- 9, // 5: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeRequest.annotations:type_name -> google.protobuf.Any
- 6, // 6: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeResponse.list:type_name -> c1.connector.v2.Grant
- 0, // 7: c1.reader.v2.GrantsReaderService.GetGrant:input_type -> c1.reader.v2.GrantsReaderServiceGetGrantRequest
- 2, // 8: c1.reader.v2.GrantsReaderService.ListGrantsForEntitlement:input_type -> c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest
- 4, // 9: c1.reader.v2.GrantsReaderService.ListGrantsForResourceType:input_type -> c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeRequest
- 1, // 10: c1.reader.v2.GrantsReaderService.GetGrant:output_type -> c1.reader.v2.GrantsReaderServiceGetGrantResponse
- 3, // 11: c1.reader.v2.GrantsReaderService.ListGrantsForEntitlement:output_type -> c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementResponse
- 5, // 12: c1.reader.v2.GrantsReaderService.ListGrantsForResourceType:output_type -> c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeResponse
- 10, // [10:13] is the sub-list for method output_type
- 7, // [7:10] is the sub-list for method input_type
- 7, // [7:7] is the sub-list for extension type_name
- 7, // [7:7] is the sub-list for extension extendee
- 0, // [0:7] is the sub-list for field type_name
+ 6, // 0: c1.reader.v2.GrantsReaderServiceGetGrantRequest.annotations:type_name -> google.protobuf.Any
+ 7, // 1: c1.reader.v2.GrantsReaderServiceGetGrantResponse.grant:type_name -> c1.connector.v2.Grant
+ 8, // 2: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.entitlement:type_name -> c1.connector.v2.Entitlement
+ 9, // 3: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.principal_id:type_name -> c1.connector.v2.ResourceId
+ 6, // 4: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.annotations:type_name -> google.protobuf.Any
+ 7, // 5: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementResponse.list:type_name -> c1.connector.v2.Grant
+ 6, // 6: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeRequest.annotations:type_name -> google.protobuf.Any
+ 7, // 7: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeResponse.list:type_name -> c1.connector.v2.Grant
+ 0, // 8: c1.reader.v2.GrantsReaderService.GetGrant:input_type -> c1.reader.v2.GrantsReaderServiceGetGrantRequest
+ 2, // 9: c1.reader.v2.GrantsReaderService.ListGrantsForEntitlement:input_type -> c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest
+ 4, // 10: c1.reader.v2.GrantsReaderService.ListGrantsForResourceType:input_type -> c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeRequest
+ 1, // 11: c1.reader.v2.GrantsReaderService.GetGrant:output_type -> c1.reader.v2.GrantsReaderServiceGetGrantResponse
+ 3, // 12: c1.reader.v2.GrantsReaderService.ListGrantsForEntitlement:output_type -> c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementResponse
+ 5, // 13: c1.reader.v2.GrantsReaderService.ListGrantsForResourceType:output_type -> c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeResponse
+ 11, // [11:14] is the sub-list for method output_type
+ 8, // [8:11] is the sub-list for method input_type
+ 8, // [8:8] is the sub-list for extension type_name
+ 8, // [8:8] is the sub-list for extension extendee
+ 0, // [0:8] is the sub-list for field type_name
}
func init() { file_c1_reader_v2_grant_proto_init() }
@@ -545,85 +541,11 @@ func file_c1_reader_v2_grant_proto_init() {
if File_c1_reader_v2_grant_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_reader_v2_grant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantsReaderServiceGetGrantRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_reader_v2_grant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantsReaderServiceGetGrantResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_reader_v2_grant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantsReaderServiceListGrantsForEntitlementRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_reader_v2_grant_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantsReaderServiceListGrantsForEntitlementResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_reader_v2_grant_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantsReaderServiceListGrantsForResourceTypeRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_reader_v2_grant_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GrantsReaderServiceListGrantsForResourceTypeResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_reader_v2_grant_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_reader_v2_grant_proto_rawDesc), len(file_c1_reader_v2_grant_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
@@ -634,7 +556,6 @@ func file_c1_reader_v2_grant_proto_init() {
MessageInfos: file_c1_reader_v2_grant_proto_msgTypes,
}.Build()
File_c1_reader_v2_grant_proto = out.File
- file_c1_reader_v2_grant_proto_rawDesc = nil
file_c1_reader_v2_grant_proto_goTypes = nil
file_c1_reader_v2_grant_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.validate.go
index b6250a99..67a5cfac 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.validate.go
@@ -69,6 +69,40 @@ func (m *GrantsReaderServiceGetGrantRequest) validate(all bool) error {
errors = append(errors, err)
}
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GrantsReaderServiceGetGrantRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GrantsReaderServiceGetGrantRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GrantsReaderServiceGetGrantRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
if len(errors) > 0 {
return GrantsReaderServiceGetGrantRequestMultiError(errors)
}
@@ -84,7 +118,7 @@ type GrantsReaderServiceGetGrantRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantsReaderServiceGetGrantRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -218,7 +252,7 @@ type GrantsReaderServiceGetGrantResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantsReaderServiceGetGrantResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -458,7 +492,7 @@ type GrantsReaderServiceListGrantsForEntitlementRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantsReaderServiceListGrantsForEntitlementRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -621,7 +655,7 @@ type GrantsReaderServiceListGrantsForEntitlementResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantsReaderServiceListGrantsForEntitlementResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -814,7 +848,7 @@ type GrantsReaderServiceListGrantsForResourceTypeRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantsReaderServiceListGrantsForResourceTypeRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -977,7 +1011,7 @@ type GrantsReaderServiceListGrantsForResourceTypeResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m GrantsReaderServiceListGrantsForResourceTypeResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant_grpc.pb.go
index 888dbcc7..08a04497 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/reader/v2/grant.proto
@@ -15,8 +15,14 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ GrantsReaderService_GetGrant_FullMethodName = "/c1.reader.v2.GrantsReaderService/GetGrant"
+ GrantsReaderService_ListGrantsForEntitlement_FullMethodName = "/c1.reader.v2.GrantsReaderService/ListGrantsForEntitlement"
+ GrantsReaderService_ListGrantsForResourceType_FullMethodName = "/c1.reader.v2.GrantsReaderService/ListGrantsForResourceType"
+)
// GrantsReaderServiceClient is the client API for GrantsReaderService service.
//
@@ -36,8 +42,9 @@ func NewGrantsReaderServiceClient(cc grpc.ClientConnInterface) GrantsReaderServi
}
func (c *grantsReaderServiceClient) GetGrant(ctx context.Context, in *GrantsReaderServiceGetGrantRequest, opts ...grpc.CallOption) (*GrantsReaderServiceGetGrantResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GrantsReaderServiceGetGrantResponse)
- err := c.cc.Invoke(ctx, "/c1.reader.v2.GrantsReaderService/GetGrant", in, out, opts...)
+ err := c.cc.Invoke(ctx, GrantsReaderService_GetGrant_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -45,8 +52,9 @@ func (c *grantsReaderServiceClient) GetGrant(ctx context.Context, in *GrantsRead
}
func (c *grantsReaderServiceClient) ListGrantsForEntitlement(ctx context.Context, in *GrantsReaderServiceListGrantsForEntitlementRequest, opts ...grpc.CallOption) (*GrantsReaderServiceListGrantsForEntitlementResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GrantsReaderServiceListGrantsForEntitlementResponse)
- err := c.cc.Invoke(ctx, "/c1.reader.v2.GrantsReaderService/ListGrantsForEntitlement", in, out, opts...)
+ err := c.cc.Invoke(ctx, GrantsReaderService_ListGrantsForEntitlement_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -54,8 +62,9 @@ func (c *grantsReaderServiceClient) ListGrantsForEntitlement(ctx context.Context
}
func (c *grantsReaderServiceClient) ListGrantsForResourceType(ctx context.Context, in *GrantsReaderServiceListGrantsForResourceTypeRequest, opts ...grpc.CallOption) (*GrantsReaderServiceListGrantsForResourceTypeResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GrantsReaderServiceListGrantsForResourceTypeResponse)
- err := c.cc.Invoke(ctx, "/c1.reader.v2.GrantsReaderService/ListGrantsForResourceType", in, out, opts...)
+ err := c.cc.Invoke(ctx, GrantsReaderService_ListGrantsForResourceType_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -64,16 +73,19 @@ func (c *grantsReaderServiceClient) ListGrantsForResourceType(ctx context.Contex
// GrantsReaderServiceServer is the server API for GrantsReaderService service.
// All implementations should embed UnimplementedGrantsReaderServiceServer
-// for forward compatibility
+// for forward compatibility.
type GrantsReaderServiceServer interface {
GetGrant(context.Context, *GrantsReaderServiceGetGrantRequest) (*GrantsReaderServiceGetGrantResponse, error)
ListGrantsForEntitlement(context.Context, *GrantsReaderServiceListGrantsForEntitlementRequest) (*GrantsReaderServiceListGrantsForEntitlementResponse, error)
ListGrantsForResourceType(context.Context, *GrantsReaderServiceListGrantsForResourceTypeRequest) (*GrantsReaderServiceListGrantsForResourceTypeResponse, error)
}
-// UnimplementedGrantsReaderServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedGrantsReaderServiceServer struct {
-}
+// UnimplementedGrantsReaderServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedGrantsReaderServiceServer struct{}
func (UnimplementedGrantsReaderServiceServer) GetGrant(context.Context, *GrantsReaderServiceGetGrantRequest) (*GrantsReaderServiceGetGrantResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetGrant not implemented")
@@ -84,6 +96,7 @@ func (UnimplementedGrantsReaderServiceServer) ListGrantsForEntitlement(context.C
func (UnimplementedGrantsReaderServiceServer) ListGrantsForResourceType(context.Context, *GrantsReaderServiceListGrantsForResourceTypeRequest) (*GrantsReaderServiceListGrantsForResourceTypeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListGrantsForResourceType not implemented")
}
+func (UnimplementedGrantsReaderServiceServer) testEmbeddedByValue() {}
// UnsafeGrantsReaderServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to GrantsReaderServiceServer will
@@ -93,6 +106,13 @@ type UnsafeGrantsReaderServiceServer interface {
}
func RegisterGrantsReaderServiceServer(s grpc.ServiceRegistrar, srv GrantsReaderServiceServer) {
+ // If the following call pancis, it indicates UnimplementedGrantsReaderServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&GrantsReaderService_ServiceDesc, srv)
}
@@ -106,7 +126,7 @@ func _GrantsReaderService_GetGrant_Handler(srv interface{}, ctx context.Context,
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.reader.v2.GrantsReaderService/GetGrant",
+ FullMethod: GrantsReaderService_GetGrant_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GrantsReaderServiceServer).GetGrant(ctx, req.(*GrantsReaderServiceGetGrantRequest))
@@ -124,7 +144,7 @@ func _GrantsReaderService_ListGrantsForEntitlement_Handler(srv interface{}, ctx
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.reader.v2.GrantsReaderService/ListGrantsForEntitlement",
+ FullMethod: GrantsReaderService_ListGrantsForEntitlement_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GrantsReaderServiceServer).ListGrantsForEntitlement(ctx, req.(*GrantsReaderServiceListGrantsForEntitlementRequest))
@@ -142,7 +162,7 @@ func _GrantsReaderService_ListGrantsForResourceType_Handler(srv interface{}, ctx
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.reader.v2.GrantsReaderService/ListGrantsForResourceType",
+ FullMethod: GrantsReaderService_ListGrantsForResourceType_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GrantsReaderServiceServer).ListGrantsForResourceType(ctx, req.(*GrantsReaderServiceListGrantsForResourceTypeRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.go
index 21624d99..06a4ec90 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/reader/v2/resource.proto
@@ -14,6 +14,7 @@ import (
anypb "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -24,20 +25,18 @@ const (
)
type ResourceTypesReaderServiceGetResourceTypeRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- ResourceTypeId string `protobuf:"bytes,1,opt,name=resource_type_id,json=resourceTypeId,proto3" json:"resource_type_id,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceTypeId string `protobuf:"bytes,1,opt,name=resource_type_id,json=resourceTypeId,proto3" json:"resource_type_id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *ResourceTypesReaderServiceGetResourceTypeRequest) Reset() {
*x = ResourceTypesReaderServiceGetResourceTypeRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_resource_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_resource_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourceTypesReaderServiceGetResourceTypeRequest) String() string {
@@ -48,7 +47,7 @@ func (*ResourceTypesReaderServiceGetResourceTypeRequest) ProtoMessage() {}
func (x *ResourceTypesReaderServiceGetResourceTypeRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_resource_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -70,21 +69,25 @@ func (x *ResourceTypesReaderServiceGetResourceTypeRequest) GetResourceTypeId() s
return ""
}
+func (x *ResourceTypesReaderServiceGetResourceTypeRequest) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
type ResourceTypesReaderServiceGetResourceTypeResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceType *v2.ResourceType `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
unknownFields protoimpl.UnknownFields
-
- ResourceType *v2.ResourceType `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ResourceTypesReaderServiceGetResourceTypeResponse) Reset() {
*x = ResourceTypesReaderServiceGetResourceTypeResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_resource_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_resource_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourceTypesReaderServiceGetResourceTypeResponse) String() string {
@@ -95,7 +98,7 @@ func (*ResourceTypesReaderServiceGetResourceTypeResponse) ProtoMessage() {}
func (x *ResourceTypesReaderServiceGetResourceTypeResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_resource_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -118,21 +121,18 @@ func (x *ResourceTypesReaderServiceGetResourceTypeResponse) GetResourceType() *v
}
type ResourcesReaderServiceGetResourceRequest struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ResourceId *v2.ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
unknownFields protoimpl.UnknownFields
-
- ResourceId *v2.ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
- Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ResourcesReaderServiceGetResourceRequest) Reset() {
*x = ResourcesReaderServiceGetResourceRequest{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_resource_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_resource_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourcesReaderServiceGetResourceRequest) String() string {
@@ -143,7 +143,7 @@ func (*ResourcesReaderServiceGetResourceRequest) ProtoMessage() {}
func (x *ResourcesReaderServiceGetResourceRequest) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_resource_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -173,20 +173,17 @@ func (x *ResourcesReaderServiceGetResourceRequest) GetAnnotations() []*anypb.Any
}
type ResourcesReaderServiceGetResourceResponse struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resource *v2.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
unknownFields protoimpl.UnknownFields
-
- Resource *v2.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *ResourcesReaderServiceGetResourceResponse) Reset() {
*x = ResourcesReaderServiceGetResourceResponse{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_reader_v2_resource_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_reader_v2_resource_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ResourcesReaderServiceGetResourceResponse) String() string {
@@ -197,7 +194,7 @@ func (*ResourcesReaderServiceGetResourceResponse) ProtoMessage() {}
func (x *ResourcesReaderServiceGetResourceResponse) ProtoReflect() protoreflect.Message {
mi := &file_c1_reader_v2_resource_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -221,7 +218,7 @@ func (x *ResourcesReaderServiceGetResourceResponse) GetResource() *v2.Resource {
var File_c1_reader_v2_resource_proto protoreflect.FileDescriptor
-var file_c1_reader_v2_resource_proto_rawDesc = []byte{
+var file_c1_reader_v2_resource_proto_rawDesc = string([]byte{
0x0a, 0x1b, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x72,
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x63,
0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x1e, 0x63, 0x31, 0x2f,
@@ -230,101 +227,105 @@ var file_c1_reader_v2_resource_proto_rawDesc = []byte{
0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
- 0x5c, 0x0a, 0x30, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73,
- 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
- 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0x77, 0x0a,
- 0x31, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65,
- 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74,
- 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31, 0x2e, 0x63,
- 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x28, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
- 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f,
- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52,
- 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61,
- 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x22, 0x62, 0x0a, 0x29, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
- 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x32, 0xb1, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x2e, 0x63, 0x31, 0x2e,
- 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72,
- 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
- 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x63, 0x31, 0x2e,
- 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x94, 0x01, 0x0a, 0x30, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
+ 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65,
+ 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x36,
+ 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x77, 0x0a, 0x31, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
- 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x98, 0x01, 0x0a, 0x16,
+ 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f,
+ 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
+ 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22,
+ 0xaa, 0x01, 0x0a, 0x28, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x61,
+ 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0b,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08,
+ 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
+ 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x62, 0x0a, 0x29,
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53,
- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x36, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65,
- 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65,
- 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e,
- 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
- 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e,
- 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63,
- 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x33,
-}
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x32, 0xb1, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
+ 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
+ 0x92, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
+ 0x79, 0x70, 0x65, 0x12, 0x3e, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e,
+ 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73,
+ 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e,
+ 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73,
+ 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x98, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
+ 0x7e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x36,
+ 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64,
+ 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52,
+ 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
+ 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
+ 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e,
+ 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65,
+ 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
var (
file_c1_reader_v2_resource_proto_rawDescOnce sync.Once
- file_c1_reader_v2_resource_proto_rawDescData = file_c1_reader_v2_resource_proto_rawDesc
+ file_c1_reader_v2_resource_proto_rawDescData []byte
)
func file_c1_reader_v2_resource_proto_rawDescGZIP() []byte {
file_c1_reader_v2_resource_proto_rawDescOnce.Do(func() {
- file_c1_reader_v2_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_reader_v2_resource_proto_rawDescData)
+ file_c1_reader_v2_resource_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_reader_v2_resource_proto_rawDesc), len(file_c1_reader_v2_resource_proto_rawDesc)))
})
return file_c1_reader_v2_resource_proto_rawDescData
}
var file_c1_reader_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
-var file_c1_reader_v2_resource_proto_goTypes = []interface{}{
+var file_c1_reader_v2_resource_proto_goTypes = []any{
(*ResourceTypesReaderServiceGetResourceTypeRequest)(nil), // 0: c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeRequest
(*ResourceTypesReaderServiceGetResourceTypeResponse)(nil), // 1: c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeResponse
(*ResourcesReaderServiceGetResourceRequest)(nil), // 2: c1.reader.v2.ResourcesReaderServiceGetResourceRequest
(*ResourcesReaderServiceGetResourceResponse)(nil), // 3: c1.reader.v2.ResourcesReaderServiceGetResourceResponse
- (*v2.ResourceType)(nil), // 4: c1.connector.v2.ResourceType
- (*v2.ResourceId)(nil), // 5: c1.connector.v2.ResourceId
- (*anypb.Any)(nil), // 6: google.protobuf.Any
- (*v2.Resource)(nil), // 7: c1.connector.v2.Resource
+ (*anypb.Any)(nil), // 4: google.protobuf.Any
+ (*v2.ResourceType)(nil), // 5: c1.connector.v2.ResourceType
+ (*v2.ResourceId)(nil), // 6: c1.connector.v2.ResourceId
+ (*v2.Resource)(nil), // 7: c1.connector.v2.Resource
}
var file_c1_reader_v2_resource_proto_depIdxs = []int32{
- 4, // 0: c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeResponse.resource_type:type_name -> c1.connector.v2.ResourceType
- 5, // 1: c1.reader.v2.ResourcesReaderServiceGetResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId
- 6, // 2: c1.reader.v2.ResourcesReaderServiceGetResourceRequest.annotations:type_name -> google.protobuf.Any
- 7, // 3: c1.reader.v2.ResourcesReaderServiceGetResourceResponse.resource:type_name -> c1.connector.v2.Resource
- 0, // 4: c1.reader.v2.ResourceTypesReaderService.GetResourceType:input_type -> c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeRequest
- 2, // 5: c1.reader.v2.ResourcesReaderService.GetResource:input_type -> c1.reader.v2.ResourcesReaderServiceGetResourceRequest
- 1, // 6: c1.reader.v2.ResourceTypesReaderService.GetResourceType:output_type -> c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeResponse
- 3, // 7: c1.reader.v2.ResourcesReaderService.GetResource:output_type -> c1.reader.v2.ResourcesReaderServiceGetResourceResponse
- 6, // [6:8] is the sub-list for method output_type
- 4, // [4:6] is the sub-list for method input_type
- 4, // [4:4] is the sub-list for extension type_name
- 4, // [4:4] is the sub-list for extension extendee
- 0, // [0:4] is the sub-list for field type_name
+ 4, // 0: c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeRequest.annotations:type_name -> google.protobuf.Any
+ 5, // 1: c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeResponse.resource_type:type_name -> c1.connector.v2.ResourceType
+ 6, // 2: c1.reader.v2.ResourcesReaderServiceGetResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId
+ 4, // 3: c1.reader.v2.ResourcesReaderServiceGetResourceRequest.annotations:type_name -> google.protobuf.Any
+ 7, // 4: c1.reader.v2.ResourcesReaderServiceGetResourceResponse.resource:type_name -> c1.connector.v2.Resource
+ 0, // 5: c1.reader.v2.ResourceTypesReaderService.GetResourceType:input_type -> c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeRequest
+ 2, // 6: c1.reader.v2.ResourcesReaderService.GetResource:input_type -> c1.reader.v2.ResourcesReaderServiceGetResourceRequest
+ 1, // 7: c1.reader.v2.ResourceTypesReaderService.GetResourceType:output_type -> c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeResponse
+ 3, // 8: c1.reader.v2.ResourcesReaderService.GetResource:output_type -> c1.reader.v2.ResourcesReaderServiceGetResourceResponse
+ 7, // [7:9] is the sub-list for method output_type
+ 5, // [5:7] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
}
func init() { file_c1_reader_v2_resource_proto_init() }
@@ -332,61 +333,11 @@ func file_c1_reader_v2_resource_proto_init() {
if File_c1_reader_v2_resource_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_reader_v2_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourceTypesReaderServiceGetResourceTypeRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_reader_v2_resource_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourceTypesReaderServiceGetResourceTypeResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_reader_v2_resource_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourcesReaderServiceGetResourceRequest); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_c1_reader_v2_resource_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResourcesReaderServiceGetResourceResponse); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_reader_v2_resource_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_reader_v2_resource_proto_rawDesc), len(file_c1_reader_v2_resource_proto_rawDesc)),
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
@@ -397,7 +348,6 @@ func file_c1_reader_v2_resource_proto_init() {
MessageInfos: file_c1_reader_v2_resource_proto_msgTypes,
}.Build()
File_c1_reader_v2_resource_proto = out.File
- file_c1_reader_v2_resource_proto_rawDesc = nil
file_c1_reader_v2_resource_proto_goTypes = nil
file_c1_reader_v2_resource_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.validate.go
index 3fc91244..e628ca15 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.validate.go
@@ -61,6 +61,40 @@ func (m *ResourceTypesReaderServiceGetResourceTypeRequest) validate(all bool) er
// no validation rules for ResourceTypeId
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceTypesReaderServiceGetResourceTypeRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceTypesReaderServiceGetResourceTypeRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceTypesReaderServiceGetResourceTypeRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
if len(errors) > 0 {
return ResourceTypesReaderServiceGetResourceTypeRequestMultiError(errors)
}
@@ -76,7 +110,7 @@ type ResourceTypesReaderServiceGetResourceTypeRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourceTypesReaderServiceGetResourceTypeRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -218,7 +252,7 @@ type ResourceTypesReaderServiceGetResourceTypeResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourceTypesReaderServiceGetResourceTypeResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -405,7 +439,7 @@ type ResourcesReaderServiceGetResourceRequestMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourcesReaderServiceGetResourceRequestMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
@@ -540,7 +574,7 @@ type ResourcesReaderServiceGetResourceResponseMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m ResourcesReaderServiceGetResourceResponseMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource_grpc.pb.go
index 0e3d558a..d0490e59 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource_grpc.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource_grpc.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
+// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: c1/reader/v2/resource.proto
@@ -15,8 +15,12 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ ResourceTypesReaderService_GetResourceType_FullMethodName = "/c1.reader.v2.ResourceTypesReaderService/GetResourceType"
+)
// ResourceTypesReaderServiceClient is the client API for ResourceTypesReaderService service.
//
@@ -34,8 +38,9 @@ func NewResourceTypesReaderServiceClient(cc grpc.ClientConnInterface) ResourceTy
}
func (c *resourceTypesReaderServiceClient) GetResourceType(ctx context.Context, in *ResourceTypesReaderServiceGetResourceTypeRequest, opts ...grpc.CallOption) (*ResourceTypesReaderServiceGetResourceTypeResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ResourceTypesReaderServiceGetResourceTypeResponse)
- err := c.cc.Invoke(ctx, "/c1.reader.v2.ResourceTypesReaderService/GetResourceType", in, out, opts...)
+ err := c.cc.Invoke(ctx, ResourceTypesReaderService_GetResourceType_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -44,18 +49,22 @@ func (c *resourceTypesReaderServiceClient) GetResourceType(ctx context.Context,
// ResourceTypesReaderServiceServer is the server API for ResourceTypesReaderService service.
// All implementations should embed UnimplementedResourceTypesReaderServiceServer
-// for forward compatibility
+// for forward compatibility.
type ResourceTypesReaderServiceServer interface {
GetResourceType(context.Context, *ResourceTypesReaderServiceGetResourceTypeRequest) (*ResourceTypesReaderServiceGetResourceTypeResponse, error)
}
-// UnimplementedResourceTypesReaderServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedResourceTypesReaderServiceServer struct {
-}
+// UnimplementedResourceTypesReaderServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedResourceTypesReaderServiceServer struct{}
func (UnimplementedResourceTypesReaderServiceServer) GetResourceType(context.Context, *ResourceTypesReaderServiceGetResourceTypeRequest) (*ResourceTypesReaderServiceGetResourceTypeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetResourceType not implemented")
}
+func (UnimplementedResourceTypesReaderServiceServer) testEmbeddedByValue() {}
// UnsafeResourceTypesReaderServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ResourceTypesReaderServiceServer will
@@ -65,6 +74,13 @@ type UnsafeResourceTypesReaderServiceServer interface {
}
func RegisterResourceTypesReaderServiceServer(s grpc.ServiceRegistrar, srv ResourceTypesReaderServiceServer) {
+ // If the following call pancis, it indicates UnimplementedResourceTypesReaderServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&ResourceTypesReaderService_ServiceDesc, srv)
}
@@ -78,7 +94,7 @@ func _ResourceTypesReaderService_GetResourceType_Handler(srv interface{}, ctx co
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.reader.v2.ResourceTypesReaderService/GetResourceType",
+ FullMethod: ResourceTypesReaderService_GetResourceType_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceTypesReaderServiceServer).GetResourceType(ctx, req.(*ResourceTypesReaderServiceGetResourceTypeRequest))
@@ -102,6 +118,10 @@ var ResourceTypesReaderService_ServiceDesc = grpc.ServiceDesc{
Metadata: "c1/reader/v2/resource.proto",
}
+const (
+ ResourcesReaderService_GetResource_FullMethodName = "/c1.reader.v2.ResourcesReaderService/GetResource"
+)
+
// ResourcesReaderServiceClient is the client API for ResourcesReaderService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@@ -118,8 +138,9 @@ func NewResourcesReaderServiceClient(cc grpc.ClientConnInterface) ResourcesReade
}
func (c *resourcesReaderServiceClient) GetResource(ctx context.Context, in *ResourcesReaderServiceGetResourceRequest, opts ...grpc.CallOption) (*ResourcesReaderServiceGetResourceResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ResourcesReaderServiceGetResourceResponse)
- err := c.cc.Invoke(ctx, "/c1.reader.v2.ResourcesReaderService/GetResource", in, out, opts...)
+ err := c.cc.Invoke(ctx, ResourcesReaderService_GetResource_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -128,18 +149,22 @@ func (c *resourcesReaderServiceClient) GetResource(ctx context.Context, in *Reso
// ResourcesReaderServiceServer is the server API for ResourcesReaderService service.
// All implementations should embed UnimplementedResourcesReaderServiceServer
-// for forward compatibility
+// for forward compatibility.
type ResourcesReaderServiceServer interface {
GetResource(context.Context, *ResourcesReaderServiceGetResourceRequest) (*ResourcesReaderServiceGetResourceResponse, error)
}
-// UnimplementedResourcesReaderServiceServer should be embedded to have forward compatible implementations.
-type UnimplementedResourcesReaderServiceServer struct {
-}
+// UnimplementedResourcesReaderServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedResourcesReaderServiceServer struct{}
func (UnimplementedResourcesReaderServiceServer) GetResource(context.Context, *ResourcesReaderServiceGetResourceRequest) (*ResourcesReaderServiceGetResourceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetResource not implemented")
}
+func (UnimplementedResourcesReaderServiceServer) testEmbeddedByValue() {}
// UnsafeResourcesReaderServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ResourcesReaderServiceServer will
@@ -149,6 +174,13 @@ type UnsafeResourcesReaderServiceServer interface {
}
func RegisterResourcesReaderServiceServer(s grpc.ServiceRegistrar, srv ResourcesReaderServiceServer) {
+ // If the following call pancis, it indicates UnimplementedResourcesReaderServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
s.RegisterService(&ResourcesReaderService_ServiceDesc, srv)
}
@@ -162,7 +194,7 @@ func _ResourcesReaderService_GetResource_Handler(srv interface{}, ctx context.Co
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/c1.reader.v2.ResourcesReaderService/GetResource",
+ FullMethod: ResourcesReaderService_GetResource_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourcesReaderServiceServer).GetResource(ctx, req.(*ResourcesReaderServiceGetResourceRequest))
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.go
new file mode 100644
index 00000000..9b50c16f
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.go
@@ -0,0 +1,594 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.4
+// protoc (unknown)
+// source: c1/reader/v2/sync.proto
+
+package v2
+
+import (
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SyncRun struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ StartedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
+ EndedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=ended_at,json=endedAt,proto3" json:"ended_at,omitempty"`
+ SyncToken string `protobuf:"bytes,4,opt,name=sync_token,json=syncToken,proto3" json:"sync_token,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SyncRun) Reset() {
+ *x = SyncRun{}
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SyncRun) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncRun) ProtoMessage() {}
+
+func (x *SyncRun) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncRun.ProtoReflect.Descriptor instead.
+func (*SyncRun) Descriptor() ([]byte, []int) {
+ return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SyncRun) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *SyncRun) GetStartedAt() *timestamppb.Timestamp {
+ if x != nil {
+ return x.StartedAt
+ }
+ return nil
+}
+
+func (x *SyncRun) GetEndedAt() *timestamppb.Timestamp {
+ if x != nil {
+ return x.EndedAt
+ }
+ return nil
+}
+
+func (x *SyncRun) GetSyncToken() string {
+ if x != nil {
+ return x.SyncToken
+ }
+ return ""
+}
+
+type SyncsReaderServiceGetSyncRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SyncId string `protobuf:"bytes,1,opt,name=sync_id,json=syncId,proto3" json:"sync_id,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SyncsReaderServiceGetSyncRequest) Reset() {
+ *x = SyncsReaderServiceGetSyncRequest{}
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SyncsReaderServiceGetSyncRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncsReaderServiceGetSyncRequest) ProtoMessage() {}
+
+func (x *SyncsReaderServiceGetSyncRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncsReaderServiceGetSyncRequest.ProtoReflect.Descriptor instead.
+func (*SyncsReaderServiceGetSyncRequest) Descriptor() ([]byte, []int) {
+ return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *SyncsReaderServiceGetSyncRequest) GetSyncId() string {
+ if x != nil {
+ return x.SyncId
+ }
+ return ""
+}
+
+func (x *SyncsReaderServiceGetSyncRequest) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type SyncsReaderServiceGetSyncResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Sync *SyncRun `protobuf:"bytes,1,opt,name=sync,proto3" json:"sync,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SyncsReaderServiceGetSyncResponse) Reset() {
+ *x = SyncsReaderServiceGetSyncResponse{}
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SyncsReaderServiceGetSyncResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncsReaderServiceGetSyncResponse) ProtoMessage() {}
+
+func (x *SyncsReaderServiceGetSyncResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncsReaderServiceGetSyncResponse.ProtoReflect.Descriptor instead.
+func (*SyncsReaderServiceGetSyncResponse) Descriptor() ([]byte, []int) {
+ return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *SyncsReaderServiceGetSyncResponse) GetSync() *SyncRun {
+ if x != nil {
+ return x.Sync
+ }
+ return nil
+}
+
+func (x *SyncsReaderServiceGetSyncResponse) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type SyncsReaderServiceListSyncsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SyncsReaderServiceListSyncsRequest) Reset() {
+ *x = SyncsReaderServiceListSyncsRequest{}
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SyncsReaderServiceListSyncsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncsReaderServiceListSyncsRequest) ProtoMessage() {}
+
+func (x *SyncsReaderServiceListSyncsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncsReaderServiceListSyncsRequest.ProtoReflect.Descriptor instead.
+func (*SyncsReaderServiceListSyncsRequest) Descriptor() ([]byte, []int) {
+ return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *SyncsReaderServiceListSyncsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *SyncsReaderServiceListSyncsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *SyncsReaderServiceListSyncsRequest) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type SyncsReaderServiceListSyncsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Syncs []*SyncRun `protobuf:"bytes,1,rep,name=syncs,proto3" json:"syncs,omitempty"`
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SyncsReaderServiceListSyncsResponse) Reset() {
+ *x = SyncsReaderServiceListSyncsResponse{}
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SyncsReaderServiceListSyncsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncsReaderServiceListSyncsResponse) ProtoMessage() {}
+
+func (x *SyncsReaderServiceListSyncsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncsReaderServiceListSyncsResponse.ProtoReflect.Descriptor instead.
+func (*SyncsReaderServiceListSyncsResponse) Descriptor() ([]byte, []int) {
+ return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *SyncsReaderServiceListSyncsResponse) GetSyncs() []*SyncRun {
+ if x != nil {
+ return x.Syncs
+ }
+ return nil
+}
+
+func (x *SyncsReaderServiceListSyncsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+func (x *SyncsReaderServiceListSyncsResponse) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type SyncsReaderServiceGetLatestFinishedSyncRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SyncsReaderServiceGetLatestFinishedSyncRequest) Reset() {
+ *x = SyncsReaderServiceGetLatestFinishedSyncRequest{}
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SyncsReaderServiceGetLatestFinishedSyncRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncsReaderServiceGetLatestFinishedSyncRequest) ProtoMessage() {}
+
+func (x *SyncsReaderServiceGetLatestFinishedSyncRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncsReaderServiceGetLatestFinishedSyncRequest.ProtoReflect.Descriptor instead.
+func (*SyncsReaderServiceGetLatestFinishedSyncRequest) Descriptor() ([]byte, []int) {
+ return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *SyncsReaderServiceGetLatestFinishedSyncRequest) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+type SyncsReaderServiceGetLatestFinishedSyncResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Sync *SyncRun `protobuf:"bytes,1,opt,name=sync,proto3" json:"sync,omitempty"`
+ Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SyncsReaderServiceGetLatestFinishedSyncResponse) Reset() {
+ *x = SyncsReaderServiceGetLatestFinishedSyncResponse{}
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SyncsReaderServiceGetLatestFinishedSyncResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SyncsReaderServiceGetLatestFinishedSyncResponse) ProtoMessage() {}
+
+func (x *SyncsReaderServiceGetLatestFinishedSyncResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_reader_v2_sync_proto_msgTypes[6]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SyncsReaderServiceGetLatestFinishedSyncResponse.ProtoReflect.Descriptor instead.
+func (*SyncsReaderServiceGetLatestFinishedSyncResponse) Descriptor() ([]byte, []int) {
+ return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *SyncsReaderServiceGetLatestFinishedSyncResponse) GetSync() *SyncRun {
+ if x != nil {
+ return x.Sync
+ }
+ return nil
+}
+
+func (x *SyncsReaderServiceGetLatestFinishedSyncResponse) GetAnnotations() []*anypb.Any {
+ if x != nil {
+ return x.Annotations
+ }
+ return nil
+}
+
+var File_c1_reader_v2_sync_proto protoreflect.FileDescriptor
+
+var file_c1_reader_v2_sync_proto_rawDesc = string([]byte{
+ 0x0a, 0x17, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x73,
+ 0x79, 0x6e, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x63, 0x31, 0x2e, 0x72, 0x65,
+ 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61,
+ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x01, 0x0a,
+ 0x07, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72,
+ 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
+ 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65,
+ 0x64, 0x41, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
+ 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x79,
+ 0x6e, 0x63, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x73, 0x79, 0x6e, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x73, 0x0a, 0x20, 0x53, 0x79, 0x6e,
+ 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47,
+ 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a,
+ 0x07, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+ 0x73, 0x79, 0x6e, 0x63, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
+ 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x86,
+ 0x01, 0x0a, 0x21, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x12,
+ 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x22, 0x53, 0x79, 0x6e, 0x63,
+ 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69,
+ 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27,
+ 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70,
+ 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f,
+ 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a,
+ 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
+ 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc1, 0x01,
+ 0x0a, 0x23, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x52, 0x05, 0x73, 0x79, 0x6e,
+ 0x63, 0x73, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f,
+ 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a,
+ 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74,
+ 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x22, 0x68, 0x0a, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74,
+ 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x2f,
+ 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73,
+ 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x29, 0x0a, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
+ 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e,
+ 0x63, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x32, 0x89, 0x03, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64,
+ 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x07, 0x47, 0x65, 0x74,
+ 0x53, 0x79, 0x6e, 0x63, 0x12, 0x2e, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e,
+ 0x63, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76,
+ 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c,
+ 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e,
+ 0x63, 0x12, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69,
+ 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53,
+ 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68,
+ 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33,
+ 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e,
+ 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d,
+ 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
+
+var (
+ file_c1_reader_v2_sync_proto_rawDescOnce sync.Once
+ file_c1_reader_v2_sync_proto_rawDescData []byte
+)
+
+func file_c1_reader_v2_sync_proto_rawDescGZIP() []byte {
+ file_c1_reader_v2_sync_proto_rawDescOnce.Do(func() {
+ file_c1_reader_v2_sync_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_reader_v2_sync_proto_rawDesc), len(file_c1_reader_v2_sync_proto_rawDesc)))
+ })
+ return file_c1_reader_v2_sync_proto_rawDescData
+}
+
+var file_c1_reader_v2_sync_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_c1_reader_v2_sync_proto_goTypes = []any{
+ (*SyncRun)(nil), // 0: c1.reader.v2.SyncRun
+ (*SyncsReaderServiceGetSyncRequest)(nil), // 1: c1.reader.v2.SyncsReaderServiceGetSyncRequest
+ (*SyncsReaderServiceGetSyncResponse)(nil), // 2: c1.reader.v2.SyncsReaderServiceGetSyncResponse
+ (*SyncsReaderServiceListSyncsRequest)(nil), // 3: c1.reader.v2.SyncsReaderServiceListSyncsRequest
+ (*SyncsReaderServiceListSyncsResponse)(nil), // 4: c1.reader.v2.SyncsReaderServiceListSyncsResponse
+ (*SyncsReaderServiceGetLatestFinishedSyncRequest)(nil), // 5: c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncRequest
+ (*SyncsReaderServiceGetLatestFinishedSyncResponse)(nil), // 6: c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncResponse
+ (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
+ (*anypb.Any)(nil), // 8: google.protobuf.Any
+}
+var file_c1_reader_v2_sync_proto_depIdxs = []int32{
+ 7, // 0: c1.reader.v2.SyncRun.started_at:type_name -> google.protobuf.Timestamp
+ 7, // 1: c1.reader.v2.SyncRun.ended_at:type_name -> google.protobuf.Timestamp
+ 8, // 2: c1.reader.v2.SyncsReaderServiceGetSyncRequest.annotations:type_name -> google.protobuf.Any
+ 0, // 3: c1.reader.v2.SyncsReaderServiceGetSyncResponse.sync:type_name -> c1.reader.v2.SyncRun
+ 8, // 4: c1.reader.v2.SyncsReaderServiceGetSyncResponse.annotations:type_name -> google.protobuf.Any
+ 8, // 5: c1.reader.v2.SyncsReaderServiceListSyncsRequest.annotations:type_name -> google.protobuf.Any
+ 0, // 6: c1.reader.v2.SyncsReaderServiceListSyncsResponse.syncs:type_name -> c1.reader.v2.SyncRun
+ 8, // 7: c1.reader.v2.SyncsReaderServiceListSyncsResponse.annotations:type_name -> google.protobuf.Any
+ 8, // 8: c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncRequest.annotations:type_name -> google.protobuf.Any
+ 0, // 9: c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncResponse.sync:type_name -> c1.reader.v2.SyncRun
+ 8, // 10: c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncResponse.annotations:type_name -> google.protobuf.Any
+ 1, // 11: c1.reader.v2.SyncsReaderService.GetSync:input_type -> c1.reader.v2.SyncsReaderServiceGetSyncRequest
+ 3, // 12: c1.reader.v2.SyncsReaderService.ListSyncs:input_type -> c1.reader.v2.SyncsReaderServiceListSyncsRequest
+ 5, // 13: c1.reader.v2.SyncsReaderService.GetLatestFinishedSync:input_type -> c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncRequest
+ 2, // 14: c1.reader.v2.SyncsReaderService.GetSync:output_type -> c1.reader.v2.SyncsReaderServiceGetSyncResponse
+ 4, // 15: c1.reader.v2.SyncsReaderService.ListSyncs:output_type -> c1.reader.v2.SyncsReaderServiceListSyncsResponse
+ 6, // 16: c1.reader.v2.SyncsReaderService.GetLatestFinishedSync:output_type -> c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncResponse
+ 14, // [14:17] is the sub-list for method output_type
+ 11, // [11:14] is the sub-list for method input_type
+ 11, // [11:11] is the sub-list for extension type_name
+ 11, // [11:11] is the sub-list for extension extendee
+ 0, // [0:11] is the sub-list for field type_name
+}
+
+func init() { file_c1_reader_v2_sync_proto_init() }
+func file_c1_reader_v2_sync_proto_init() {
+ if File_c1_reader_v2_sync_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_reader_v2_sync_proto_rawDesc), len(file_c1_reader_v2_sync_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 7,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_c1_reader_v2_sync_proto_goTypes,
+ DependencyIndexes: file_c1_reader_v2_sync_proto_depIdxs,
+ MessageInfos: file_c1_reader_v2_sync_proto_msgTypes,
+ }.Build()
+ File_c1_reader_v2_sync_proto = out.File
+ file_c1_reader_v2_sync_proto_goTypes = nil
+ file_c1_reader_v2_sync_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.validate.go
new file mode 100644
index 00000000..13702f99
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.validate.go
@@ -0,0 +1,1179 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: c1/reader/v2/sync.proto
+
+package v2
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on SyncRun with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *SyncRun) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SyncRun with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in SyncRunMultiError, or nil if none found.
+func (m *SyncRun) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SyncRun) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Id
+
+ if all {
+ switch v := interface{}(m.GetStartedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SyncRunValidationError{
+ field: "StartedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SyncRunValidationError{
+ field: "StartedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStartedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SyncRunValidationError{
+ field: "StartedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetEndedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SyncRunValidationError{
+ field: "EndedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SyncRunValidationError{
+ field: "EndedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetEndedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SyncRunValidationError{
+ field: "EndedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for SyncToken
+
+ if len(errors) > 0 {
+ return SyncRunMultiError(errors)
+ }
+
+ return nil
+}
+
+// SyncRunMultiError is an error wrapping multiple validation errors returned
+// by SyncRun.ValidateAll() if the designated constraints aren't met.
+type SyncRunMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SyncRunMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SyncRunMultiError) AllErrors() []error { return m }
+
+// SyncRunValidationError is the validation error returned by SyncRun.Validate
+// if the designated constraints aren't met.
+type SyncRunValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SyncRunValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SyncRunValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SyncRunValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SyncRunValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SyncRunValidationError) ErrorName() string { return "SyncRunValidationError" }
+
+// Error satisfies the builtin error interface
+func (e SyncRunValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSyncRun.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SyncRunValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SyncRunValidationError{}
+
+// Validate checks the field values on SyncsReaderServiceGetSyncRequest with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *SyncsReaderServiceGetSyncRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SyncsReaderServiceGetSyncRequest with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// SyncsReaderServiceGetSyncRequestMultiError, or nil if none found.
+func (m *SyncsReaderServiceGetSyncRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SyncsReaderServiceGetSyncRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for SyncId
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetSyncRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetSyncRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SyncsReaderServiceGetSyncRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return SyncsReaderServiceGetSyncRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// SyncsReaderServiceGetSyncRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// SyncsReaderServiceGetSyncRequest.ValidateAll() if the designated
+// constraints aren't met.
+type SyncsReaderServiceGetSyncRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SyncsReaderServiceGetSyncRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SyncsReaderServiceGetSyncRequestMultiError) AllErrors() []error { return m }
+
+// SyncsReaderServiceGetSyncRequestValidationError is the validation error
+// returned by SyncsReaderServiceGetSyncRequest.Validate if the designated
+// constraints aren't met.
+type SyncsReaderServiceGetSyncRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SyncsReaderServiceGetSyncRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SyncsReaderServiceGetSyncRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SyncsReaderServiceGetSyncRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SyncsReaderServiceGetSyncRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SyncsReaderServiceGetSyncRequestValidationError) ErrorName() string {
+ return "SyncsReaderServiceGetSyncRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e SyncsReaderServiceGetSyncRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSyncsReaderServiceGetSyncRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SyncsReaderServiceGetSyncRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SyncsReaderServiceGetSyncRequestValidationError{}
+
+// Validate checks the field values on SyncsReaderServiceGetSyncResponse with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *SyncsReaderServiceGetSyncResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SyncsReaderServiceGetSyncResponse
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// SyncsReaderServiceGetSyncResponseMultiError, or nil if none found.
+func (m *SyncsReaderServiceGetSyncResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SyncsReaderServiceGetSyncResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetSync()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetSyncResponseValidationError{
+ field: "Sync",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetSyncResponseValidationError{
+ field: "Sync",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSync()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SyncsReaderServiceGetSyncResponseValidationError{
+ field: "Sync",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetSyncResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetSyncResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SyncsReaderServiceGetSyncResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return SyncsReaderServiceGetSyncResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// SyncsReaderServiceGetSyncResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// SyncsReaderServiceGetSyncResponse.ValidateAll() if the designated
+// constraints aren't met.
+type SyncsReaderServiceGetSyncResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SyncsReaderServiceGetSyncResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SyncsReaderServiceGetSyncResponseMultiError) AllErrors() []error { return m }
+
+// SyncsReaderServiceGetSyncResponseValidationError is the validation error
+// returned by SyncsReaderServiceGetSyncResponse.Validate if the designated
+// constraints aren't met.
+type SyncsReaderServiceGetSyncResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SyncsReaderServiceGetSyncResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SyncsReaderServiceGetSyncResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SyncsReaderServiceGetSyncResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SyncsReaderServiceGetSyncResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SyncsReaderServiceGetSyncResponseValidationError) ErrorName() string {
+ return "SyncsReaderServiceGetSyncResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e SyncsReaderServiceGetSyncResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSyncsReaderServiceGetSyncResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SyncsReaderServiceGetSyncResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SyncsReaderServiceGetSyncResponseValidationError{}
+
+// Validate checks the field values on SyncsReaderServiceListSyncsRequest with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *SyncsReaderServiceListSyncsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SyncsReaderServiceListSyncsRequest
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// SyncsReaderServiceListSyncsRequestMultiError, or nil if none found.
+func (m *SyncsReaderServiceListSyncsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SyncsReaderServiceListSyncsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetPageSize() != 0 {
+
+ if m.GetPageSize() > 250 {
+ err := SyncsReaderServiceListSyncsRequestValidationError{
+ field: "PageSize",
+ reason: "value must be less than or equal to 250",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if m.GetPageToken() != "" {
+
+ if l := len(m.GetPageToken()); l < 1 || l > 2048 {
+ err := SyncsReaderServiceListSyncsRequestValidationError{
+ field: "PageToken",
+ reason: "value length must be between 1 and 2048 bytes, inclusive",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SyncsReaderServiceListSyncsRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SyncsReaderServiceListSyncsRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SyncsReaderServiceListSyncsRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return SyncsReaderServiceListSyncsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// SyncsReaderServiceListSyncsRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// SyncsReaderServiceListSyncsRequest.ValidateAll() if the designated
+// constraints aren't met.
+type SyncsReaderServiceListSyncsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SyncsReaderServiceListSyncsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SyncsReaderServiceListSyncsRequestMultiError) AllErrors() []error { return m }
+
+// SyncsReaderServiceListSyncsRequestValidationError is the validation error
+// returned by SyncsReaderServiceListSyncsRequest.Validate if the designated
+// constraints aren't met.
+type SyncsReaderServiceListSyncsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SyncsReaderServiceListSyncsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SyncsReaderServiceListSyncsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SyncsReaderServiceListSyncsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SyncsReaderServiceListSyncsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SyncsReaderServiceListSyncsRequestValidationError) ErrorName() string {
+ return "SyncsReaderServiceListSyncsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e SyncsReaderServiceListSyncsRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSyncsReaderServiceListSyncsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SyncsReaderServiceListSyncsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SyncsReaderServiceListSyncsRequestValidationError{}
+
+// Validate checks the field values on SyncsReaderServiceListSyncsResponse with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *SyncsReaderServiceListSyncsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SyncsReaderServiceListSyncsResponse
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// SyncsReaderServiceListSyncsResponseMultiError, or nil if none found.
+func (m *SyncsReaderServiceListSyncsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SyncsReaderServiceListSyncsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetSyncs() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SyncsReaderServiceListSyncsResponseValidationError{
+ field: fmt.Sprintf("Syncs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SyncsReaderServiceListSyncsResponseValidationError{
+ field: fmt.Sprintf("Syncs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SyncsReaderServiceListSyncsResponseValidationError{
+ field: fmt.Sprintf("Syncs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if m.GetNextPageToken() != "" {
+
+ if l := len(m.GetNextPageToken()); l < 1 || l > 2048 {
+ err := SyncsReaderServiceListSyncsResponseValidationError{
+ field: "NextPageToken",
+ reason: "value length must be between 1 and 2048 bytes, inclusive",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SyncsReaderServiceListSyncsResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SyncsReaderServiceListSyncsResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SyncsReaderServiceListSyncsResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return SyncsReaderServiceListSyncsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// SyncsReaderServiceListSyncsResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// SyncsReaderServiceListSyncsResponse.ValidateAll() if the designated
+// constraints aren't met.
+type SyncsReaderServiceListSyncsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SyncsReaderServiceListSyncsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SyncsReaderServiceListSyncsResponseMultiError) AllErrors() []error { return m }
+
+// SyncsReaderServiceListSyncsResponseValidationError is the validation error
+// returned by SyncsReaderServiceListSyncsResponse.Validate if the designated
+// constraints aren't met.
+type SyncsReaderServiceListSyncsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SyncsReaderServiceListSyncsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SyncsReaderServiceListSyncsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SyncsReaderServiceListSyncsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SyncsReaderServiceListSyncsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SyncsReaderServiceListSyncsResponseValidationError) ErrorName() string {
+ return "SyncsReaderServiceListSyncsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e SyncsReaderServiceListSyncsResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSyncsReaderServiceListSyncsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SyncsReaderServiceListSyncsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SyncsReaderServiceListSyncsResponseValidationError{}
+
+// Validate checks the field values on
+// SyncsReaderServiceGetLatestFinishedSyncRequest with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *SyncsReaderServiceGetLatestFinishedSyncRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// SyncsReaderServiceGetLatestFinishedSyncRequest with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in
+// SyncsReaderServiceGetLatestFinishedSyncRequestMultiError, or nil if none found.
+func (m *SyncsReaderServiceGetLatestFinishedSyncRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SyncsReaderServiceGetLatestFinishedSyncRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SyncsReaderServiceGetLatestFinishedSyncRequestValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return SyncsReaderServiceGetLatestFinishedSyncRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// SyncsReaderServiceGetLatestFinishedSyncRequestMultiError is an error
+// wrapping multiple validation errors returned by
+// SyncsReaderServiceGetLatestFinishedSyncRequest.ValidateAll() if the
+// designated constraints aren't met.
+type SyncsReaderServiceGetLatestFinishedSyncRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SyncsReaderServiceGetLatestFinishedSyncRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SyncsReaderServiceGetLatestFinishedSyncRequestMultiError) AllErrors() []error { return m }
+
+// SyncsReaderServiceGetLatestFinishedSyncRequestValidationError is the
+// validation error returned by
+// SyncsReaderServiceGetLatestFinishedSyncRequest.Validate if the designated
+// constraints aren't met.
+type SyncsReaderServiceGetLatestFinishedSyncRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) ErrorName() string {
+ return "SyncsReaderServiceGetLatestFinishedSyncRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSyncsReaderServiceGetLatestFinishedSyncRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SyncsReaderServiceGetLatestFinishedSyncRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SyncsReaderServiceGetLatestFinishedSyncRequestValidationError{}
+
+// Validate checks the field values on
+// SyncsReaderServiceGetLatestFinishedSyncResponse with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *SyncsReaderServiceGetLatestFinishedSyncResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// SyncsReaderServiceGetLatestFinishedSyncResponse with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in
+// SyncsReaderServiceGetLatestFinishedSyncResponseMultiError, or nil if none found.
+func (m *SyncsReaderServiceGetLatestFinishedSyncResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SyncsReaderServiceGetLatestFinishedSyncResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetSync()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{
+ field: "Sync",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{
+ field: "Sync",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSync()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{
+ field: "Sync",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetAnnotations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{
+ field: fmt.Sprintf("Annotations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return SyncsReaderServiceGetLatestFinishedSyncResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// SyncsReaderServiceGetLatestFinishedSyncResponseMultiError is an error
+// wrapping multiple validation errors returned by
+// SyncsReaderServiceGetLatestFinishedSyncResponse.ValidateAll() if the
+// designated constraints aren't met.
+type SyncsReaderServiceGetLatestFinishedSyncResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SyncsReaderServiceGetLatestFinishedSyncResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SyncsReaderServiceGetLatestFinishedSyncResponseMultiError) AllErrors() []error { return m }
+
+// SyncsReaderServiceGetLatestFinishedSyncResponseValidationError is the
+// validation error returned by
+// SyncsReaderServiceGetLatestFinishedSyncResponse.Validate if the designated
+// constraints aren't met.
+type SyncsReaderServiceGetLatestFinishedSyncResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) Field() string {
+ return e.field
+}
+
+// Reason function returns reason value.
+func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) ErrorName() string {
+ return "SyncsReaderServiceGetLatestFinishedSyncResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSyncsReaderServiceGetLatestFinishedSyncResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync_grpc.pb.go
new file mode 100644
index 00000000..c9dc9e3c
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync_grpc.pb.go
@@ -0,0 +1,195 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc (unknown)
+// source: c1/reader/v2/sync.proto
+
+package v2
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ SyncsReaderService_GetSync_FullMethodName = "/c1.reader.v2.SyncsReaderService/GetSync"
+ SyncsReaderService_ListSyncs_FullMethodName = "/c1.reader.v2.SyncsReaderService/ListSyncs"
+ SyncsReaderService_GetLatestFinishedSync_FullMethodName = "/c1.reader.v2.SyncsReaderService/GetLatestFinishedSync"
+)
+
+// SyncsReaderServiceClient is the client API for SyncsReaderService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type SyncsReaderServiceClient interface {
+ GetSync(ctx context.Context, in *SyncsReaderServiceGetSyncRequest, opts ...grpc.CallOption) (*SyncsReaderServiceGetSyncResponse, error)
+ ListSyncs(ctx context.Context, in *SyncsReaderServiceListSyncsRequest, opts ...grpc.CallOption) (*SyncsReaderServiceListSyncsResponse, error)
+ GetLatestFinishedSync(ctx context.Context, in *SyncsReaderServiceGetLatestFinishedSyncRequest, opts ...grpc.CallOption) (*SyncsReaderServiceGetLatestFinishedSyncResponse, error)
+}
+
+type syncsReaderServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewSyncsReaderServiceClient(cc grpc.ClientConnInterface) SyncsReaderServiceClient {
+ return &syncsReaderServiceClient{cc}
+}
+
+func (c *syncsReaderServiceClient) GetSync(ctx context.Context, in *SyncsReaderServiceGetSyncRequest, opts ...grpc.CallOption) (*SyncsReaderServiceGetSyncResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(SyncsReaderServiceGetSyncResponse)
+ err := c.cc.Invoke(ctx, SyncsReaderService_GetSync_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *syncsReaderServiceClient) ListSyncs(ctx context.Context, in *SyncsReaderServiceListSyncsRequest, opts ...grpc.CallOption) (*SyncsReaderServiceListSyncsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(SyncsReaderServiceListSyncsResponse)
+ err := c.cc.Invoke(ctx, SyncsReaderService_ListSyncs_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *syncsReaderServiceClient) GetLatestFinishedSync(ctx context.Context, in *SyncsReaderServiceGetLatestFinishedSyncRequest, opts ...grpc.CallOption) (*SyncsReaderServiceGetLatestFinishedSyncResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(SyncsReaderServiceGetLatestFinishedSyncResponse)
+ err := c.cc.Invoke(ctx, SyncsReaderService_GetLatestFinishedSync_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// SyncsReaderServiceServer is the server API for SyncsReaderService service.
+// All implementations should embed UnimplementedSyncsReaderServiceServer
+// for forward compatibility.
+type SyncsReaderServiceServer interface {
+ GetSync(context.Context, *SyncsReaderServiceGetSyncRequest) (*SyncsReaderServiceGetSyncResponse, error)
+ ListSyncs(context.Context, *SyncsReaderServiceListSyncsRequest) (*SyncsReaderServiceListSyncsResponse, error)
+ GetLatestFinishedSync(context.Context, *SyncsReaderServiceGetLatestFinishedSyncRequest) (*SyncsReaderServiceGetLatestFinishedSyncResponse, error)
+}
+
+// UnimplementedSyncsReaderServiceServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedSyncsReaderServiceServer struct{}
+
+func (UnimplementedSyncsReaderServiceServer) GetSync(context.Context, *SyncsReaderServiceGetSyncRequest) (*SyncsReaderServiceGetSyncResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetSync not implemented")
+}
+func (UnimplementedSyncsReaderServiceServer) ListSyncs(context.Context, *SyncsReaderServiceListSyncsRequest) (*SyncsReaderServiceListSyncsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListSyncs not implemented")
+}
+func (UnimplementedSyncsReaderServiceServer) GetLatestFinishedSync(context.Context, *SyncsReaderServiceGetLatestFinishedSyncRequest) (*SyncsReaderServiceGetLatestFinishedSyncResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetLatestFinishedSync not implemented")
+}
+func (UnimplementedSyncsReaderServiceServer) testEmbeddedByValue() {}
+
+// UnsafeSyncsReaderServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to SyncsReaderServiceServer will
+// result in compilation errors.
+type UnsafeSyncsReaderServiceServer interface {
+ mustEmbedUnimplementedSyncsReaderServiceServer()
+}
+
+func RegisterSyncsReaderServiceServer(s grpc.ServiceRegistrar, srv SyncsReaderServiceServer) {
+ // If the following call pancis, it indicates UnimplementedSyncsReaderServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&SyncsReaderService_ServiceDesc, srv)
+}
+
+func _SyncsReaderService_GetSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(SyncsReaderServiceGetSyncRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SyncsReaderServiceServer).GetSync(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SyncsReaderService_GetSync_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SyncsReaderServiceServer).GetSync(ctx, req.(*SyncsReaderServiceGetSyncRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _SyncsReaderService_ListSyncs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(SyncsReaderServiceListSyncsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SyncsReaderServiceServer).ListSyncs(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SyncsReaderService_ListSyncs_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SyncsReaderServiceServer).ListSyncs(ctx, req.(*SyncsReaderServiceListSyncsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _SyncsReaderService_GetLatestFinishedSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(SyncsReaderServiceGetLatestFinishedSyncRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SyncsReaderServiceServer).GetLatestFinishedSync(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SyncsReaderService_GetLatestFinishedSync_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SyncsReaderServiceServer).GetLatestFinishedSync(ctx, req.(*SyncsReaderServiceGetLatestFinishedSyncRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// SyncsReaderService_ServiceDesc is the grpc.ServiceDesc for SyncsReaderService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var SyncsReaderService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "c1.reader.v2.SyncsReaderService",
+ HandlerType: (*SyncsReaderServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "GetSync",
+ Handler: _SyncsReaderService_GetSync_Handler,
+ },
+ {
+ MethodName: "ListSyncs",
+ Handler: _SyncsReaderService_ListSyncs_Handler,
+ },
+ {
+ MethodName: "GetLatestFinishedSync",
+ Handler: _SyncsReaderService_GetLatestFinishedSync_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "c1/reader/v2/sync.proto",
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.go
new file mode 100644
index 00000000..a899c5f6
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.go
@@ -0,0 +1,246 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.4
+// protoc (unknown)
+// source: c1/transport/v1/transport.proto
+
+package v1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Request struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
+ Req *anypb.Any `protobuf:"bytes,2,opt,name=req,proto3" json:"req,omitempty"`
+ Headers *structpb.Struct `protobuf:"bytes,3,opt,name=headers,proto3" json:"headers,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Request) Reset() {
+ *x = Request{}
+ mi := &file_c1_transport_v1_transport_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Request) ProtoMessage() {}
+
+func (x *Request) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_transport_v1_transport_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Request.ProtoReflect.Descriptor instead.
+func (*Request) Descriptor() ([]byte, []int) {
+ return file_c1_transport_v1_transport_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Request) GetMethod() string {
+ if x != nil {
+ return x.Method
+ }
+ return ""
+}
+
+func (x *Request) GetReq() *anypb.Any {
+ if x != nil {
+ return x.Req
+ }
+ return nil
+}
+
+func (x *Request) GetHeaders() *structpb.Struct {
+ if x != nil {
+ return x.Headers
+ }
+ return nil
+}
+
+type Response struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resp *anypb.Any `protobuf:"bytes,1,opt,name=resp,proto3" json:"resp,omitempty"`
+ Status *anypb.Any `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
+ Headers *structpb.Struct `protobuf:"bytes,3,opt,name=headers,proto3" json:"headers,omitempty"`
+ Trailers *structpb.Struct `protobuf:"bytes,4,opt,name=trailers,proto3" json:"trailers,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Response) Reset() {
+ *x = Response{}
+ mi := &file_c1_transport_v1_transport_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Response) ProtoMessage() {}
+
+func (x *Response) ProtoReflect() protoreflect.Message {
+ mi := &file_c1_transport_v1_transport_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Response.ProtoReflect.Descriptor instead.
+func (*Response) Descriptor() ([]byte, []int) {
+ return file_c1_transport_v1_transport_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *Response) GetResp() *anypb.Any {
+ if x != nil {
+ return x.Resp
+ }
+ return nil
+}
+
+func (x *Response) GetStatus() *anypb.Any {
+ if x != nil {
+ return x.Status
+ }
+ return nil
+}
+
+func (x *Response) GetHeaders() *structpb.Struct {
+ if x != nil {
+ return x.Headers
+ }
+ return nil
+}
+
+func (x *Response) GetTrailers() *structpb.Struct {
+ if x != nil {
+ return x.Trailers
+ }
+ return nil
+}
+
+var File_c1_transport_v1_transport_proto protoreflect.FileDescriptor
+
+var file_c1_transport_v1_transport_proto_rawDesc = string([]byte{
+ 0x0a, 0x1f, 0x63, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76,
+ 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e,
+ 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73,
+ 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x07, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x26,
+ 0x0a, 0x03, 0x72, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
+ 0x79, 0x52, 0x03, 0x72, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74,
+ 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xca, 0x01, 0x0a, 0x08, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x70, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x72, 0x65, 0x73, 0x70,
+ 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31,
+ 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x73, 0x12, 0x33, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x74, 0x72,
+ 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e,
+ 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63,
+ 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
+
+var (
+ file_c1_transport_v1_transport_proto_rawDescOnce sync.Once
+ file_c1_transport_v1_transport_proto_rawDescData []byte
+)
+
+func file_c1_transport_v1_transport_proto_rawDescGZIP() []byte {
+ file_c1_transport_v1_transport_proto_rawDescOnce.Do(func() {
+ file_c1_transport_v1_transport_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_transport_v1_transport_proto_rawDesc), len(file_c1_transport_v1_transport_proto_rawDesc)))
+ })
+ return file_c1_transport_v1_transport_proto_rawDescData
+}
+
+var file_c1_transport_v1_transport_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_c1_transport_v1_transport_proto_goTypes = []any{
+ (*Request)(nil), // 0: c1.transport.v1.Request
+ (*Response)(nil), // 1: c1.transport.v1.Response
+ (*anypb.Any)(nil), // 2: google.protobuf.Any
+ (*structpb.Struct)(nil), // 3: google.protobuf.Struct
+}
+var file_c1_transport_v1_transport_proto_depIdxs = []int32{
+ 2, // 0: c1.transport.v1.Request.req:type_name -> google.protobuf.Any
+ 3, // 1: c1.transport.v1.Request.headers:type_name -> google.protobuf.Struct
+ 2, // 2: c1.transport.v1.Response.resp:type_name -> google.protobuf.Any
+ 2, // 3: c1.transport.v1.Response.status:type_name -> google.protobuf.Any
+ 3, // 4: c1.transport.v1.Response.headers:type_name -> google.protobuf.Struct
+ 3, // 5: c1.transport.v1.Response.trailers:type_name -> google.protobuf.Struct
+ 6, // [6:6] is the sub-list for method output_type
+ 6, // [6:6] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() { file_c1_transport_v1_transport_proto_init() }
+func file_c1_transport_v1_transport_proto_init() {
+ if File_c1_transport_v1_transport_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_transport_v1_transport_proto_rawDesc), len(file_c1_transport_v1_transport_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_c1_transport_v1_transport_proto_goTypes,
+ DependencyIndexes: file_c1_transport_v1_transport_proto_depIdxs,
+ MessageInfos: file_c1_transport_v1_transport_proto_msgTypes,
+ }.Build()
+ File_c1_transport_v1_transport_proto = out.File
+ file_c1_transport_v1_transport_proto_goTypes = nil
+ file_c1_transport_v1_transport_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.validate.go
new file mode 100644
index 00000000..a85bbaba
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.validate.go
@@ -0,0 +1,409 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: c1/transport/v1/transport.proto
+
+package v1
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Request with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Request) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Request with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in RequestMultiError, or nil if none found.
+func (m *Request) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Request) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Method
+
+ if all {
+ switch v := interface{}(m.GetReq()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RequestValidationError{
+ field: "Req",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RequestValidationError{
+ field: "Req",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReq()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RequestValidationError{
+ field: "Req",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetHeaders()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RequestValidationError{
+ field: "Headers",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RequestValidationError{
+ field: "Headers",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetHeaders()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RequestValidationError{
+ field: "Headers",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return RequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// RequestMultiError is an error wrapping multiple validation errors returned
+// by Request.ValidateAll() if the designated constraints aren't met.
+type RequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RequestMultiError) AllErrors() []error { return m }
+
+// RequestValidationError is the validation error returned by Request.Validate
+// if the designated constraints aren't met.
+type RequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RequestValidationError) ErrorName() string { return "RequestValidationError" }
+
+// Error satisfies the builtin error interface
+func (e RequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RequestValidationError{}
+
+// Validate checks the field values on Response with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Response) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Response with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ResponseMultiError, or nil
+// if none found.
+func (m *Response) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Response) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetResp()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResponseValidationError{
+ field: "Resp",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResponseValidationError{
+ field: "Resp",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetResp()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResponseValidationError{
+ field: "Resp",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetStatus()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResponseValidationError{
+ field: "Status",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResponseValidationError{
+ field: "Status",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResponseValidationError{
+ field: "Status",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetHeaders()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResponseValidationError{
+ field: "Headers",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResponseValidationError{
+ field: "Headers",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetHeaders()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResponseValidationError{
+ field: "Headers",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetTrailers()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResponseValidationError{
+ field: "Trailers",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResponseValidationError{
+ field: "Trailers",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTrailers()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResponseValidationError{
+ field: "Trailers",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ResponseMultiError is an error wrapping multiple validation errors returned
+// by Response.ValidateAll() if the designated constraints aren't met.
+type ResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ResponseMultiError) AllErrors() []error { return m }
+
+// ResponseValidationError is the validation error returned by
+// Response.Validate if the designated constraints aren't met.
+type ResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ResponseValidationError) ErrorName() string { return "ResponseValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ResponseValidationError{}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.proto b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.proto
new file mode 100644
index 00000000..94efa33c
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.proto
@@ -0,0 +1,22 @@
+syntax = "proto3";
+
+package c1.svc.transport.v1;
+
+import "google/protobuf/struct.proto";
+import "google/protobuf/any.proto";
+
+
+option go_package = "github.com/conductorone/baton-sdk/pb/c1/transport/v1";
+
+message Request {
+ string method = 1;
+ google.protobuf.Any req = 2;
+ google.protobuf.Struct headers = 3;
+}
+
+message Response {
+ google.protobuf.Any resp = 1;
+ google.protobuf.Any status = 2;
+ google.protobuf.Struct headers = 3;
+ google.protobuf.Struct trailers = 4;
+}
\ No newline at end of file
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/utls/v1/tls.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/utls/v1/tls.pb.go
index be8a6c33..fcfe5b8c 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/utls/v1/tls.pb.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/utls/v1/tls.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
+// protoc-gen-go v1.36.4
// protoc (unknown)
// source: c1/utls/v1/tls.proto
@@ -11,6 +11,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
const (
@@ -21,22 +22,19 @@ const (
)
type Credential struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ CaCert []byte `protobuf:"bytes,1,opt,name=ca_cert,json=caCert,proto3" json:"ca_cert,omitempty"`
+ Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
+ Cert []byte `protobuf:"bytes,3,opt,name=cert,proto3" json:"cert,omitempty"`
unknownFields protoimpl.UnknownFields
-
- CaCert []byte `protobuf:"bytes,1,opt,name=ca_cert,json=caCert,proto3" json:"ca_cert,omitempty"`
- Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
- Cert []byte `protobuf:"bytes,3,opt,name=cert,proto3" json:"cert,omitempty"`
+ sizeCache protoimpl.SizeCache
}
func (x *Credential) Reset() {
*x = Credential{}
- if protoimpl.UnsafeEnabled {
- mi := &file_c1_utls_v1_tls_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_c1_utls_v1_tls_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Credential) String() string {
@@ -47,7 +45,7 @@ func (*Credential) ProtoMessage() {}
func (x *Credential) ProtoReflect() protoreflect.Message {
mi := &file_c1_utls_v1_tls_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -85,7 +83,7 @@ func (x *Credential) GetCert() []byte {
var File_c1_utls_v1_tls_proto protoreflect.FileDescriptor
-var file_c1_utls_v1_tls_proto_rawDesc = []byte{
+var file_c1_utls_v1_tls_proto_rawDesc = string([]byte{
0x0a, 0x14, 0x63, 0x31, 0x2f, 0x75, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6c, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x63, 0x31, 0x2e, 0x75, 0x74, 0x6c, 0x73, 0x2e,
0x76, 0x31, 0x22, 0x4b, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
@@ -97,22 +95,22 @@ var file_c1_utls_v1_tls_proto_rawDesc = []byte{
0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e,
0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x75, 0x74, 0x6c, 0x73, 0x2f,
0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_c1_utls_v1_tls_proto_rawDescOnce sync.Once
- file_c1_utls_v1_tls_proto_rawDescData = file_c1_utls_v1_tls_proto_rawDesc
+ file_c1_utls_v1_tls_proto_rawDescData []byte
)
func file_c1_utls_v1_tls_proto_rawDescGZIP() []byte {
file_c1_utls_v1_tls_proto_rawDescOnce.Do(func() {
- file_c1_utls_v1_tls_proto_rawDescData = protoimpl.X.CompressGZIP(file_c1_utls_v1_tls_proto_rawDescData)
+ file_c1_utls_v1_tls_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_utls_v1_tls_proto_rawDesc), len(file_c1_utls_v1_tls_proto_rawDesc)))
})
return file_c1_utls_v1_tls_proto_rawDescData
}
var file_c1_utls_v1_tls_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_c1_utls_v1_tls_proto_goTypes = []interface{}{
+var file_c1_utls_v1_tls_proto_goTypes = []any{
(*Credential)(nil), // 0: c1.utls.v1.Credential
}
var file_c1_utls_v1_tls_proto_depIdxs = []int32{
@@ -128,25 +126,11 @@ func file_c1_utls_v1_tls_proto_init() {
if File_c1_utls_v1_tls_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_c1_utls_v1_tls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Credential); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_c1_utls_v1_tls_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_utls_v1_tls_proto_rawDesc), len(file_c1_utls_v1_tls_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -157,7 +141,6 @@ func file_c1_utls_v1_tls_proto_init() {
MessageInfos: file_c1_utls_v1_tls_proto_msgTypes,
}.Build()
File_c1_utls_v1_tls_proto = out.File
- file_c1_utls_v1_tls_proto_rawDesc = nil
file_c1_utls_v1_tls_proto_goTypes = nil
file_c1_utls_v1_tls_proto_depIdxs = nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/utls/v1/tls.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/utls/v1/tls.pb.validate.go
index c8a2045d..9b5537d7 100644
--- a/vendor/github.com/conductorone/baton-sdk/pb/c1/utls/v1/tls.pb.validate.go
+++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/utls/v1/tls.pb.validate.go
@@ -76,7 +76,7 @@ type CredentialMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m CredentialMultiError) Error() string {
- var msgs []string
+ msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/annotations/annotations.go b/vendor/github.com/conductorone/baton-sdk/pkg/annotations/annotations.go
index e1284bd1..fe76906c 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/annotations/annotations.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/annotations/annotations.go
@@ -3,6 +3,7 @@ package annotations
import (
"fmt"
+ c1zpb "github.com/conductorone/baton-sdk/pb/c1/c1z/v1"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
@@ -106,3 +107,16 @@ func (a *Annotations) WithRateLimiting(rateLimit *v2.RateLimitDescription) *Anno
a.Update(rateLimit)
return a
}
+
+func GetSyncIdFromAnnotations(annos Annotations) (string, error) {
+ syncDetails := &c1zpb.SyncDetails{}
+ ok, err := annos.Pick(syncDetails)
+ if err != nil {
+ return "", err
+ }
+ if ok {
+ return syncDetails.GetId(), nil
+ }
+
+ return "", nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/cli/cli.go b/vendor/github.com/conductorone/baton-sdk/pkg/cli/cli.go
new file mode 100644
index 00000000..e9402b39
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/cli/cli.go
@@ -0,0 +1,254 @@
+package cli
+
+import (
+ "context"
+ "fmt"
+ "reflect"
+
+ "github.com/conductorone/baton-sdk/pkg/field"
+ "github.com/conductorone/baton-sdk/pkg/types"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+ "github.com/spf13/viper"
+)
+
+type GetConnectorFunc[T field.Configurable] func(context.Context, T) (types.ConnectorServer, error)
+
+func MakeGenericConfiguration[T field.Configurable](v *viper.Viper) (T, error) {
+ // Create an instance of the struct type T using reflection
+ var config T // Create a zero-value instance of T
+
+ // Is it a *Viper?
+ if reflect.TypeOf(config) == reflect.TypeOf((*viper.Viper)(nil)) {
+ if t, ok := any(v).(T); ok {
+ return t, nil
+ }
+ return config, fmt.Errorf("cannot convert *viper.Viper to %T", config)
+ }
+
+ // Unmarshal into the config struct
+ err := v.Unmarshal(&config)
+ if err != nil {
+ return config, fmt.Errorf("failed to unmarshal config: %w", err)
+ }
+ return config, nil
+}
+
+// NOTE(shackra): Set all values from Viper to the flags so...
+// that Cobra won't complain that a flag is missing in case we...
+// pass values through environment variables.
+func VisitFlags(cmd *cobra.Command, v *viper.Viper) {
+ cmd.Flags().VisitAll(func(f *pflag.Flag) {
+ if v.IsSet(f.Name) {
+ _ = cmd.Flags().Set(f.Name, v.GetString(f.Name))
+ }
+ })
+}
+
+func AddCommand(mainCMD *cobra.Command, v *viper.Viper, schema *field.Configuration, subCMD *cobra.Command) (*cobra.Command, error) {
+ mainCMD.AddCommand(subCMD)
+ if schema != nil {
+ err := SetFlagsAndConstraints(subCMD, *schema)
+ if err != nil {
+ return nil, err
+ }
+ }
+ VisitFlags(subCMD, v)
+
+ return subCMD, nil
+}
+func SetFlagsAndConstraints(command *cobra.Command, schema field.Configuration) error {
+ // add options
+ for _, f := range schema.Fields {
+ switch f.Variant {
+ case field.BoolVariant:
+ value, err := field.GetDefaultValue[bool](f)
+ if err != nil {
+ return fmt.Errorf(
+ "field %s, %s: %w",
+ f.FieldName,
+ f.Variant,
+ err,
+ )
+ }
+ if f.IsPersistent() {
+ command.PersistentFlags().
+ BoolP(f.FieldName, f.GetCLIShortHand(), *value, f.GetDescription())
+ } else {
+ command.Flags().
+ BoolP(f.FieldName, f.GetCLIShortHand(), *value, f.GetDescription())
+ }
+ case field.IntVariant:
+ value, err := field.GetDefaultValue[int](f)
+ if err != nil {
+ return fmt.Errorf(
+ "field %s, %s: %w",
+ f.FieldName,
+ f.Variant,
+ err,
+ )
+ }
+ if f.IsPersistent() {
+ command.PersistentFlags().
+ IntP(f.FieldName, f.GetCLIShortHand(), *value, f.GetDescription())
+ } else {
+ command.Flags().
+ IntP(f.FieldName, f.GetCLIShortHand(), *value, f.GetDescription())
+ }
+ case field.StringVariant:
+ value, err := field.GetDefaultValue[string](f)
+ if err != nil {
+ return fmt.Errorf(
+ "field %s, %s: %w",
+ f.FieldName,
+ f.Variant,
+ err,
+ )
+ }
+ if f.IsPersistent() {
+ command.PersistentFlags().
+ StringP(f.FieldName, f.GetCLIShortHand(), *value, f.GetDescription())
+ } else {
+ command.Flags().
+ StringP(f.FieldName, f.GetCLIShortHand(), *value, f.GetDescription())
+ }
+
+ case field.StringSliceVariant:
+ value, err := field.GetDefaultValue[[]string](f)
+ if err != nil {
+ return fmt.Errorf(
+ "field %s, %s: %w",
+ f.FieldName,
+ f.Variant,
+ err,
+ )
+ }
+ if f.IsPersistent() {
+ command.PersistentFlags().
+ StringSliceP(f.FieldName, f.GetCLIShortHand(), *value, f.GetDescription())
+ } else {
+ command.Flags().
+ StringSliceP(f.FieldName, f.GetCLIShortHand(), *value, f.GetDescription())
+ }
+ case field.StringMapVariant:
+ value, err := field.GetDefaultValue[map[string]any](f)
+ if err != nil {
+ return fmt.Errorf(
+ "field %s, %s: %w",
+ f.FieldName,
+ f.Variant,
+ err,
+ )
+ }
+ strMap := make(map[string]string)
+ for k, v := range *value {
+ switch val := v.(type) {
+ case string:
+ strMap[k] = val
+ case int:
+ strMap[k] = fmt.Sprintf("%d", val)
+ case bool:
+ strMap[k] = fmt.Sprintf("%v", val)
+ case float64:
+ strMap[k] = fmt.Sprintf("%g", val)
+ default:
+ strMap[k] = fmt.Sprintf("%v", val)
+ }
+ }
+ if f.IsPersistent() {
+ command.PersistentFlags().
+ StringToStringP(f.FieldName, f.GetCLIShortHand(), strMap, f.GetDescription())
+ } else {
+ command.Flags().
+ StringToStringP(f.FieldName, f.GetCLIShortHand(), strMap, f.GetDescription())
+ }
+ default:
+ return fmt.Errorf(
+ "field %s, %s is not yet supported",
+ f.FieldName,
+ f.Variant,
+ )
+ }
+
+ // mark hidden
+ if f.IsHidden() {
+ if f.IsPersistent() {
+ err := command.PersistentFlags().MarkHidden(f.FieldName)
+ if err != nil {
+ return fmt.Errorf(
+ "cannot hide persistent field %s, %s: %w",
+ f.FieldName,
+ f.Variant,
+ err,
+ )
+ }
+ } else {
+ err := command.Flags().MarkHidden(f.FieldName)
+ if err != nil {
+ return fmt.Errorf(
+ "cannot hide field %s, %s: %w",
+ f.FieldName,
+ f.Variant,
+ err,
+ )
+ }
+ }
+ }
+
+ // mark required
+ if f.Required {
+ if f.Variant == field.BoolVariant {
+ return fmt.Errorf("requiring %s of type %s does not make sense", f.FieldName, f.Variant)
+ }
+
+ if f.IsPersistent() {
+ err := command.MarkPersistentFlagRequired(f.FieldName)
+ if err != nil {
+ return fmt.Errorf(
+ "cannot require persistent field %s, %s: %w",
+ f.FieldName,
+ f.Variant,
+ err,
+ )
+ }
+ } else {
+ err := command.MarkFlagRequired(f.FieldName)
+ if err != nil {
+ return fmt.Errorf(
+ "cannot require field %s, %s: %w",
+ f.FieldName,
+ f.Variant,
+ err,
+ )
+ }
+ }
+ }
+ }
+
+ // apply constrains
+ for _, constrain := range schema.Constraints {
+ switch constrain.Kind {
+ case field.MutuallyExclusive:
+ command.MarkFlagsMutuallyExclusive(listFieldConstrainsAsStrings(constrain)...)
+ case field.RequiredTogether:
+ command.MarkFlagsRequiredTogether(listFieldConstrainsAsStrings(constrain)...)
+ case field.AtLeastOne:
+ command.MarkFlagsOneRequired(listFieldConstrainsAsStrings(constrain)...)
+ case field.Dependents:
+ // do nothing
+ default:
+ return fmt.Errorf("invalid config")
+ }
+ }
+
+ return nil
+}
+
+func listFieldConstrainsAsStrings(constrains field.SchemaFieldRelationship) []string {
+ var fields []string
+ for _, v := range constrains.Fields {
+ fields = append(fields, v.FieldName)
+ }
+
+ return fields
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go b/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go
index dcb31055..2e87ea14 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/cli/commands.go
@@ -4,6 +4,7 @@ import (
"bufio"
"context"
"encoding/base64"
+ "encoding/json"
"fmt"
"os"
@@ -22,17 +23,17 @@ import (
"github.com/conductorone/baton-sdk/pkg/connectorrunner"
"github.com/conductorone/baton-sdk/pkg/field"
"github.com/conductorone/baton-sdk/pkg/logging"
- "github.com/conductorone/baton-sdk/pkg/types"
+ "github.com/conductorone/baton-sdk/pkg/uotel"
)
-type GetConnectorFunc func(context.Context, *viper.Viper) (types.ConnectorServer, error)
+type ContrainstSetter func(*cobra.Command, field.Configuration) error
-func MakeMainCommand(
+func MakeMainCommand[T field.Configurable](
ctx context.Context,
name string,
v *viper.Viper,
confschema field.Configuration,
- getconnector GetConnectorFunc,
+ getconnector GetConnectorFunc[T],
opts ...connectorrunner.Option,
) func(*cobra.Command, []string) error {
return func(cmd *cobra.Command, args []string) error {
@@ -57,6 +58,17 @@ func MakeMainCommand(
l := ctxzap.Extract(runCtx)
+ otelShutdown, err := uotel.InitOtel(context.Background(), v.GetString("otel-collector-endpoint"), name)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ err := otelShutdown(context.Background())
+ if err != nil {
+ l.Error("error shutting down otel", zap.Error(err))
+ }
+ }()
+
if isService() {
l.Debug("running as service", zap.String("name", name))
runCtx, err = runService(runCtx, name)
@@ -71,11 +83,6 @@ func MakeMainCommand(
return err
}
- c, err := getconnector(runCtx, v)
- if err != nil {
- return err
- }
-
daemonMode := v.GetString("client-id") != "" || isService()
if daemonMode {
if v.GetString("client-id") == "" {
@@ -114,15 +121,53 @@ func MakeMainCommand(
))
case v.GetBool("event-feed"):
opts = append(opts, connectorrunner.WithOnDemandEventStream())
- case v.GetString("create-account-login") != "":
+ case v.GetString("create-account-profile") != "":
profileMap := v.GetStringMap("create-account-profile")
if profileMap == nil {
- profileMap = make(map[string]interface{})
+ return fmt.Errorf("create-account-profile is empty or incorrectly formatted: %v", v.GetString("create-account-profile"))
+ }
+ if v.GetString("create-account-login") != "" {
+ if _, ok := profileMap["login"]; !ok {
+ profileMap["login"] = v.GetString("create-account-login")
+ }
+ }
+ if v.GetString("create-account-email") != "" {
+ if _, ok := profileMap["email"]; !ok {
+ profileMap["email"] = v.GetString("create-account-email")
+ }
+ }
+ login, email := "", ""
+ if l, ok := profileMap["login"]; ok {
+ if l, ok := l.(string); ok {
+ login = l
+ }
+ }
+ if e, ok := profileMap["email"]; ok {
+ if e, ok := e.(string); ok {
+ email = e
+ }
}
profile, err := structpb.NewStruct(profileMap)
if err != nil {
return err
}
+ opts = append(opts,
+ connectorrunner.WithProvisioningEnabled(),
+ connectorrunner.WithOnDemandCreateAccount(
+ v.GetString("file"),
+ login,
+ email,
+ profile,
+ ))
+ case v.GetString("create-account-login") != "":
+ // should only be here if no create-account-profile is provided, so lets make one.
+ profile, err := structpb.NewStruct(map[string]any{
+ "login": v.GetString("create-account-login"),
+ "email": v.GetString("create-account-email"),
+ })
+ if err != nil {
+ return err
+ }
opts = append(opts,
connectorrunner.WithProvisioningEnabled(),
connectorrunner.WithOnDemandCreateAccount(
@@ -176,6 +221,30 @@ func MakeMainCommand(
opts = append(opts, connectorrunner.WithTempDir(v.GetString("c1z-temp-dir")))
}
+ if v.GetString("external-resource-c1z") != "" {
+ externalResourceC1ZPath := v.GetString("external-resource-c1z")
+ _, err := os.Open(externalResourceC1ZPath)
+ if err != nil {
+ return fmt.Errorf("the specified external resource c1z file does not exist: %s", externalResourceC1ZPath)
+ }
+ opts = append(opts, connectorrunner.WithExternalResourceC1Z(externalResourceC1ZPath))
+ }
+
+ if v.GetString("external-resource-entitlement-id-filter") != "" {
+ externalResourceEntitlementIdFilter := v.GetString("external-resource-entitlement-id-filter")
+ opts = append(opts, connectorrunner.WithExternalResourceEntitlementFilter(externalResourceEntitlementIdFilter))
+ }
+
+ t, err := MakeGenericConfiguration[T](v)
+ if err != nil {
+ return fmt.Errorf("failed to make configuration: %w", err)
+ }
+
+ c, err := getconnector(runCtx, t)
+ if err != nil {
+ return err
+ }
+
// NOTE(shackra): top-most in the execution flow for connectors
r, err := connectorrunner.NewConnectorRunner(runCtx, c, opts...)
if err != nil {
@@ -194,12 +263,12 @@ func MakeMainCommand(
}
}
-func MakeGRPCServerCommand(
+func MakeGRPCServerCommand[T field.Configurable](
ctx context.Context,
name string,
v *viper.Viper,
confschema field.Configuration,
- getconnector GetConnectorFunc,
+ getconnector GetConnectorFunc[T],
) func(*cobra.Command, []string) error {
return func(cmd *cobra.Command, args []string) error {
// NOTE(shackra): bind all the flags (persistent and
@@ -221,12 +290,32 @@ func MakeGRPCServerCommand(
return err
}
+ l := ctxzap.Extract(runCtx)
+
+ otelShutdown, err := uotel.InitOtel(
+ context.Background(),
+ v.GetString("otel-collector-endpoint"),
+ fmt.Sprintf("%s-server", name),
+ )
+ if err != nil {
+ return err
+ }
+ defer func() {
+ err := otelShutdown(context.Background())
+ if err != nil {
+ l.Error("error shutting down otel", zap.Error(err))
+ }
+ }()
+
// validate required fields and relationship constraints
if err := field.Validate(confschema, v); err != nil {
return err
}
-
- c, err := getconnector(runCtx, v)
+ t, err := MakeGenericConfiguration[T](v)
+ if err != nil {
+ return fmt.Errorf("failed to make configuration: %w", err)
+ }
+ c, err := getconnector(runCtx, t)
if err != nil {
return err
}
@@ -250,6 +339,8 @@ func MakeGRPCServerCommand(
copts = append(copts, connector.WithProvisioningEnabled())
case v.GetString("revoke-grant") != "":
copts = append(copts, connector.WithProvisioningEnabled())
+ case v.GetString("create-account-profile") != "":
+ copts = append(copts, connector.WithProvisioningEnabled())
case v.GetString("create-account-login") != "" || v.GetString("create-account-email") != "":
copts = append(copts, connector.WithProvisioningEnabled())
case v.GetString("delete-resource") != "" || v.GetString("delete-resource-type") != "":
@@ -312,12 +403,12 @@ func MakeGRPCServerCommand(
}
}
-func MakeCapabilitiesCommand(
+func MakeCapabilitiesCommand[T field.Configurable](
ctx context.Context,
name string,
v *viper.Viper,
confschema field.Configuration,
- getconnector GetConnectorFunc,
+ getconnector GetConnectorFunc[T],
) func(*cobra.Command, []string) error {
return func(cmd *cobra.Command, args []string) error {
// NOTE(shackra): bind all the flags (persistent and
@@ -343,8 +434,12 @@ func MakeCapabilitiesCommand(
if err := field.Validate(confschema, v); err != nil {
return err
}
+ t, err := MakeGenericConfiguration[T](v)
+ if err != nil {
+ return fmt.Errorf("failed to make configuration: %w", err)
+ }
- c, err := getconnector(runCtx, v)
+ c, err := getconnector(runCtx, t)
if err != nil {
return err
}
@@ -382,3 +477,23 @@ func MakeCapabilitiesCommand(
return nil
}
}
+
+func MakeConfigSchemaCommand[T field.Configurable](
+ ctx context.Context,
+ name string,
+ v *viper.Viper,
+ confschema field.Configuration,
+ getconnector GetConnectorFunc[T],
+) func(*cobra.Command, []string) error {
+ return func(cmd *cobra.Command, args []string) error {
+ pb, err := json.Marshal(&confschema)
+ if err != nil {
+ return err
+ }
+ _, err = fmt.Fprint(os.Stdout, string(pb))
+ if err != nil {
+ return err
+ }
+ return nil
+ }
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/cli/lambda_server__added.go b/vendor/github.com/conductorone/baton-sdk/pkg/cli/lambda_server__added.go
new file mode 100644
index 00000000..626dbb4c
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/cli/lambda_server__added.go
@@ -0,0 +1,111 @@
+//go:build baton_lambda_support
+
+package cli
+
+import (
+ "context"
+ "fmt"
+
+ aws_lambda "github.com/aws/aws-lambda-go/lambda"
+ "github.com/conductorone/baton-sdk/pkg/logging"
+ "github.com/mitchellh/mapstructure"
+ "github.com/spf13/cobra"
+ "github.com/spf13/viper"
+
+ "github.com/conductorone/baton-sdk/internal/connector"
+ pb_connector_api "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
+ "github.com/conductorone/baton-sdk/pkg/field"
+ c1_lambda_grpc "github.com/conductorone/baton-sdk/pkg/lambda/grpc"
+ c1_lambda_config "github.com/conductorone/baton-sdk/pkg/lambda/grpc/config"
+)
+
+func OptionallyAddLambdaCommand[T field.Configurable](
+ ctx context.Context,
+ name string,
+ v *viper.Viper,
+ getconnector GetConnectorFunc[T],
+ connectorSchema field.Configuration,
+ mainCmd *cobra.Command,
+) error {
+ lambdaSchema := field.NewConfiguration(field.LambdaServerFields(), field.LambdaServerRelationships...)
+
+ lambdaCmd, err := AddCommand(mainCmd, v, &lambdaSchema, &cobra.Command{
+ Use: "lambda",
+ Short: "Run a server for a AWS Lambda function",
+ SilenceErrors: true,
+ SilenceUsage: true,
+ })
+
+ if err != nil {
+ return err
+ }
+
+ lambdaCmd.RunE = func(cmd *cobra.Command, args []string) error {
+ err := v.BindPFlags(cmd.Flags())
+ if err != nil {
+ return err
+ }
+
+ runCtx, err := initLogger(
+ ctx,
+ name,
+ logging.WithLogFormat(v.GetString("log-format")),
+ logging.WithLogLevel(v.GetString("log-level")),
+ )
+ if err != nil {
+ return err
+ }
+
+ if err := field.Validate(lambdaSchema, v); err != nil {
+ return err
+ }
+
+ client, err := c1_lambda_config.GetConnectorConfigServiceClient(
+ ctx,
+ v.GetString(field.LambdaServerClientIDField.GetName()),
+ v.GetString(field.LambdaServerClientSecretField.GetName()),
+ )
+ if err != nil {
+ return fmt.Errorf("lambda-run: failed to get connector manager client: %w", err)
+ }
+
+ // Get configuration, convert it to viper flag values, then proceed.
+ config, err := client.GetConnectorConfig(ctx, &pb_connector_api.GetConnectorConfigRequest{})
+ if err != nil {
+ return fmt.Errorf("lambda-run: failed to get connector config: %w", err)
+ }
+
+ t, err := MakeGenericConfiguration[T](v)
+ if err != nil {
+ return fmt.Errorf("lambda-run: failed to make generic configuration: %w", err)
+ }
+
+ err = mapstructure.Decode(config.Config.AsMap(), t)
+ if err != nil {
+ return fmt.Errorf("lambda-run: failed to decode config: %w", err)
+ }
+
+ if err := field.Validate(connectorSchema, t); err != nil {
+ return fmt.Errorf("lambda-run: failed to validate config: %w", err)
+ }
+
+ c, err := getconnector(runCtx, t)
+ if err != nil {
+ return fmt.Errorf("lambda-run: failed to get connector: %w", err)
+ }
+
+ // TODO(morgabra/kans): This seems to be OK in practice - just don't invoke the unimplemented methods.
+ opts := &connector.RegisterOps{
+ Ratelimiter: nil,
+ ProvisioningEnabled: true,
+ TicketingEnabled: true,
+ }
+
+ s := c1_lambda_grpc.NewServer(nil)
+ connector.Register(ctx, s, c, opts)
+
+ aws_lambda.Start(s.Handler)
+ return nil
+ }
+ return nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/cli/lambda_server_omitted.go b/vendor/github.com/conductorone/baton-sdk/pkg/cli/lambda_server_omitted.go
new file mode 100644
index 00000000..902887d0
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/cli/lambda_server_omitted.go
@@ -0,0 +1,23 @@
+//go:build !baton_lambda_support
+
+package cli
+
+import (
+ "context"
+
+ "github.com/spf13/cobra"
+ "github.com/spf13/viper"
+
+ "github.com/conductorone/baton-sdk/pkg/field"
+)
+
+func OptionallyAddLambdaCommand[T field.Configurable](
+ ctx context.Context,
+ name string,
+ v *viper.Viper,
+ getconnector GetConnectorFunc[T],
+ connectorSchema field.Configuration,
+ mainCmd *cobra.Command,
+) error {
+ return nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/cli/service_unix.go b/vendor/github.com/conductorone/baton-sdk/pkg/cli/service_unix.go
index d9e8ad8f..48d6aee6 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/cli/service_unix.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/cli/service_unix.go
@@ -5,9 +5,10 @@ package cli
import (
"context"
+ "github.com/spf13/cobra"
+
"github.com/conductorone/baton-sdk/pkg/field"
"github.com/conductorone/baton-sdk/pkg/logging"
- "github.com/spf13/cobra"
)
func isService() bool {
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/cli/service_windows.go b/vendor/github.com/conductorone/baton-sdk/pkg/cli/service_windows.go
index 5ed0fed7..a4782663 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/cli/service_windows.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/cli/service_windows.go
@@ -9,20 +9,21 @@ import (
"fmt"
"os"
"path/filepath"
- "reflect"
"strconv"
"time"
- "github.com/conductorone/baton-sdk/pkg/field"
- "github.com/conductorone/baton-sdk/pkg/logging"
- "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
- "github.com/spf13/cobra"
"go.uber.org/zap"
"golang.org/x/sys/windows/svc"
"golang.org/x/sys/windows/svc/debug"
"golang.org/x/sys/windows/svc/eventlog"
"golang.org/x/sys/windows/svc/mgr"
"gopkg.in/yaml.v2"
+
+ "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "github.com/spf13/cobra"
+
+ "github.com/conductorone/baton-sdk/pkg/field"
+ "github.com/conductorone/baton-sdk/pkg/logging"
)
const (
@@ -62,12 +63,6 @@ var skipServiceSetupFields = map[string]struct{}{
"RevokeGrantID": {},
}
-var (
- stringReflectType = reflect.TypeOf("")
- boolReflectType = reflect.TypeOf(true)
- stringSliceReflectType = reflect.TypeOf([]string(nil))
-)
-
func getExePath() (string, error) {
p, err := filepath.Abs(os.Args[0])
if err != nil {
@@ -98,11 +93,12 @@ func getExePath() (string, error) {
func initLogger(ctx context.Context, name string, loggingOpts ...logging.Option) (context.Context, error) {
if isService() {
- loggingOpts = []logging.Option{
+ defaultLoggingOpts := []logging.Option{
logging.WithLogFormat(logging.LogFormatJSON),
logging.WithLogLevel("info"),
logging.WithOutputPaths([]string{filepath.Join(getConfigDir(name), "baton.log")}),
}
+ loggingOpts = append(defaultLoggingOpts, loggingOpts...)
}
return logging.Init(ctx, loggingOpts...)
@@ -303,18 +299,18 @@ func interactiveSetup(ctx context.Context, outputFilePath string, fields []field
continue
}
- switch vfield.GetType() {
- case reflect.Bool:
+ switch vfield.Variant {
+ case field.BoolVariant:
b, err := strconv.ParseBool(input)
if err != nil {
return err
}
config[vfield.GetName()] = b
- case reflect.String:
+ case field.StringVariant:
config[vfield.GetName()] = input
- case reflect.Int:
+ case field.IntVariant:
i, err := strconv.Atoi(input)
if err != nil {
return err
@@ -324,7 +320,7 @@ func interactiveSetup(ctx context.Context, outputFilePath string, fields []field
// TODO (shackra): add support for []string in SDK
default:
- l.Error("Unsupported type for interactive config.", zap.String("type", vfield.GetType().String()))
+ l.Error("Unsupported type for interactive config.", zap.String("type", string(vfield.Variant)))
return errors.New("unsupported type for interactive config")
}
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go b/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go
index d2d4f249..76c2a259 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/config/config.go
@@ -13,17 +13,20 @@ import (
"github.com/conductorone/baton-sdk/pkg/connectorrunner"
"github.com/conductorone/baton-sdk/pkg/field"
"github.com/spf13/cobra"
- "github.com/spf13/pflag"
"github.com/spf13/viper"
)
-func DefineConfiguration(
+func DefineConfiguration[T field.Configurable](
ctx context.Context,
connectorName string,
- connector cli.GetConnectorFunc,
+ connector cli.GetConnectorFunc[T],
schema field.Configuration,
options ...connectorrunner.Option,
) (*viper.Viper, *cobra.Command, error) {
+ if err := verifyStructFields[T](schema); err != nil {
+ return nil, nil, fmt.Errorf("VerifyStructFields failed: %w", err)
+ }
+
v := viper.New()
v.SetConfigType("yaml")
@@ -54,6 +57,7 @@ func DefineConfiguration(
for _, f := range uniqueFields {
confschema.Fields = append(confschema.Fields, f)
}
+
// setup CLI with cobra
mainCMD := &cobra.Command{
Use: connectorName,
@@ -63,77 +67,90 @@ func DefineConfiguration(
RunE: cli.MakeMainCommand(ctx, connectorName, v, confschema, connector, options...),
}
// set persistent flags only on the main subcommand
- err = setFlagsAndConstraints(mainCMD, field.NewConfiguration(field.DefaultFields, field.DefaultRelationships...))
+ err = cli.SetFlagsAndConstraints(mainCMD, field.NewConfiguration(field.DefaultFields, field.DefaultRelationships...))
if err != nil {
return nil, nil, err
}
// set the rest of flags
- err = setFlagsAndConstraints(mainCMD, schema)
+ err = cli.SetFlagsAndConstraints(mainCMD, schema)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ mainCMD.AddCommand(cli.AdditionalCommands(connectorName, schema.Fields)...)
+ cli.VisitFlags(mainCMD, v)
+
+ err = cli.OptionallyAddLambdaCommand(ctx, connectorName, v, connector, confschema, mainCMD)
+
if err != nil {
return nil, nil, err
}
- grpcServerCmd := &cobra.Command{
+ _, err = cli.AddCommand(mainCMD, v, &schema, &cobra.Command{
Use: "_connector-service",
Short: "Start the connector service",
Hidden: true,
RunE: cli.MakeGRPCServerCommand(ctx, connectorName, v, confschema, connector),
- }
- err = setFlagsAndConstraints(grpcServerCmd, schema)
+ })
+
if err != nil {
return nil, nil, err
}
- mainCMD.AddCommand(grpcServerCmd)
- capabilitiesCmd := &cobra.Command{
+ _, err = cli.AddCommand(mainCMD, v, &schema, &cobra.Command{
Use: "capabilities",
Short: "Get connector capabilities",
RunE: cli.MakeCapabilitiesCommand(ctx, connectorName, v, confschema, connector),
- }
- err = setFlagsAndConstraints(capabilitiesCmd, schema)
+ })
+
if err != nil {
return nil, nil, err
}
- mainCMD.AddCommand(capabilitiesCmd)
- mainCMD.AddCommand(cli.AdditionalCommands(connectorName, schema.Fields)...)
-
- // NOTE(shackra): Set all values from Viper to the flags so
- // that Cobra won't complain that a flag is missing in case we
- // pass values through environment variables
-
- // main subcommand
- mainCMD.Flags().VisitAll(func(f *pflag.Flag) {
- if v.IsSet(f.Name) {
- _ = mainCMD.Flags().Set(f.Name, v.GetString(f.Name))
- }
+ _, err = cli.AddCommand(mainCMD, v, nil, &cobra.Command{
+ Use: "config",
+ Short: "Get the connector config schema",
+ RunE: cli.MakeConfigSchemaCommand(ctx, connectorName, v, confschema, connector),
})
- // children process subcommand
- grpcServerCmd.Flags().VisitAll(func(f *pflag.Flag) {
- if v.IsSet(f.Name) {
- _ = grpcServerCmd.Flags().Set(f.Name, v.GetString(f.Name))
- }
- })
-
- // capabilities subcommand
- capabilitiesCmd.Flags().VisitAll(func(f *pflag.Flag) {
- if v.IsSet(f.Name) {
- _ = capabilitiesCmd.Flags().Set(f.Name, v.GetString(f.Name))
- }
- })
+ if err != nil {
+ return nil, nil, err
+ }
return v, mainCMD, nil
}
-func listFieldConstrainsAsStrings(constrains field.SchemaFieldRelationship) []string {
- var fields []string
- for _, v := range constrains.Fields {
- fields = append(fields, v.FieldName)
+func verifyStructFields[T field.Configurable](schema field.Configuration) error {
+ // Verify that every field in the confschema has a corresponding struct tag in the struct defined in getconnector of type T
+ // or that it obeys the old interface, a *viper.Viper
+ var config T // Create a zero-value instance of T
+ tType := reflect.TypeOf(config)
+ // Viper doesn't do struct fields
+ if tType == reflect.TypeOf(&viper.Viper{}) {
+ return nil
}
-
- return fields
+ configType := reflect.TypeOf(config)
+ if configType.Kind() == reflect.Ptr {
+ configType = configType.Elem()
+ }
+ if configType.Kind() != reflect.Struct {
+ return fmt.Errorf("T must be a struct type, got %v", configType.Kind())
+ }
+ for _, field := range schema.Fields {
+ fieldFound := false
+ for i := 0; i < configType.NumField(); i++ {
+ structField := configType.Field(i)
+ if structField.Tag.Get("mapstructure") == field.FieldName {
+ fieldFound = true
+ break
+ }
+ }
+ if !fieldFound {
+ return fmt.Errorf("field %s in confschema does not have a corresponding struct tag in the configuration struct", field.FieldName)
+ }
+ }
+ return nil
}
func cleanOrGetConfigPath(customPath string) (string, string, error) {
@@ -159,157 +176,3 @@ func cleanOrGetConfigPath(customPath string) (string, string, error) {
return ".", ".baton", nil
}
-
-func setFlagsAndConstraints(command *cobra.Command, schema field.Configuration) error {
- // add options
- for _, field := range schema.Fields {
- switch field.FieldType {
- case reflect.Bool:
- value, err := field.Bool()
- if err != nil {
- return fmt.Errorf(
- "field %s, %s: %w",
- field.FieldName,
- field.FieldType,
- err,
- )
- }
- if field.Persistent {
- command.PersistentFlags().
- BoolP(field.FieldName, field.CLIShortHand, value, field.GetDescription())
- } else {
- command.Flags().
- BoolP(field.FieldName, field.CLIShortHand, value, field.GetDescription())
- }
- case reflect.Int:
- value, err := field.Int()
- if err != nil {
- return fmt.Errorf(
- "field %s, %s: %w",
- field.FieldName,
- field.FieldType,
- err,
- )
- }
- if field.Persistent {
- command.PersistentFlags().
- IntP(field.FieldName, field.CLIShortHand, value, field.GetDescription())
- } else {
- command.Flags().
- IntP(field.FieldName, field.CLIShortHand, value, field.GetDescription())
- }
- case reflect.String:
- value, err := field.String()
- if err != nil {
- return fmt.Errorf(
- "field %s, %s: %w",
- field.FieldName,
- field.FieldType,
- err,
- )
- }
- if field.Persistent {
- command.PersistentFlags().
- StringP(field.FieldName, field.CLIShortHand, value, field.GetDescription())
- } else {
- command.Flags().
- StringP(field.FieldName, field.CLIShortHand, value, field.GetDescription())
- }
- case reflect.Slice:
- value, err := field.StringSlice()
- if err != nil {
- return fmt.Errorf(
- "field %s, %s: %w",
- field.FieldName,
- field.FieldType,
- err,
- )
- }
- if field.Persistent {
- command.PersistentFlags().
- StringSliceP(field.FieldName, field.CLIShortHand, value, field.GetDescription())
- } else {
- command.Flags().
- StringSliceP(field.FieldName, field.CLIShortHand, value, field.GetDescription())
- }
- default:
- return fmt.Errorf(
- "field %s, %s is not yet supported",
- field.FieldName,
- field.FieldType,
- )
- }
-
- // mark hidden
- if field.Hidden {
- if field.Persistent {
- err := command.PersistentFlags().MarkHidden(field.FieldName)
- if err != nil {
- return fmt.Errorf(
- "cannot hide persistent field %s, %s: %w",
- field.FieldName,
- field.FieldType,
- err,
- )
- }
- } else {
- err := command.Flags().MarkHidden(field.FieldName)
- if err != nil {
- return fmt.Errorf(
- "cannot hide field %s, %s: %w",
- field.FieldName,
- field.FieldType,
- err,
- )
- }
- }
- }
-
- // mark required
- if field.Required {
- if field.FieldType == reflect.Bool {
- return fmt.Errorf("requiring %s of type %s does not make sense", field.FieldName, field.FieldType)
- }
-
- if field.Persistent {
- err := command.MarkPersistentFlagRequired(field.FieldName)
- if err != nil {
- return fmt.Errorf(
- "cannot require persistent field %s, %s: %w",
- field.FieldName,
- field.FieldType,
- err,
- )
- }
- } else {
- err := command.MarkFlagRequired(field.FieldName)
- if err != nil {
- return fmt.Errorf(
- "cannot require field %s, %s: %w",
- field.FieldName,
- field.FieldType,
- err,
- )
- }
- }
- }
- }
-
- // apply constrains
- for _, constrain := range schema.Constraints {
- switch constrain.Kind {
- case field.MutuallyExclusive:
- command.MarkFlagsMutuallyExclusive(listFieldConstrainsAsStrings(constrain)...)
- case field.RequiredTogether:
- command.MarkFlagsRequiredTogether(listFieldConstrainsAsStrings(constrain)...)
- case field.AtLeastOne:
- command.MarkFlagsOneRequired(listFieldConstrainsAsStrings(constrain)...)
- case field.Dependents:
- // do nothing
- default:
- return fmt.Errorf("invalid config")
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/config/generate.go b/vendor/github.com/conductorone/baton-sdk/pkg/config/generate.go
new file mode 100644
index 00000000..25498beb
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/config/generate.go
@@ -0,0 +1,185 @@
+package config
+
+import (
+ "os"
+ "strings"
+ "text/template"
+
+ "github.com/conductorone/baton-sdk/pkg/field"
+ "golang.org/x/text/cases"
+ "golang.org/x/text/language"
+)
+
+// Converts kebab-case "foo-bar-baz" to PascalCase "FooBarBaz".
+func toPascalCase(input string) string {
+ words := strings.Split(input, "-") // Split into words
+ caser := cases.Title(language.AmericanEnglish)
+ for i, word := range words {
+ words[i] = caser.String(word)
+ }
+ return strings.Join(words, "") // Join without spaces
+}
+
+func Generate(name string, schema field.Configuration) {
+ if name == "" {
+ panic("name cannot be empty")
+ }
+ if len(schema.Fields) == 0 {
+ panic("schema must contain at least one field")
+ }
+ confschema := schema
+ confschema.Fields = append(confschema.Fields, field.DefaultFields...)
+ // Ensure unique fields
+ uniqueFields := make(map[string]field.SchemaField)
+ for _, f := range confschema.Fields {
+ uniqueFields[f.FieldName] = f
+ }
+ confschema.Fields = make([]field.SchemaField, 0, len(uniqueFields))
+ for _, f := range uniqueFields {
+ confschema.Fields = append(confschema.Fields, f)
+ }
+
+ type FieldInfo struct {
+ FieldName string
+ FieldType string
+ Tag string
+ }
+ type StructInfo struct {
+ StructName string
+ Fields []FieldInfo
+ }
+
+ data := StructInfo{
+ StructName: toPascalCase(name),
+ Fields: []FieldInfo{},
+ }
+ for _, f := range schema.Fields {
+ if f.ExportTarget != field.ExportTargetGUI && f.ExportTarget != field.ExportTargetOps && f.ExportTarget != field.ExportTargetCLIOnly {
+ continue
+ }
+ fieldName := f.StructFieldName
+ if fieldName == "" {
+ fieldName = toPascalCase(f.FieldName)
+ }
+
+ nf := FieldInfo{
+ FieldName: fieldName,
+ Tag: f.FieldName,
+ }
+ switch f.Variant {
+ case field.StringVariant:
+ nf.FieldType = "string"
+ case field.BoolVariant:
+ nf.FieldType = "bool"
+ case field.IntVariant:
+ nf.FieldType = "int"
+ case field.StringSliceVariant:
+ nf.FieldType = "[]string"
+ case field.StringMapVariant:
+ nf.FieldType = "map[string]any"
+ }
+ data.Fields = append(data.Fields, nf)
+ }
+ tmpl, err := template.New("struct").Parse(structTemplate)
+ if err != nil {
+ panic(err)
+ }
+ // Create output file
+ f, err := os.Create("conf.gen.go")
+ if err != nil {
+ panic(err)
+ }
+ defer f.Close()
+
+ // Execute the template and write to file
+ if err := tmpl.Execute(f, data); err != nil {
+ panic(err)
+ }
+}
+
+const structTemplate = `// Code generated by baton-sdk. DO NOT EDIT!!!
+package config
+
+import "reflect"
+
+type {{ .StructName }} struct {
+ {{- range .Fields }}
+ {{ .FieldName }} {{ .FieldType }} ` + "`mapstructure:\"{{ .Tag }}\"`" + `
+ {{- end }}
+}
+
+func (c* {{ .StructName }}) findFieldByTag(tagValue string) (any, bool) {
+ v := reflect.ValueOf(c).Elem() // Dereference pointer to struct
+ t := v.Type()
+
+ for i := 0; i < t.NumField(); i++ {
+ field := t.Field(i)
+ tag := field.Tag.Get("mapstructure")
+
+ if tag == tagValue {
+ return v.Field(i).Interface(), true
+ }
+ }
+ return nil, false
+}
+
+func (c *{{ .StructName }}) GetStringSlice(fieldName string) []string {
+ v, ok := c.findFieldByTag(fieldName)
+ if !ok {
+ return []string{}
+ }
+ t, ok := v.([]string)
+ if !ok {
+ panic("wrong type")
+ }
+ return t
+}
+
+func (c *{{ .StructName }}) GetString(fieldName string) string {
+ v, ok := c.findFieldByTag(fieldName)
+ if !ok {
+ return ""
+ }
+ t, ok := v.(string)
+ if !ok {
+ panic("wrong type")
+ }
+ return t
+}
+
+func (c *{{ .StructName }}) GetInt(fieldName string) int {
+ v, ok := c.findFieldByTag(fieldName)
+ if !ok {
+ return 0
+ }
+ t, ok := v.(int)
+ if !ok {
+ panic("wrong type")
+ }
+ return t
+}
+
+func (c *{{ .StructName }}) GetBool(fieldName string) bool {
+ v, ok := c.findFieldByTag(fieldName)
+ if !ok {
+ return false
+ }
+ t, ok := v.(bool)
+ if !ok {
+ panic("wrong type")
+ }
+ return t
+}
+
+func (c *{{ .StructName }}) GetStringMap(fieldName string) map[string]any {
+ v, ok := c.findFieldByTag(fieldName)
+ if !ok {
+ return map[string]any{}
+ }
+ t, ok := v.(map[string]any)
+ if !ok {
+ panic("wrong type")
+ }
+ return t
+}
+`
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go b/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go
index 29e02e8b..e8780cce 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/connectorbuilder/connectorbuilder.go
@@ -9,10 +9,12 @@ import (
"time"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.opentelemetry.io/otel"
"go.uber.org/zap"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/structpb"
"google.golang.org/protobuf/types/known/timestamppb"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
@@ -25,6 +27,8 @@ import (
"github.com/conductorone/baton-sdk/pkg/uhttp"
)
+var tracer = otel.Tracer("baton-sdk/pkg.connectorbuilder")
+
type ResourceSyncer interface {
ResourceType(ctx context.Context) *v2.ResourceType
List(ctx context.Context, parentResourceID *v2.ResourceId, pToken *pagination.Token) ([]*v2.Resource, string, annotations.Annotations, error)
@@ -49,6 +53,10 @@ type ResourceManager interface {
Delete(ctx context.Context, resourceId *v2.ResourceId) (annotations.Annotations, error)
}
+type ResourceDeleter interface {
+ Delete(ctx context.Context, resourceId *v2.ResourceId) (annotations.Annotations, error)
+}
+
type CreateAccountResponse interface {
proto.Message
GetIsCreateAccountResult() bool
@@ -77,6 +85,17 @@ type TicketManager interface {
BulkGetTickets(context.Context, *v2.TicketsServiceBulkGetTicketsRequest) (*v2.TicketsServiceBulkGetTicketsResponse, error)
}
+type CustomActionManager interface {
+ ListActionSchemas(ctx context.Context) ([]*v2.BatonActionSchema, annotations.Annotations, error)
+ GetActionSchema(ctx context.Context, name string) (*v2.BatonActionSchema, annotations.Annotations, error)
+ InvokeAction(ctx context.Context, name string, args *structpb.Struct) (string, v2.BatonActionStatus, *structpb.Struct, annotations.Annotations, error)
+ GetActionStatus(ctx context.Context, id string) (v2.BatonActionStatus, string, *structpb.Struct, annotations.Annotations, error)
+}
+
+type RegisterActionManager interface {
+ RegisterActionManager(ctx context.Context) (CustomActionManager, error)
+}
+
type ConnectorBuilder interface {
Metadata(ctx context.Context) (*v2.ConnectorMetadata, error)
Validate(ctx context.Context) (annotations.Annotations, error)
@@ -88,7 +107,9 @@ type builderImpl struct {
resourceProvisioners map[string]ResourceProvisioner
resourceProvisionersV2 map[string]ResourceProvisionerV2
resourceManagers map[string]ResourceManager
+ resourceDeleters map[string]ResourceDeleter
accountManager AccountManager
+ actionManager CustomActionManager
credentialManagers map[string]CredentialManager
eventFeed EventProvider
cb ConnectorBuilder
@@ -99,6 +120,9 @@ type builderImpl struct {
}
func (b *builderImpl) BulkCreateTickets(ctx context.Context, request *v2.TicketsServiceBulkCreateTicketsRequest) (*v2.TicketsServiceBulkCreateTicketsResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.BulkCreateTickets")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.BulkCreateTicketsType
if b.ticketManager == nil {
@@ -125,6 +149,9 @@ func (b *builderImpl) BulkCreateTickets(ctx context.Context, request *v2.Tickets
}
func (b *builderImpl) BulkGetTickets(ctx context.Context, request *v2.TicketsServiceBulkGetTicketsRequest) (*v2.TicketsServiceBulkGetTicketsResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.BulkGetTickets")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.BulkGetTicketsType
if b.ticketManager == nil {
@@ -151,6 +178,9 @@ func (b *builderImpl) BulkGetTickets(ctx context.Context, request *v2.TicketsSer
}
func (b *builderImpl) ListTicketSchemas(ctx context.Context, request *v2.TicketsServiceListTicketSchemasRequest) (*v2.TicketsServiceListTicketSchemasResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.ListTicketSchemas")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.ListTicketSchemasType
if b.ticketManager == nil {
@@ -180,6 +210,9 @@ func (b *builderImpl) ListTicketSchemas(ctx context.Context, request *v2.Tickets
}
func (b *builderImpl) CreateTicket(ctx context.Context, request *v2.TicketsServiceCreateTicketRequest) (*v2.TicketsServiceCreateTicketResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.CreateTicket")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.CreateTicketType
if b.ticketManager == nil {
@@ -222,6 +255,9 @@ func (b *builderImpl) CreateTicket(ctx context.Context, request *v2.TicketsServi
}
func (b *builderImpl) GetTicket(ctx context.Context, request *v2.TicketsServiceGetTicketRequest) (*v2.TicketsServiceGetTicketResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.GetTicket")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.GetTicketType
if b.ticketManager == nil {
@@ -250,6 +286,9 @@ func (b *builderImpl) GetTicket(ctx context.Context, request *v2.TicketsServiceG
}
func (b *builderImpl) GetTicketSchema(ctx context.Context, request *v2.TicketsServiceGetTicketSchemaRequest) (*v2.TicketsServiceGetTicketSchemaResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.GetTicketSchema")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.GetTicketSchemaType
if b.ticketManager == nil {
@@ -279,7 +318,9 @@ func NewConnector(ctx context.Context, in interface{}, opts ...Opt) (types.Conne
resourceProvisioners: make(map[string]ResourceProvisioner),
resourceProvisionersV2: make(map[string]ResourceProvisionerV2),
resourceManagers: make(map[string]ResourceManager),
+ resourceDeleters: make(map[string]ResourceDeleter),
accountManager: nil,
+ actionManager: nil,
credentialManagers: make(map[string]CredentialManager),
cb: c,
ticketManager: nil,
@@ -306,6 +347,27 @@ func NewConnector(ctx context.Context, in interface{}, opts ...Opt) (types.Conne
ret.ticketManager = ticketManager
}
+ if actionManager, ok := c.(CustomActionManager); ok {
+ if ret.actionManager != nil {
+ return nil, fmt.Errorf("error: cannot set multiple action managers")
+ }
+ ret.actionManager = actionManager
+ }
+
+ if registerActionManager, ok := c.(RegisterActionManager); ok {
+ if ret.actionManager != nil {
+ return nil, fmt.Errorf("error: cannot register multiple action managers")
+ }
+ actionManager, err := registerActionManager.RegisterActionManager(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("error: registering action manager failed: %w", err)
+ }
+ if actionManager == nil {
+ return nil, fmt.Errorf("error: action manager is nil")
+ }
+ ret.actionManager = actionManager
+ }
+
for _, rb := range c.ResourceSyncers(ctx) {
rType := rb.ResourceType(ctx)
if _, ok := ret.resourceBuilders[rType.Id]; ok {
@@ -330,11 +392,24 @@ func NewConnector(ctx context.Context, in interface{}, opts ...Opt) (types.Conne
ret.resourceProvisionersV2[rType.Id] = provisioner
}
- if resourceManagers, ok := rb.(ResourceManager); ok {
+ if resourceManager, ok := rb.(ResourceManager); ok {
if _, ok := ret.resourceManagers[rType.Id]; ok {
return nil, fmt.Errorf("error: duplicate resource type found for resource manager %s", rType.Id)
}
- ret.resourceManagers[rType.Id] = resourceManagers
+ ret.resourceManagers[rType.Id] = resourceManager
+ // Support DeleteResourceV2 if connector implements both Create and Delete
+ if _, ok := ret.resourceDeleters[rType.Id]; ok {
+ // This should never happen
+ return nil, fmt.Errorf("error: duplicate resource type found for resource deleter %s", rType.Id)
+ }
+ ret.resourceDeleters[rType.Id] = resourceManager
+ } else {
+ if resourceDeleter, ok := rb.(ResourceDeleter); ok {
+ if _, ok := ret.resourceDeleters[rType.Id]; ok {
+ return nil, fmt.Errorf("error: duplicate resource type found for resource deleter %s", rType.Id)
+ }
+ ret.resourceDeleters[rType.Id] = resourceDeleter
+ }
}
if accountManager, ok := rb.(AccountManager); ok {
@@ -405,6 +480,9 @@ func (b *builderImpl) ListResourceTypes(
ctx context.Context,
request *v2.ResourceTypesServiceListResourceTypesRequest,
) (*v2.ResourceTypesServiceListResourceTypesResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.ListResourceTypes")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.ListResourceTypesType
var out []*v2.ResourceType
@@ -419,6 +497,9 @@ func (b *builderImpl) ListResourceTypes(
// ListResources returns all available resources for a given resource type ID.
func (b *builderImpl) ListResources(ctx context.Context, request *v2.ResourcesServiceListResourcesRequest) (*v2.ResourcesServiceListResourcesResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.ListResources")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.ListResourcesType
rb, ok := b.resourceBuilders[request.ResourceTypeId]
@@ -451,6 +532,9 @@ func (b *builderImpl) ListResources(ctx context.Context, request *v2.ResourcesSe
// ListEntitlements returns all the entitlements for a given resource.
func (b *builderImpl) ListEntitlements(ctx context.Context, request *v2.EntitlementsServiceListEntitlementsRequest) (*v2.EntitlementsServiceListEntitlementsResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.ListEntitlements")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.ListEntitlementsType
rb, ok := b.resourceBuilders[request.Resource.Id.ResourceType]
@@ -483,6 +567,9 @@ func (b *builderImpl) ListEntitlements(ctx context.Context, request *v2.Entitlem
// ListGrants lists all the grants for a given resource.
func (b *builderImpl) ListGrants(ctx context.Context, request *v2.GrantsServiceListGrantsRequest) (*v2.GrantsServiceListGrantsResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.ListGrants")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.ListGrantsType
rid := request.Resource.Id
@@ -518,6 +605,9 @@ func (b *builderImpl) ListGrants(ctx context.Context, request *v2.GrantsServiceL
// GetMetadata gets all metadata for a connector.
func (b *builderImpl) GetMetadata(ctx context.Context, request *v2.ConnectorServiceGetMetadataRequest) (*v2.ConnectorServiceGetMetadataResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.GetMetadata")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.GetMetadataType
md, err := b.cb.Metadata(ctx)
@@ -629,7 +719,11 @@ func getCapabilities(ctx context.Context, b *builderImpl) (*v2.ConnectorCapabili
resourceTypeCapability.Capabilities = append(resourceTypeCapability.Capabilities, v2.Capability_CAPABILITY_RESOURCE_CREATE, v2.Capability_CAPABILITY_RESOURCE_DELETE)
connectorCaps[v2.Capability_CAPABILITY_RESOURCE_CREATE] = struct{}{}
connectorCaps[v2.Capability_CAPABILITY_RESOURCE_DELETE] = struct{}{}
+ } else if _, ok := rb.(ResourceDeleter); ok {
+ resourceTypeCapability.Capabilities = append(resourceTypeCapability.Capabilities, v2.Capability_CAPABILITY_RESOURCE_DELETE)
+ connectorCaps[v2.Capability_CAPABILITY_RESOURCE_DELETE] = struct{}{}
}
+
resourceTypeCapabilities = append(resourceTypeCapabilities, resourceTypeCapability)
}
sort.Slice(resourceTypeCapabilities, func(i, j int) bool {
@@ -644,6 +738,10 @@ func getCapabilities(ctx context.Context, b *builderImpl) (*v2.ConnectorCapabili
connectorCaps[v2.Capability_CAPABILITY_TICKETING] = struct{}{}
}
+ if b.actionManager != nil {
+ connectorCaps[v2.Capability_CAPABILITY_ACTIONS] = struct{}{}
+ }
+
var caps []v2.Capability
for c := range connectorCaps {
caps = append(caps, c)
@@ -664,6 +762,9 @@ func getCapabilities(ctx context.Context, b *builderImpl) (*v2.ConnectorCapabili
// Validate validates the connector.
func (b *builderImpl) Validate(ctx context.Context, request *v2.ConnectorServiceValidateRequest) (*v2.ConnectorServiceValidateResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.Validate")
+ defer span.End()
+
annos, err := b.cb.Validate(ctx)
if err != nil {
return nil, err
@@ -673,6 +774,9 @@ func (b *builderImpl) Validate(ctx context.Context, request *v2.ConnectorService
}
func (b *builderImpl) Grant(ctx context.Context, request *v2.GrantManagerServiceGrantRequest) (*v2.GrantManagerServiceGrantResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.Grant")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.GrantType
l := ctxzap.Extract(ctx)
@@ -710,6 +814,9 @@ func (b *builderImpl) Grant(ctx context.Context, request *v2.GrantManagerService
}
func (b *builderImpl) Revoke(ctx context.Context, request *v2.GrantManagerServiceRevokeRequest) (*v2.GrantManagerServiceRevokeResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.Revoke")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.RevokeType
@@ -748,10 +855,16 @@ func (b *builderImpl) Revoke(ctx context.Context, request *v2.GrantManagerServic
// GetAsset streams the asset to the client.
// FIXME(jirwin): Asset streaming is disabled.
func (b *builderImpl) GetAsset(request *v2.AssetServiceGetAssetRequest, server v2.AssetService_GetAssetServer) error {
+ _, span := tracer.Start(server.Context(), "builderImpl.GetAsset")
+ defer span.End()
+
return nil
}
func (b *builderImpl) ListEvents(ctx context.Context, request *v2.ListEventsRequest) (*v2.ListEventsResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.ListEvents")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.ListEventsType
if b.eventFeed == nil {
@@ -776,6 +889,9 @@ func (b *builderImpl) ListEvents(ctx context.Context, request *v2.ListEventsRequ
}
func (b *builderImpl) CreateResource(ctx context.Context, request *v2.CreateResourceRequest) (*v2.CreateResourceResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.CreateResource")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.CreateResourceType
l := ctxzap.Extract(ctx)
@@ -791,18 +907,26 @@ func (b *builderImpl) CreateResource(ctx context.Context, request *v2.CreateReso
b.m.RecordTaskSuccess(ctx, tt, b.nowFunc().Sub(start))
return &v2.CreateResourceResponse{Created: resource, Annotations: annos}, nil
}
- l.Error("error: resource type does not have resource manager configured", zap.String("resource_type", rt))
+ l.Error("error: resource type does not have resource Create() configured", zap.String("resource_type", rt))
b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
- return nil, status.Error(codes.Unimplemented, "resource type does not have resource manager configured")
+ return nil, status.Error(codes.Unimplemented, fmt.Sprintf("resource type %s does not have resource Create() configured", rt))
}
func (b *builderImpl) DeleteResource(ctx context.Context, request *v2.DeleteResourceRequest) (*v2.DeleteResourceResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.DeleteResource")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.DeleteResourceType
l := ctxzap.Extract(ctx)
rt := request.GetResourceId().GetResourceType()
- manager, ok := b.resourceManagers[rt]
+ var manager ResourceDeleter
+ var ok bool
+ manager, ok = b.resourceManagers[rt]
+ if !ok {
+ manager, ok = b.resourceDeleters[rt]
+ }
if ok {
annos, err := manager.Delete(ctx, request.GetResourceId())
if err != nil {
@@ -813,12 +937,45 @@ func (b *builderImpl) DeleteResource(ctx context.Context, request *v2.DeleteReso
b.m.RecordTaskSuccess(ctx, tt, b.nowFunc().Sub(start))
return &v2.DeleteResourceResponse{Annotations: annos}, nil
}
- l.Error("error: resource type does not have resource manager configured", zap.String("resource_type", rt))
+ l.Error("error: resource type does not have resource Delete() configured", zap.String("resource_type", rt))
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, status.Error(codes.Unimplemented, fmt.Sprintf("resource type %s does not have resource Delete() configured", rt))
+}
+
+func (b *builderImpl) DeleteResourceV2(ctx context.Context, request *v2.DeleteResourceV2Request) (*v2.DeleteResourceV2Response, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.DeleteResourceV2")
+ defer span.End()
+
+ start := b.nowFunc()
+ tt := tasks.DeleteResourceType
+
+ l := ctxzap.Extract(ctx)
+ rt := request.GetResourceId().GetResourceType()
+ var manager ResourceDeleter
+ var ok bool
+ manager, ok = b.resourceManagers[rt]
+ if !ok {
+ manager, ok = b.resourceDeleters[rt]
+ }
+ if ok {
+ annos, err := manager.Delete(ctx, request.GetResourceId())
+ if err != nil {
+ l.Error("error: delete resource failed", zap.Error(err))
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: delete resource failed: %w", err)
+ }
+ b.m.RecordTaskSuccess(ctx, tt, b.nowFunc().Sub(start))
+ return &v2.DeleteResourceV2Response{Annotations: annos}, nil
+ }
+ l.Error("error: resource type does not have resource Delete() configured", zap.String("resource_type", rt))
b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
- return nil, status.Error(codes.Unimplemented, "resource type does not have resource manager configured")
+ return nil, status.Error(codes.Unimplemented, fmt.Sprintf("resource type %s does not have resource Delete() configured", rt))
}
func (b *builderImpl) RotateCredential(ctx context.Context, request *v2.RotateCredentialRequest) (*v2.RotateCredentialResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.RotateCredential")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.RotateCredentialsType
l := ctxzap.Extract(ctx)
@@ -874,6 +1031,9 @@ func (b *builderImpl) Cleanup(ctx context.Context, request *v2.ConnectorServiceC
}
func (b *builderImpl) CreateAccount(ctx context.Context, request *v2.CreateAccountRequest) (*v2.CreateAccountResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.CreateAccount")
+ defer span.End()
+
start := b.nowFunc()
tt := tasks.CreateAccountType
l := ctxzap.Extract(ctx)
@@ -924,3 +1084,113 @@ func (b *builderImpl) CreateAccount(ctx context.Context, request *v2.CreateAccou
b.m.RecordTaskSuccess(ctx, tt, b.nowFunc().Sub(start))
return rv, nil
}
+
+func (b *builderImpl) ListActionSchemas(ctx context.Context, request *v2.ListActionSchemasRequest) (*v2.ListActionSchemasResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.ListActionSchemas")
+ defer span.End()
+
+ start := b.nowFunc()
+ tt := tasks.ActionListSchemasType
+ if b.actionManager == nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: action manager not implemented")
+ }
+
+ actionSchemas, annos, err := b.actionManager.ListActionSchemas(ctx)
+ if err != nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: listing action schemas failed: %w", err)
+ }
+
+ rv := &v2.ListActionSchemasResponse{
+ Schemas: actionSchemas,
+ Annotations: annos,
+ }
+
+ b.m.RecordTaskSuccess(ctx, tt, b.nowFunc().Sub(start))
+ return rv, nil
+}
+
+func (b *builderImpl) GetActionSchema(ctx context.Context, request *v2.GetActionSchemaRequest) (*v2.GetActionSchemaResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.GetActionSchema")
+ defer span.End()
+
+ start := b.nowFunc()
+ tt := tasks.ActionGetSchemaType
+ if b.actionManager == nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: action manager not implemented")
+ }
+
+ actionSchema, annos, err := b.actionManager.GetActionSchema(ctx, request.GetName())
+ if err != nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: getting action schema failed: %w", err)
+ }
+
+ rv := &v2.GetActionSchemaResponse{
+ Schema: actionSchema,
+ Annotations: annos,
+ }
+
+ b.m.RecordTaskSuccess(ctx, tt, b.nowFunc().Sub(start))
+ return rv, nil
+}
+
+func (b *builderImpl) InvokeAction(ctx context.Context, request *v2.InvokeActionRequest) (*v2.InvokeActionResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.InvokeAction")
+ defer span.End()
+
+ start := b.nowFunc()
+ tt := tasks.ActionInvokeType
+ if b.actionManager == nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: action manager not implemented")
+ }
+
+ id, status, resp, annos, err := b.actionManager.InvokeAction(ctx, request.GetName(), request.GetArgs())
+ if err != nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: invoking action failed: %w", err)
+ }
+
+ rv := &v2.InvokeActionResponse{
+ Id: id,
+ Name: request.GetName(),
+ Status: status,
+ Annotations: annos,
+ Response: resp,
+ }
+
+ b.m.RecordTaskSuccess(ctx, tt, b.nowFunc().Sub(start))
+ return rv, nil
+}
+
+func (b *builderImpl) GetActionStatus(ctx context.Context, request *v2.GetActionStatusRequest) (*v2.GetActionStatusResponse, error) {
+ ctx, span := tracer.Start(ctx, "builderImpl.GetActionStatus")
+ defer span.End()
+
+ start := b.nowFunc()
+ tt := tasks.ActionStatusType
+ if b.actionManager == nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: action manager not implemented")
+ }
+
+ status, name, rv, annos, err := b.actionManager.GetActionStatus(ctx, request.GetId())
+ if err != nil {
+ b.m.RecordTaskFailure(ctx, tt, b.nowFunc().Sub(start))
+ return nil, fmt.Errorf("error: getting action status failed: %w", err)
+ }
+
+ resp := &v2.GetActionStatusResponse{
+ Id: request.GetId(),
+ Name: name,
+ Status: status,
+ Annotations: annos,
+ Response: rv,
+ }
+
+ b.m.RecordTaskSuccess(ctx, tt, b.nowFunc().Sub(start))
+ return resp, nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go b/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go
index f3310918..2b1aba42 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/connectorrunner/runner.go
@@ -283,27 +283,29 @@ type eventStreamConfig struct {
}
type runnerConfig struct {
- rlCfg *ratelimitV1.RateLimiterConfig
- rlDescriptors []*ratelimitV1.RateLimitDescriptors_Entry
- onDemand bool
- c1zPath string
- clientAuth bool
- clientID string
- clientSecret string
- provisioningEnabled bool
- ticketingEnabled bool
- grantConfig *grantConfig
- revokeConfig *revokeConfig
- eventFeedConfig *eventStreamConfig
- tempDir string
- createAccountConfig *createAccountConfig
- deleteResourceConfig *deleteResourceConfig
- rotateCredentialsConfig *rotateCredentialsConfig
- createTicketConfig *createTicketConfig
- bulkCreateTicketConfig *bulkCreateTicketConfig
- listTicketSchemasConfig *listTicketSchemasConfig
- getTicketConfig *getTicketConfig
- skipFullSync bool
+ rlCfg *ratelimitV1.RateLimiterConfig
+ rlDescriptors []*ratelimitV1.RateLimitDescriptors_Entry
+ onDemand bool
+ c1zPath string
+ clientAuth bool
+ clientID string
+ clientSecret string
+ provisioningEnabled bool
+ ticketingEnabled bool
+ grantConfig *grantConfig
+ revokeConfig *revokeConfig
+ eventFeedConfig *eventStreamConfig
+ tempDir string
+ createAccountConfig *createAccountConfig
+ deleteResourceConfig *deleteResourceConfig
+ rotateCredentialsConfig *rotateCredentialsConfig
+ createTicketConfig *createTicketConfig
+ bulkCreateTicketConfig *bulkCreateTicketConfig
+ listTicketSchemasConfig *listTicketSchemasConfig
+ getTicketConfig *getTicketConfig
+ skipFullSync bool
+ externalResourceC1Z string
+ externalResourceEntitlementIdFilter string
}
// WithRateLimiterConfig sets the RateLimiterConfig for a runner.
@@ -531,6 +533,20 @@ func WithTempDir(tempDir string) Option {
}
}
+func WithExternalResourceC1Z(externalResourceC1Z string) Option {
+ return func(ctx context.Context, cfg *runnerConfig) error {
+ cfg.externalResourceC1Z = externalResourceC1Z
+ return nil
+ }
+}
+
+func WithExternalResourceEntitlementFilter(entitlementId string) Option {
+ return func(ctx context.Context, cfg *runnerConfig) error {
+ cfg.externalResourceEntitlementIdFilter = entitlementId
+ return nil
+ }
+}
+
// NewConnectorRunner creates a new connector runner.
func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Option) (*connectorRunner, error) {
runner := &connectorRunner{}
@@ -608,7 +624,10 @@ func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Op
case cfg.bulkCreateTicketConfig != nil:
tm = local.NewBulkTicket(ctx, cfg.bulkCreateTicketConfig.templatePath)
default:
- tm, err = local.NewSyncer(ctx, cfg.c1zPath, local.WithTmpDir(cfg.tempDir))
+ tm, err = local.NewSyncer(ctx, cfg.c1zPath,
+ local.WithTmpDir(cfg.tempDir),
+ local.WithExternalResourceC1Z(cfg.externalResourceC1Z),
+ local.WithExternalResourceEntitlementIdFilter(cfg.externalResourceEntitlementIdFilter))
if err != nil {
return nil, err
}
@@ -620,7 +639,7 @@ func NewConnectorRunner(ctx context.Context, c types.ConnectorServer, opts ...Op
return runner, nil
}
- tm, err := c1api.NewC1TaskManager(ctx, cfg.clientID, cfg.clientSecret, cfg.tempDir, cfg.skipFullSync)
+ tm, err := c1api.NewC1TaskManager(ctx, cfg.clientID, cfg.clientSecret, cfg.tempDir, cfg.skipFullSync, cfg.externalResourceC1Z, cfg.externalResourceEntitlementIdFilter)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go b/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go
index 88ac4e5c..7ca90658 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/connectorstore/connectorstore.go
@@ -22,6 +22,8 @@ type Reader interface {
v2.GrantsServiceServer
reader_v2.GrantsReaderServiceServer
+ reader_v2.SyncsReaderServiceServer
+
// GetAsset does not implement the AssetServer on the reader here. In other situations we were able to easily 'fake'
// the GRPC api, but because this is defined as a streaming RPC, it isn't trivial to implement grpc streaming as part of the c1z format.
GetAsset(ctx context.Context, req *v2.AssetServiceGetAssetRequest) (string, io.Reader, error)
@@ -44,4 +46,5 @@ type Writer interface {
PutResourceTypes(ctx context.Context, resourceTypes ...*v2.ResourceType) error
PutResources(ctx context.Context, resources ...*v2.Resource) error
PutEntitlements(ctx context.Context, entitlements ...*v2.Entitlement) error
+ DeleteGrant(ctx context.Context, grantId string) error
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/ecdsa.go b/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/ecdsa.go
index 44476bad..c3dcccd0 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/ecdsa.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/ecdsa.go
@@ -4,7 +4,7 @@ import (
"crypto/ecdsa"
"fmt"
- "github.com/go-jose/go-jose/v3"
+ "github.com/go-jose/go-jose/v4"
)
func EncryptECDSA(pubKey *ecdsa.PublicKey, plaintext []byte) ([]byte, error) {
@@ -27,7 +27,22 @@ func EncryptECDSA(pubKey *ecdsa.PublicKey, plaintext []byte) ([]byte, error) {
}
func DecryptECDSA(privKey *ecdsa.PrivateKey, ciphertext []byte) ([]byte, error) {
- jwe, err := jose.ParseEncrypted(string(ciphertext))
+ jwe, err := jose.ParseEncryptedCompact(string(ciphertext),
+ []jose.KeyAlgorithm{
+ jose.ECDH_ES,
+ jose.ECDH_ES_A128KW,
+ jose.ECDH_ES_A192KW,
+ jose.ECDH_ES_A256KW,
+ },
+ []jose.ContentEncryption{
+ jose.A128CBC_HS256,
+ jose.A192CBC_HS384,
+ jose.A256CBC_HS512,
+ jose.A128GCM,
+ jose.A192GCM,
+ jose.A256GCM,
+ },
+ )
if err != nil {
return nil, fmt.Errorf("jwk-ecdsa: failed to parse ciphertext: %w", err)
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go b/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go
index a8b8b95b..240bf6f3 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/crypto/providers/jwk/jwk.go
@@ -9,11 +9,12 @@ import (
"crypto/rsa"
"encoding/base64"
"encoding/hex"
+ "errors"
"fmt"
"io"
"filippo.io/age"
- "github.com/go-jose/go-jose/v3"
+ "github.com/go-jose/go-jose/v4"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
)
@@ -21,8 +22,8 @@ import (
// TODO(morgabra): Fix the circular dependency/entire registry pattern here.
const EncryptionProviderJwk = "baton/jwk/v1"
-var JWKInvalidKeyTypeError = fmt.Errorf("jwk: invalid key type")
-var JWKUnsupportedKeyTypeError = fmt.Errorf("jwk: unsupported key type")
+var ErrJWKInvalidKeyType = errors.New("jwk: invalid key type")
+var ErrJWKUnsupportedKeyType = errors.New("jwk: unsupported key type")
func unmarshalJWK(jwkBytes []byte) (*jose.JSONWebKey, error) {
jwk := &jose.JSONWebKey{}
@@ -44,6 +45,10 @@ func (j *JWKEncryptionProvider) GenerateKey(ctx context.Context) (*v2.Encryption
privKeyJWK := &jose.JSONWebKey{
Key: privKey,
}
+ return j.marshalKey(ctx, privKeyJWK)
+}
+
+func (j *JWKEncryptionProvider) marshalKey(ctx context.Context, privKeyJWK *jose.JSONWebKey) (*v2.EncryptionConfig, []byte, error) {
privKeyJWKBytes, err := privKeyJWK.MarshalJSON()
if err != nil {
return nil, nil, fmt.Errorf("jwk: failed to marshal private key: %w", err)
@@ -62,7 +67,7 @@ func (j *JWKEncryptionProvider) GenerateKey(ctx context.Context) (*v2.Encryption
return &v2.EncryptionConfig{
Principal: nil,
- Provider: "baton/jwk/v1", // TODO(morgabra): Fix the circular dependency/entire registry pattern.
+ Provider: EncryptionProviderJwk, // TODO(morgabra): Fix the circular dependency/entire registry pattern.
KeyId: kid,
Config: &v2.EncryptionConfig_JwkPublicKeyConfig{
JwkPublicKeyConfig: &v2.EncryptionConfig_JWKPublicKeyConfig{
@@ -96,7 +101,7 @@ func (j *JWKEncryptionProvider) Encrypt(ctx context.Context, conf *v2.Encryption
return nil, err
}
default:
- return nil, JWKUnsupportedKeyTypeError
+ return nil, ErrJWKUnsupportedKeyType
}
tp, err := thumbprint(jwk)
@@ -124,7 +129,7 @@ func (j *JWKEncryptionProvider) Decrypt(ctx context.Context, cipherText *v2.Encr
}
if jwk.IsPublic() {
- return nil, fmt.Errorf("%w: key is public", JWKInvalidKeyTypeError)
+ return nil, fmt.Errorf("%w: key is public", ErrJWKInvalidKeyType)
}
decCipherText, err := base64.StdEncoding.DecodeString(string(cipherText.EncryptedBytes))
@@ -150,7 +155,7 @@ func (j *JWKEncryptionProvider) Decrypt(ctx context.Context, cipherText *v2.Encr
return nil, err
}
default:
- return nil, JWKUnsupportedKeyTypeError
+ return nil, ErrJWKUnsupportedKeyType
}
return &v2.PlaintextData{
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/assets.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/assets.go
index 2347a5be..6fc9066f 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/assets.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/assets.go
@@ -51,6 +51,9 @@ func (r *assetsTable) Schema() (string, []interface{}) {
// PutAsset stores the given asset in the database.
func (c *C1File) PutAsset(ctx context.Context, assetRef *v2.AssetRef, contentType string, data []byte) error {
+ ctx, span := tracer.Start(ctx, "C1File.PutAsset")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
if len(data) == 0 {
@@ -98,6 +101,9 @@ func (c *C1File) PutAsset(ctx context.Context, assetRef *v2.AssetRef, contentTyp
// GetAsset fetches the specified asset from the database, and returns the content type and an io.Reader for the caller to
// read the asset from.
func (c *C1File) GetAsset(ctx context.Context, request *v2.AssetServiceGetAssetRequest) (string, io.Reader, error) {
+ ctx, span := tracer.Start(ctx, "C1File.GetAsset")
+ defer span.End()
+
err := c.validateDb(ctx)
if err != nil {
return "", nil, err
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/c1file.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/c1file.go
index 04a35292..87fe0270 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/c1file.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/c1file.go
@@ -6,6 +6,8 @@ import (
"fmt"
"os"
"path/filepath"
+ "sync"
+ "time"
"github.com/doug-martin/goqu/v9"
// NOTE: required to register the dialect for goqu.
@@ -36,6 +38,12 @@ type C1File struct {
dbUpdated bool
tempDir string
pragmas []pragma
+
+ // Slow query tracking
+ slowQueryLogTimes map[string]time.Time
+ slowQueryLogTimesMu sync.Mutex
+ slowQueryThreshold time.Duration
+ slowQueryLogFrequency time.Duration
}
var _ connectorstore.Writer = (*C1File)(nil)
@@ -56,6 +64,9 @@ func WithC1FPragma(name string, value string) C1FOption {
// Returns a C1File instance for the given db filepath.
func NewC1File(ctx context.Context, dbFilePath string, opts ...C1FOption) (*C1File, error) {
+ ctx, span := tracer.Start(ctx, "NewC1File")
+ defer span.End()
+
rawDB, err := sql.Open("sqlite", dbFilePath)
if err != nil {
return nil, err
@@ -64,9 +75,13 @@ func NewC1File(ctx context.Context, dbFilePath string, opts ...C1FOption) (*C1Fi
db := goqu.New("sqlite3", rawDB)
c1File := &C1File{
- rawDb: rawDB,
- db: db,
- dbFilePath: dbFilePath,
+ rawDb: rawDB,
+ db: db,
+ dbFilePath: dbFilePath,
+ pragmas: []pragma{},
+ slowQueryLogTimes: make(map[string]time.Time),
+ slowQueryThreshold: 5 * time.Second,
+ slowQueryLogFrequency: 1 * time.Minute,
}
for _, opt := range opts {
@@ -101,6 +116,9 @@ func WithPragma(name string, value string) C1ZOption {
// Returns a new C1File instance with its state stored at the provided filename.
func NewC1ZFile(ctx context.Context, outputFilePath string, opts ...C1ZOption) (*C1File, error) {
+ ctx, span := tracer.Start(ctx, "NewC1ZFile")
+ defer span.End()
+
options := &c1zOptions{}
for _, opt := range opts {
opt(options)
@@ -164,6 +182,9 @@ func (c *C1File) Close() error {
// init ensures that the database has all of the required schema.
func (c *C1File) init(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "C1File.init")
+ defer span.End()
+
err := c.validateDb(ctx)
if err != nil {
return err
@@ -190,6 +211,9 @@ func (c *C1File) init(ctx context.Context) error {
// Stats introspects the database and returns the count of objects for the given sync run.
func (c *C1File) Stats(ctx context.Context) (map[string]int64, error) {
+ ctx, span := tracer.Start(ctx, "C1File.Stats")
+ defer span.End()
+
counts := make(map[string]int64)
syncID, err := c.LatestSyncID(ctx)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/clone_sync.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/clone_sync.go
index 03bb27c5..8d8767b3 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/clone_sync.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/clone_sync.go
@@ -48,11 +48,14 @@ func cloneTableQuery(tableName string) (string, error) {
// 3. Execute an ATTACH query to bring our empty sqlite db into the context of our db connection
// 4. Select directly from the cloned db and insert directly into the new database.
// 5. Close and save the new database as a c1z at the configured path.
-func (c *C1File) CloneSync(ctx context.Context, outPath string, syncID string) error {
+func (c *C1File) CloneSync(ctx context.Context, outPath string, syncID string) (err error) {
+ ctx, span := tracer.Start(ctx, "C1File.CloneSync")
+ defer span.End()
+
// Be sure that the output path is empty else return an error
- _, err := os.Stat(outPath)
+ _, err = os.Stat(outPath)
if err == nil || !errors.Is(err, fs.ErrNotExist) {
- return fmt.Errorf("output path (%s) must not exist for cloning to proceed", outPath)
+ return fmt.Errorf("clone-sync: output path (%s) must not exist for cloning to proceed", outPath)
}
tmpDir, err := os.MkdirTemp(c.tempDir, "c1zclone")
@@ -60,6 +63,14 @@ func (c *C1File) CloneSync(ctx context.Context, outPath string, syncID string) e
return err
}
+ // Always clean up the temp dir and return an error if that fails
+ defer func() {
+ cleanupErr := os.RemoveAll(tmpDir)
+ if cleanupErr != nil {
+ err = errors.Join(err, fmt.Errorf("clone-sync: error cleaning up temp dir: %w", cleanupErr))
+ }
+ }()
+
dbPath := filepath.Join(tmpDir, "db")
out, err := NewC1File(ctx, dbPath)
if err != nil {
@@ -79,6 +90,19 @@ func (c *C1File) CloneSync(ctx context.Context, outPath string, syncID string) e
}
}
+ sync, err := c.getSync(ctx, syncID)
+ if err != nil {
+ return err
+ }
+
+ if sync == nil {
+ return fmt.Errorf("clone-sync: sync not found")
+ }
+
+ if sync.EndedAt == nil {
+ return fmt.Errorf("clone-sync: sync is not ended")
+ }
+
qCtx, canc := context.WithCancel(ctx)
defer canc()
@@ -121,11 +145,5 @@ func (c *C1File) CloneSync(ctx context.Context, outPath string, syncID string) e
return err
}
- // Clean up
- err = os.RemoveAll(tmpDir)
- if err != nil {
- return err
- }
-
- return nil
+ return err
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/dotc1z.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/dotc1z.go
index bf94f593..cc46a12f 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/dotc1z.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/dotc1z.go
@@ -3,11 +3,16 @@ package dotc1z
import (
"context"
"errors"
+ "fmt"
"io"
+ "go.opentelemetry.io/otel"
+
"github.com/conductorone/baton-sdk/pkg/connectorstore"
)
+var tracer = otel.Tracer("baton-sdk/pkg.dotc1z")
+
// NewC1FileReader returns a connectorstore.Reader implementation for the given sqlite db file path.
func NewC1FileReader(ctx context.Context, dbFilePath string) (connectorstore.Reader, error) {
return NewC1File(ctx, dbFilePath)
@@ -43,3 +48,12 @@ func C1ZFileCheckHeader(f io.ReadSeeker) (bool, error) {
return true, nil
}
+
+func NewExternalC1FileReader(ctx context.Context, tmpDir string, externalResourceC1ZPath string) (connectorstore.Reader, error) {
+ dbFilePath, err := loadC1z(externalResourceC1ZPath, tmpDir)
+ if err != nil {
+ return nil, fmt.Errorf("error loading external resource c1z file: %w", err)
+ }
+
+ return NewC1File(ctx, dbFilePath)
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go
index 2ceebc6a..55a8a408 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/entitlements.go
@@ -9,6 +9,7 @@ import (
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
reader_v2 "github.com/conductorone/baton-sdk/pb/c1/reader/v2"
+ "github.com/conductorone/baton-sdk/pkg/annotations"
)
const entitlementsTableVersion = "1"
@@ -49,6 +50,9 @@ func (r *entitlementsTable) Schema() (string, []interface{}) {
}
func (c *C1File) ListEntitlements(ctx context.Context, request *v2.EntitlementsServiceListEntitlementsRequest) (*v2.EntitlementsServiceListEntitlementsResponse, error) {
+ ctx, span := tracer.Start(ctx, "C1File.ListEntitlements")
+ defer span.End()
+
objs, nextPageToken, err := c.listConnectorObjects(ctx, entitlements.Name(), request)
if err != nil {
return nil, fmt.Errorf("error listing entitlements: %w", err)
@@ -71,9 +75,15 @@ func (c *C1File) ListEntitlements(ctx context.Context, request *v2.EntitlementsS
}
func (c *C1File) GetEntitlement(ctx context.Context, request *reader_v2.EntitlementsReaderServiceGetEntitlementRequest) (*reader_v2.EntitlementsReaderServiceGetEntitlementResponse, error) {
- ret := &v2.Entitlement{}
+ ctx, span := tracer.Start(ctx, "C1File.GetEntitlement")
+ defer span.End()
- err := c.getConnectorObject(ctx, entitlements.Name(), request.EntitlementId, ret)
+ ret := &v2.Entitlement{}
+ syncId, err := annotations.GetSyncIdFromAnnotations(request.GetAnnotations())
+ if err != nil {
+ return nil, fmt.Errorf("error getting sync id from annotations for entitlement '%s': %w", request.EntitlementId, err)
+ }
+ err = c.getConnectorObject(ctx, entitlements.Name(), request.EntitlementId, syncId, ret)
if err != nil {
return nil, fmt.Errorf("error fetching entitlement '%s': %w", request.EntitlementId, err)
}
@@ -84,6 +94,9 @@ func (c *C1File) GetEntitlement(ctx context.Context, request *reader_v2.Entitlem
}
func (c *C1File) PutEntitlements(ctx context.Context, entitlementObjs ...*v2.Entitlement) error {
+ ctx, span := tracer.Start(ctx, "C1File.PutEntitlements")
+ defer span.End()
+
err := bulkPutConnectorObject(ctx, c, entitlements.Name(),
func(entitlement *v2.Entitlement) (goqu.Record, error) {
return goqu.Record{
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/file.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/file.go
index 64d20d1e..44bfc4a9 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/file.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/file.go
@@ -12,10 +12,18 @@ import (
)
func loadC1z(filePath string, tmpDir string) (string, error) {
+ var err error
workingDir, err := os.MkdirTemp(tmpDir, "c1z")
if err != nil {
return "", err
}
+ defer func() {
+ if err != nil {
+ if removeErr := os.RemoveAll(workingDir); removeErr != nil {
+ err = errors.Join(err, removeErr)
+ }
+ }
+ }()
dbFilePath := filepath.Join(workingDir, "db")
dbFile, err := os.Create(dbFilePath)
if err != nil {
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go
index 432f9093..972dfe24 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/grants.go
@@ -9,6 +9,7 @@ import (
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
reader_v2 "github.com/conductorone/baton-sdk/pb/c1/reader/v2"
+ "github.com/conductorone/baton-sdk/pkg/annotations"
)
const grantsTableVersion = "1"
@@ -46,7 +47,7 @@ func (r *grantsTable) Name() string {
func (r *grantsTable) Schema() (string, []interface{}) {
return grantsTableSchema, []interface{}{
r.Name(),
- fmt.Sprintf("idx_resource_types_external_sync_v%s", r.Version()),
+ fmt.Sprintf("idx_grants_resource_type_id_resource_id_v%s", r.Version()),
r.Name(),
fmt.Sprintf("idx_grants_principal_id_v%s", r.Version()),
r.Name(),
@@ -58,6 +59,9 @@ func (r *grantsTable) Schema() (string, []interface{}) {
}
func (c *C1File) ListGrants(ctx context.Context, request *v2.GrantsServiceListGrantsRequest) (*v2.GrantsServiceListGrantsResponse, error) {
+ ctx, span := tracer.Start(ctx, "C1File.ListGrants")
+ defer span.End()
+
objs, nextPageToken, err := c.listConnectorObjects(ctx, grants.Name(), request)
if err != nil {
return nil, fmt.Errorf("error listing grants: %w", err)
@@ -80,9 +84,15 @@ func (c *C1File) ListGrants(ctx context.Context, request *v2.GrantsServiceListGr
}
func (c *C1File) GetGrant(ctx context.Context, request *reader_v2.GrantsReaderServiceGetGrantRequest) (*reader_v2.GrantsReaderServiceGetGrantResponse, error) {
- ret := &v2.Grant{}
+ ctx, span := tracer.Start(ctx, "C1File.GetGrant")
+ defer span.End()
- err := c.getConnectorObject(ctx, grants.Name(), request.GrantId, ret)
+ ret := &v2.Grant{}
+ syncId, err := annotations.GetSyncIdFromAnnotations(request.GetAnnotations())
+ if err != nil {
+ return nil, fmt.Errorf("error getting sync id from annotations for grant '%s': %w", request.GrantId, err)
+ }
+ err = c.getConnectorObject(ctx, grants.Name(), request.GrantId, syncId, ret)
if err != nil {
return nil, fmt.Errorf("error fetching grant '%s': %w", request.GetGrantId(), err)
}
@@ -96,6 +106,9 @@ func (c *C1File) ListGrantsForEntitlement(
ctx context.Context,
request *reader_v2.GrantsReaderServiceListGrantsForEntitlementRequest,
) (*reader_v2.GrantsReaderServiceListGrantsForEntitlementResponse, error) {
+ ctx, span := tracer.Start(ctx, "C1File.ListGrantsForEntitlement")
+ defer span.End()
+
objs, nextPageToken, err := c.listConnectorObjects(ctx, grants.Name(), request)
if err != nil {
return nil, fmt.Errorf("error listing grants for entitlement '%s': %w", request.GetEntitlement().GetId(), err)
@@ -121,6 +134,9 @@ func (c *C1File) ListGrantsForPrincipal(
ctx context.Context,
request *reader_v2.GrantsReaderServiceListGrantsForEntitlementRequest,
) (*reader_v2.GrantsReaderServiceListGrantsForEntitlementResponse, error) {
+ ctx, span := tracer.Start(ctx, "C1File.ListGrantsForPrincipal")
+ defer span.End()
+
objs, nextPageToken, err := c.listConnectorObjects(ctx, grants.Name(), request)
if err != nil {
return nil, fmt.Errorf("error listing grants for principal '%s': %w", request.GetPrincipalId(), err)
@@ -146,6 +162,9 @@ func (c *C1File) ListGrantsForResourceType(
ctx context.Context,
request *reader_v2.GrantsReaderServiceListGrantsForResourceTypeRequest,
) (*reader_v2.GrantsReaderServiceListGrantsForResourceTypeResponse, error) {
+ ctx, span := tracer.Start(ctx, "C1File.ListGrantsForResourceType")
+ defer span.End()
+
objs, nextPageToken, err := c.listConnectorObjects(ctx, grants.Name(), request)
if err != nil {
return nil, fmt.Errorf("error listing grants for resource type '%s': %w", request.GetResourceTypeId(), err)
@@ -168,6 +187,9 @@ func (c *C1File) ListGrantsForResourceType(
}
func (c *C1File) PutGrants(ctx context.Context, bulkGrants ...*v2.Grant) error {
+ ctx, span := tracer.Start(ctx, "C1File.PutGrants")
+ defer span.End()
+
err := bulkPutConnectorObject(ctx, c, grants.Name(),
func(grant *v2.Grant) (goqu.Record, error) {
return goqu.Record{
@@ -186,3 +208,30 @@ func (c *C1File) PutGrants(ctx context.Context, bulkGrants ...*v2.Grant) error {
c.dbUpdated = true
return nil
}
+
+func (c *C1File) DeleteGrant(ctx context.Context, grantId string) error {
+ ctx, span := tracer.Start(ctx, "C1File.DeleteGrant")
+ defer span.End()
+
+ err := c.validateSyncDb(ctx)
+ if err != nil {
+ return err
+ }
+
+ q := c.db.Delete(grants.Name())
+ q = q.Where(goqu.C("external_id").Eq(grantId))
+ if c.currentSyncID != "" {
+ q = q.Where(goqu.C("sync_id").Eq(c.currentSyncID))
+ }
+ query, args, err := q.ToSQL()
+ if err != nil {
+ return err
+ }
+
+ _, err = c.db.ExecContext(ctx, query, args...)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/local/local.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/local/local.go
index 00296878..79e8195a 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/local/local.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/local/local.go
@@ -6,11 +6,15 @@ import (
"io"
"os"
- "github.com/conductorone/baton-sdk/pkg/dotc1z"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.opentelemetry.io/otel"
"go.uber.org/zap"
+
+ "github.com/conductorone/baton-sdk/pkg/dotc1z"
)
+var tracer = otel.Tracer("baton-sdk/pkg.dotc1z.manager.local")
+
type localManager struct {
filePath string
tmpPath string
@@ -26,6 +30,9 @@ func WithTmpDir(tmpDir string) Option {
}
func (l *localManager) copyFileToTmp(ctx context.Context) error {
+ _, span := tracer.Start(ctx, "localManager.copyFileToTmp")
+ defer span.End()
+
tmp, err := os.CreateTemp(l.tmpDir, "sync-*.c1z")
if err != nil {
return err
@@ -56,6 +63,9 @@ func (l *localManager) copyFileToTmp(ctx context.Context) error {
// LoadRaw returns an io.Reader of the bytes in the c1z file.
func (l *localManager) LoadRaw(ctx context.Context) (io.ReadCloser, error) {
+ ctx, span := tracer.Start(ctx, "localManager.LoadRaw")
+ defer span.End()
+
err := l.copyFileToTmp(ctx)
if err != nil {
return nil, err
@@ -71,6 +81,9 @@ func (l *localManager) LoadRaw(ctx context.Context) (io.ReadCloser, error) {
// LoadC1Z loads the C1Z file from the local file system.
func (l *localManager) LoadC1Z(ctx context.Context) (*dotc1z.C1File, error) {
+ ctx, span := tracer.Start(ctx, "localManager.LoadC1Z")
+ defer span.End()
+
log := ctxzap.Extract(ctx)
err := l.copyFileToTmp(ctx)
@@ -89,6 +102,9 @@ func (l *localManager) LoadC1Z(ctx context.Context) (*dotc1z.C1File, error) {
// SaveC1Z saves the C1Z file to the local file system.
func (l *localManager) SaveC1Z(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "localManager.SaveC1Z")
+ defer span.End()
+
log := ctxzap.Extract(ctx)
if l.tmpPath == "" {
@@ -127,6 +143,9 @@ func (l *localManager) SaveC1Z(ctx context.Context) error {
}
func (l *localManager) Close(ctx context.Context) error {
+ _, span := tracer.Start(ctx, "localManager.Close")
+ defer span.End()
+
err := os.Remove(l.tmpPath)
if err != nil {
return err
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/s3/s3.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/s3/s3.go
index edb88597..eed8b599 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/s3/s3.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/manager/s3/s3.go
@@ -8,12 +8,16 @@ import (
"os"
"github.com/aws/smithy-go"
- "github.com/conductorone/baton-sdk/pkg/dotc1z"
- "github.com/conductorone/baton-sdk/pkg/us3"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.opentelemetry.io/otel"
"go.uber.org/zap"
+
+ "github.com/conductorone/baton-sdk/pkg/dotc1z"
+ "github.com/conductorone/baton-sdk/pkg/us3"
)
+var tracer = otel.Tracer("baton-sdk/pkg.dotc1z.manager.s3")
+
type s3Manager struct {
client *us3.S3Client
fileName string
@@ -30,6 +34,9 @@ func WithTmpDir(tmpDir string) Option {
}
func (s *s3Manager) copyToTempFile(ctx context.Context, r io.Reader) error {
+ _, span := tracer.Start(ctx, "s3Manager.copyToTempFile")
+ defer span.End()
+
f, err := os.CreateTemp(s.tmpDir, "sync-*.c1z")
if err != nil {
return err
@@ -51,6 +58,9 @@ func (s *s3Manager) copyToTempFile(ctx context.Context, r io.Reader) error {
// LoadRaw loads the file from S3 and returns an io.Reader for the contents.
func (s *s3Manager) LoadRaw(ctx context.Context) (io.ReadCloser, error) {
+ ctx, span := tracer.Start(ctx, "s3Manager.LoadRaw")
+ defer span.End()
+
out, err := s.client.Get(ctx, s.fileName)
if err != nil {
var ae smithy.APIError
@@ -81,6 +91,9 @@ func (s *s3Manager) LoadRaw(ctx context.Context) (io.ReadCloser, error) {
// LoadC1Z gets a file from the AWS S3 bucket and copies it to a temp file.
func (s *s3Manager) LoadC1Z(ctx context.Context) (*dotc1z.C1File, error) {
+ ctx, span := tracer.Start(ctx, "s3Manager.LoadC1Z")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
out, err := s.client.Get(ctx, s.fileName)
@@ -108,6 +121,9 @@ func (s *s3Manager) LoadC1Z(ctx context.Context) (*dotc1z.C1File, error) {
// SaveC1Z saves a file to the AWS S3 bucket.
func (s *s3Manager) SaveC1Z(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "s3Manager.SaveC1Z")
+ defer span.End()
+
f, err := os.Open(s.tmpFile)
if err != nil {
return err
@@ -130,6 +146,9 @@ func (s *s3Manager) SaveC1Z(ctx context.Context) error {
}
func (s *s3Manager) Close(ctx context.Context) error {
+ _, span := tracer.Start(ctx, "s3Manager.Close")
+ defer span.End()
+
err := os.Remove(s.tmpFile)
if err != nil {
return err
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go
index 4b12f40e..9197e751 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resouce_types.go
@@ -6,9 +6,11 @@ import (
"google.golang.org/protobuf/proto"
+ "github.com/doug-martin/goqu/v9"
+
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
reader_v2 "github.com/conductorone/baton-sdk/pb/c1/reader/v2"
- "github.com/doug-martin/goqu/v9"
+ "github.com/conductorone/baton-sdk/pkg/annotations"
)
const resourceTypesTableVersion = "1"
@@ -44,6 +46,9 @@ func (r *resourceTypesTable) Schema() (string, []interface{}) {
}
func (c *C1File) ListResourceTypes(ctx context.Context, request *v2.ResourceTypesServiceListResourceTypesRequest) (*v2.ResourceTypesServiceListResourceTypesResponse, error) {
+ ctx, span := tracer.Start(ctx, "C1File.ListResourceTypes")
+ defer span.End()
+
objs, nextPageToken, err := c.listConnectorObjects(ctx, resourceTypes.Name(), request)
if err != nil {
return nil, fmt.Errorf("error listing resource types: %w", err)
@@ -66,9 +71,15 @@ func (c *C1File) ListResourceTypes(ctx context.Context, request *v2.ResourceType
}
func (c *C1File) GetResourceType(ctx context.Context, request *reader_v2.ResourceTypesReaderServiceGetResourceTypeRequest) (*reader_v2.ResourceTypesReaderServiceGetResourceTypeResponse, error) {
- ret := &v2.ResourceType{}
+ ctx, span := tracer.Start(ctx, "C1File.GetResourceType")
+ defer span.End()
- err := c.getConnectorObject(ctx, resourceTypes.Name(), request.ResourceTypeId, ret)
+ ret := &v2.ResourceType{}
+ syncId, err := annotations.GetSyncIdFromAnnotations(request.GetAnnotations())
+ if err != nil {
+ return nil, fmt.Errorf("error getting sync id from annotations for resource type '%s': %w", request.ResourceTypeId, err)
+ }
+ err = c.getConnectorObject(ctx, resourceTypes.Name(), request.ResourceTypeId, syncId, ret)
if err != nil {
return nil, fmt.Errorf("error fetching resource type '%s': %w", request.ResourceTypeId, err)
}
@@ -79,6 +90,9 @@ func (c *C1File) GetResourceType(ctx context.Context, request *reader_v2.Resourc
}
func (c *C1File) PutResourceTypes(ctx context.Context, resourceTypesObjs ...*v2.ResourceType) error {
+ ctx, span := tracer.Start(ctx, "C1File.PutResourceTypes")
+ defer span.End()
+
err := bulkPutConnectorObject(ctx, c, resourceTypes.Name(),
func(resource *v2.ResourceType) (goqu.Record, error) {
return nil, nil
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go
index 40e0542d..84d16f6b 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/resources.go
@@ -7,7 +7,6 @@ import (
"github.com/doug-martin/goqu/v9"
"google.golang.org/protobuf/proto"
- c1zpb "github.com/conductorone/baton-sdk/pb/c1/c1z/v1"
"github.com/conductorone/baton-sdk/pkg/annotations"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
@@ -56,6 +55,9 @@ func (r *resourcesTable) Schema() (string, []interface{}) {
}
func (c *C1File) ListResources(ctx context.Context, request *v2.ResourcesServiceListResourcesRequest) (*v2.ResourcesServiceListResourcesResponse, error) {
+ ctx, span := tracer.Start(ctx, "C1File.ListResources")
+ defer span.End()
+
objs, nextPageToken, err := c.listConnectorObjects(ctx, resources.Name(), request)
if err != nil {
return nil, fmt.Errorf("error listing resources: %w", err)
@@ -78,16 +80,15 @@ func (c *C1File) ListResources(ctx context.Context, request *v2.ResourcesService
}
func (c *C1File) GetResource(ctx context.Context, request *reader_v2.ResourcesReaderServiceGetResourceRequest) (*reader_v2.ResourcesReaderServiceGetResourceResponse, error) {
- ret := &v2.Resource{}
- annos := annotations.Annotations(request.GetAnnotations())
- syncDetails := &c1zpb.SyncDetails{}
- syncID := ""
+ ctx, span := tracer.Start(ctx, "C1File.GetResource")
+ defer span.End()
- if ok, err := annos.Pick(syncDetails); err == nil && ok {
- syncID = syncDetails.GetId()
+ ret := &v2.Resource{}
+ syncId, err := annotations.GetSyncIdFromAnnotations(request.GetAnnotations())
+ if err != nil {
+ return nil, fmt.Errorf("error getting sync id from annotations for resource '%s': %w", request.ResourceId, err)
}
-
- err := c.getResourceObject(ctx, request.ResourceId, ret, syncID)
+ err = c.getResourceObject(ctx, request.ResourceId, ret, syncId)
if err != nil {
return nil, fmt.Errorf("error fetching resource '%s': %w", request.ResourceId, err)
}
@@ -98,6 +99,9 @@ func (c *C1File) GetResource(ctx context.Context, request *reader_v2.ResourcesRe
}
func (c *C1File) PutResources(ctx context.Context, resourceObjs ...*v2.Resource) error {
+ ctx, span := tracer.Start(ctx, "C1File.PutResources")
+ defer span.End()
+
err := bulkPutConnectorObject(ctx, c, resources.Name(),
func(resource *v2.Resource) (goqu.Record, error) {
fields := goqu.Record{
@@ -105,7 +109,11 @@ func (c *C1File) PutResources(ctx context.Context, resourceObjs ...*v2.Resource)
"external_id": fmt.Sprintf("%s:%s", resource.Id.ResourceType, resource.Id.Resource),
}
- if resource.ParentResourceId != nil {
+ // If we bulk insert some resources with parent ids and some without, goqu errors because of the different number of fields.
+ if resource.ParentResourceId == nil {
+ fields["parent_resource_type_id"] = nil
+ fields["parent_resource_id"] = nil
+ } else {
fields["parent_resource_type_id"] = resource.ParentResourceId.ResourceType
fields["parent_resource_id"] = resource.ParentResourceId.Resource
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go
index b1f8ff8e..931a3245 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sql_helpers.go
@@ -7,10 +7,11 @@ import (
"time"
"github.com/doug-martin/goqu/v9"
+ "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.uber.org/zap"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
- c1zpb "github.com/conductorone/baton-sdk/pb/c1/c1z/v1"
"github.com/conductorone/baton-sdk/pkg/annotations"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
@@ -70,9 +71,29 @@ type protoHasID interface {
GetId() string
}
+// throttledWarnSlowQuery logs a warning about a slow query at most once per minute per request type.
+func (c *C1File) throttledWarnSlowQuery(ctx context.Context, query string, duration time.Duration) {
+ c.slowQueryLogTimesMu.Lock()
+ defer c.slowQueryLogTimesMu.Unlock()
+
+ now := time.Now()
+ lastLogTime, exists := c.slowQueryLogTimes[query]
+ if !exists || now.Sub(lastLogTime) > c.slowQueryLogFrequency {
+ ctxzap.Extract(ctx).Warn(
+ "slow query detected",
+ zap.String("query", query),
+ zap.Duration("duration", duration),
+ )
+ c.slowQueryLogTimes[query] = now
+ }
+}
+
// listConnectorObjects uses a connector list request to fetch the corresponding data from the local db.
// It returns the raw bytes that need to be unmarshalled into the correct proto message.
func (c *C1File) listConnectorObjects(ctx context.Context, tableName string, req proto.Message) ([][]byte, string, error) {
+ ctx, span := tracer.Start(ctx, "C1File.listConnectorObjects")
+ defer span.End()
+
err := c.validateDb(ctx)
if err != nil {
return nil, "", err
@@ -84,19 +105,16 @@ func (c *C1File) listConnectorObjects(ctx context.Context, tableName string, req
return nil, "", fmt.Errorf("c1file: invalid list request")
}
- reqAnnos := annotations.Annotations(listReq.GetAnnotations())
-
- var reqSyncID string
- syncDetails := &c1zpb.SyncDetails{}
- hasSyncIdAnno, err := reqAnnos.Pick(syncDetails)
+ annoSyncID, err := annotations.GetSyncIdFromAnnotations(listReq.GetAnnotations())
if err != nil {
- return nil, "", fmt.Errorf("c1file: failed to get sync id annotation: %w", err)
+ return nil, "", fmt.Errorf("error getting sync id from annotations for list request: %w", err)
}
+ var reqSyncID string
switch {
// If the request has a sync id annotation, use that
- case hasSyncIdAnno && syncDetails.GetId() != "":
- reqSyncID = syncDetails.GetId()
+ case annoSyncID != "":
+ reqSyncID = annoSyncID
// We are currently syncing, so use the current sync id
case c.currentSyncID != "":
@@ -200,12 +218,24 @@ func (c *C1File) listConnectorObjects(ctx context.Context, tableName string, req
return nil, "", err
}
+ // Start timing the query execution
+ queryStartTime := time.Now()
+
+ // Execute the query
rows, err := c.db.QueryContext(ctx, query, args...)
if err != nil {
return nil, "", err
}
defer rows.Close()
+ // Calculate the query duration
+ queryDuration := time.Since(queryStartTime)
+
+ // If the query took longer than the threshold, log a warning (rate-limited)
+ if queryDuration > c.slowQueryThreshold {
+ c.throttledWarnSlowQuery(ctx, query, queryDuration)
+ }
+
var count uint32 = 0
lastRow := 0
for rows.Next() {
@@ -240,6 +270,8 @@ func bulkPutConnectorObject[T proto.Message](ctx context.Context, c *C1File,
if len(msgs) == 0 {
return nil
}
+ ctx, span := tracer.Start(ctx, "C1File.bulkPutConnectorObjectTx")
+ defer span.End()
err := c.validateSyncDb(ctx)
if err != nil {
@@ -304,6 +336,9 @@ func bulkPutConnectorObject[T proto.Message](ctx context.Context, c *C1File,
}
func (c *C1File) getResourceObject(ctx context.Context, resourceID *v2.ResourceId, m *v2.Resource, syncID string) error {
+ ctx, span := tracer.Start(ctx, "C1File.getResourceObject")
+ defer span.End()
+
err := c.validateDb(ctx)
if err != nil {
return err
@@ -361,7 +396,10 @@ func (c *C1File) getResourceObject(ctx context.Context, resourceID *v2.ResourceI
return nil
}
-func (c *C1File) getConnectorObject(ctx context.Context, tableName string, id string, m proto.Message) error {
+func (c *C1File) getConnectorObject(ctx context.Context, tableName string, id string, syncID string, m proto.Message) error {
+ ctx, span := tracer.Start(ctx, "C1File.getConnectorObject")
+ defer span.End()
+
err := c.validateDb(ctx)
if err != nil {
return err
@@ -372,6 +410,8 @@ func (c *C1File) getConnectorObject(ctx context.Context, tableName string, id st
q = q.Where(goqu.C("external_id").Eq(id))
switch {
+ case syncID != "":
+ q = q.Where(goqu.C("sync_id").Eq(syncID))
case c.currentSyncID != "":
q = q.Where(goqu.C("sync_id").Eq(c.currentSyncID))
case c.viewSyncID != "":
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go
index c6e8006b..69f1170a 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/dotc1z/sync_runs.go
@@ -13,6 +13,9 @@ import (
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
"github.com/segmentio/ksuid"
"go.uber.org/zap"
+ "google.golang.org/protobuf/types/known/timestamppb"
+
+ reader_v2 "github.com/conductorone/baton-sdk/pb/c1/reader/v2"
)
const syncRunsTableVersion = "1"
@@ -55,6 +58,9 @@ type syncRun struct {
}
func (c *C1File) getLatestUnfinishedSync(ctx context.Context) (*syncRun, error) {
+ ctx, span := tracer.Start(ctx, "C1File.getLatestUnfinishedSync")
+ defer span.End()
+
err := c.validateDb(ctx)
if err != nil {
return nil, err
@@ -89,6 +95,9 @@ func (c *C1File) getLatestUnfinishedSync(ctx context.Context) (*syncRun, error)
}
func (c *C1File) getFinishedSync(ctx context.Context, offset uint) (*syncRun, error) {
+ ctx, span := tracer.Start(ctx, "C1File.getFinishedSync")
+ defer span.End()
+
err := c.validateDb(ctx)
if err != nil {
return nil, err
@@ -123,7 +132,10 @@ func (c *C1File) getFinishedSync(ctx context.Context, offset uint) (*syncRun, er
return ret, nil
}
-func (c *C1File) ListSyncRuns(ctx context.Context, pageToken string, pageSize uint) ([]*syncRun, string, error) {
+func (c *C1File) ListSyncRuns(ctx context.Context, pageToken string, pageSize uint32) ([]*syncRun, string, error) {
+ ctx, span := tracer.Start(ctx, "C1File.ListSyncRuns")
+ defer span.End()
+
err := c.validateDb(ctx)
if err != nil {
return nil, "", err
@@ -141,7 +153,7 @@ func (c *C1File) ListSyncRuns(ctx context.Context, pageToken string, pageSize ui
}
q = q.Order(goqu.C("id").Asc())
- q = q.Limit(pageSize + 1)
+ q = q.Limit(uint(pageSize + 1))
var ret []*syncRun
@@ -156,7 +168,7 @@ func (c *C1File) ListSyncRuns(ctx context.Context, pageToken string, pageSize ui
}
defer rows.Close()
- var count uint = 0
+ var count uint32 = 0
lastRow := 0
for rows.Next() {
count++
@@ -182,6 +194,9 @@ func (c *C1File) ListSyncRuns(ctx context.Context, pageToken string, pageSize ui
}
func (c *C1File) LatestSyncID(ctx context.Context) (string, error) {
+ ctx, span := tracer.Start(ctx, "C1File.LatestSyncID")
+ defer span.End()
+
s, err := c.getFinishedSync(ctx, 0)
if err != nil {
return "", err
@@ -205,6 +220,9 @@ func (c *C1File) ViewSync(ctx context.Context, syncID string) error {
}
func (c *C1File) PreviousSyncID(ctx context.Context) (string, error) {
+ ctx, span := tracer.Start(ctx, "C1File.PreviousSyncID")
+ defer span.End()
+
s, err := c.getFinishedSync(ctx, 1)
if err != nil {
return "", err
@@ -218,6 +236,9 @@ func (c *C1File) PreviousSyncID(ctx context.Context) (string, error) {
}
func (c *C1File) LatestFinishedSync(ctx context.Context) (string, error) {
+ ctx, span := tracer.Start(ctx, "C1File.LatestFinishedSync")
+ defer span.End()
+
s, err := c.getFinishedSync(ctx, 0)
if err != nil {
return "", err
@@ -231,6 +252,9 @@ func (c *C1File) LatestFinishedSync(ctx context.Context) (string, error) {
}
func (c *C1File) getSync(ctx context.Context, syncID string) (*syncRun, error) {
+ ctx, span := tracer.Start(ctx, "C1File.getSync")
+ defer span.End()
+
err := c.validateDb(ctx)
if err != nil {
return nil, err
@@ -257,6 +281,9 @@ func (c *C1File) getSync(ctx context.Context, syncID string) (*syncRun, error) {
}
func (c *C1File) getCurrentSync(ctx context.Context) (*syncRun, error) {
+ ctx, span := tracer.Start(ctx, "C1File.getCurrentSync")
+ defer span.End()
+
if c.currentSyncID == "" {
return nil, fmt.Errorf("c1file: sync must be running to checkpoint")
}
@@ -265,6 +292,9 @@ func (c *C1File) getCurrentSync(ctx context.Context) (*syncRun, error) {
}
func (c *C1File) CheckpointSync(ctx context.Context, syncToken string) error {
+ ctx, span := tracer.Start(ctx, "C1File.CheckpointSync")
+ defer span.End()
+
err := c.validateSyncDb(ctx)
if err != nil {
return err
@@ -291,6 +321,9 @@ func (c *C1File) CheckpointSync(ctx context.Context, syncToken string) error {
// StartSync generates a sync ID to be associated with all objects discovered during this run.
func (c *C1File) StartSync(ctx context.Context) (string, bool, error) {
+ ctx, span := tracer.Start(ctx, "C1File.StartSync")
+ defer span.End()
+
if c.currentSyncID != "" {
return c.currentSyncID, false, nil
}
@@ -319,6 +352,9 @@ func (c *C1File) StartSync(ctx context.Context) (string, bool, error) {
}
func (c *C1File) StartNewSync(ctx context.Context) (string, error) {
+ ctx, span := tracer.Start(ctx, "C1File.StartNewSync")
+ defer span.End()
+
// Not sure if we want to do this here
if c.currentSyncID != "" {
return c.currentSyncID, nil
@@ -350,6 +386,9 @@ func (c *C1File) StartNewSync(ctx context.Context) (string, error) {
}
func (c *C1File) CurrentSyncStep(ctx context.Context) (string, error) {
+ ctx, span := tracer.Start(ctx, "C1File.CurrentSyncStep")
+ defer span.End()
+
sr, err := c.getCurrentSync(ctx)
if err != nil {
return "", err
@@ -360,6 +399,9 @@ func (c *C1File) CurrentSyncStep(ctx context.Context) (string, error) {
// EndSync updates the current sync_run row with the end time, and removes any other objects that don't have the current sync ID.
func (c *C1File) EndSync(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "C1File.EndSync")
+ defer span.End()
+
err := c.validateSyncDb(ctx)
if err != nil {
return err
@@ -389,9 +431,13 @@ func (c *C1File) EndSync(ctx context.Context) error {
}
func (c *C1File) Cleanup(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "C1File.Cleanup")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
if skipCleanup, _ := strconv.ParseBool(os.Getenv("BATON_SKIP_CLEANUP")); skipCleanup {
+ l.Info("BATON_SKIP_CLEANUP is set, skipping cleanup of old syncs")
return nil
}
@@ -401,6 +447,7 @@ func (c *C1File) Cleanup(ctx context.Context) error {
}
if c.currentSyncID != "" {
+ l.Warn("current sync is running, skipping cleanup of old syncs", zap.String("current_sync_id", c.currentSyncID))
return nil
}
@@ -431,6 +478,7 @@ func (c *C1File) Cleanup(ctx context.Context) error {
syncLimit = int(customSyncLimit)
}
+ l.Debug("found syncs", zap.Int("count", len(ret)), zap.Int("sync_limit", syncLimit))
if len(ret) <= syncLimit {
return nil
}
@@ -456,6 +504,9 @@ func (c *C1File) Cleanup(ctx context.Context) error {
// DeleteSyncRun removes all the objects with a given syncID from the database.
func (c *C1File) DeleteSyncRun(ctx context.Context, syncID string) error {
+ ctx, span := tracer.Start(ctx, "C1File.DeleteSyncRun")
+ defer span.End()
+
err := c.validateDb(ctx)
if err != nil {
return err
@@ -487,6 +538,9 @@ func (c *C1File) DeleteSyncRun(ctx context.Context, syncID string) error {
// Vacuum runs a VACUUM on the database to reclaim space.
func (c *C1File) Vacuum(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "C1File.Vacuum")
+ defer span.End()
+
err := c.validateDb(ctx)
if err != nil {
return err
@@ -501,3 +555,73 @@ func (c *C1File) Vacuum(ctx context.Context) error {
return nil
}
+
+func toTimeStamp(t *time.Time) *timestamppb.Timestamp {
+ if t == nil {
+ return nil
+ }
+ return timestamppb.New(*t)
+}
+
+func (c *C1File) GetSync(ctx context.Context, request *reader_v2.SyncsReaderServiceGetSyncRequest) (*reader_v2.SyncsReaderServiceGetSyncResponse, error) {
+ ctx, span := tracer.Start(ctx, "C1File.GetSync")
+ defer span.End()
+
+ sr, err := c.getSync(ctx, request.SyncId)
+ if err != nil {
+ return nil, fmt.Errorf("error getting sync '%s': %w", request.SyncId, err)
+ }
+
+ return &reader_v2.SyncsReaderServiceGetSyncResponse{
+ Sync: &reader_v2.SyncRun{
+ Id: sr.ID,
+ StartedAt: toTimeStamp(sr.StartedAt),
+ EndedAt: toTimeStamp(sr.EndedAt),
+ SyncToken: sr.SyncToken,
+ },
+ }, nil
+}
+
+func (c *C1File) ListSyncs(ctx context.Context, request *reader_v2.SyncsReaderServiceListSyncsRequest) (*reader_v2.SyncsReaderServiceListSyncsResponse, error) {
+ ctx, span := tracer.Start(ctx, "C1File.ListSyncs")
+ defer span.End()
+
+ syncs, nextPageToken, err := c.ListSyncRuns(ctx, request.PageToken, request.PageSize)
+ if err != nil {
+ return nil, fmt.Errorf("error listing syncs: %w", err)
+ }
+
+ syncRuns := make([]*reader_v2.SyncRun, len(syncs))
+ for i, sr := range syncs {
+ syncRuns[i] = &reader_v2.SyncRun{
+ Id: sr.ID,
+ StartedAt: toTimeStamp(sr.StartedAt),
+ EndedAt: toTimeStamp(sr.EndedAt),
+ SyncToken: sr.SyncToken,
+ }
+ }
+
+ return &reader_v2.SyncsReaderServiceListSyncsResponse{
+ Syncs: syncRuns,
+ NextPageToken: nextPageToken,
+ }, nil
+}
+
+func (c *C1File) GetLatestFinishedSync(ctx context.Context, request *reader_v2.SyncsReaderServiceGetLatestFinishedSyncRequest) (*reader_v2.SyncsReaderServiceGetLatestFinishedSyncResponse, error) {
+ ctx, span := tracer.Start(ctx, "C1File.GetLatestFinishedSync")
+ defer span.End()
+
+ sync, err := c.getFinishedSync(ctx, 0)
+ if err != nil {
+ return nil, fmt.Errorf("error fetching latest finished sync: %w", err)
+ }
+
+ return &reader_v2.SyncsReaderServiceGetLatestFinishedSyncResponse{
+ Sync: &reader_v2.SyncRun{
+ Id: sync.ID,
+ StartedAt: toTimeStamp(sync.StartedAt),
+ EndedAt: toTimeStamp(sync.EndedAt),
+ SyncToken: sync.SyncToken,
+ },
+ }, nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/default_relationships.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/default_relationships.go
index d1df00f0..07a00ca9 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/field/default_relationships.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/default_relationships.go
@@ -27,6 +27,10 @@ var DefaultRelationships = []SchemaFieldRelationship{
eventFeedField,
ListTicketSchemasField,
),
+ FieldsDependentOn(
+ []SchemaField{externalResourceEntitlementIdFilter},
+ []SchemaField{externalResourceC1ZField},
+ ),
}
func EnsureDefaultRelationships(original []SchemaFieldRelationship) []SchemaFieldRelationship {
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go
index 5baa8050..18447ef2 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/defaults.go
@@ -3,40 +3,75 @@ package field
import "github.com/conductorone/baton-sdk/pkg/logging"
var (
- createTicketField = BoolField("create-ticket", WithHidden(true), WithDescription("Create ticket"), WithPersistent(true))
- bulkCreateTicketField = BoolField("bulk-create-ticket", WithHidden(true), WithDescription("Bulk create tickets"), WithPersistent(true))
- bulkTicketTemplatePathField = StringField("bulk-ticket-template-path", WithHidden(true), WithDescription("A JSON file describing the ticket to create"), WithPersistent(true))
- getTicketField = BoolField("get-ticket", WithHidden(true), WithDescription("Get ticket"), WithPersistent(true))
- ListTicketSchemasField = BoolField("list-ticket-schemas", WithHidden(true), WithDescription("List ticket schemas"), WithPersistent(true))
- provisioningField = BoolField("provisioning", WithShortHand("p"), WithDescription("This must be set in order for provisioning actions to be enabled"), WithPersistent(true))
- TicketingField = BoolField("ticketing", WithDescription("This must be set to enable ticketing support"), WithPersistent(true))
- c1zTmpDirField = StringField("c1z-temp-dir", WithHidden(true), WithDescription("The directory to store temporary files in. It must exist, "+
- "and write access is required. Defaults to the OS temporary directory."), WithPersistent(true))
- clientIDField = StringField("client-id", WithDescription("The client ID used to authenticate with ConductorOne"), WithPersistent(true))
- clientSecretField = StringField("client-secret", WithDescription("The client secret used to authenticate with ConductorOne"), WithPersistent(true))
- createAccountEmailField = StringField("create-account-email", WithHidden(true), WithDescription("The email of the account to create"), WithPersistent(true))
- createAccountLoginField = StringField("create-account-login", WithHidden(true), WithDescription("The login of the account to create"), WithPersistent(true))
+ createTicketField = BoolField("create-ticket", WithHidden(true), WithDescription("Create ticket"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ bulkCreateTicketField = BoolField("bulk-create-ticket", WithHidden(true), WithDescription("Bulk create tickets"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ bulkTicketTemplatePathField = StringField("bulk-ticket-template-path", WithHidden(true), WithDescription("A JSON file describing the ticket to create"),
+ WithPersistent(true), WithExportTarget(ExportTargetNone))
+ getTicketField = BoolField("get-ticket", WithHidden(true), WithDescription("Get ticket"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ ListTicketSchemasField = BoolField("list-ticket-schemas", WithHidden(true), WithDescription("List ticket schemas"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ provisioningField = BoolField("provisioning", WithShortHand("p"), WithDescription("This must be set in order for provisioning actions to be enabled"),
+ WithPersistent(true), WithExportTarget(ExportTargetNone))
+ TicketingField = BoolField("ticketing", WithDescription("This must be set to enable ticketing support"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ c1zTmpDirField = StringField("c1z-temp-dir", WithHidden(true), WithDescription("The directory to store temporary files in. It must exist, "+
+ "and write access is required. Defaults to the OS temporary directory."), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ clientIDField = StringField("client-id", WithDescription("The client ID used to authenticate with ConductorOne"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ clientSecretField = StringField("client-secret", WithDescription("The client secret used to authenticate with ConductorOne"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ createAccountEmailField = StringField("create-account-email", WithHidden(true), WithDescription("The email of the account to create"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ createAccountLoginField = StringField("create-account-login", WithHidden(true), WithDescription("The login of the account to create"), WithPersistent(true), WithExportTarget(ExportTargetNone))
createAccountProfileField = StringField("create-account-profile",
WithHidden(true),
WithDescription("JSON-formatted object of map keys and values like '{ 'key': 'value' }'"),
- WithPersistent(true))
- deleteResourceField = StringField("delete-resource", WithHidden(true), WithDescription("The id of the resource to delete"), WithPersistent(true))
- deleteResourceTypeField = StringField("delete-resource-type", WithHidden(true), WithDescription("The type of the resource to delete"), WithPersistent(true))
- eventFeedField = StringField("event-feed", WithHidden(true), WithDescription("Read feed events to stdout"), WithPersistent(true))
- fileField = StringField("file", WithShortHand("f"), WithDefaultValue("sync.c1z"), WithDescription("The path to the c1z file to sync with"), WithPersistent(true))
- grantEntitlementField = StringField("grant-entitlement", WithHidden(true), WithDescription("The id of the entitlement to grant to the supplied principal"), WithPersistent(true))
- grantPrincipalField = StringField("grant-principal", WithHidden(true), WithDescription("The id of the resource to grant the entitlement to"), WithPersistent(true))
- grantPrincipalTypeField = StringField("grant-principal-type", WithHidden(true), WithDescription("The resource type of the principal to grant the entitlement to"), WithPersistent(true))
- logFormatField = StringField("log-format", WithDefaultValue(logging.LogFormatJSON), WithDescription("The output format for logs: json, console"), WithPersistent(true))
- revokeGrantField = StringField("revoke-grant", WithHidden(true), WithDescription("The grant to revoke"), WithPersistent(true))
- rotateCredentialsField = StringField("rotate-credentials", WithHidden(true), WithDescription("The id of the resource to rotate credentials on"), WithPersistent(true))
- rotateCredentialsTypeField = StringField("rotate-credentials-type", WithHidden(true), WithDescription("The type of the resource to rotate credentials on"), WithPersistent(true))
- ticketIDField = StringField("ticket-id", WithHidden(true), WithDescription("The ID of the ticket to get"), WithPersistent(true))
- ticketTemplatePathField = StringField("ticket-template-path", WithHidden(true), WithDescription("A JSON file describing the ticket to create"), WithPersistent(true))
- logLevelField = StringField("log-level", WithDefaultValue("info"), WithDescription("The log level: debug, info, warn, error"), WithPersistent(true))
- skipFullSync = BoolField("skip-full-sync", WithDescription("This must be set to skip a full sync"), WithPersistent(true))
+ WithPersistent(true), WithExportTarget(ExportTargetNone))
+ deleteResourceField = StringField("delete-resource", WithHidden(true), WithDescription("The id of the resource to delete"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ deleteResourceTypeField = StringField("delete-resource-type", WithHidden(true), WithDescription("The type of the resource to delete"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ eventFeedField = StringField("event-feed", WithHidden(true), WithDescription("Read feed events to stdout"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ fileField = StringField("file", WithShortHand("f"), WithDefaultValue("sync.c1z"), WithDescription("The path to the c1z file to sync with"),
+ WithPersistent(true), WithExportTarget(ExportTargetNone))
+ grantEntitlementField = StringField("grant-entitlement", WithHidden(true), WithDescription("The id of the entitlement to grant to the supplied principal"),
+ WithPersistent(true), WithExportTarget(ExportTargetNone))
+ grantPrincipalField = StringField("grant-principal", WithHidden(true), WithDescription("The id of the resource to grant the entitlement to"),
+ WithPersistent(true), WithExportTarget(ExportTargetNone))
+ grantPrincipalTypeField = StringField("grant-principal-type", WithHidden(true), WithDescription("The resource type of the principal to grant the entitlement to"),
+ WithPersistent(true), WithExportTarget(ExportTargetNone))
+ logFormatField = StringField("log-format", WithDefaultValue(logging.LogFormatJSON), WithDescription("The output format for logs: json, console"),
+ WithPersistent(true), WithExportTarget(ExportTargetNone))
+ revokeGrantField = StringField("revoke-grant", WithHidden(true), WithDescription("The grant to revoke"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ rotateCredentialsField = StringField("rotate-credentials", WithHidden(true), WithDescription("The id of the resource to rotate credentials on"),
+ WithPersistent(true), WithExportTarget(ExportTargetNone))
+ rotateCredentialsTypeField = StringField("rotate-credentials-type", WithHidden(true), WithDescription("The type of the resource to rotate credentials on"),
+ WithPersistent(true), WithExportTarget(ExportTargetNone))
+ ticketIDField = StringField("ticket-id", WithHidden(true), WithDescription("The ID of the ticket to get"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ ticketTemplatePathField = StringField("ticket-template-path", WithHidden(true), WithDescription("A JSON file describing the ticket to create"),
+ WithPersistent(true), WithExportTarget(ExportTargetNone))
+ logLevelField = StringField("log-level", WithDefaultValue("info"), WithDescription("The log level: debug, info, warn, error"), WithPersistent(true),
+ WithExportTarget(ExportTargetOps))
+ skipFullSync = BoolField("skip-full-sync", WithDescription("This must be set to skip a full sync"), WithPersistent(true), WithExportTarget(ExportTargetNone))
+ otelCollectorEndpoint = StringField("otel-collector-endpoint", WithDescription("The endpoint of the OpenTelemetry collector to send observability data to"),
+ WithPersistent(true), WithExportTarget(ExportTargetOps))
+ externalResourceC1ZField = StringField("external-resource-c1z",
+ WithDescription("The path to the c1z file to sync external baton resources with"),
+ WithPersistent(true),
+ WithExportTarget(ExportTargetNone))
+ externalResourceEntitlementIdFilter = StringField("external-resource-entitlement-id-filter",
+ WithDescription("The entitlement that external users, groups must have access to sync external baton resources"),
+ WithPersistent(true),
+ WithExportTarget(ExportTargetNone))
+
+ LambdaServerClientIDField = StringField("lambda-client-id", WithRequired(true), WithDescription("The oauth client id to use with the configuration endpoint"),
+ WithExportTarget(ExportTargetNone))
+ LambdaServerClientSecretField = StringField("lambda-client-secret", WithRequired(true), WithDescription("The oauth client secret to use with the configuration endpoint"),
+ WithExportTarget(ExportTargetNone))
)
+func LambdaServerFields() []SchemaField {
+ return []SchemaField{
+ LambdaServerClientIDField,
+ LambdaServerClientSecretField,
+ }
+}
+
+var LambdaServerRelationships = make([]SchemaFieldRelationship, 0)
+
// DefaultFields list the default fields expected in every single connector.
var DefaultFields = []SchemaField{
createTicketField,
@@ -67,6 +102,9 @@ var DefaultFields = []SchemaField{
ticketTemplatePathField,
logLevelField,
skipFullSync,
+ otelCollectorEndpoint,
+ externalResourceC1ZField,
+ externalResourceEntitlementIdFilter,
}
func IsFieldAmongDefaultList(f SchemaField) bool {
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/field_options.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/field_options.go
index 1699b448..1e076171 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/field/field_options.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/field_options.go
@@ -1,10 +1,45 @@
package field
+import (
+ "fmt"
+
+ v1_conf "github.com/conductorone/baton-sdk/pb/c1/config/v1"
+)
+
type fieldOption func(SchemaField) SchemaField
func WithRequired(required bool) fieldOption {
return func(o SchemaField) SchemaField {
o.Required = required
+
+ switch o.Variant {
+ case BoolVariant:
+ if required {
+ panic(fmt.Sprintf("required cannot be set on bool field: %s", o.FieldName))
+ }
+ case IntVariant:
+ if o.Rules.i == nil {
+ o.Rules.i = &v1_conf.Int64Rules{}
+ }
+ o.Rules.i.IsRequired = required
+ case StringVariant:
+ if o.Rules.s == nil {
+ o.Rules.s = &v1_conf.StringRules{}
+ }
+ o.Rules.s.IsRequired = required
+ case StringSliceVariant:
+ if o.Rules.ss == nil {
+ o.Rules.ss = &v1_conf.RepeatedStringRules{}
+ }
+ o.Rules.ss.IsRequired = required
+ case StringMapVariant:
+ if o.Rules.sm == nil {
+ o.Rules.sm = &v1_conf.StringMapRules{}
+ }
+ o.Rules.sm.IsRequired = required
+ default:
+ panic(fmt.Sprintf("field %s has unsupported type %s", o.FieldName, o.Variant))
+ }
return o
}
}
@@ -17,6 +52,13 @@ func WithDescription(description string) fieldOption {
}
}
+func WithDisplayName(displayName string) fieldOption {
+ return func(o SchemaField) SchemaField {
+ o.ConnectorConfig.DisplayName = displayName
+ return o
+ }
+}
+
func WithDefaultValue(value any) fieldOption {
return func(o SchemaField) SchemaField {
o.DefaultValue = value
@@ -27,15 +69,51 @@ func WithDefaultValue(value any) fieldOption {
func WithHidden(hidden bool) fieldOption {
return func(o SchemaField) SchemaField {
- o.Hidden = hidden
+ o.SyncerConfig.Hidden = hidden
+ return o
+ }
+}
+
+/*
+ExportTarget specifies who sets the flag.
+
+ CLI: dev ops invoking the connector, as for service mode, eg flag that specifies a file path on disk
+ GUI: C1 tenant admin on the Web. Inclusive of CLI. eg service user name
+ Ops: C1 support dashbaord. Inclusive of CLI. eg log level
+ None: Only currently usable for the default fields. Those flags are consumed by the Syncer, not the Connector.
+
+ ExportTarget is used by both dynamic conf generation and the conf schema exporting logic
+*/
+type ExportTarget string
+
+const (
+ ExportTargetNone ExportTarget = "none"
+ ExportTargetGUI ExportTarget = "gui"
+ ExportTargetOps ExportTarget = "ops"
+ ExportTargetCLIOnly ExportTarget = "cli"
+)
+
+func WithExportTarget(target ExportTarget) fieldOption {
+ return func(o SchemaField) SchemaField {
+ if o.ExportTarget != ExportTargetGUI && target != o.ExportTarget {
+ panic(fmt.Sprintf("target %s would be overwritten by %s for %s", o.ExportTarget, target, o.FieldName))
+ }
+ o.ExportTarget = target
+ return o
+ }
+}
+func WithRequiredInGUI(value bool) fieldOption {
+ return func(o SchemaField) SchemaField {
+ o.ConnectorConfig.Required = value
+ o.ExportTarget = ExportTargetGUI
return o
}
}
func WithShortHand(sh string) fieldOption {
return func(o SchemaField) SchemaField {
- o.CLIShortHand = sh
+ o.SyncerConfig.ShortHand = sh
return o
}
@@ -43,8 +121,119 @@ func WithShortHand(sh string) fieldOption {
func WithPersistent(value bool) fieldOption {
return func(o SchemaField) SchemaField {
- o.Persistent = value
+ o.SyncerConfig.Persistent = value
+
+ return o
+ }
+}
+
+func WithIsSecret(value bool) fieldOption {
+ return func(o SchemaField) SchemaField {
+ o.Secret = value
+
+ return o
+ }
+}
+
+func WithPlaceholder(value string) fieldOption {
+ return func(o SchemaField) SchemaField {
+ o.ConnectorConfig.Placeholder = value
+
+ return o
+ }
+}
+
+type intRuleMaker func(r *IntRuler)
+
+func WithInt(f intRuleMaker) fieldOption {
+ return func(o SchemaField) SchemaField {
+ rules := o.Rules.i
+ if rules == nil {
+ rules = &v1_conf.Int64Rules{}
+ }
+ o.Rules.i = rules
+ f(NewIntBuilder(rules))
+ return o
+ }
+}
+
+type stringRuleMaker func(r *StringRuler)
+
+func WithString(f stringRuleMaker) fieldOption {
+ return func(o SchemaField) SchemaField {
+ rules := o.Rules.s
+ if rules == nil {
+ rules = &v1_conf.StringRules{}
+ }
+ o.Rules.s = rules
+ f(NewStringBuilder(rules))
+ return o
+ }
+}
+
+type boolRuleMaker func(r *BoolRuler)
+
+func WithBool(f boolRuleMaker) fieldOption {
+ return func(o SchemaField) SchemaField {
+ rules := o.Rules.b
+ if rules == nil {
+ rules = &v1_conf.BoolRules{}
+ }
+ o.Rules.b = rules
+ f(NewBoolBuilder(rules))
+ return o
+ }
+}
+
+type stringSliceRuleMaker func(r *StringSliceRuler)
+
+func WithStringSlice(f stringSliceRuleMaker) fieldOption {
+ return func(o SchemaField) SchemaField {
+ rules := o.Rules.ss
+ if rules == nil {
+ rules = &v1_conf.RepeatedStringRules{}
+ }
+ o.Rules.ss = rules
+ f(NewRepeatedStringBuilder(rules))
+ return o
+ }
+}
+
+type stringMapRuleMaker func(r *StringMapRuler)
+func WithStringMap(f stringMapRuleMaker) fieldOption {
+ return func(o SchemaField) SchemaField {
+ rules := o.Rules.sm
+ if rules == nil {
+ rules = &v1_conf.StringMapRules{}
+ }
+ o.Rules.sm = rules
+ f(NewStringMapBuilder(rules))
return o
}
}
+
+func WithStructFieldName(name string) fieldOption {
+ return func(o SchemaField) SchemaField {
+ o.StructFieldName = name
+ return o
+ }
+}
+
+type StringMapRuler struct {
+ rules *v1_conf.StringMapRules
+}
+
+func NewStringMapBuilder(rules *v1_conf.StringMapRules) *StringMapRuler {
+ return &StringMapRuler{rules: rules}
+}
+
+func (r *StringMapRuler) WithRequired(required bool) *StringMapRuler {
+ r.rules.IsRequired = required
+ return r
+}
+
+func (r *StringMapRuler) WithValidateEmpty(validateEmpty bool) *StringMapRuler {
+ r.rules.ValidateEmpty = validateEmpty
+ return r
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/fields.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/fields.go
index ab39e087..01ba1652 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/field/fields.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/fields.go
@@ -3,61 +3,95 @@ package field
import (
"errors"
"fmt"
- "reflect"
"strings"
+
+ v1_conf "github.com/conductorone/baton-sdk/pb/c1/config/v1"
)
var WrongValueTypeErr = errors.New("unable to cast any to concrete type")
+type Variant string
+
+const (
+ StringVariant Variant = "StringField"
+ BoolVariant Variant = "BoolField"
+ IntVariant Variant = "IntField"
+ StringSliceVariant Variant = "StringSliceField"
+ StringMapVariant Variant = "StringMapField"
+)
+
+type WebFieldType string
+
+const (
+ Text WebFieldType = "TEXT"
+ Randomize WebFieldType = "RANDOMIZE"
+ OAuth2 WebFieldType = "OAUTH2"
+ ConnectorDerivedOptions WebFieldType = "CONNECTOR_DERIVED_OPTIONS"
+ FileUpload WebFieldType = "FILE_UPLOAD"
+)
+
+type FieldRule struct {
+ s *v1_conf.StringRules
+ ss *v1_conf.RepeatedStringRules
+ b *v1_conf.BoolRules
+ i *v1_conf.Int64Rules
+ sm *v1_conf.StringMapRules
+}
+
+type syncerConfig struct {
+ Required bool
+ Hidden bool
+ ShortHand string
+ Persistent bool
+}
+
+type connectorConfig struct {
+ DisplayName string
+ Required bool
+ Placeholder string
+ FieldType WebFieldType
+ // Only used by file uploads atm.
+ BonusStrings []string
+}
+
type SchemaField struct {
FieldName string
- FieldType reflect.Kind
- CLIShortHand string
Required bool
- Hidden bool
- Persistent bool
- Description string
DefaultValue any
-}
+ Description string
+ ExportTarget ExportTarget
+ HelpURL string
-// Bool returns the default value as a boolean.
-func (s SchemaField) Bool() (bool, error) {
- value, ok := s.DefaultValue.(bool)
- if !ok {
- return false, WrongValueTypeErr
- }
+ Variant Variant
+ Rules FieldRule
+ Secret bool
+ StructFieldName string
- return value, nil
-}
+ // Default fields - syncer side
+ SyncerConfig syncerConfig
-// Int returns the default value as a integer.
-func (s SchemaField) Int() (int, error) {
- value, ok := s.DefaultValue.(int)
- if !ok {
- return 0, WrongValueTypeErr
- }
+ // Config acutally ingested on the connector side - auth, regions, etc
+ ConnectorConfig connectorConfig
+}
- return value, nil
+type SchemaTypes interface {
+ ~string | ~bool | ~int | ~[]string | ~map[string]any
}
-// String returns the default value as a string.
-func (s SchemaField) String() (string, error) {
- value, ok := s.DefaultValue.(string)
- if !ok {
- return "", WrongValueTypeErr
- }
+func (s SchemaField) GetName() string {
+ return s.FieldName
+}
- return value, nil
+func (s SchemaField) GetCLIShortHand() string {
+ return s.SyncerConfig.ShortHand
}
-// StringSlice returns the default value as a string array.
-func (s SchemaField) StringSlice() ([]string, error) {
- value, ok := s.DefaultValue.([]string)
- if !ok {
- return nil, WrongValueTypeErr
- }
+func (s SchemaField) IsPersistent() bool {
+ return s.SyncerConfig.Persistent
+}
- return value, nil
+func (s SchemaField) IsHidden() bool {
+ return s.SyncerConfig.Hidden
}
func (s SchemaField) GetDescription() string {
@@ -75,19 +109,70 @@ func (s SchemaField) GetDescription() string {
return line
}
-func (s SchemaField) GetName() string {
- return s.FieldName
+// Go doesn't allow generic methods on a non-generic struct.
+func ValidateField[T SchemaTypes](s *SchemaField, value T) (bool, error) {
+ return s.validate(value)
+}
+
+func (s SchemaField) validate(value any) (bool, error) {
+ switch s.Variant {
+ case StringVariant:
+ v, ok := value.(string)
+ if !ok {
+ return false, WrongValueTypeErr
+ }
+ return v != "", ValidateStringRules(s.Rules.s, v, s.FieldName)
+ case BoolVariant:
+ v, ok := value.(bool)
+ if !ok {
+ return false, WrongValueTypeErr
+ }
+ return v, ValidateBoolRules(s.Rules.b, v, s.FieldName)
+ case IntVariant:
+ v, ok := value.(int)
+ if !ok {
+ return false, WrongValueTypeErr
+ }
+ return v != 0, ValidateIntRules(s.Rules.i, v, s.FieldName)
+ case StringSliceVariant:
+ v, ok := value.([]string)
+ if !ok {
+ return false, WrongValueTypeErr
+ }
+ return len(v) != 0, ValidateRepeatedStringRules(s.Rules.ss, v, s.FieldName)
+ case StringMapVariant:
+ v, ok := value.(map[string]any)
+ if !ok {
+ return false, WrongValueTypeErr
+ }
+ return len(v) != 0, ValidateStringMapRules(s.Rules.sm, v, s.FieldName)
+ default:
+ return false, fmt.Errorf("unknown field type %s", s.Variant)
+ }
}
-func (s SchemaField) GetType() reflect.Kind {
- return s.FieldType
+func toUpperCase(i string) string {
+ return strings.ReplaceAll(strings.ToUpper(i), "-", "_")
+}
+
+// SchemaField can't be generic over SchemaTypes without breaking backwards compatibility :-/.
+func GetDefaultValue[T SchemaTypes](s SchemaField) (*T, error) {
+ value, ok := s.DefaultValue.(T)
+ if !ok {
+ return nil, WrongValueTypeErr
+ }
+ return &value, nil
}
func BoolField(name string, optional ...fieldOption) SchemaField {
field := SchemaField{
- FieldName: name,
- FieldType: reflect.Bool,
- DefaultValue: false,
+ FieldName: name,
+ Variant: BoolVariant,
+ DefaultValue: false,
+ ExportTarget: ExportTargetGUI,
+ Rules: FieldRule{},
+ SyncerConfig: syncerConfig{},
+ ConnectorConfig: connectorConfig{},
}
for _, o := range optional {
@@ -95,7 +180,7 @@ func BoolField(name string, optional ...fieldOption) SchemaField {
}
if field.Required {
- panic(fmt.Sprintf("requiring %s of type %s does not make sense", field.FieldName, field.FieldType))
+ panic(fmt.Sprintf("requiring %s of type %s does not make sense", field.FieldName, field.Variant))
}
return field
@@ -103,9 +188,13 @@ func BoolField(name string, optional ...fieldOption) SchemaField {
func StringField(name string, optional ...fieldOption) SchemaField {
field := SchemaField{
- FieldName: name,
- FieldType: reflect.String,
- DefaultValue: "",
+ FieldName: name,
+ Variant: StringVariant,
+ DefaultValue: "",
+ ExportTarget: ExportTargetGUI,
+ Rules: FieldRule{},
+ SyncerConfig: syncerConfig{},
+ ConnectorConfig: connectorConfig{FieldType: Text},
}
for _, o := range optional {
@@ -117,9 +206,13 @@ func StringField(name string, optional ...fieldOption) SchemaField {
func IntField(name string, optional ...fieldOption) SchemaField {
field := SchemaField{
- FieldName: name,
- FieldType: reflect.Int,
- DefaultValue: 0,
+ FieldName: name,
+ Variant: IntVariant,
+ DefaultValue: 0,
+ ExportTarget: ExportTargetGUI,
+ Rules: FieldRule{},
+ SyncerConfig: syncerConfig{},
+ ConnectorConfig: connectorConfig{},
}
for _, o := range optional {
@@ -131,9 +224,13 @@ func IntField(name string, optional ...fieldOption) SchemaField {
func StringSliceField(name string, optional ...fieldOption) SchemaField {
field := SchemaField{
- FieldName: name,
- FieldType: reflect.Slice,
- DefaultValue: []string{},
+ FieldName: name,
+ Variant: StringSliceVariant,
+ DefaultValue: []string{},
+ ExportTarget: ExportTargetGUI,
+ Rules: FieldRule{},
+ SyncerConfig: syncerConfig{},
+ ConnectorConfig: connectorConfig{},
}
for _, o := range optional {
@@ -143,6 +240,40 @@ func StringSliceField(name string, optional ...fieldOption) SchemaField {
return field
}
-func toUpperCase(i string) string {
- return strings.ReplaceAll(strings.ToUpper(i), "-", "_")
+func StringMapField(name string, optional ...fieldOption) SchemaField {
+ field := SchemaField{
+ FieldName: name,
+ Variant: StringMapVariant,
+ DefaultValue: map[string]any{},
+ ExportTarget: ExportTargetGUI,
+ Rules: FieldRule{},
+ SyncerConfig: syncerConfig{},
+ ConnectorConfig: connectorConfig{},
+ }
+
+ for _, o := range optional {
+ field = o(field)
+ }
+
+ return field
+}
+
+func SelectField(name string, options []string, optional ...fieldOption) SchemaField {
+ field := SchemaField{
+ FieldName: name,
+ Variant: StringVariant,
+ DefaultValue: "",
+ ExportTarget: ExportTargetGUI,
+ Rules: FieldRule{
+ s: &v1_conf.StringRules{In: options},
+ },
+ SyncerConfig: syncerConfig{},
+ ConnectorConfig: connectorConfig{FieldType: Text},
+ }
+
+ for _, o := range optional {
+ field = o(field)
+ }
+
+ return field
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/marshal.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/marshal.go
new file mode 100644
index 00000000..4d6e8186
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/marshal.go
@@ -0,0 +1,181 @@
+package field
+
+import (
+ "fmt"
+
+ "google.golang.org/protobuf/types/known/anypb"
+ "google.golang.org/protobuf/types/known/structpb"
+
+ v1_conf "github.com/conductorone/baton-sdk/pb/c1/config/v1"
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
+)
+
+var RelationshipToConstraintKind = map[Relationship]v1_conf.ConstraintKind{
+ RequiredTogether: v1_conf.ConstraintKind_CONSTRAINT_KIND_REQUIRED_TOGETHER,
+ MutuallyExclusive: v1_conf.ConstraintKind_CONSTRAINT_KIND_MUTUALLY_EXCLUSIVE,
+ AtLeastOne: v1_conf.ConstraintKind_CONSTRAINT_KIND_AT_LEAST_ONE,
+ Dependents: v1_conf.ConstraintKind_CONSTRAINT_KIND_DEPENDENT_ON,
+}
+
+func (c *Configuration) MarshalJSON() ([]byte, error) {
+ conf, err := c.marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ return protojson.Marshal(conf)
+}
+
+func (c *Configuration) Marshal() ([]byte, error) {
+ conf, err := c.marshal()
+ if err != nil {
+ return nil, err
+ }
+ return proto.Marshal(conf)
+}
+
+func (c Configuration) marshal() (*v1_conf.Configuration, error) {
+ conf := &v1_conf.Configuration{}
+
+ ignore := make(map[string]struct{})
+ for _, f := range c.Fields {
+ if f.ExportTarget != ExportTargetGUI && f.ExportTarget != ExportTargetOps {
+ ignore[f.FieldName] = struct{}{}
+ continue
+ }
+ field := v1_conf.Field{
+ Name: f.FieldName,
+ DisplayName: f.ConnectorConfig.DisplayName,
+ Description: f.Description,
+ Placeholder: f.ConnectorConfig.Placeholder,
+ IsRequired: f.Required,
+ IsOps: f.ExportTarget == ExportTargetOps,
+ IsSecret: f.Secret,
+ }
+
+ switch f.Variant {
+ case IntVariant:
+ intField := &v1_conf.IntField{Rules: f.Rules.i}
+ d, err := GetDefaultValue[int](f)
+ if err != nil {
+ return nil, err
+ }
+ if d != nil {
+ intField.DefaultValue = int64(*d)
+ }
+
+ field.Field = &v1_conf.Field_IntField{IntField: intField}
+
+ case BoolVariant:
+ boolField := &v1_conf.BoolField{Rules: f.Rules.b}
+ d, err := GetDefaultValue[bool](f)
+ if err != nil {
+ return nil, err
+ }
+ if d != nil {
+ boolField.DefaultValue = *d
+ }
+ field.Field = &v1_conf.Field_BoolField{BoolField: boolField}
+ case StringSliceVariant:
+ stringSliceField := &v1_conf.StringSliceField{Rules: f.Rules.ss}
+ d, err := GetDefaultValue[[]string](f)
+ if err != nil {
+ return nil, err
+ }
+ if d != nil {
+ stringSliceField.DefaultValue = *d
+ }
+ field.Field = &v1_conf.Field_StringSliceField{StringSliceField: stringSliceField}
+ case StringMapVariant:
+ stringMapField := &v1_conf.StringMapField{Rules: f.Rules.sm}
+ d, err := GetDefaultValue[map[string]any](f)
+ if err != nil {
+ return nil, err
+ }
+ if d != nil {
+ // Convert map[string]any to map[string]*anypb.Any
+ anyMap := make(map[string]*anypb.Any)
+ for k, v := range *d {
+ // Convert the value to a structpb.Value
+ value, err := structpb.NewValue(v)
+ if err != nil {
+ return nil, fmt.Errorf("failed to convert map value to structpb.Value: %w", err)
+ }
+ anyValue, err := anypb.New(value)
+ if err != nil {
+ return nil, fmt.Errorf("failed to convert structpb.Value to Any: %w", err)
+ }
+ anyMap[k] = anyValue
+ }
+ stringMapField.DefaultValue = anyMap
+ }
+ field.Field = &v1_conf.Field_StringMapField{StringMapField: stringMapField}
+ case StringVariant:
+ stringField := &v1_conf.StringField{Rules: f.Rules.s}
+ d, err := GetDefaultValue[string](f)
+ if err != nil {
+ return nil, err
+ }
+ if d != nil {
+ stringField.DefaultValue = *d
+ }
+
+ switch f.ConnectorConfig.FieldType {
+ case Text:
+ stringField.Type = v1_conf.StringFieldType_STRING_FIELD_TYPE_TEXT_UNSPECIFIED
+ case Randomize:
+ stringField.Type = v1_conf.StringFieldType_STRING_FIELD_TYPE_RANDOM
+ case OAuth2:
+ stringField.Type = v1_conf.StringFieldType_STRING_FIELD_TYPE_OAUTH2
+ case ConnectorDerivedOptions:
+ stringField.Type = v1_conf.StringFieldType_STRING_FIELD_TYPE_CONNECTOR_DERIVED_OPTIONS
+ case FileUpload:
+ stringField.Type = v1_conf.StringFieldType_STRING_FIELD_TYPE_FILE_UPLOAD
+ stringField.AllowedExtensions = f.ConnectorConfig.BonusStrings
+ default:
+ return nil, fmt.Errorf("invalid field type: '%s'", f.ConnectorConfig.FieldType)
+ }
+
+ field.Field = &v1_conf.Field_StringField{StringField: stringField}
+ }
+ conf.Fields = append(conf.Fields, &field)
+ }
+
+ for _, rel := range c.Constraints {
+ constraint := v1_conf.Constraint{}
+
+ contraintForIgnoredField := false
+ for _, f := range rel.Fields {
+ if _, ok := ignore[f.FieldName]; ok {
+ contraintForIgnoredField = true
+ break
+ }
+ constraint.FieldNames = append(constraint.FieldNames, f.FieldName)
+ }
+ if contraintForIgnoredField {
+ continue
+ }
+
+ for _, f := range rel.ExpectedFields {
+ if _, ok := ignore[f.FieldName]; ok {
+ contraintForIgnoredField = true
+ break
+ }
+ constraint.SecondaryFieldNames = append(constraint.SecondaryFieldNames, f.FieldName)
+ }
+
+ if contraintForIgnoredField {
+ continue
+ }
+
+ kind, ok := RelationshipToConstraintKind[rel.Kind]
+ if !ok {
+ return nil, fmt.Errorf("invalid constraint kind: %d", rel.Kind)
+ }
+ constraint.Kind = kind
+
+ conf.Constraints = append(conf.Constraints, &constraint)
+ }
+ return conf, nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/relationships.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/relationships.go
index 6e589b65..11833007 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/field/relationships.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/relationships.go
@@ -13,7 +13,7 @@ const (
type SchemaFieldRelationship struct {
Kind Relationship
Fields []SchemaField
- ExpectedFields []SchemaField
+ ExpectedFields []SchemaField // Not really expected, just another field bag.
}
func countFieldNames(fields ...SchemaField) int {
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/rule_builders.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/rule_builders.go
new file mode 100644
index 00000000..d9f006a4
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/rule_builders.go
@@ -0,0 +1,240 @@
+package field
+
+import (
+ "fmt"
+ "regexp"
+
+ v1_conf "github.com/conductorone/baton-sdk/pb/c1/config/v1"
+)
+
+type IntRuler struct {
+ rules *v1_conf.Int64Rules
+}
+
+func NewIntBuilder(rules *v1_conf.Int64Rules) *IntRuler {
+ return &IntRuler{rules: rules}
+}
+
+func (b *IntRuler) Eq(value int64) *IntRuler {
+ b.rules.Eq = &value
+ return b
+}
+
+func (b *IntRuler) Gt(value int64) *IntRuler {
+ b.rules.Gt = &value
+ return b
+}
+
+func (b *IntRuler) Lt(value int64) *IntRuler {
+ b.rules.Lt = &value
+ return b
+}
+
+func (b *IntRuler) Lte(value int64) *IntRuler {
+ b.rules.Lte = &value
+ return b
+}
+
+func (b *IntRuler) Gte(value int64) *IntRuler {
+ b.rules.Gte = &value
+ return b
+}
+
+func (b *IntRuler) In(values []int64) *IntRuler {
+ b.rules.In = values
+ return b
+}
+
+func (b *IntRuler) NotIn(values []int64) *IntRuler {
+ b.rules.NotIn = values
+ return b
+}
+
+func (b *IntRuler) ValidateEmpty(value bool) *IntRuler {
+ b.rules.ValidateEmpty = value
+ return b
+}
+
+type BoolRuler struct {
+ rules *v1_conf.BoolRules
+}
+
+func NewBoolBuilder(rules *v1_conf.BoolRules) *BoolRuler {
+ return &BoolRuler{rules: rules}
+}
+
+func (b *BoolRuler) Eq(v bool) *BoolRuler {
+ b.rules.Eq = &v
+ return b
+}
+
+type StringRuler struct {
+ rules *v1_conf.StringRules
+}
+
+func NewStringBuilder(rules *v1_conf.StringRules) *StringRuler {
+ return &StringRuler{rules: rules}
+}
+
+func (b *StringRuler) Eq(value string) *StringRuler {
+ b.rules.Eq = &value
+ return b
+}
+
+func (b *StringRuler) Len(value uint64) *StringRuler {
+ b.rules.Len = &value
+ return b
+}
+
+func (b *StringRuler) MinLen(value uint64) *StringRuler {
+ b.rules.MinLen = &value
+ return b
+}
+
+func (b *StringRuler) MaxLen(value uint64) *StringRuler {
+ b.rules.MaxLen = &value
+ return b
+}
+
+func (b *StringRuler) Pattern(value string) *StringRuler {
+ _, err := regexp.CompilePOSIX(value)
+ if err != nil {
+ panic(fmt.Errorf("invalid regex: %w", err))
+ }
+ b.rules.Pattern = &value
+ return b
+}
+
+func (b *StringRuler) Prefix(value string) *StringRuler {
+ b.rules.Prefix = &value
+ return b
+}
+
+func (b *StringRuler) Suffix(value string) *StringRuler {
+ b.rules.Suffix = &value
+ return b
+}
+
+func (b *StringRuler) Contains(value string) *StringRuler {
+ b.rules.Contains = &value
+ return b
+}
+
+func (b *StringRuler) NotContains(value string) *StringRuler {
+ b.rules.NotContains = &value
+ return b
+}
+
+func (b *StringRuler) In(values []string) *StringRuler {
+ b.rules.In = values
+ return b
+}
+
+func (b *StringRuler) NotIn(values []string) *StringRuler {
+ b.rules.NotIn = values
+ return b
+}
+
+func (b *StringRuler) IsEmail() *StringRuler {
+ if b.rules.WellKnown != 0 {
+ panic("well known rules are already set")
+ }
+ b.rules.WellKnown = v1_conf.WellKnownString_WELL_KNOWN_STRING_EMAIL
+ return b
+}
+
+func (b *StringRuler) IsHostname() *StringRuler {
+ if b.rules.WellKnown != 0 {
+ panic("well known rules are already set")
+ }
+ b.rules.WellKnown = v1_conf.WellKnownString_WELL_KNOWN_STRING_HOSTNAME
+ return b
+}
+
+func (b *StringRuler) IsIP() *StringRuler {
+ if b.rules.WellKnown != 0 {
+ panic("well known rules are already set")
+ }
+ b.rules.WellKnown = v1_conf.WellKnownString_WELL_KNOWN_STRING_IP
+ return b
+}
+
+func (b *StringRuler) IsIpv4() *StringRuler {
+ if b.rules.WellKnown != 0 {
+ panic("well known rules are already set")
+ }
+ b.rules.WellKnown = v1_conf.WellKnownString_WELL_KNOWN_STRING_IPV4
+ return b
+}
+
+func (b *StringRuler) IsIpv6() *StringRuler {
+ if b.rules.WellKnown != 0 {
+ panic("well known rules are already set")
+ }
+ b.rules.WellKnown = v1_conf.WellKnownString_WELL_KNOWN_STRING_IPV6
+ return b
+}
+
+func (b *StringRuler) IsURI() *StringRuler {
+ if b.rules.WellKnown != 0 {
+ panic("well known rules are already set")
+ }
+ b.rules.WellKnown = v1_conf.WellKnownString_WELL_KNOWN_STRING_URI
+ return b
+}
+
+func (b *StringRuler) IsAddress() *StringRuler {
+ if b.rules.WellKnown != 0 {
+ panic("well known rules are already set")
+ }
+ b.rules.WellKnown = v1_conf.WellKnownString_WELL_KNOWN_STRING_ADDRESS
+ return b
+}
+
+func (b *StringRuler) IsUUID() *StringRuler {
+ if b.rules.WellKnown != 0 {
+ panic("well known rules are already set")
+ }
+ b.rules.WellKnown = v1_conf.WellKnownString_WELL_KNOWN_STRING_UUID
+ return b
+}
+
+type StringSliceRuler struct {
+ rules *v1_conf.RepeatedStringRules
+ stringer *StringRuler
+}
+
+func NewRepeatedStringBuilder(rules *v1_conf.RepeatedStringRules) *StringSliceRuler {
+ itemRules := rules.ItemRules
+ if itemRules == nil {
+ itemRules = &v1_conf.StringRules{}
+ rules.ItemRules = itemRules
+ }
+ stringer := NewStringBuilder(itemRules)
+ return &StringSliceRuler{rules: rules, stringer: stringer}
+}
+
+func (b *StringSliceRuler) MinItems(value uint64) *StringSliceRuler {
+ b.rules.MinItems = &value
+ return b
+}
+
+func (b *StringSliceRuler) MaxItems(value uint64) *StringSliceRuler {
+ b.rules.MaxItems = &value
+ return b
+}
+
+func (b *StringSliceRuler) Unique(unique bool) *StringSliceRuler {
+ b.rules.Unique = unique
+ return b
+}
+
+func (b *StringSliceRuler) ValidateEmpty(value bool) *StringSliceRuler {
+ b.rules.ValidateEmpty = value
+ return b
+}
+
+func (b *StringSliceRuler) ItemRules(f func(stringer *StringRuler)) *StringSliceRuler {
+ f(b.stringer)
+ return b
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/field/validation.go b/vendor/github.com/conductorone/baton-sdk/pkg/field/validation.go
index 06cd2ca6..87474f52 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/field/validation.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/field/validation.go
@@ -2,17 +2,310 @@ package field
import (
"fmt"
- "reflect"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "strconv"
"strings"
+ "github.com/google/uuid"
+
+ v1_conf "github.com/conductorone/baton-sdk/pb/c1/config/v1"
"github.com/conductorone/baton-sdk/pkg/ustrings"
- "github.com/spf13/viper"
)
type ErrConfigurationMissingFields struct {
errors []error
}
+func ValidateIntRules(r *v1_conf.Int64Rules, vInt int, name string) error {
+ if r == nil {
+ return nil
+ }
+ v := int64(vInt)
+ if r.IsRequired && v == 0 {
+ return fmt.Errorf("field %s of type int is marked as required but it has a zero-value", name)
+ }
+
+ if !r.ValidateEmpty && v == 0 {
+ return nil
+ }
+ if r.Eq != nil && *r.Eq != v {
+ return fmt.Errorf("field %s: expected %v but got %v", name, *r.Eq, v)
+ }
+ if r.Lt != nil && v >= *r.Lt {
+ return fmt.Errorf("field %s: value must be less than %d but got %d", name, *r.Lt, v)
+ }
+ if r.Lte != nil && v > *r.Lte {
+ return fmt.Errorf("field %s: value must be less than or equal to %d but got %d", name, *r.Lte, v)
+ }
+ if r.Gt != nil && v <= *r.Gt {
+ return fmt.Errorf("field %s: value must be greater than %d but got %d", name, *r.Gt, v)
+ }
+ if r.Gte != nil && v < *r.Gte {
+ return fmt.Errorf("field %s: value must be greater than or equal to %d but got %d", name, *r.Gte, v)
+ }
+ if r.In != nil {
+ found := false
+ for _, val := range r.In {
+ if v == val {
+ found = true
+ break
+ }
+ }
+ if !found {
+ return fmt.Errorf("field %s: value must be one of %v but got %d", name, r.In, v)
+ }
+ }
+ if r.NotIn != nil {
+ for _, val := range r.NotIn {
+ if v == val {
+ return fmt.Errorf("field %s: value must not be one of %v but got %d", name, r.NotIn, v)
+ }
+ }
+ }
+ return nil
+}
+
+func ValidateBoolRules(r *v1_conf.BoolRules, v bool, name string) error {
+ if r == nil {
+ return nil
+ }
+ if r.Eq != nil && *r.Eq != v {
+ return fmt.Errorf("expected %v but got %v", *r.Eq, v)
+ }
+ return nil
+}
+
+// ValidateHostname checks if the given string is a valid hostname or IP address.
+func validateHostname(hostname string) bool {
+ // Check if it's an IP address
+ if net.ParseIP(hostname) != nil {
+ return true
+ }
+
+ // Check if it follows hostname rules
+ return isValidDomain(hostname)
+}
+
+// isValidDomain checks if a hostname follows domain name rules.
+func isValidDomain(hostname string) bool {
+ if len(hostname) == 0 || len(hostname) > 253 {
+ return false
+ }
+
+ // Hostname must not start or end with a dot
+ if hostname[0] == '.' || hostname[len(hostname)-1] == '.' {
+ return false
+ }
+
+ // Split by dots
+ labels := strings.Split(hostname, ".")
+
+ for _, label := range labels {
+ if len(label) == 0 || len(label) > 63 {
+ return false
+ }
+
+ // Each label must start & end with a letter or digit (RFC 1035)
+ if !isAlphaNumeric(label[0]) || !isAlphaNumeric(label[len(label)-1]) {
+ return false
+ }
+
+ // Labels can only contain letters, digits, or hyphens
+ for i := range label {
+ if !(isAlphaNumeric(label[i]) || label[i] == '-') {
+ return false
+ }
+ }
+ }
+
+ return true
+}
+
+// isAlphaNumeric checks if a byte is a letter or digit.
+func isAlphaNumeric(b byte) bool {
+ return (b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || (b >= '0' && b <= '9')
+}
+
+func ValidateStringRules(r *v1_conf.StringRules, v string, name string) error {
+ if r == nil {
+ return nil
+ }
+
+ if r.IsRequired && v == "" {
+ return fmt.Errorf("field %s of type string is marked as required but it has a zero-value", name)
+ }
+
+ if !r.ValidateEmpty && v == "" {
+ return nil
+ }
+
+ if r.Eq != nil && *r.Eq != v {
+ return fmt.Errorf("field %s: expected '%v' but got '%v'", name, *r.Eq, v)
+ }
+ if r.Len != nil && uint64(len(v)) != *r.Len {
+ return fmt.Errorf("field %s: value must be exactly %d characters long but got %d", name, *r.Len, len(v))
+ }
+ if r.MinLen != nil && uint64(len(v)) < *r.MinLen {
+ return fmt.Errorf("field %s: value must be at least %d characters long but got %d", name, *r.MinLen, len(v))
+ }
+ if r.MaxLen != nil && uint64(len(v)) > *r.MaxLen {
+ return fmt.Errorf("field %s: value must be at most %d characters long but got %d", name, *r.MaxLen, len(v))
+ }
+ if r.Pattern != nil {
+ pattern, err := regexp.CompilePOSIX(*r.Pattern)
+ if err != nil {
+ return fmt.Errorf("field %s: invalid pattern: %w", name, err)
+ }
+ if !pattern.MatchString(v) {
+ return fmt.Errorf("field %s: value must match pattern %s but got '%s'", name, pattern.String(), v)
+ }
+ }
+ if r.Prefix != nil && !strings.HasPrefix(v, *r.Prefix) {
+ return fmt.Errorf("field %s: value must have prefix '%s' but got '%s'", name, *r.Prefix, v)
+ }
+ if r.Suffix != nil && !strings.HasSuffix(v, *r.Suffix) {
+ return fmt.Errorf("field %s: value must have suffix '%s' but got '%s'", name, *r.Suffix, v)
+ }
+ if r.Contains != nil && !strings.Contains(v, *r.Contains) {
+ return fmt.Errorf("field %s: value must contain '%s' but got '%s'", name, *r.Contains, v)
+ }
+ if r.In != nil {
+ found := false
+ for _, val := range r.In {
+ if v == val {
+ found = true
+ break
+ }
+ }
+ if !found {
+ return fmt.Errorf("field %s: value must be one of %v but got '%s'", name, r.In, v)
+ }
+ }
+ if r.NotIn != nil {
+ for _, val := range r.NotIn {
+ if v == val {
+ return fmt.Errorf("field %s: value must not be one of %v but got '%s'", name, r.NotIn, v)
+ }
+ }
+ }
+ if r.WellKnown == v1_conf.WellKnownString_WELL_KNOWN_STRING_UNSPECIFIED {
+ return nil
+ }
+
+ switch r.WellKnown {
+ case v1_conf.WellKnownString_WELL_KNOWN_STRING_EMAIL:
+ _, err := mail.ParseAddress(v)
+ if err != nil {
+ return fmt.Errorf("field %s: value must be a valid email address but got '%s'", name, v)
+ }
+
+ case v1_conf.WellKnownString_WELL_KNOWN_STRING_URI:
+ _, err := url.ParseRequestURI(v)
+ if err != nil {
+ return fmt.Errorf("field %s: value must be a valid URL but got '%s'", name, v)
+ }
+
+ case v1_conf.WellKnownString_WELL_KNOWN_STRING_UUID:
+ _, err := uuid.Parse(v)
+ if err != nil {
+ return fmt.Errorf("field %s: value must be a valid UUID but got '%s'", name, v)
+ }
+
+ case v1_conf.WellKnownString_WELL_KNOWN_STRING_HOSTNAME:
+ if !validateHostname(v) {
+ return fmt.Errorf("field %s: value must be a valid hostname but got '%s'", name, v)
+ }
+ case v1_conf.WellKnownString_WELL_KNOWN_STRING_IP:
+ if net.ParseIP(v) == nil {
+ return fmt.Errorf("field %s: value must be a valid IP address but got '%s'", name, v)
+ }
+ case v1_conf.WellKnownString_WELL_KNOWN_STRING_IPV4:
+ ip := net.ParseIP(v)
+ if ip == nil || ip.To4() == nil {
+ return fmt.Errorf("field %s: value must be a valid IPv4 address but got '%s'", name, v)
+ }
+ case v1_conf.WellKnownString_WELL_KNOWN_STRING_IPV6:
+ ip := net.ParseIP(v)
+ if ip == nil || ip.To16() == nil {
+ return fmt.Errorf("field %s: value must be a valid IPv6 address but got '%s'", name, v)
+ }
+
+ default:
+ return fmt.Errorf("field %s: unknown well-known validation rule: %T", name, r.WellKnown)
+ }
+
+ return nil
+}
+
+type WellKnownStrings string
+
+const (
+ WellKnownEmailString WellKnownStrings = "EMAIL"
+ WellKnownHostnameString WellKnownStrings = "HOSTNAME"
+ WellKnownIPString WellKnownStrings = "IP"
+ WellKnownIpv4String WellKnownStrings = "IPv4"
+ WellKnownIpv6String WellKnownStrings = "IPv6"
+ WellKnownURIString WellKnownStrings = "URI"
+ WellKnownUUIDString WellKnownStrings = "UUID"
+)
+
+func ValidateRepeatedStringRules(r *v1_conf.RepeatedStringRules, v []string, name string) error {
+ if r == nil {
+ return nil
+ }
+ if r.IsRequired && len(v) == 0 {
+ return fmt.Errorf("field %s of type []string is marked as required but it has a zero-value", name)
+ }
+
+ if !r.ValidateEmpty && len(v) == 0 {
+ return nil
+ }
+
+ if r.MinItems != nil && uint64(len(v)) < *r.MinItems {
+ return fmt.Errorf("field %s: value must have at least %d items but got %d", name, *r.MinItems, len(v))
+ }
+ if r.MaxItems != nil && uint64(len(v)) > *r.MaxItems {
+ return fmt.Errorf("field %s: value must have at most %d items but got %d", name, *r.MaxItems, len(v))
+ }
+ if r.Unique {
+ uniqueValues := make(map[string]struct{})
+ for _, item := range v {
+ if _, exists := uniqueValues[item]; exists {
+ return fmt.Errorf("field %s: value must not contain duplicate items but got multiple \"%s\"", name, item)
+ }
+ uniqueValues[item] = struct{}{}
+ }
+ }
+ if r.ItemRules == nil {
+ return nil
+ }
+
+ for i, item := range v {
+ if err := ValidateStringRules(r.ItemRules, item, strconv.Itoa(i)); err != nil {
+ return fmt.Errorf("field %s invalid item at %w", name, err)
+ }
+ }
+ return nil
+}
+
+func ValidateStringMapRules(r *v1_conf.StringMapRules, v map[string]any, name string) error {
+ if r == nil {
+ return nil
+ }
+ if r.IsRequired && len(v) == 0 {
+ return fmt.Errorf("field %s of type map[string]any is marked as required but it has a zero-value", name)
+ }
+
+ if !r.ValidateEmpty && len(v) == 0 {
+ return nil
+ }
+
+ return nil
+}
+
func (e *ErrConfigurationMissingFields) Error() string {
var messages []string
@@ -27,51 +320,55 @@ func (e *ErrConfigurationMissingFields) Push(err error) {
e.errors = append(e.errors, err)
}
+type Configurable interface {
+ GetString(key string) string
+ GetBool(key string) bool
+ GetInt(key string) int
+ GetStringSlice(key string) []string
+ GetStringMap(key string) map[string]any
+}
+
// Validate perform validation of field requirement and constraints
// relationships after the configuration is read.
// We don't check the following:
// - if sets of fields are mutually exclusive and required
// together at the same time
-func Validate(c Configuration, v *viper.Viper) error {
+func Validate(c Configuration, v Configurable) error {
present := make(map[string]int)
- missingFieldsError := &ErrConfigurationMissingFields{}
+ validationErrors := &ErrConfigurationMissingFields{}
- // check if required fields are present
for _, f := range c.Fields {
- isNonZero := false
- switch f.FieldType {
- case reflect.Bool:
- isNonZero = v.GetBool(f.FieldName)
- case reflect.Int:
- isNonZero = v.GetInt(f.FieldName) != 0
- case reflect.String:
- isNonZero = v.GetString(f.FieldName) != ""
- case reflect.Slice:
- isNonZero = len(v.GetStringSlice(f.FieldName)) != 0
+ // Note: the viper methods are actually casting
+ // internal strings into the desired type.
+ var isPresent bool
+ var validationError error
+ switch f.Variant {
+ case StringVariant:
+ isPresent, validationError = ValidateField(&f, v.GetString(f.FieldName))
+ case BoolVariant:
+ isPresent, validationError = ValidateField(&f, v.GetBool(f.FieldName))
+ case IntVariant:
+ isPresent, validationError = ValidateField(&f, v.GetInt(f.FieldName))
+ case StringSliceVariant:
+ isPresent, validationError = ValidateField(&f, v.GetStringSlice(f.FieldName))
+ case StringMapVariant:
+ isPresent, validationError = ValidateField(&f, v.GetStringMap(f.FieldName))
default:
- return fmt.Errorf("field %s has unsupported type %s", f.FieldName, f.FieldType)
+ return fmt.Errorf("unknown field type %s", f.Variant)
}
-
- if isNonZero {
- present[f.FieldName] = 1
+ if validationError != nil {
+ validationErrors.Push(validationError)
}
- if f.Required && !isNonZero {
- missingFieldsError.Push(
- fmt.Errorf(
- "field %s of type %s is marked as required but it has a zero-value",
- f.FieldName,
- f.FieldType,
- ),
- )
+ if isPresent {
+ present[f.FieldName] = 1
}
}
- if len(missingFieldsError.errors) > 0 {
- return missingFieldsError
+ if len(validationErrors.errors) > 0 {
+ return validationErrors
}
- // check constraints
return validateConstraints(present, c.Constraints)
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/client.go b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/client.go
new file mode 100644
index 00000000..c52eec9f
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/client.go
@@ -0,0 +1,129 @@
+package grpc
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/service/lambda"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+type lambdaTransport struct {
+ lambdaClient *lambda.Client
+ functionName string
+}
+
+func (l *lambdaTransport) RoundTrip(ctx context.Context, req *Request) (*Response, error) {
+ payload, err := req.MarshalJSON()
+ if err != nil {
+ return nil, fmt.Errorf("lambda_transport: failed to marshal frame: %w", err)
+ }
+
+ input := &lambda.InvokeInput{
+ FunctionName: aws.String(l.functionName),
+ Payload: payload,
+ }
+
+ // Invoke the Lambda function.
+ invokeResp, err := l.lambdaClient.Invoke(ctx, input)
+ if err != nil {
+ return nil, fmt.Errorf("lambda_transport: failed to invoke lambda function: %w", err)
+ }
+
+ // Check if the function returned an error.
+ if invokeResp.FunctionError != nil {
+ return nil, fmt.Errorf("lambda_transport: function returned error: %v", *invokeResp.FunctionError)
+ }
+
+ resp := &Response{}
+ err = json.Unmarshal(invokeResp.Payload, resp)
+ if err != nil {
+ return nil, fmt.Errorf("lambda_transport: failed to unmarshal response: %w", err)
+ }
+
+ return resp, err
+}
+
+// NewLambdaClientTransport returns a new client transport that invokes a lambda function.
+func NewLambdaClientTransport(ctx context.Context, client *lambda.Client, functionName string) (ClientTransport, error) {
+ return &lambdaTransport{
+ lambdaClient: client,
+ functionName: functionName,
+ }, nil
+}
+
+type ClientTransport interface {
+ RoundTrip(context.Context, *Request) (*Response, error)
+}
+
+type clientConn struct {
+ t ClientTransport
+}
+
+func (c *clientConn) Invoke(ctx context.Context, method string, args any, reply any, opts ...grpc.CallOption) error {
+ req, reqOk := args.(proto.Message)
+ resp, respOk := reply.(proto.Message)
+ if !reqOk || !respOk {
+ return status.Errorf(codes.Unknown, "args and reply must satisfy proto.Message")
+ }
+
+ // TODO(morgabra): Should we do some of this stuff? (e.g. detect ctx deadline and set grpc-timeout, etc?)
+ // https://github.com/grpc/grpc-go/blob/9dc22c029c2592b5b6235d9ef6f14d62ecd6a509/internal/transport/http2_client.go#L541
+ md, _ := metadata.FromOutgoingContext(ctx)
+
+ treq, err := NewRequest(method, req, md)
+ if err != nil {
+ return status.Errorf(codes.Unknown, "failed creating request: %s", err)
+ }
+
+ tresp, err := c.t.RoundTrip(ctx, treq)
+ if err != nil {
+ return err
+ }
+
+ st, err := tresp.Status()
+ if err != nil {
+ return err
+ }
+
+ if st.Code() != codes.OK {
+ return st.Err()
+ }
+
+ err = tresp.UnmarshalResponse(resp)
+ if err != nil {
+ return err
+ }
+
+ // TODO(morgabra): call opts here, some are probably important (e.g. PerRPCCredsCallOption, etc)
+ for _, opt := range opts {
+ switch o := opt.(type) {
+ case grpc.HeaderCallOption:
+ for k, v := range tresp.Headers() {
+ o.HeaderAddr.Append(k, v...)
+ }
+ case grpc.TrailerCallOption:
+ for k, v := range tresp.Trailers() {
+ o.TrailerAddr.Append(k, v...)
+ }
+ }
+ }
+
+ return nil
+}
+
+func (c *clientConn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) {
+ return nil, status.Errorf(codes.Unimplemented, "streaming is not supported")
+}
+
+func NewClientConn(transport ClientTransport) grpc.ClientConnInterface {
+ return &clientConn{
+ t: transport,
+ }
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/config/claims.go b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/config/claims.go
new file mode 100644
index 00000000..0daeae73
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/config/claims.go
@@ -0,0 +1,71 @@
+package config
+
+import (
+ "context"
+ "crypto/sha256"
+ "encoding/base64"
+ "encoding/hex"
+ "encoding/json"
+ "fmt"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ aws_config "github.com/aws/aws-sdk-go-v2/config"
+ "github.com/go-jose/go-jose/v4/jwt"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+func sha256AndHexEncode(input string) string {
+ hash := sha256.Sum256([]byte(input))
+ return hex.EncodeToString(hash[:])
+}
+
+type idAttMarshaller struct {
+ awsConfig *aws.Config
+}
+
+func NewIdAttMarshaller(ctx context.Context) (*idAttMarshaller, error) {
+ cfg, err := aws_config.LoadDefaultConfig(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("create-sigv4-sts-get-caller-identity-request: failed to load AWS configuration: %w", err)
+ }
+
+ return &idAttMarshaller{awsConfig: &cfg}, nil
+}
+
+func (a *idAttMarshaller) Marshal(claims *jwt.Claims) ([]byte, error) {
+ getIdentityAttestation, err := a.getIdentityAttestation()
+ if err != nil {
+ return nil, fmt.Errorf("c1-credential-provider: failed to get identity attestation: %w", err)
+ }
+
+ claimsWithIDAtt := &struct {
+ jwt.Claims
+ IDAtt string `json:"id_att"` // Identity Attestation: Currently only supports v1.Sigv4SignedRequestSTSGetCallerIdentity
+ }{
+ Claims: *claims,
+ IDAtt: getIdentityAttestation,
+ }
+
+ return json.Marshal(claimsWithIDAtt)
+}
+
+// getIdentityAttestation creates a signed sts GetCallerIdentity request and marshals it to a base64 encoded string.
+func (a *idAttMarshaller) getIdentityAttestation() (string, error) {
+ req, err := createSigv4STSGetCallerIdentityRequest(context.Background(), a.awsConfig)
+ if err != nil {
+ return "", fmt.Errorf("c1-credential-provider: failed to create sigv4 sts get caller identity request: %w", err)
+ }
+
+ anyReq, err := anypb.New(req)
+ if err != nil {
+ return "", fmt.Errorf("c1-credential-provider: failed to create sigv4 sts get caller identity request: %w", err)
+ }
+
+ b, err := proto.Marshal(anyReq)
+ if err != nil {
+ return "", fmt.Errorf("c1-credential-provider: failed to marshal sigv4 sts get caller identity request: %w", err)
+ }
+
+ return base64.RawURLEncoding.EncodeToString(b), nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/config/config.go b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/config/config.go
new file mode 100644
index 00000000..575832b8
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/config/config.go
@@ -0,0 +1,162 @@
+package config
+
+import (
+ "bytes"
+ "context"
+ "crypto/ed25519"
+ "crypto/tls"
+ "crypto/x509"
+ "encoding/base64"
+ "errors"
+ "fmt"
+ "net/url"
+ "os"
+ "strings"
+ "time"
+
+ "github.com/go-jose/go-jose/v4"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials"
+
+ pb_connector_manager "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
+
+ "github.com/conductorone/dpop/pkg/dpop"
+
+ dpop_grpc "github.com/conductorone/dpop/integrations/dpop_grpc"
+ dpop_oauth "github.com/conductorone/dpop/integrations/dpop_oauth2"
+)
+
+var (
+ ErrInvalidClientSecret = errors.New("invalid client secret")
+ ErrInvalidClientID = errors.New("invalid client id")
+ v1SecretTokenIdentifier = []byte("v1")
+)
+
+func GetConnectorConfigServiceClient(ctx context.Context, clientID string, clientSecret string) (pb_connector_manager.ConnectorConfigServiceClient, error) {
+ clientName, tokenHost, err := parseClientID(clientID)
+ if err != nil {
+ return nil, err
+ }
+
+ if envHost, ok := os.LookupEnv("BATON_LAMBDA_TOKEN_HOST"); ok {
+ tokenHost = envHost
+ }
+
+ tokenURL := &url.URL{
+ Scheme: "https",
+ Host: tokenHost,
+ Path: "auth/v1/token",
+ }
+
+ _, priv, err := ed25519.GenerateKey(nil)
+ if err != nil {
+ return nil, fmt.Errorf("get-connector-service-client: failed to generate ed25519: %w", err)
+ }
+
+ jwk := &jose.JSONWebKey{
+ Key: priv,
+ KeyID: "key",
+ Algorithm: string(jose.EdDSA),
+ Use: "sig",
+ }
+
+ clientSecretJWK, err := parseSecret([]byte(clientSecret))
+ if err != nil {
+ return nil, fmt.Errorf("get-connector-service-client: failed to unmarshal client secret: %w", err)
+ }
+
+ proofer, err := dpop.NewProofer(jwk)
+ if err != nil {
+ return nil, fmt.Errorf("get-connector-service-client: failed to create proofer: %w", err)
+ }
+
+ idAttMarshaller, err := NewIdAttMarshaller(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("get-connector-service-client: failed to create claims adjuster: %w", err)
+ }
+ opts := dpop_oauth.WithRequestOption(dpop_oauth.WithCustomMarshaler(idAttMarshaller.Marshal))
+ tokenSource, err := dpop_oauth.NewTokenSource(proofer, tokenURL, clientID, clientSecretJWK, opts)
+ if err != nil {
+ return nil, fmt.Errorf("get-connector-service-client: failed to create token source: %w", err)
+ }
+
+ creds, err := dpop_grpc.NewDPoPCredentials(proofer, tokenSource, tokenHost, []dpop.ProofOption{
+ dpop.WithValidityDuration(time.Minute * 5),
+ dpop.WithProofNowFunc(time.Now),
+ })
+ if err != nil {
+ return nil, fmt.Errorf("get-connector-service-client: failed to create dpop credentials: %w", err)
+ }
+
+ systemCertPool, err := x509.SystemCertPool()
+ if err != nil || systemCertPool == nil {
+ return nil, fmt.Errorf("get-connector-service-client: failed to load system cert pool: %w", err)
+ }
+ transportCreds := credentials.NewTLS(&tls.Config{
+ RootCAs: systemCertPool,
+ MinVersion: tls.VersionTLS12,
+ })
+
+ dialOpts := []grpc.DialOption{
+ grpc.WithTransportCredentials(transportCreds),
+ grpc.WithUserAgent(fmt.Sprintf("%s baton-lambda/%s", clientName, "v0.0.1")),
+ grpc.WithPerRPCCredentials(creds),
+ }
+
+ client, err := grpc.NewClient(tokenHost, dialOpts...)
+ if err != nil {
+ return nil, fmt.Errorf("connector-manager-client: failed to create client: %w", err)
+ }
+
+ return pb_connector_manager.NewConnectorConfigServiceClient(client), nil
+}
+
+func parseClientID(input string) (string, string, error) {
+ // split the input into 2 parts by @
+ items := strings.SplitN(input, "@", 2)
+ if len(items) != 2 {
+ return "", "", ErrInvalidClientID
+ }
+ clientName := items[0]
+
+ // split the right part into 2 parts by /
+ items = strings.SplitN(items[1], "/", 2)
+ if len(items) != 2 {
+ return "", "", ErrInvalidClientID
+ }
+
+ return clientName, items[0], nil
+}
+
+func parseSecret(input []byte) (*jose.JSONWebKey, error) {
+ items := bytes.SplitN(input, []byte(":"), 4)
+ if len(items) != 4 {
+ return nil, ErrInvalidClientSecret
+ }
+
+ if !bytes.Equal(items[2], v1SecretTokenIdentifier) {
+ return nil, ErrInvalidClientSecret
+ }
+
+ jwkData, err := base64.RawURLEncoding.DecodeString(string(items[3]))
+ if err != nil {
+ return nil, ErrInvalidClientSecret
+ }
+
+ npk := &jose.JSONWebKey{}
+ err = npk.UnmarshalJSON(jwkData)
+ if err != nil {
+ return nil, ErrInvalidClientSecret
+ }
+
+ if npk.IsPublic() || !npk.Valid() {
+ return nil, ErrInvalidClientSecret
+ }
+
+ _, ok := npk.Key.(ed25519.PrivateKey)
+ if !ok {
+ return nil, ErrInvalidClientSecret
+ }
+
+ return npk, nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/config/sts.go b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/config/sts.go
new file mode 100644
index 00000000..d52644b7
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/config/sts.go
@@ -0,0 +1,71 @@
+package config
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "net/http"
+ "time"
+
+ "github.com/aws/aws-sdk-go-v2/aws"
+ v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+
+ pb_connector_manager "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
+)
+
+func createSigv4STSGetCallerIdentityRequest(ctx context.Context, cfg *aws.Config) (*pb_connector_manager.Sigv4SignedRequestSTSGetCallerIdentity, error) {
+ credentials, err := cfg.Credentials.Retrieve(ctx)
+ if err != nil {
+ return nil, fmt.Errorf("create-sigv4-sts-get-caller-identity-request: failed to retrieve credentials: %w", err)
+ }
+ region := cfg.Region
+ body := "Action=GetCallerIdentity&Version=2011-06-15"
+ service := "sts"
+ endpoint := fmt.Sprintf("https://sts.%s.amazonaws.com", region)
+ method := "POST"
+
+ reqHeaders := map[string][]string{
+ "Content-Type": {"application/x-www-form-urlencoded; charset=utf-8"},
+ }
+
+ req, err := http.NewRequestWithContext(ctx, method, endpoint, bytes.NewReader([]byte(body)))
+ if err != nil {
+ return nil, fmt.Errorf("create-sigv4-sts-get-caller-identity-request: failed to create request: %w", err)
+ }
+
+ for headerKey, headerValues := range reqHeaders {
+ for _, headerValue := range headerValues {
+ req.Header.Add(headerKey, headerValue)
+ }
+ }
+
+ // Use the AWS SigV4 signer
+ signer := v4.NewSigner(func(options *v4.SignerOptions) {
+ options.DisableHeaderHoisting = true // maybe only applicable to presigned requests
+ })
+
+ // NOTE(morgabra/kans): Expiration is sort of whack, and it appears only s3 respects the expiration header, so we can't actually clamp it down.
+ // It appears anecdotally that most services expire the request after 15 minutes.
+ err = signer.SignHTTP(ctx, credentials, req, sha256AndHexEncode(body), service, region, time.Now())
+ if err != nil {
+ return nil, fmt.Errorf("create-sigv4-sts-get-caller-identity-request: failed to sign request: %w", err)
+ }
+
+ signedHeaders := make([]*pb_connector_manager.SignedHeader, 0)
+ for signedHeaderKey, signedHeaderValues := range req.Header {
+ v := make([]string, len(signedHeaderValues))
+ copy(v, signedHeaderValues)
+ signedHeader := &pb_connector_manager.SignedHeader{
+ Key: signedHeaderKey,
+ Value: v,
+ }
+ signedHeaders = append(signedHeaders, signedHeader)
+ }
+
+ return &pb_connector_manager.Sigv4SignedRequestSTSGetCallerIdentity{
+ Method: method,
+ Endpoint: endpoint,
+ Headers: signedHeaders,
+ Body: []byte(body),
+ }, nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/server.go b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/server.go
new file mode 100644
index 00000000..4c2d5f63
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/server.go
@@ -0,0 +1,310 @@
+package grpc
+
+import (
+ "context"
+ "fmt"
+ "reflect"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ spb "google.golang.org/genproto/googleapis/rpc/status"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/peer"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/anypb"
+
+ pbtransport "github.com/conductorone/baton-sdk/pb/c1/transport/v1"
+)
+
+var ErrIllegalSendHeader = status.Errorf(codes.Internal, "transport: SendHeader called multiple times")
+var ErrIllegalHeaderWrite = status.Errorf(codes.Internal, "transport: SetHeader/SetTrailer called after headers were sent")
+
+type TransportStream struct {
+ mtx sync.Mutex
+
+ response proto.Message
+ status *spb.Status
+
+ methodDesc *grpc.MethodDesc
+ headersSent atomic.Bool
+ headers metadata.MD
+ trailers metadata.MD
+}
+
+func (r *TransportStream) Response() (*Response, error) {
+ if r.status == nil {
+ return nil, status.Errorf(codes.Internal, "error marshalling response: status not set")
+ }
+
+ headers, err := MarshalMetadata(r.headers)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "error marshalling headers: %v", err)
+ }
+ trailers, err := MarshalMetadata(r.trailers)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "error marshalling headers: %v", err)
+ }
+
+ var anyResp *anypb.Any
+ if r.response != nil {
+ anyResp, err = anypb.New(r.response)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "error marshalling response: %v", err)
+ }
+ }
+
+ anyStatus, err := anypb.New(r.status)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "error marshalling status: %v", err)
+ }
+
+ return &Response{
+ msg: &pbtransport.Response{
+ Resp: anyResp,
+ Status: anyStatus,
+ Headers: headers,
+ Trailers: trailers,
+ },
+ }, nil
+}
+
+func (r *TransportStream) Method() string {
+ return r.methodDesc.MethodName
+}
+
+func (r *TransportStream) SetHeader(md metadata.MD) error {
+ if md.Len() == 0 {
+ return nil
+ }
+ if r.headersSent.Load() {
+ return ErrIllegalHeaderWrite
+ }
+ r.mtx.Lock()
+ defer r.mtx.Unlock()
+ r.headers = metadata.Join(r.headers, md)
+ return nil
+}
+
+func (r *TransportStream) SendHeader(md metadata.MD) error {
+ if r.headersSent.Load() {
+ return ErrIllegalSendHeader
+ }
+ r.mtx.Lock()
+ defer r.mtx.Unlock()
+ r.headersSent.Store(true)
+ r.headers = metadata.Join(r.headers, md)
+ return nil
+}
+
+func (r *TransportStream) SetTrailer(md metadata.MD) error {
+ if md.Len() == 0 {
+ return nil
+ }
+ if r.headersSent.Load() {
+ return ErrIllegalHeaderWrite
+ }
+ r.mtx.Lock()
+ defer r.mtx.Unlock()
+ r.trailers = metadata.Join(r.trailers, md)
+ return nil
+}
+
+func (r *TransportStream) SetResponse(resp any) error {
+ if resp == nil {
+ return status.Errorf(codes.Internal, "error setting response: response is nil")
+ }
+ resppb, ok := resp.(proto.Message)
+ if !ok {
+ return status.Errorf(codes.Internal, "error setting response: not a proto.Message")
+ }
+ r.response = resppb
+ return nil
+}
+
+func (r *TransportStream) SetStatus(st *status.Status) {
+ r.status = st.Proto()
+}
+
+func NewTransportStream(method *grpc.MethodDesc) *TransportStream {
+ return &TransportStream{
+ methodDesc: method,
+ headers: metadata.MD{},
+ trailers: metadata.MD{},
+ }
+}
+
+func NewServer(unaryInterceptor grpc.UnaryServerInterceptor,
+) *Server {
+ return &Server{
+ unaryInterceptor: unaryInterceptor,
+ services: make(map[string]*serviceInfo),
+ }
+}
+
+type serviceInfo struct {
+ serviceImpl any
+ methods map[string]*grpc.MethodDesc
+ streams map[string]*grpc.StreamDesc
+ mdata any
+}
+
+type Server struct {
+ mu sync.Mutex
+ unaryInterceptor grpc.UnaryServerInterceptor
+
+ services map[string]*serviceInfo
+}
+
+func MetadataForRequest(req *Request) metadata.MD {
+ rv := metadata.MD{}
+ for k, v := range req.Headers() {
+ rv.Append(k, v...)
+ }
+
+ // https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md
+ // emulate grpc-go's behavior of setting these headers.
+ // TODO(morgabra): what do here?
+ rv.Set("content-type ", "application/grpc+proto")
+ rv.Set(":method", "POST")
+ rv.Set(":path", req.Method())
+ rv.Set(":authority", "localhost")
+ rv.Set(":scheme", "http")
+ return rv
+}
+
+type unknownAddr string
+
+func (l unknownAddr) Network() string {
+ return "unknown"
+}
+
+func (l unknownAddr) String() string {
+ return ""
+}
+
+// TODO(morgabra): The transport impl has to give this to us I suppose.
+func PeerForRequest(req *Request) *peer.Peer {
+ pr := &peer.Peer{
+ Addr: unknownAddr(""),
+ AuthInfo: nil, // If nil, no transport security is being used... which is technically true?
+ }
+
+ return pr
+}
+
+func TimeoutForRequest(req *Request) (time.Duration, bool, error) {
+ v := req.Headers().Get("grpc-timeout")
+ if len(v) > 1 {
+ to, err := decodeTimeout(v[0])
+ if err != nil {
+ return 0, false, status.Errorf(codes.Internal, "malformed grpc-timeout: %v", err)
+ }
+ return to, true, nil
+ }
+ return 0, false, nil
+}
+
+func (s *Server) Handler(ctx context.Context, req *Request) (*Response, error) {
+ serviceName, methodName, err := parseMethod(req.Method())
+ if err != nil {
+ return ErrorResponse(err), nil
+ }
+ service, ok := s.services[serviceName]
+ if !ok {
+ return ErrorResponse(status.Errorf(codes.Unimplemented, "unknown service %v", serviceName)), nil
+ }
+ method, ok := service.methods[methodName]
+ if !ok {
+ return ErrorResponse(status.Errorf(codes.Unimplemented, "unknown method %v for service %v", method, service)), nil
+ }
+
+ md := MetadataForRequest(req)
+ p := PeerForRequest(req)
+ timeout, ok, err := TimeoutForRequest(req)
+ if err != nil {
+ return ErrorResponse(err), nil
+ }
+
+ var timeoutDone context.CancelFunc
+ if ok {
+ ctx, timeoutDone = context.WithTimeout(ctx, timeout)
+ defer timeoutDone()
+ }
+
+ ctx = peer.NewContext(ctx, p)
+ ctx = metadata.NewIncomingContext(ctx, md)
+ stream := NewTransportStream(method)
+ ctx = grpc.NewContextWithServerTransportStream(ctx, stream)
+
+ df := func(v any) error {
+ err := req.UnmarshalRequest(v)
+ if err != nil {
+ return status.Errorf(codes.Internal, "failed to unmarshal request: %v", err)
+ }
+ return nil
+ }
+
+ resp, err := method.Handler(service.serviceImpl, ctx, df, s.unaryInterceptor)
+ if err != nil {
+ appStatus, ok := status.FromError(err)
+ if ok {
+ err = appStatus.Err()
+ } else {
+ // Convert non-status application error to a status error with code
+ // Unknown, but handle context errors specifically.
+ appStatus = status.FromContextError(err)
+ err = appStatus.Err()
+ }
+ return ErrorResponse(err), nil
+ }
+
+ err = stream.SetResponse(resp)
+ if err != nil {
+ return ErrorResponse(err), nil
+ }
+
+ // Everything is OK!
+ // TODO(morgabra): We should maybe allow nil status == OK to save on bytes/serialization?
+ stream.SetStatus(status.New(codes.OK, "OK"))
+ return stream.Response()
+}
+
+// RegisterService registers a service and its implementation to the gRPC
+// server. This is lifted from grpc.Server.
+func (s *Server) RegisterService(sd *grpc.ServiceDesc, ss any) {
+ if ss != nil {
+ ht := reflect.TypeOf(sd.HandlerType).Elem()
+ st := reflect.TypeOf(ss)
+ if !st.Implements(ht) {
+ panic(fmt.Sprintf("grpc: Server.RegisterService found the handler of type %v that does not satisfy %v", st, ht))
+ }
+ }
+ s.register(sd, ss)
+}
+
+func (s *Server) register(sd *grpc.ServiceDesc, ss any) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if _, ok := s.services[sd.ServiceName]; ok {
+ panic(fmt.Sprintf("grpc: Server.RegisterService found duplicate service registration for %q", sd.ServiceName))
+ }
+ info := &serviceInfo{
+ serviceImpl: ss,
+ methods: make(map[string]*grpc.MethodDesc),
+ streams: make(map[string]*grpc.StreamDesc),
+ mdata: sd.Metadata,
+ }
+ for i := range sd.Methods {
+ d := &sd.Methods[i]
+ info.methods[d.MethodName] = d
+ }
+ for i := range sd.Streams {
+ d := &sd.Streams[i]
+ info.streams[d.StreamName] = d
+ }
+ s.services[sd.ServiceName] = info
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/transport.go b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/transport.go
new file mode 100644
index 00000000..29576c5c
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/transport.go
@@ -0,0 +1,110 @@
+package grpc
+
+import (
+ spb "google.golang.org/genproto/googleapis/rpc/status"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/anypb"
+
+ pbtransport "github.com/conductorone/baton-sdk/pb/c1/transport/v1"
+)
+
+type Request struct {
+ msg *pbtransport.Request
+}
+
+func (f *Request) UnmarshalJSON(b []byte) error {
+ f.msg = &pbtransport.Request{}
+ return protojson.Unmarshal(b, f.msg)
+}
+
+func (f *Request) MarshalJSON() ([]byte, error) {
+ return protojson.Marshal(f.msg)
+}
+
+func (f *Request) Method() string {
+ return f.msg.GetMethod()
+}
+
+func (f *Request) UnmarshalRequest(req any) error {
+ reqpb, ok := req.(proto.Message)
+ if !ok {
+ return status.Errorf(codes.Internal, "error unmarshalling request: not a proto.Message")
+ }
+ err := anypb.UnmarshalTo(f.msg.GetReq(), reqpb, proto.UnmarshalOptions{})
+ if err != nil {
+ return status.Errorf(codes.Internal, "error unmarshalling request: %v", err)
+ }
+ return nil
+}
+
+func (f *Request) Headers() metadata.MD {
+ // TODO(morgabra): Memoize this.
+ return UnmarshalMetadata(f.msg.GetHeaders())
+}
+
+func NewRequest(method string, req proto.Message, headers metadata.MD) (*Request, error) {
+ reqAny, err := anypb.New(req)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "error marshalling request: %v", err)
+ }
+ reqHdrs, err := MarshalMetadata(headers)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "error marshalling headers: %v", err)
+ }
+ return &Request{
+ msg: &pbtransport.Request{
+ Method: method,
+ Req: reqAny,
+ Headers: reqHdrs,
+ },
+ }, nil
+}
+
+type Response struct {
+ msg *pbtransport.Response
+}
+
+func (f *Response) UnmarshalJSON(b []byte) error {
+ f.msg = &pbtransport.Response{}
+ return protojson.Unmarshal(b, f.msg)
+}
+
+func (f *Response) MarshalJSON() ([]byte, error) {
+ return protojson.Marshal(f.msg)
+}
+
+func (f *Response) UnmarshalResponse(resp any) error {
+ respb, ok := resp.(proto.Message)
+ if !ok {
+ return status.Errorf(codes.Internal, "error unmarshalling response: not a proto.Message")
+ }
+ err := anypb.UnmarshalTo(f.msg.GetResp(), respb, proto.UnmarshalOptions{})
+ if err != nil {
+ return status.Errorf(codes.Internal, "error unmarshalling request: %v", err)
+ }
+ return nil
+}
+
+func (f *Response) Status() (*status.Status, error) {
+ if f.msg.GetStatus() == nil {
+ return nil, status.Errorf(codes.Internal, "response status not set")
+ }
+ st := &spb.Status{}
+ err := anypb.UnmarshalTo(f.msg.GetStatus(), st, proto.UnmarshalOptions{})
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "error unmarshalling status: %v", err)
+ }
+ return status.FromProto(st), nil
+}
+
+func (f *Response) Headers() metadata.MD {
+ return UnmarshalMetadata(f.msg.GetHeaders())
+}
+
+func (f *Response) Trailers() metadata.MD {
+ return UnmarshalMetadata(f.msg.GetTrailers())
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/util.go b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/util.go
new file mode 100644
index 00000000..f0112657
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/lambda/grpc/util.go
@@ -0,0 +1,155 @@
+package grpc
+
+import (
+ "fmt"
+ "math"
+ "strconv"
+ "strings"
+ "time"
+
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/types/known/anypb"
+ "google.golang.org/protobuf/types/known/structpb"
+
+ pbtransport "github.com/conductorone/baton-sdk/pb/c1/transport/v1"
+)
+
+type timeoutUnit uint8
+
+const (
+ hour timeoutUnit = 'H'
+ minute timeoutUnit = 'M'
+ second timeoutUnit = 'S'
+ millisecond timeoutUnit = 'm'
+ microsecond timeoutUnit = 'u'
+ nanosecond timeoutUnit = 'n'
+)
+
+func timeoutUnitToDuration(u timeoutUnit) (time.Duration, bool) {
+ switch u {
+ case hour:
+ return time.Hour, true
+ case minute:
+ return time.Minute, true
+ case second:
+ return time.Second, true
+ case millisecond:
+ return time.Millisecond, true
+ case microsecond:
+ return time.Microsecond, true
+ case nanosecond:
+ return time.Nanosecond, true
+ default:
+ return 0, false
+ }
+}
+
+// NOTE(morgabra): straight lift of a private function :/.
+func decodeTimeout(s string) (time.Duration, error) {
+ size := len(s)
+ if size < 2 {
+ return 0, fmt.Errorf("transport: timeout string is too short: %q", s)
+ }
+ if size > 9 {
+ // Spec allows for 8 digits plus the unit.
+ return 0, fmt.Errorf("transport: timeout string is too long: %q", s)
+ }
+ unit := timeoutUnit(s[size-1])
+ d, ok := timeoutUnitToDuration(unit)
+ if !ok {
+ return 0, fmt.Errorf("transport: timeout unit is not recognized: %q", s)
+ }
+ t, err := strconv.ParseInt(s[:size-1], 10, 64)
+ if err != nil {
+ return 0, err
+ }
+ const maxHours = math.MaxInt64 / int64(time.Hour)
+ if d == time.Hour && t > maxHours {
+ // This timeout would overflow math.MaxInt64; clamp it.
+ return time.Duration(math.MaxInt64), nil
+ }
+ return d * time.Duration(t), nil
+}
+
+func parseMethod(method string) (string, string, error) {
+ if method != "" && method[0] == '/' {
+ method = method[1:]
+ }
+ pos := strings.LastIndex(method, "/")
+ if pos == -1 {
+ return "", "", status.Errorf(codes.Unimplemented, "malformed method name: %q", method)
+ }
+ return method[:pos], method[pos+1:], nil
+}
+
+// Convert accepts a list of T and returns a list of R based on the input func.
+func Convert[T any, R any](slice []T, f func(in T) R) []R {
+ ret := make([]R, 0, len(slice))
+ for _, t := range slice {
+ ret = append(ret, f(t))
+ }
+ return ret
+}
+
+func MarshalMetadata(md metadata.MD) (*structpb.Struct, error) {
+ x := &structpb.Struct{Fields: make(map[string]*structpb.Value, len(md))}
+ for k, v := range md {
+ lv, err := structpb.NewList(Convert(v, func(in string) any { return in }))
+ if err != nil {
+ return nil, err
+ }
+ x.Fields[k] = structpb.NewListValue(lv)
+ }
+ return x, nil
+}
+
+// UnmarshalMetadata converts a *structpb.Struct to a metadata.MD.
+// Only keys with []string values are converted.
+// Empty string values are ignored.
+func UnmarshalMetadata(s *structpb.Struct) metadata.MD {
+ md := make(metadata.MD, len(s.Fields))
+ for k, v := range s.Fields {
+ lv := v.GetListValue()
+ if lv == nil {
+ continue
+ }
+ values := make([]string, 0, len(lv.GetValues()))
+ for _, sval := range lv.GetValues() {
+ val := sval.GetStringValue()
+ if val != "" {
+ values = append(values, val)
+ }
+ }
+ md.Append(k, values...)
+ }
+ return md
+}
+
+// ErrorResponse converts a given error to a status.Status and returns a *pbtransport.Response.
+// status.FromError(err) must unwrap a status.Status for this to work - all other errors are converted
+// to grpc codes.Unknown errors.
+func ErrorResponse(err error) *Response {
+ st, ok := status.FromError(err)
+ if !ok {
+ st = status.Newf(codes.Unknown, "unknown error: %s", err)
+ }
+ spb := st.Proto()
+ if spb == nil {
+ st = status.Newf(codes.Unknown, "unknown error: %s", err)
+ spb = st.Proto()
+ }
+ anyst, err := anypb.New(spb)
+ if err != nil {
+ panic(fmt.Errorf("server: unable to serialize status: %w", err))
+ }
+ return &Response{
+ msg: &pbtransport.Response{
+ Resp: nil,
+ Status: anyst,
+ Headers: nil,
+ Trailers: nil,
+ },
+ }
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/provisioner/provisioner.go b/vendor/github.com/conductorone/baton-sdk/pkg/provisioner/provisioner.go
index 55895536..653602d3 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/provisioner/provisioner.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/provisioner/provisioner.go
@@ -5,6 +5,7 @@ import (
"errors"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.opentelemetry.io/otel"
"go.uber.org/zap"
"google.golang.org/protobuf/types/known/structpb"
@@ -17,6 +18,8 @@ import (
"github.com/conductorone/baton-sdk/pkg/types"
)
+var tracer = otel.Tracer("baton-sdk/pkg.provisioner")
+
type Provisioner struct {
dbPath string
connector types.ConnectorClient
@@ -66,6 +69,9 @@ func makeCrypto(ctx context.Context) ([]byte, *v2.CredentialOptions, []*v2.Encry
}
func (p *Provisioner) Run(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "Provisioner.Run")
+ defer span.End()
+
switch {
case p.revokeGrantID != "":
return p.revoke(ctx)
@@ -83,6 +89,9 @@ func (p *Provisioner) Run(ctx context.Context) error {
}
func (p *Provisioner) loadStore(ctx context.Context) (connectorstore.Reader, error) {
+ ctx, span := tracer.Start(ctx, "Provisioner.loadStore")
+ defer span.End()
+
if p.store != nil {
return p.store, nil
}
@@ -105,6 +114,9 @@ func (p *Provisioner) loadStore(ctx context.Context) (connectorstore.Reader, err
}
func (p *Provisioner) Close(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "Provisioner.Close")
+ defer span.End()
+
var err error
if p.store != nil {
storeErr := p.store.Close()
@@ -130,6 +142,9 @@ func (p *Provisioner) Close(ctx context.Context) error {
}
func (p *Provisioner) grant(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "Provisioner.grant")
+ defer span.End()
+
store, err := p.loadStore(ctx)
if err != nil {
return err
@@ -174,6 +189,9 @@ func (p *Provisioner) grant(ctx context.Context) error {
}
func (p *Provisioner) revoke(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "Provisioner.revoke")
+ defer span.End()
+
store, err := p.loadStore(ctx)
if err != nil {
return err
@@ -225,6 +243,9 @@ func (p *Provisioner) revoke(ctx context.Context) error {
}
func (p *Provisioner) createAccount(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "Provisioner.createAccount")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
var emails []*v2.AccountInfo_Email
if p.createAccountEmail != "" {
@@ -258,6 +279,9 @@ func (p *Provisioner) createAccount(ctx context.Context) error {
}
func (p *Provisioner) deleteResource(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "Provisioner.deleteResource")
+ defer span.End()
+
_, err := p.connector.DeleteResource(ctx, &v2.DeleteResourceRequest{
ResourceId: &v2.ResourceId{
Resource: p.deleteResourceID,
@@ -271,6 +295,9 @@ func (p *Provisioner) deleteResource(ctx context.Context) error {
}
func (p *Provisioner) rotateCredentials(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "Provisioner.rotateCredentials")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
_, opts, config, err := makeCrypto(ctx)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/grpc.go b/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/grpc.go
index 0483b960..e288b995 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/grpc.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/ratelimit/grpc.go
@@ -9,7 +9,6 @@ import (
connectorV2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
ratelimitV1 "github.com/conductorone/baton-sdk/pb/c1/ratelimit/v1"
"github.com/conductorone/baton-sdk/pkg/annotations"
- "github.com/golang/protobuf/ptypes/any"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
"go.uber.org/zap"
"google.golang.org/grpc"
@@ -180,7 +179,7 @@ func reportRatelimit(
token string,
status ratelimitV1.RateLimitDescription_Status,
descriptors *ratelimitV1.RateLimitDescriptors,
- anys []*any.Any,
+ anys []*anypb.Any,
) error {
l := ctxzap.Extract(ctx)
annos := annotations.Annotations(anys)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
index 424d857c..14f682e9 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/sdk/version.go
@@ -1,3 +1,3 @@
package sdk
-const Version = "v0.2.64"
+const Version = "v0.2.83"
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sync/state.go b/vendor/github.com/conductorone/baton-sdk/pkg/sync/state.go
index df651a4a..35336394 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/sync/state.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/sync/state.go
@@ -27,6 +27,8 @@ type State interface {
Unmarshal(input string) error
NeedsExpansion() bool
SetNeedsExpansion()
+ HasExternalResourcesGrants() bool
+ SetHasExternalResourcesGrants()
}
// ActionOp represents a sync operation.
@@ -45,6 +47,8 @@ func (s ActionOp) String() string {
return "list-entitlements"
case SyncGrantsOp:
return "list-grants"
+ case SyncExternalResourcesOp:
+ return "list-external-resources"
case SyncAssetsOp:
return "fetch-assets"
case SyncGrantExpansionOp:
@@ -88,6 +92,8 @@ func newActionOp(str string) ActionOp {
return SyncAssetsOp
case SyncGrantExpansionOp.String():
return SyncGrantExpansionOp
+ case SyncExternalResourcesOp.String():
+ return SyncExternalResourcesOp
default:
return UnknownOp
}
@@ -101,6 +107,7 @@ const (
SyncEntitlementsOp
ListResourcesForEntitlementsOp
SyncGrantsOp
+ SyncExternalResourcesOp
SyncAssetsOp
SyncGrantExpansionOp
)
@@ -117,20 +124,22 @@ type Action struct {
// state is an object used for tracking the current status of a connector sync. It operates like a stack.
type state struct {
- mtx sync.RWMutex
- actions []Action
- currentAction *Action
- entitlementGraph *expand.EntitlementGraph
- needsExpansion bool
+ mtx sync.RWMutex
+ actions []Action
+ currentAction *Action
+ entitlementGraph *expand.EntitlementGraph
+ needsExpansion bool
+ hasExternalResourceGrants bool
}
// serializedToken is used to serialize the token to JSON. This separate object is used to avoid having exported fields
// on the object used externally. We should interface this, probably.
type serializedToken struct {
- Actions []Action `json:"actions"`
- CurrentAction *Action `json:"current_action"`
- NeedsExpansion bool `json:"needs_expansion"`
- EntitlementGraph *expand.EntitlementGraph `json:"entitlement_graph"`
+ Actions []Action `json:"actions"`
+ CurrentAction *Action `json:"current_action"`
+ NeedsExpansion bool `json:"needs_expansion"`
+ EntitlementGraph *expand.EntitlementGraph `json:"entitlement_graph"`
+ HasExternalResourceGrants bool `json:"has_external_resource_grants"`
}
// push adds a new action to the stack. If there is no current state, the action is directly set to current, else
@@ -199,6 +208,7 @@ func (st *state) Unmarshal(input string) error {
st.actions = token.Actions
st.currentAction = token.CurrentAction
st.needsExpansion = token.NeedsExpansion
+ st.hasExternalResourceGrants = token.HasExternalResourceGrants
} else {
st.actions = nil
st.entitlementGraph = nil
@@ -214,10 +224,11 @@ func (st *state) Marshal() (string, error) {
defer st.mtx.RUnlock()
data, err := json.Marshal(serializedToken{
- Actions: st.actions,
- CurrentAction: st.currentAction,
- NeedsExpansion: st.needsExpansion,
- EntitlementGraph: st.entitlementGraph,
+ Actions: st.actions,
+ CurrentAction: st.currentAction,
+ NeedsExpansion: st.needsExpansion,
+ EntitlementGraph: st.entitlementGraph,
+ HasExternalResourceGrants: st.hasExternalResourceGrants,
})
if err != nil {
return "", err
@@ -262,6 +273,14 @@ func (st *state) SetNeedsExpansion() {
st.needsExpansion = true
}
+func (st *state) HasExternalResourcesGrants() bool {
+ return st.hasExternalResourceGrants
+}
+
+func (st *state) SetHasExternalResourcesGrants() {
+ st.hasExternalResourceGrants = true
+}
+
// PageToken returns the page token for the current action.
func (st *state) PageToken(ctx context.Context) string {
c := st.Current()
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go b/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go
index 9502c18d..58bef7e5 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/sync/syncer.go
@@ -10,9 +10,16 @@ import (
"math"
"os"
"strconv"
+ "strings"
"time"
+ "github.com/conductorone/baton-sdk/pkg/dotc1z"
"github.com/conductorone/baton-sdk/pkg/sync/expand"
+ batonGrant "github.com/conductorone/baton-sdk/pkg/types/grant"
+ "github.com/conductorone/baton-sdk/pkg/types/resource"
+ mapset "github.com/deckarep/golang-set/v2"
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/attribute"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
"go.uber.org/zap"
@@ -29,13 +36,14 @@ import (
"github.com/conductorone/baton-sdk/pkg/types"
)
-const maxDepth = 8
+var tracer = otel.Tracer("baton-sdk/sync")
+const defaultMaxDepth int64 = 20
+
+var maxDepth, _ = strconv.ParseInt(os.Getenv("BATON_GRAPH_EXPAND_MAX_DEPTH"), 10, 64)
var dontFixCycles, _ = strconv.ParseBool(os.Getenv("BATON_DONT_FIX_CYCLES"))
-var (
- ErrSyncNotComplete = fmt.Errorf("sync exited without finishing")
-)
+var ErrSyncNotComplete = fmt.Errorf("sync exited without finishing")
type Syncer interface {
Sync(context.Context) error
@@ -80,12 +88,22 @@ func (p *ProgressCounts) LogResourcesProgress(ctx context.Context, resourceType
func (p *ProgressCounts) LogEntitlementsProgress(ctx context.Context, resourceType string) {
entitlementsProgress := p.EntitlementsProgress[resourceType]
resources := p.Resources[resourceType]
+
+ l := ctxzap.Extract(ctx)
if resources == 0 {
+ // if resuming sync, resource counts will be zero, so don't calculate percentage. just log every 10 seconds.
+ if time.Since(p.LastEntitlementLog[resourceType]) > maxLogFrequency {
+ l.Info("Syncing entitlements",
+ zap.String("resource_type_id", resourceType),
+ zap.Int("synced", entitlementsProgress),
+ )
+ p.LastEntitlementLog[resourceType] = time.Now()
+ }
return
}
+
percentComplete := (entitlementsProgress * 100) / resources
- l := ctxzap.Extract(ctx)
switch {
case entitlementsProgress > resources:
l.Error("more entitlement resources than resources",
@@ -114,12 +132,22 @@ func (p *ProgressCounts) LogEntitlementsProgress(ctx context.Context, resourceTy
func (p *ProgressCounts) LogGrantsProgress(ctx context.Context, resourceType string) {
grantsProgress := p.GrantsProgress[resourceType]
resources := p.Resources[resourceType]
+
+ l := ctxzap.Extract(ctx)
if resources == 0 {
+ // if resuming sync, resource counts will be zero, so don't calculate percentage. just log every 10 seconds.
+ if time.Since(p.LastGrantLog[resourceType]) > maxLogFrequency {
+ l.Info("Syncing grants",
+ zap.String("resource_type_id", resourceType),
+ zap.Int("synced", grantsProgress),
+ )
+ p.LastGrantLog[resourceType] = time.Now()
+ }
return
}
+
percentComplete := (grantsProgress * 100) / resources
- l := ctxzap.Extract(ctx)
switch {
case grantsProgress > resources:
l.Error("more grant resources than resources",
@@ -158,18 +186,21 @@ func (p *ProgressCounts) LogExpandProgress(ctx context.Context, actions []*expan
// syncer orchestrates a connector sync and stores the results using the provided datasource.Writer.
type syncer struct {
- c1zManager manager.Manager
- c1zPath string
- store connectorstore.Writer
- connector types.ConnectorClient
- state State
- runDuration time.Duration
- transitionHandler func(s Action)
- progressHandler func(p *Progress)
- tmpDir string
- skipFullSync bool
- lastCheckPointTime time.Time
- counts *ProgressCounts
+ c1zManager manager.Manager
+ c1zPath string
+ externalResourceC1ZPath string
+ externalResourceEntitlementIdFilter string
+ store connectorstore.Writer
+ externalResourceReader connectorstore.Reader
+ connector types.ConnectorClient
+ state State
+ runDuration time.Duration
+ transitionHandler func(s Action)
+ progressHandler func(p *Progress)
+ tmpDir string
+ skipFullSync bool
+ lastCheckPointTime time.Time
+ counts *ProgressCounts
skipEGForResourceType map[string]bool
}
@@ -177,10 +208,13 @@ type syncer struct {
const minCheckpointInterval = 10 * time.Second
// Checkpoint marshals the current state and stores it.
-func (s *syncer) Checkpoint(ctx context.Context) error {
- if !s.lastCheckPointTime.IsZero() && time.Since(s.lastCheckPointTime) < minCheckpointInterval {
+func (s *syncer) Checkpoint(ctx context.Context, force bool) error {
+ if !force && !s.lastCheckPointTime.IsZero() && time.Since(s.lastCheckPointTime) < minCheckpointInterval {
return nil
}
+ ctx, span := tracer.Start(ctx, "syncer.Checkpoint")
+ defer span.End()
+
s.lastCheckPointTime = time.Now()
checkpoint, err := s.state.Marshal()
if err != nil {
@@ -211,6 +245,9 @@ func (s *syncer) handleProgress(ctx context.Context, a *Action, c int) {
var attempts = 0
func shouldWaitAndRetry(ctx context.Context, err error) bool {
+ ctx, span := tracer.Start(ctx, "syncer.shouldWaitAndRetry")
+ defer span.End()
+
if err == nil {
attempts = 0
return true
@@ -278,6 +315,9 @@ func isWarning(ctx context.Context, err error) bool {
// an action is completed, it is popped off of the queue. Before processing each action, we checkpoint the state object
// into the datasource. This allows for graceful resumes if a sync is interrupted.
func (s *syncer) Sync(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.Sync")
+ defer span.End()
+
if s.skipFullSync {
return s.SkipSync(ctx)
}
@@ -308,6 +348,8 @@ func (s *syncer) Sync(ctx context.Context) error {
return err
}
+ span.SetAttributes(attribute.String("sync_id", syncID))
+
if newSync {
l.Debug("beginning new sync", zap.String("sync_id", syncID))
} else {
@@ -328,7 +370,7 @@ func (s *syncer) Sync(ctx context.Context) error {
var warnings []error
for s.state.Current() != nil {
- err = s.Checkpoint(ctx)
+ err = s.Checkpoint(ctx, false)
if err != nil {
return err
}
@@ -356,15 +398,19 @@ func (s *syncer) Sync(ctx context.Context) error {
switch stateAction.Op {
case InitOp:
s.state.FinishAction(ctx)
+
// FIXME(jirwin): Disabling syncing assets for now
// s.state.PushAction(ctx, Action{Op: SyncAssetsOp})
s.state.PushAction(ctx, Action{Op: SyncGrantExpansionOp})
+ if s.externalResourceReader != nil {
+ s.state.PushAction(ctx, Action{Op: SyncExternalResourcesOp})
+ }
s.state.PushAction(ctx, Action{Op: SyncGrantsOp})
s.state.PushAction(ctx, Action{Op: SyncEntitlementsOp})
s.state.PushAction(ctx, Action{Op: SyncResourcesOp})
s.state.PushAction(ctx, Action{Op: SyncResourceTypesOp})
- err = s.Checkpoint(ctx)
+ err = s.Checkpoint(ctx, true)
if err != nil {
return err
}
@@ -410,6 +456,12 @@ func (s *syncer) Sync(ctx context.Context) error {
}
continue
+ case SyncExternalResourcesOp:
+ err = s.SyncExternalResources(ctx)
+ if !shouldWaitAndRetry(ctx, err) {
+ return err
+ }
+ continue
case SyncAssetsOp:
err = s.SyncAssets(ctx)
if !shouldWaitAndRetry(ctx, err) {
@@ -434,6 +486,12 @@ func (s *syncer) Sync(ctx context.Context) error {
}
}
+ // Force a checkpoint to clear sync_token.
+ err = s.Checkpoint(ctx, true)
+ if err != nil {
+ return err
+ }
+
err = s.store.EndSync(ctx)
if err != nil {
return err
@@ -458,6 +516,9 @@ func (s *syncer) Sync(ctx context.Context) error {
}
func (s *syncer) SkipSync(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.SkipSync")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
l.Info("skipping sync")
@@ -499,6 +560,9 @@ func (s *syncer) SkipSync(ctx context.Context) error {
// SyncResourceTypes calls the ListResourceType() connector endpoint and persists the results in to the datasource.
func (s *syncer) SyncResourceTypes(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.SyncResourceTypes")
+ defer span.End()
+
pageToken := s.state.PageToken(ctx)
if pageToken == "" {
@@ -540,6 +604,9 @@ func (s *syncer) SyncResourceTypes(ctx context.Context) error {
// getSubResources fetches the sub resource types from a resources' annotations.
func (s *syncer) getSubResources(ctx context.Context, parent *v2.Resource) error {
+ ctx, span := tracer.Start(ctx, "syncer.getSubResources")
+ defer span.End()
+
for _, a := range parent.Annotations {
if a.MessageIs((*v2.ChildResourceType)(nil)) {
crt := &v2.ChildResourceType{}
@@ -564,6 +631,9 @@ func (s *syncer) getSubResources(ctx context.Context, parent *v2.Resource) error
// SyncResources handles fetching all of the resources from the connector given the provided resource types. For each
// resource, we gather any child resource types it may emit, and traverse the resource tree.
func (s *syncer) SyncResources(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.SyncResources")
+ defer span.End()
+
if s.state.Current().ResourceTypeID == "" {
pageToken := s.state.PageToken(ctx)
@@ -598,6 +668,9 @@ func (s *syncer) SyncResources(ctx context.Context) error {
// syncResources fetches a given resource from the connector, and returns a slice of new child resources to fetch.
func (s *syncer) syncResources(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.syncResources")
+ defer span.End()
+
req := &v2.ResourcesServiceListResourcesRequest{
ResourceTypeId: s.state.ResourceTypeID(ctx),
PageToken: s.state.PageToken(ctx),
@@ -670,6 +743,9 @@ func (s *syncer) syncResources(ctx context.Context) error {
}
func (s *syncer) validateResourceTraits(ctx context.Context, r *v2.Resource) error {
+ ctx, span := tracer.Start(ctx, "syncer.validateResourceTraits")
+ defer span.End()
+
resourceTypeResponse, err := s.store.GetResourceType(ctx, &reader_v2.ResourceTypesReaderServiceGetResourceTypeRequest{
ResourceTypeId: r.Id.ResourceType,
})
@@ -713,6 +789,9 @@ func (s *syncer) validateResourceTraits(ctx context.Context, r *v2.Resource) err
// shouldSkipEntitlementsAndGrants determines if we should sync entitlements for a given resource. We cache the
// result of this function for each resource type to avoid constant lookups in the database.
func (s *syncer) shouldSkipEntitlementsAndGrants(ctx context.Context, r *v2.Resource) (bool, error) {
+ ctx, span := tracer.Start(ctx, "syncer.shouldSkipEntitlementsAndGrants")
+ defer span.End()
+
// We've checked this resource type, so we can return what we have cached directly.
if skip, ok := s.skipEGForResourceType[r.Id.ResourceType]; ok {
return skip, nil
@@ -736,6 +815,9 @@ func (s *syncer) shouldSkipEntitlementsAndGrants(ctx context.Context, r *v2.Reso
// SyncEntitlements fetches the entitlements from the connector. It first lists each resource from the datastore,
// and pushes an action to fetch the entitlements for each resource.
func (s *syncer) SyncEntitlements(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.SyncEntitlements")
+ defer span.End()
+
if s.state.ResourceTypeID(ctx) == "" && s.state.ResourceID(ctx) == "" {
pageToken := s.state.PageToken(ctx)
@@ -786,6 +868,9 @@ func (s *syncer) SyncEntitlements(ctx context.Context) error {
// syncEntitlementsForResource fetches the entitlements for a specific resource from the connector.
func (s *syncer) syncEntitlementsForResource(ctx context.Context, resourceID *v2.ResourceId) error {
+ ctx, span := tracer.Start(ctx, "syncer.syncEntitlementsForResource")
+ defer span.End()
+
resourceResponse, err := s.store.GetResource(ctx, &reader_v2.ResourcesReaderServiceGetResourceRequest{
ResourceId: resourceID,
})
@@ -828,6 +913,9 @@ func (s *syncer) syncEntitlementsForResource(ctx context.Context, resourceID *v2
// include references to an asset. For each AssetRef, we then call GetAsset on the connector and stream the asset from the connector.
// Once we have the entire asset, we put it in the database.
func (s *syncer) syncAssetsForResource(ctx context.Context, resourceID *v2.ResourceId) error {
+ ctx, span := tracer.Start(ctx, "syncer.syncAssetsForResource")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
resourceResponse, err := s.store.GetResource(ctx, &reader_v2.ResourcesReaderServiceGetResourceRequest{
ResourceId: resourceID,
@@ -931,6 +1019,9 @@ func (s *syncer) syncAssetsForResource(ctx context.Context, resourceID *v2.Resou
// SyncAssets iterates each resource in the data store, and adds an action to fetch all of the assets for that resource.
func (s *syncer) SyncAssets(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.SyncAssets")
+ defer span.End()
+
if s.state.ResourceTypeID(ctx) == "" && s.state.ResourceID(ctx) == "" {
pageToken := s.state.PageToken(ctx)
@@ -973,9 +1064,11 @@ func (s *syncer) SyncAssets(ctx context.Context) error {
return nil
}
-// SyncGrantExpansion
-// TODO(morgabra) Docs.
+// SyncGrantExpansion documentation pending.
func (s *syncer) SyncGrantExpansion(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.SyncGrantExpansion")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
entitlementGraph := s.state.EntitlementGraph(ctx)
if !entitlementGraph.Loaded {
@@ -1076,8 +1169,8 @@ func (s *syncer) SyncGrantExpansion(ctx context.Context) error {
l.Warn(
"cycle detected in entitlement graph",
zap.Any("cycle", cycle),
- zap.Any("initial graph", entitlementGraph),
)
+ l.Debug("initial graph", zap.Any("initial graph", entitlementGraph))
if dontFixCycles {
return fmt.Errorf("cycles detected in entitlement graph")
}
@@ -1100,6 +1193,9 @@ func (s *syncer) SyncGrantExpansion(ctx context.Context) error {
// SyncGrants fetches the grants for each resource from the connector. It iterates each resource
// from the datastore, and pushes a new action to sync the grants for each individual resource.
func (s *syncer) SyncGrants(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.SyncGrants")
+ defer span.End()
+
if s.state.ResourceTypeID(ctx) == "" && s.state.ResourceID(ctx) == "" {
pageToken := s.state.PageToken(ctx)
@@ -1153,6 +1249,9 @@ type latestSyncFetcher interface {
}
func (s *syncer) fetchResourceForPreviousSync(ctx context.Context, resourceID *v2.ResourceId) (string, *v2.ETag, error) {
+ ctx, span := tracer.Start(ctx, "syncer.fetchResourceForPreviousSync")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
var previousSyncID string
@@ -1210,6 +1309,9 @@ func (s *syncer) fetchEtaggedGrantsForResource(
prevSyncID string,
grantResponse *v2.GrantsServiceListGrantsResponse,
) ([]*v2.Grant, bool, error) {
+ ctx, span := tracer.Start(ctx, "syncer.fetchEtaggedGrantsForResource")
+ defer span.End()
+
respAnnos := annotations.Annotations(grantResponse.GetAnnotations())
etagMatch := &v2.ETagMatch{}
hasMatch, err := respAnnos.Pick(etagMatch)
@@ -1269,6 +1371,9 @@ func (s *syncer) fetchEtaggedGrantsForResource(
// syncGrantsForResource fetches the grants for a specific resource from the connector.
func (s *syncer) syncGrantsForResource(ctx context.Context, resourceID *v2.ResourceId) error {
+ ctx, span := tracer.Start(ctx, "syncer.syncGrantsForResource")
+ defer span.End()
+
resourceResponse, err := s.store.GetResource(ctx, &reader_v2.ResourcesReaderServiceGetResourceRequest{
ResourceId: resourceID,
})
@@ -1314,6 +1419,9 @@ func (s *syncer) syncGrantsForResource(ctx context.Context, resourceID *v2.Resou
if grantAnnos.Contains(&v2.GrantExpandable{}) {
s.state.SetNeedsExpansion()
}
+ if grantAnnos.Contains(&v2.ExternalResourceMatchAll{}) || grantAnnos.Contains(&v2.ExternalResourceMatch{}) {
+ s.state.SetHasExternalResourcesGrants()
+ }
}
err = s.store.PutGrants(ctx, grants...)
if err != nil {
@@ -1364,7 +1472,536 @@ func (s *syncer) syncGrantsForResource(ctx context.Context, resourceID *v2.Resou
return nil
}
+func (s *syncer) SyncExternalResources(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.SyncExternalResources")
+ defer span.End()
+
+ l := ctxzap.Extract(ctx)
+ l.Info("Syncing external resources")
+
+ if s.externalResourceEntitlementIdFilter != "" {
+ return s.SyncExternalResourcesWithGrantToEntitlement(ctx, s.externalResourceEntitlementIdFilter)
+ } else {
+ return s.SyncExternalResourcesUsersAndGroups(ctx)
+ }
+}
+
+func (s *syncer) SyncExternalResourcesWithGrantToEntitlement(ctx context.Context, entitlementId string) error {
+ ctx, span := tracer.Start(ctx, "syncer.SyncExternalResourcesWithGrantToEntitlement")
+ defer span.End()
+
+ l := ctxzap.Extract(ctx)
+ l.Info("Syncing external baton resources with grants to entitlement...")
+
+ skipEGForResourceType := make(map[string]bool)
+
+ filterEntitlement, err := s.externalResourceReader.GetEntitlement(ctx, &reader_v2.EntitlementsReaderServiceGetEntitlementRequest{
+ EntitlementId: entitlementId,
+ })
+ if err != nil {
+ return err
+ }
+
+ grants, err := s.listExternalGrantsForEntitlement(ctx, filterEntitlement.GetEntitlement())
+ if err != nil {
+ return err
+ }
+
+ ents := make([]*v2.Entitlement, 0)
+ principals := make([]*v2.Resource, 0)
+ resourceTypes := make([]*v2.ResourceType, 0)
+ resourceTypeIDs := mapset.NewSet[string]()
+ resourceIDs := make(map[string]*v2.ResourceId)
+
+ grantsForEnts := make([]*v2.Grant, 0)
+
+ for _, g := range grants {
+ resourceTypeIDs.Add(g.Principal.Id.ResourceType)
+ resourceIDs[g.Principal.Id.Resource] = g.Principal.Id
+ }
+
+ for _, resourceTypeId := range resourceTypeIDs.ToSlice() {
+ resourceTypeResp, err := s.externalResourceReader.GetResourceType(ctx, &reader_v2.ResourceTypesReaderServiceGetResourceTypeRequest{ResourceTypeId: resourceTypeId})
+ if err != nil {
+ return err
+ }
+ // Should we error or skip if this is not user or group?
+ for _, t := range resourceTypeResp.ResourceType.Traits {
+ if t == v2.ResourceType_TRAIT_USER || t == v2.ResourceType_TRAIT_GROUP {
+ resourceTypes = append(resourceTypes, resourceTypeResp.ResourceType)
+ continue
+ }
+ }
+
+ rtAnnos := annotations.Annotations(resourceTypeResp.ResourceType.Annotations)
+ skipEntitlements := rtAnnos.Contains(&v2.SkipEntitlementsAndGrants{})
+ skipEGForResourceType[resourceTypeResp.ResourceType.Id] = skipEntitlements
+ }
+
+ for _, resourceId := range resourceIDs {
+ resourceResp, err := s.externalResourceReader.GetResource(ctx, &reader_v2.ResourcesReaderServiceGetResourceRequest{ResourceId: resourceId})
+ if err != nil {
+ return err
+ }
+ resourceVal := resourceResp.GetResource()
+ resourceAnnos := annotations.Annotations(resourceVal.GetAnnotations())
+ batonID := &v2.BatonID{}
+ resourceAnnos.Update(batonID)
+ resourceVal.Annotations = resourceAnnos
+ principals = append(principals, resourceVal)
+ }
+
+ for _, principal := range principals {
+ skipEnts := skipEGForResourceType[principal.Id.ResourceType]
+ if skipEnts {
+ continue
+ }
+ resourceEnts, err := s.listExternalEntitlementsForResource(ctx, principal)
+ if err != nil {
+ return err
+ }
+ ents = append(ents, resourceEnts...)
+ }
+
+ for _, ent := range ents {
+ grantsForEnt, err := s.listExternalGrantsForEntitlement(ctx, ent)
+ if err != nil {
+ return err
+ }
+ grantsForEnts = append(grantsForEnts, grantsForEnt...)
+ }
+
+ err = s.store.PutResourceTypes(ctx, resourceTypes...)
+ if err != nil {
+ return err
+ }
+
+ err = s.store.PutResources(ctx, principals...)
+ if err != nil {
+ return err
+ }
+
+ err = s.store.PutEntitlements(ctx, ents...)
+ if err != nil {
+ return err
+ }
+
+ err = s.store.PutGrants(ctx, grantsForEnts...)
+ if err != nil {
+ return err
+ }
+
+ l.Info("Synced external resources for entitlement",
+ zap.Int("resource_type_count", len(resourceTypes)),
+ zap.Int("resource_count", len(principals)),
+ zap.Int("entitlement_count", len(ents)),
+ zap.Int("grant_count", len(grantsForEnts)),
+ )
+
+ err = s.processGrantsWithExternalPrincipals(ctx, principals)
+ if err != nil {
+ return err
+ }
+
+ s.state.FinishAction(ctx)
+
+ return nil
+}
+
+func (s *syncer) SyncExternalResourcesUsersAndGroups(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.SyncExternalResourcesUsersAndGroups")
+ defer span.End()
+
+ l := ctxzap.Extract(ctx)
+ l.Info("Syncing external resources for users and groups...")
+
+ skipEGForResourceType := make(map[string]bool)
+
+ resourceTypes, err := s.listExternalResourceTypes(ctx)
+ if err != nil {
+ return err
+ }
+
+ userAndGroupResourceTypes := make([]*v2.ResourceType, 0)
+ ents := make([]*v2.Entitlement, 0)
+ principals := make([]*v2.Resource, 0)
+ grantsForEnts := make([]*v2.Grant, 0)
+ for _, rt := range resourceTypes {
+ for _, t := range rt.Traits {
+ if t == v2.ResourceType_TRAIT_USER || t == v2.ResourceType_TRAIT_GROUP {
+ userAndGroupResourceTypes = append(userAndGroupResourceTypes, rt)
+ continue
+ }
+ }
+ }
+
+ for _, rt := range userAndGroupResourceTypes {
+ rtAnnos := annotations.Annotations(rt.Annotations)
+ skipEntitlements := rtAnnos.Contains(&v2.SkipEntitlementsAndGrants{})
+ skipEGForResourceType[rt.Id] = skipEntitlements
+
+ resourceListResp, err := s.listExternalResourcesForResourceType(ctx, rt.Id)
+ if err != nil {
+ return err
+ }
+
+ for _, resourceVal := range resourceListResp {
+ resourceAnnos := annotations.Annotations(resourceVal.GetAnnotations())
+ batonID := &v2.BatonID{}
+ resourceAnnos.Update(batonID)
+ resourceVal.Annotations = resourceAnnos
+ principals = append(principals, resourceVal)
+ }
+ }
+
+ for _, principal := range principals {
+ skipEnts := skipEGForResourceType[principal.Id.ResourceType]
+ if skipEnts {
+ continue
+ }
+ resourceEnts, err := s.listExternalEntitlementsForResource(ctx, principal)
+ if err != nil {
+ return err
+ }
+ ents = append(ents, resourceEnts...)
+ }
+
+ for _, ent := range ents {
+ grantsForEnt, err := s.listExternalGrantsForEntitlement(ctx, ent)
+ if err != nil {
+ return err
+ }
+ grantsForEnts = append(grantsForEnts, grantsForEnt...)
+ }
+
+ err = s.store.PutResourceTypes(ctx, userAndGroupResourceTypes...)
+ if err != nil {
+ return err
+ }
+
+ err = s.store.PutResources(ctx, principals...)
+ if err != nil {
+ return err
+ }
+
+ err = s.store.PutEntitlements(ctx, ents...)
+ if err != nil {
+ return err
+ }
+
+ err = s.store.PutGrants(ctx, grantsForEnts...)
+ if err != nil {
+ return err
+ }
+
+ l.Info("Synced external resources",
+ zap.Int("resource_type_count", len(userAndGroupResourceTypes)),
+ zap.Int("resource_count", len(principals)),
+ zap.Int("entitlement_count", len(ents)),
+ zap.Int("grant_count", len(grantsForEnts)),
+ )
+
+ err = s.processGrantsWithExternalPrincipals(ctx, principals)
+ if err != nil {
+ return err
+ }
+
+ s.state.FinishAction(ctx)
+
+ return nil
+}
+
+func (s *syncer) listExternalResourcesForResourceType(ctx context.Context, resourceTypeId string) ([]*v2.Resource, error) {
+ resources := make([]*v2.Resource, 0)
+ pageToken := ""
+ for {
+ resourceResp, err := s.externalResourceReader.ListResources(ctx, &v2.ResourcesServiceListResourcesRequest{
+ PageToken: pageToken,
+ ResourceTypeId: resourceTypeId,
+ })
+ if err != nil {
+ return nil, err
+ }
+ resources = append(resources, resourceResp.List...)
+ pageToken = resourceResp.NextPageToken
+ if pageToken == "" {
+ break
+ }
+ }
+ return resources, nil
+}
+
+func (s *syncer) listExternalEntitlementsForResource(ctx context.Context, resource *v2.Resource) ([]*v2.Entitlement, error) {
+ ents := make([]*v2.Entitlement, 0)
+ entitlementToken := ""
+ for {
+ entitlementsList, err := s.externalResourceReader.ListEntitlements(ctx, &v2.EntitlementsServiceListEntitlementsRequest{
+ PageToken: entitlementToken,
+ Resource: resource,
+ })
+ if err != nil {
+ return nil, err
+ }
+ ents = append(ents, entitlementsList.List...)
+ entitlementToken = entitlementsList.NextPageToken
+ if entitlementToken == "" {
+ break
+ }
+ }
+ return ents, nil
+}
+
+func (s *syncer) listExternalGrantsForEntitlement(ctx context.Context, ent *v2.Entitlement) ([]*v2.Grant, error) {
+ grantsForEnts := make([]*v2.Grant, 0)
+ entitlementGrantPageToken := ""
+ for {
+ grantsForEntitlementResp, err := s.externalResourceReader.ListGrantsForEntitlement(ctx, &reader_v2.GrantsReaderServiceListGrantsForEntitlementRequest{
+ Entitlement: ent,
+ PageToken: entitlementGrantPageToken,
+ })
+ if err != nil {
+ return nil, err
+ }
+ grantsForEnts = append(grantsForEnts, grantsForEntitlementResp.List...)
+ entitlementGrantPageToken = grantsForEntitlementResp.NextPageToken
+ if entitlementGrantPageToken == "" {
+ break
+ }
+ }
+ return grantsForEnts, nil
+}
+
+func (s *syncer) listExternalResourceTypes(ctx context.Context) ([]*v2.ResourceType, error) {
+ resourceTypes := make([]*v2.ResourceType, 0)
+ rtPageToken := ""
+ for {
+ resourceTypesResp, err := s.externalResourceReader.ListResourceTypes(ctx, &v2.ResourceTypesServiceListResourceTypesRequest{
+ PageToken: rtPageToken,
+ })
+ if err != nil {
+ return nil, err
+ }
+ resourceTypes = append(resourceTypes, resourceTypesResp.List...)
+ rtPageToken = resourceTypesResp.NextPageToken
+ if rtPageToken == "" {
+ break
+ }
+ }
+ return resourceTypes, nil
+}
+
+func (s *syncer) listAllGrants(ctx context.Context) ([]*v2.Grant, error) {
+ grants := make([]*v2.Grant, 0)
+ pageToken := ""
+ for {
+ grantsResp, err := s.store.ListGrants(ctx, &v2.GrantsServiceListGrantsRequest{
+ PageToken: pageToken,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ grants = append(grants, grantsResp.List...)
+ pageToken = grantsResp.NextPageToken
+ if pageToken == "" {
+ break
+ }
+ }
+ return grants, nil
+}
+
+// TODO(lauren) Split up principals by type (user, group)
+func (s *syncer) processGrantsWithExternalPrincipals(ctx context.Context, principals []*v2.Resource) error {
+ ctx, span := tracer.Start(ctx, "processGrantsWithExternalPrincipals")
+ defer span.End()
+
+ if !s.state.HasExternalResourcesGrants() {
+ return nil
+ }
+
+ grantsToDelete := make([]string, 0)
+
+ grants, err := s.listAllGrants(ctx)
+ if err != nil {
+ return err
+ }
+ expandedGrants := make([]*v2.Grant, 0)
+ for _, grant := range grants {
+ annos := annotations.Annotations(grant.Annotations)
+ matchResourceMatchAllAnno, err := GetExternalResourceMatchAllAnnotation(annos)
+ if err != nil {
+ return err
+ }
+ if matchResourceMatchAllAnno != nil {
+ for _, principal := range principals {
+ rAnnos := annotations.Annotations(principal.GetAnnotations())
+ batonID := &v2.BatonID{}
+ if !rAnnos.Contains(batonID) {
+ continue
+ }
+ switch matchResourceMatchAllAnno.ResourceType {
+ case v2.ResourceType_TRAIT_USER:
+ userTrait := &v2.UserTrait{}
+ ok, err := rAnnos.Pick(userTrait)
+ if err != nil {
+ return err
+ }
+ if !ok {
+ continue
+ }
+ case v2.ResourceType_TRAIT_GROUP:
+ groupTrait := &v2.GroupTrait{}
+ ok, err := rAnnos.Pick(groupTrait)
+ if err != nil {
+ return err
+ }
+ if !ok {
+ continue
+ }
+ default:
+ return errors.New("unexpected external resource type")
+ }
+
+ newGrant := &v2.Grant{
+ Entitlement: grant.Entitlement,
+ Principal: principal,
+ Id: batonGrant.NewGrantID(principal, grant.Entitlement),
+ Sources: grant.Sources,
+ Annotations: grant.Annotations,
+ }
+ expandedGrants = append(expandedGrants, newGrant)
+ }
+ grantsToDelete = append(grantsToDelete, grant.Id)
+ continue
+ }
+
+ matchExternalResource, err := GetExternalResourceMatchAnnotation(annos)
+ if err != nil {
+ return err
+ }
+ if matchExternalResource != nil {
+ for _, principal := range principals {
+ rAnnos := annotations.Annotations(principal.GetAnnotations())
+ batonID := &v2.BatonID{}
+ if !rAnnos.Contains(batonID) {
+ continue
+ }
+ switch matchExternalResource.ResourceType {
+ case v2.ResourceType_TRAIT_USER:
+ userTrait := &v2.UserTrait{}
+ ok, err := rAnnos.Pick(userTrait)
+ if err != nil {
+ return err
+ }
+ if !ok {
+ continue
+ }
+
+ if matchExternalResource.Key == "email" {
+ // TODO(lauren) Should we only use primary? or should we use profile?
+ for _, email := range userTrait.Emails {
+ // Case insensitive comparison for email
+ if strings.EqualFold(email.Address, matchExternalResource.Value) {
+ newGrant := &v2.Grant{
+ Entitlement: grant.Entitlement,
+ Principal: principal,
+ Id: batonGrant.NewGrantID(principal, grant.Entitlement),
+ Sources: grant.Sources,
+ Annotations: grant.Annotations,
+ }
+ expandedGrants = append(expandedGrants, newGrant)
+ grantsToDelete = append(grantsToDelete, grant.Id)
+ // break out of principal list iteration since we found a match
+ break
+ }
+ }
+ }
+ profileVal, ok := resource.GetProfileStringValue(userTrait.Profile, matchExternalResource.Key)
+ if ok && profileVal == matchExternalResource.Value {
+ newGrant := &v2.Grant{
+ Entitlement: grant.Entitlement,
+ Principal: principal,
+ Id: batonGrant.NewGrantID(principal, grant.Entitlement),
+ Sources: grant.Sources,
+ Annotations: grant.Annotations,
+ }
+ expandedGrants = append(expandedGrants, newGrant)
+ grantsToDelete = append(grantsToDelete, grant.Id)
+ // break out of principal list iteration since we found a match
+ break
+ }
+ case v2.ResourceType_TRAIT_GROUP:
+ groupTrait := &v2.GroupTrait{}
+ ok, err := rAnnos.Pick(groupTrait)
+ if err != nil {
+ return err
+ }
+ if !ok {
+ continue
+ }
+ profileVal, ok := resource.GetProfileStringValue(groupTrait.Profile, matchExternalResource.Key)
+ if ok && profileVal == matchExternalResource.Value {
+ newGrant := &v2.Grant{
+ Entitlement: grant.Entitlement,
+ Principal: principal,
+ Id: batonGrant.NewGrantID(principal, grant.Entitlement),
+ Sources: grant.Sources,
+ Annotations: grant.Annotations,
+ }
+ expandedGrants = append(expandedGrants, newGrant)
+ grantsToDelete = append(grantsToDelete, grant.Id)
+ // break out of principal list iteration since we found a match
+ break
+ }
+ default:
+ return errors.New("unexpected external resource type")
+ }
+ }
+
+ // We still want to delete the grant even if there are no matches
+ grantsToDelete = append(grantsToDelete, grant.Id)
+ }
+ }
+
+ err = s.store.PutGrants(ctx, expandedGrants...)
+ if err != nil {
+ return err
+ }
+
+ for _, grantId := range grantsToDelete {
+ err = s.store.DeleteGrant(ctx, grantId)
+ if err != nil {
+ return err
+ }
+ }
+
+ s.state.FinishAction(ctx)
+
+ return nil
+}
+
+func GetExternalResourceMatchAllAnnotation(annos annotations.Annotations) (*v2.ExternalResourceMatchAll, error) {
+ externalResourceMatchAll := &v2.ExternalResourceMatchAll{}
+ ok, err := annos.Pick(externalResourceMatchAll)
+ if err != nil || !ok {
+ return nil, err
+ }
+ return externalResourceMatchAll, nil
+}
+
+func GetExternalResourceMatchAnnotation(annos annotations.Annotations) (*v2.ExternalResourceMatch, error) {
+ externalResourceMatch := &v2.ExternalResourceMatch{}
+ ok, err := annos.Pick(externalResourceMatch)
+ if err != nil || !ok {
+ return nil, err
+ }
+ return externalResourceMatch, nil
+}
+
func (s *syncer) runGrantExpandActions(ctx context.Context) (bool, error) {
+ ctx, span := tracer.Start(ctx, "syncer.runGrantExpandActions")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
graph := s.state.EntitlementGraph(ctx)
@@ -1553,6 +2190,9 @@ func (s *syncer) newExpandedGrant(_ context.Context, descEntitlement *v2.Entitle
// expandGrantsForEntitlements expands grants for the given entitlement.
func (s *syncer) expandGrantsForEntitlements(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.expandGrantsForEntitlements")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
graph := s.state.EntitlementGraph(ctx)
@@ -1577,14 +2217,18 @@ func (s *syncer) expandGrantsForEntitlements(ctx context.Context) error {
return nil
}
- if graph.Depth > maxDepth {
+ if maxDepth == 0 {
+ maxDepth = defaultMaxDepth
+ }
+
+ if int64(graph.Depth) > maxDepth {
l.Error(
"expandGrantsForEntitlements: exceeded max depth",
zap.Any("graph", graph),
- zap.Int("max_depth", maxDepth),
+ zap.Int64("max_depth", maxDepth),
)
s.state.FinishAction(ctx)
- return fmt.Errorf("exceeded max depth")
+ return fmt.Errorf("expandGrantsForEntitlements: exceeded max depth (%d)", maxDepth)
}
// TODO(morgabra) Yield here after some amount of work?
@@ -1627,6 +2271,9 @@ func (s *syncer) expandGrantsForEntitlements(ctx context.Context) error {
}
func (s *syncer) loadStore(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.loadStore")
+ defer span.End()
+
if s.store != nil {
return nil
}
@@ -1651,6 +2298,9 @@ func (s *syncer) loadStore(ctx context.Context) error {
// Close closes the datastorage to ensure it is updated on disk.
func (s *syncer) Close(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "syncer.Close")
+ defer span.End()
+
var err error
if s.store != nil {
err = s.store.Close()
@@ -1728,6 +2378,18 @@ func WithSkipFullSync() SyncOpt {
}
}
+func WithExternalResourceC1ZPath(path string) SyncOpt {
+ return func(s *syncer) {
+ s.externalResourceC1ZPath = path
+ }
+}
+
+func WithExternalResourceEntitlementIdFilter(entitlementId string) SyncOpt {
+ return func(s *syncer) {
+ s.externalResourceEntitlementIdFilter = entitlementId
+ }
+}
+
// NewSyncer returns a new syncer object.
func NewSyncer(ctx context.Context, c types.ConnectorClient, opts ...SyncOpt) (Syncer, error) {
s := &syncer{
@@ -1744,5 +2406,13 @@ func NewSyncer(ctx context.Context, c types.ConnectorClient, opts ...SyncOpt) (S
return nil, errors.New("a connector store writer or a db path must be provided")
}
+ if s.externalResourceC1ZPath != "" {
+ externalC1ZReader, err := dotc1z.NewExternalC1FileReader(ctx, s.tmpDir, s.externalResourceC1ZPath)
+ if err != nil {
+ return nil, err
+ }
+ s.externalResourceReader = externalC1ZReader
+ }
+
return s, nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/actions.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/actions.go
new file mode 100644
index 00000000..cb59bb5c
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/actions.go
@@ -0,0 +1,190 @@
+package c1api
+
+import (
+ "context"
+ "errors"
+
+ "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+
+ v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
+ v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
+ "github.com/conductorone/baton-sdk/pkg/annotations"
+ "github.com/conductorone/baton-sdk/pkg/types"
+)
+
+type actionListSchemasTaskHelpers interface {
+ ConnectorClient() types.ConnectorClient
+ FinishTask(ctx context.Context, resp proto.Message, annos annotations.Annotations, err error) error
+}
+
+type actionListSchemasTaskHandler struct {
+ task *v1.Task
+ helpers actionListSchemasTaskHelpers
+}
+
+func (c *actionListSchemasTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "actionListSchemasTaskHandler.HandleTask")
+ defer span.End()
+
+ l := ctxzap.Extract(ctx)
+
+ cc := c.helpers.ConnectorClient()
+
+ t := c.task.GetActionListSchemas()
+ if t == nil {
+ return c.helpers.FinishTask(ctx, nil, nil, errors.New("action list schemas task is nil"))
+ }
+ resp, err := cc.ListActionSchemas(ctx, &v2.ListActionSchemasRequest{
+ Annotations: t.GetAnnotations(),
+ })
+ if err != nil {
+ return c.helpers.FinishTask(ctx, nil, nil, err)
+ }
+
+ l.Debug("ActionListSchemas response", zap.Any("resp", resp))
+
+ return c.helpers.FinishTask(ctx, resp, nil, nil)
+}
+
+func newActionListSchemasTaskHandler(task *v1.Task, helpers actionListSchemasTaskHelpers) *actionListSchemasTaskHandler {
+ return &actionListSchemasTaskHandler{
+ task: task,
+ helpers: helpers,
+ }
+}
+
+type actionGetSchemaTaskHelpers interface {
+ ConnectorClient() types.ConnectorClient
+ FinishTask(ctx context.Context, resp proto.Message, annos annotations.Annotations, err error) error
+}
+
+type actionGetSchemaTaskHandler struct {
+ task *v1.Task
+ helpers actionGetSchemaTaskHelpers
+}
+
+func (c *actionGetSchemaTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "actionGetSchemaTaskHandler.HandleTask")
+ defer span.End()
+
+ l := ctxzap.Extract(ctx)
+
+ cc := c.helpers.ConnectorClient()
+
+ t := c.task.GetActionGetSchema()
+ if t == nil || t.GetName() == "" {
+ return c.helpers.FinishTask(ctx, nil, nil, errors.New("action name required"))
+ }
+
+ resp, err := cc.GetActionSchema(ctx, &v2.GetActionSchemaRequest{
+ Name: t.GetName(),
+ Annotations: t.GetAnnotations(),
+ })
+ if err != nil {
+ return c.helpers.FinishTask(ctx, nil, nil, err)
+ }
+
+ l.Debug("ActionGetSchema response", zap.Any("resp", resp))
+
+ return c.helpers.FinishTask(ctx, resp, nil, nil)
+}
+
+func newActionGetSchemaTaskHandler(task *v1.Task, helpers actionGetSchemaTaskHelpers) *actionGetSchemaTaskHandler {
+ return &actionGetSchemaTaskHandler{
+ task: task,
+ helpers: helpers,
+ }
+}
+
+type actionInvokeTaskHelpers interface {
+ ConnectorClient() types.ConnectorClient
+ FinishTask(ctx context.Context, resp proto.Message, annos annotations.Annotations, err error) error
+}
+
+type actionInvokeTaskHandler struct {
+ task *v1.Task
+ helpers actionInvokeTaskHelpers
+}
+
+func (c *actionInvokeTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "actionInvokeTaskHandler.HandleTask")
+ defer span.End()
+
+ l := ctxzap.Extract(ctx)
+
+ cc := c.helpers.ConnectorClient()
+
+ t := c.task.GetActionInvoke()
+ if t == nil || t.GetName() == "" {
+ return c.helpers.FinishTask(ctx, nil, nil, errors.New("action name required"))
+ }
+ if t.GetArgs() == nil {
+ return c.helpers.FinishTask(ctx, nil, nil, errors.New("args required"))
+ }
+
+ resp, err := cc.InvokeAction(ctx, &v2.InvokeActionRequest{
+ Name: t.GetName(),
+ Args: t.GetArgs(),
+ Annotations: t.GetAnnotations(),
+ })
+ if err != nil {
+ return c.helpers.FinishTask(ctx, nil, nil, err)
+ }
+
+ l.Debug("ActionInvoke response", zap.Any("resp", resp))
+
+ return c.helpers.FinishTask(ctx, resp, nil, nil)
+}
+
+func newActionInvokeTaskHandler(task *v1.Task, helpers actionInvokeTaskHelpers) *actionInvokeTaskHandler {
+ return &actionInvokeTaskHandler{
+ task: task,
+ helpers: helpers,
+ }
+}
+
+type actionStatusTaskHelpers interface {
+ ConnectorClient() types.ConnectorClient
+ FinishTask(ctx context.Context, resp proto.Message, annos annotations.Annotations, err error) error
+}
+
+type actionStatusTaskHandler struct {
+ task *v1.Task
+ helpers actionStatusTaskHelpers
+}
+
+func (c *actionStatusTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "actionStatusTaskHandler.HandleTask")
+ defer span.End()
+
+ l := ctxzap.Extract(ctx)
+
+ cc := c.helpers.ConnectorClient()
+
+ t := c.task.GetActionStatus()
+ if t == nil || t.GetId() == "" {
+ return c.helpers.FinishTask(ctx, nil, nil, errors.New("action id required"))
+ }
+
+ resp, err := cc.GetActionStatus(ctx, &v2.GetActionStatusRequest{
+ Name: t.GetName(),
+ Id: t.GetId(),
+ Annotations: t.GetAnnotations(),
+ })
+ if err != nil {
+ return c.helpers.FinishTask(ctx, nil, nil, err)
+ }
+
+ l.Debug("ActionInvoke response", zap.Any("resp", resp))
+
+ return c.helpers.FinishTask(ctx, resp, nil, nil)
+}
+
+func newActionStatusTaskHandler(task *v1.Task, helpers actionStatusTaskHelpers) *actionStatusTaskHandler {
+ return &actionStatusTaskHandler{
+ task: task,
+ helpers: helpers,
+ }
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_create_tickets.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_create_tickets.go
index 3baab42d..24bb2b6c 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_create_tickets.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_create_tickets.go
@@ -25,6 +25,9 @@ type bulkCreateTicketTaskHandler struct {
}
func (c *bulkCreateTicketTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "bulkCreateTicketTaskHandler.HandleTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
t := c.task.GetBulkCreateTickets()
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_get_tickets.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_get_tickets.go
index 38bc09cb..703a5ef9 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_get_tickets.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/bulk_get_tickets.go
@@ -4,13 +4,14 @@ import (
"context"
"errors"
+ "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
"github.com/conductorone/baton-sdk/pkg/annotations"
"github.com/conductorone/baton-sdk/pkg/types"
- "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
- "go.uber.org/zap"
- "google.golang.org/protobuf/proto"
)
type bulkGetTicketsTaskHelpers interface {
@@ -24,6 +25,9 @@ type bulkGetTicketTaskHandler struct {
}
func (c *bulkGetTicketTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "bulkGetTicketTaskHandler.HandleTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
cc := c.helpers.ConnectorClient()
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/c1api.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/c1api.go
new file mode 100644
index 00000000..74a7d3b8
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/c1api.go
@@ -0,0 +1,5 @@
+package c1api
+
+import "go.opentelemetry.io/otel"
+
+var tracer = otel.Tracer("baton-sdk/pkg.tasks.c1api")
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_account.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_account.go
index 4e9d4c5c..7f7b442d 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_account.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_account.go
@@ -26,6 +26,9 @@ type createAccountTaskHandler struct {
}
func (g *createAccountTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "createAccountTaskHandler.HandleTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx).With(zap.String("task_id", g.task.Id), zap.Stringer("task_type", tasks.GetType(g.task)))
t := g.task.GetCreateAccount()
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_resource.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_resource.go
index 3256ab55..8b97f2eb 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_resource.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_resource.go
@@ -26,6 +26,9 @@ type createResourceTaskHandler struct {
}
func (g *createResourceTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "createResourceTaskHandler.HandleTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx).With(zap.String("task_id", g.task.Id), zap.Stringer("task_type", tasks.GetType(g.task)))
t := g.task.GetCreateResource()
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_ticket.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_ticket.go
index b4af9525..3cd82079 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_ticket.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/create_ticket.go
@@ -25,6 +25,9 @@ type createTicketTaskHandler struct {
}
func (c *createTicketTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "createTicketTaskHandler.HandleTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
t := c.task.GetCreateTicketTask()
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/debug.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/debug.go
index c05c5bcd..e96885d9 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/debug.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/debug.go
@@ -13,6 +13,9 @@ func newStartDebugging(tm *c1ApiTaskManager) *debugHandler {
}
func (c *debugHandler) HandleTask(ctx context.Context) error {
+ _, span := tracer.Start(ctx, "debugHandler.HandleTask")
+ defer span.End()
+
c.taskmanager.runnerShouldDebug = true
return nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/delete_resource.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/delete_resource.go
index fce46d78..13c61576 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/delete_resource.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/delete_resource.go
@@ -26,6 +26,9 @@ type deleteResourceTaskHandler struct {
}
func (g *deleteResourceTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "deleteResourceTaskHandler.HandleTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx).With(zap.String("task_id", g.task.Id), zap.Stringer("task_type", tasks.GetType(g.task)))
t := g.task.GetDeleteResource()
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/full_sync.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/full_sync.go
index e214b769..c9690ae1 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/full_sync.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/full_sync.go
@@ -7,14 +7,15 @@ import (
"os"
"path/filepath"
+ "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+
v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
"github.com/conductorone/baton-sdk/pkg/annotations"
sdkSync "github.com/conductorone/baton-sdk/pkg/sync"
"github.com/conductorone/baton-sdk/pkg/tasks"
"github.com/conductorone/baton-sdk/pkg/types"
- "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
- "go.uber.org/zap"
- "google.golang.org/protobuf/proto"
)
type fullSyncHelpers interface {
@@ -26,12 +27,17 @@ type fullSyncHelpers interface {
}
type fullSyncTaskHandler struct {
- task *v1.Task
- helpers fullSyncHelpers
- skipFullSync bool
+ task *v1.Task
+ helpers fullSyncHelpers
+ skipFullSync bool
+ externalResourceC1ZPath string
+ externalResourceEntitlementIdFilter string
}
func (c *fullSyncTaskHandler) sync(ctx context.Context, c1zPath string) error {
+ ctx, span := tracer.Start(ctx, "fullSyncTaskHandler.sync")
+ defer span.End()
+
l := ctxzap.Extract(ctx).With(zap.String("task_id", c.task.GetId()), zap.Stringer("task_type", tasks.GetType(c.task)))
syncOpts := []sdkSync.SyncOpt{
@@ -39,6 +45,14 @@ func (c *fullSyncTaskHandler) sync(ctx context.Context, c1zPath string) error {
sdkSync.WithTmpDir(c.helpers.TempDir()),
}
+ if c.externalResourceC1ZPath != "" {
+ syncOpts = append(syncOpts, sdkSync.WithExternalResourceC1ZPath(c.externalResourceC1ZPath))
+ }
+
+ if c.externalResourceEntitlementIdFilter != "" {
+ syncOpts = append(syncOpts, sdkSync.WithExternalResourceEntitlementIdFilter(c.externalResourceEntitlementIdFilter))
+ }
+
if c.skipFullSync {
syncOpts = append(syncOpts, sdkSync.WithSkipFullSync())
}
@@ -80,6 +94,9 @@ func (c *fullSyncTaskHandler) sync(ctx context.Context, c1zPath string) error {
// task with a sync_id and it doesn't match our current state sync_id, we should reject the task. If we have a task
// with a sync_id that does match our current state, we should resume our current sync, if possible.
func (c *fullSyncTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "fullSyncTaskHandler.HandleTask")
+ defer span.End()
+
ctx, cancel := context.WithCancel(ctx)
defer cancel()
l := ctxzap.Extract(ctx).With(zap.String("task_id", c.task.GetId()), zap.Stringer("task_type", tasks.GetType(c.task)))
@@ -139,15 +156,20 @@ func (c *fullSyncTaskHandler) HandleTask(ctx context.Context) error {
return c.helpers.FinishTask(ctx, nil, nil, nil)
}
-func newFullSyncTaskHandler(task *v1.Task, helpers fullSyncHelpers, skipFullSync bool) tasks.TaskHandler {
+func newFullSyncTaskHandler(task *v1.Task, helpers fullSyncHelpers, skipFullSync bool, externalResourceC1ZPath string, externalResourceEntitlementIdFilter string) tasks.TaskHandler {
return &fullSyncTaskHandler{
- task: task,
- helpers: helpers,
- skipFullSync: skipFullSync,
+ task: task,
+ helpers: helpers,
+ skipFullSync: skipFullSync,
+ externalResourceC1ZPath: externalResourceC1ZPath,
+ externalResourceEntitlementIdFilter: externalResourceEntitlementIdFilter,
}
}
func uploadDebugLogs(ctx context.Context, helper fullSyncHelpers) error {
+ ctx, span := tracer.Start(ctx, "uploadDebugLogs")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
debugfilelocation := filepath.Join(helper.TempDir(), "debug.log")
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/get_ticket.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/get_ticket.go
index 18ce23e8..3406f7ea 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/get_ticket.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/get_ticket.go
@@ -4,13 +4,14 @@ import (
"context"
"errors"
+ "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
"github.com/conductorone/baton-sdk/pkg/annotations"
"github.com/conductorone/baton-sdk/pkg/types"
- "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
- "go.uber.org/zap"
- "google.golang.org/protobuf/proto"
)
type getTicketTaskHelpers interface {
@@ -24,6 +25,9 @@ type getTicketTaskHandler struct {
}
func (c *getTicketTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "getTicketTaskHandler.HandleTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
cc := c.helpers.ConnectorClient()
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/grant.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/grant.go
index 98294fc7..4d4c3801 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/grant.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/grant.go
@@ -26,6 +26,9 @@ type grantTaskHandler struct {
}
func (g *grantTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "grantTaskHandler.HandleTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx).With(zap.String("task_id", g.task.Id), zap.Stringer("task_type", tasks.GetType(g.task)))
if g.task.GetGrant() == nil || g.task.GetGrant().GetEntitlement() == nil || g.task.GetGrant().GetPrincipal() == nil {
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/hello.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/hello.go
index e3728433..da5b0223 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/hello.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/hello.go
@@ -5,13 +5,14 @@ import (
"errors"
"runtime/debug"
+ "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "github.com/shirou/gopsutil/v3/host"
+ "go.uber.org/zap"
+
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
"github.com/conductorone/baton-sdk/pkg/tasks"
"github.com/conductorone/baton-sdk/pkg/types"
- "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
- "github.com/shirou/gopsutil/v3/host"
- "go.uber.org/zap"
)
type helloHelpers interface {
@@ -66,6 +67,9 @@ func (c *helloTaskHandler) buildInfo(ctx context.Context) *v1.BatonServiceHelloR
}
func (c *helloTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "helloTaskHandler.HandleTask")
+ defer span.End()
+
if c.task == nil {
return errors.New("cannot handle task: task is nil")
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/list_ticket_schemas.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/list_ticket_schemas.go
index 1c39af24..95579eb1 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/list_ticket_schemas.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/list_ticket_schemas.go
@@ -28,6 +28,9 @@ type listTicketSchemasTaskHandler struct {
}
func (c *listTicketSchemasTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "listTicketSchemasTaskHandler.HandleTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
t := c.task.GetListTicketSchemas()
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go
index d63e95a8..216d1320 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/manager.go
@@ -6,6 +6,7 @@ import (
"sync"
"time"
+ "go.opentelemetry.io/otel/trace"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
@@ -42,13 +43,15 @@ var (
)
type c1ApiTaskManager struct {
- mtx sync.Mutex
- started bool
- queue []*v1.Task
- serviceClient BatonServiceClient
- tempDir string
- skipFullSync bool
- runnerShouldDebug bool
+ mtx sync.Mutex
+ started bool
+ queue []*v1.Task
+ serviceClient BatonServiceClient
+ tempDir string
+ skipFullSync bool
+ runnerShouldDebug bool
+ externalResourceC1Z string
+ externalResourceEntitlementIdFilter string
}
// getHeartbeatInterval returns an appropriate heartbeat interval. If the interval is 0, it will return the default heartbeat interval.
@@ -79,6 +82,9 @@ func getNextPoll(d time.Duration) time.Duration {
}
func (c *c1ApiTaskManager) Next(ctx context.Context) (*v1.Task, time.Duration, error) {
+ ctx, span := tracer.Start(ctx, "c1ApiTaskManager.Next", trace.WithNewRoot())
+ defer span.End()
+
l := ctxzap.Extract(ctx)
c.mtx.Lock()
@@ -130,6 +136,9 @@ func (c *c1ApiTaskManager) Next(ctx context.Context) (*v1.Task, time.Duration, e
}
func (c *c1ApiTaskManager) finishTask(ctx context.Context, task *v1.Task, resp proto.Message, annos annotations.Annotations, err error) error {
+ ctx, span := tracer.Start(ctx, "c1ApiTaskManager.finishTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
l = l.With(
zap.String("task_id", task.GetId()),
@@ -207,6 +216,9 @@ func (c *c1ApiTaskManager) ShouldDebug() bool {
}
func (c *c1ApiTaskManager) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error {
+ ctx, span := tracer.Start(ctx, "c1ApiTaskManager.Process", trace.WithNewRoot())
+ defer span.End()
+
l := ctxzap.Extract(ctx)
if task == nil {
l.Debug("c1_api_task_manager.Process(): process called with nil task -- continuing")
@@ -234,7 +246,7 @@ func (c *c1ApiTaskManager) Process(ctx context.Context, task *v1.Task, cc types.
var handler tasks.TaskHandler
switch tasks.GetType(task) {
case taskTypes.FullSyncType:
- handler = newFullSyncTaskHandler(task, tHelpers, c.skipFullSync)
+ handler = newFullSyncTaskHandler(task, tHelpers, c.skipFullSync, c.externalResourceC1Z, c.externalResourceEntitlementIdFilter)
case taskTypes.HelloType:
handler = newHelloTaskHandler(task, tHelpers)
case taskTypes.GrantType:
@@ -261,6 +273,14 @@ func (c *c1ApiTaskManager) Process(ctx context.Context, task *v1.Task, cc types.
handler = newBulkCreateTicketTaskHandler(task, tHelpers)
case taskTypes.BulkGetTicketsType:
handler = newBulkGetTicketTaskHandler(task, tHelpers)
+ case taskTypes.ActionListSchemasType:
+ handler = newActionListSchemasTaskHandler(task, tHelpers)
+ case taskTypes.ActionGetSchemaType:
+ handler = newActionGetSchemaTaskHandler(task, tHelpers)
+ case taskTypes.ActionInvokeType:
+ handler = newActionInvokeTaskHandler(task, tHelpers)
+ case taskTypes.ActionStatusType:
+ handler = newActionStatusTaskHandler(task, tHelpers)
default:
return c.finishTask(ctx, task, nil, nil, errors.New("unsupported task type"))
}
@@ -274,15 +294,19 @@ func (c *c1ApiTaskManager) Process(ctx context.Context, task *v1.Task, cc types.
return nil
}
-func NewC1TaskManager(ctx context.Context, clientID string, clientSecret string, tempDir string, skipFullSync bool) (tasks.Manager, error) {
+func NewC1TaskManager(
+ ctx context.Context, clientID string, clientSecret string, tempDir string, skipFullSync bool,
+ externalC1Z string, externalResourceEntitlementIdFilter string) (tasks.Manager, error) {
serviceClient, err := newServiceClient(ctx, clientID, clientSecret)
if err != nil {
return nil, err
}
return &c1ApiTaskManager{
- serviceClient: serviceClient,
- tempDir: tempDir,
- skipFullSync: skipFullSync,
+ serviceClient: serviceClient,
+ tempDir: tempDir,
+ skipFullSync: skipFullSync,
+ externalResourceC1Z: externalC1Z,
+ externalResourceEntitlementIdFilter: externalResourceEntitlementIdFilter,
}, nil
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/revoke.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/revoke.go
index 08dc93be..efe072cd 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/revoke.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/revoke.go
@@ -28,6 +28,9 @@ type revokeTaskHandler struct {
}
func (r *revokeTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "revokeTaskHandler.HandleTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx).With(zap.String("task_id", r.task.Id), zap.Stringer("task_type", tasks.GetType(r.task)))
if r.task.GetRevoke() == nil || r.task.GetRevoke().GetGrant() == nil {
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/rotate_credentials.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/rotate_credentials.go
index 2556f51f..36d5f803 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/rotate_credentials.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/rotate_credentials.go
@@ -26,6 +26,9 @@ type rotateCredentialsTaskHandler struct {
}
func (g *rotateCredentialsTaskHandler) HandleTask(ctx context.Context) error {
+ ctx, span := tracer.Start(ctx, "rotateCredentialsTaskHandler.HandleTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx).With(zap.String("task_id", g.task.Id), zap.Stringer("task_type", tasks.GetType(g.task)))
t := g.task.GetRotateCredentials()
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/service_client.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/service_client.go
index d483cf2e..55707ab3 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/service_client.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/service_client.go
@@ -65,7 +65,7 @@ func (c *c1ServiceClient) getHostID() string {
func (c *c1ServiceClient) getClientConn(ctx context.Context) (v1.BatonServiceClient, func(), error) {
dialCtx, cancel := context.WithTimeout(ctx, time.Second*30)
defer cancel()
- cc, err := grpc.DialContext(
+ cc, err := grpc.DialContext( //nolint:staticcheck // grpc.DialContext is deprecated but we are using it still.
dialCtx,
c.addr,
c.dialOpts...,
@@ -83,6 +83,9 @@ func (c *c1ServiceClient) getClientConn(ctx context.Context) (v1.BatonServiceCli
}
func (c *c1ServiceClient) Hello(ctx context.Context, in *v1.BatonServiceHelloRequest) (*v1.BatonServiceHelloResponse, error) {
+ ctx, span := tracer.Start(ctx, "c1ServiceClient.Hello")
+ defer span.End()
+
client, done, err := c.getClientConn(ctx)
if err != nil {
return nil, err
@@ -95,6 +98,9 @@ func (c *c1ServiceClient) Hello(ctx context.Context, in *v1.BatonServiceHelloReq
}
func (c *c1ServiceClient) GetTask(ctx context.Context, in *v1.BatonServiceGetTaskRequest) (*v1.BatonServiceGetTaskResponse, error) {
+ ctx, span := tracer.Start(ctx, "c1ServiceClient.GetTask")
+ defer span.End()
+
client, done, err := c.getClientConn(ctx)
if err != nil {
return nil, err
@@ -107,6 +113,9 @@ func (c *c1ServiceClient) GetTask(ctx context.Context, in *v1.BatonServiceGetTas
}
func (c *c1ServiceClient) Heartbeat(ctx context.Context, in *v1.BatonServiceHeartbeatRequest) (*v1.BatonServiceHeartbeatResponse, error) {
+ ctx, span := tracer.Start(ctx, "c1ServiceClient.Heartbeat")
+ defer span.End()
+
client, done, err := c.getClientConn(ctx)
if err != nil {
return nil, err
@@ -119,6 +128,9 @@ func (c *c1ServiceClient) Heartbeat(ctx context.Context, in *v1.BatonServiceHear
}
func (c *c1ServiceClient) FinishTask(ctx context.Context, in *v1.BatonServiceFinishTaskRequest) (*v1.BatonServiceFinishTaskResponse, error) {
+ ctx, span := tracer.Start(ctx, "c1ServiceClient.FinishTask")
+ defer span.End()
+
client, done, err := c.getClientConn(ctx)
if err != nil {
return nil, err
@@ -131,6 +143,9 @@ func (c *c1ServiceClient) FinishTask(ctx context.Context, in *v1.BatonServiceFin
}
func (c *c1ServiceClient) Upload(ctx context.Context, task *v1.Task, r io.ReadSeeker) error {
+ ctx, span := tracer.Start(ctx, "c1ServiceClient.Upload")
+ defer span.End()
+
l := ctxzap.Extract(ctx)
client, done, err := c.getClientConn(ctx)
@@ -172,7 +187,7 @@ func (c *c1ServiceClient) Upload(ctx context.Context, task *v1.Task, r io.ReadSe
}
chunkCount := int(math.Ceil(float64(rLen) / float64(fileChunkSize)))
- for i := 0; i < chunkCount; i++ {
+ for i := range chunkCount {
l.Debug(
"sending upload chunk",
zap.Int("chunk", i),
@@ -222,6 +237,7 @@ func (c *c1ServiceClient) Upload(ctx context.Context, task *v1.Task, r io.ReadSe
return err
}
+ l.Info("uploaded asset", zap.String("task_id", task.Id), zap.Int64("size", rLen))
return nil
}
@@ -248,7 +264,7 @@ func newServiceClient(ctx context.Context, clientID string, clientSecret string)
})),
grpc.WithPerRPCCredentials(credProvider),
grpc.WithUserAgent(fmt.Sprintf("%s baton-sdk/%s", clientName, sdk.Version)),
- grpc.WithBlock(),
+ grpc.WithBlock(), //nolint:staticcheck // grpc.WithBlock is deprecated but we are using it still.
}
return &c1ServiceClient{
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/task_helpers.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/task_helpers.go
index 90bd99c9..7e8342d8 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/task_helpers.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/c1api/task_helpers.go
@@ -31,6 +31,9 @@ func (t *taskHelpers) ConnectorClient() types.ConnectorClient {
}
func (t *taskHelpers) Upload(ctx context.Context, r io.ReadSeeker) error {
+ ctx, span := tracer.Start(ctx, "taskHelpers.Upload")
+ defer span.End()
+
if t.task == nil {
return errors.New("cannot upload: task is nil")
}
@@ -38,6 +41,9 @@ func (t *taskHelpers) Upload(ctx context.Context, r io.ReadSeeker) error {
}
func (t *taskHelpers) FinishTask(ctx context.Context, resp proto.Message, annos annotations.Annotations, err error) error {
+ ctx, span := tracer.Start(ctx, "taskHelpers.FinishTask")
+ defer span.End()
+
if t.task == nil {
return errors.New("cannot finish task: task is nil")
}
@@ -58,6 +64,9 @@ func (t *taskHelpers) TempDir() string {
// If the heartbeat fails, this function will retry up to taskMaximumHeartbeatFailures times before cancelling the returned context with ErrTaskHeartbeatFailed.
// If the task is cancelled by the server, the returned context will be cancelled with ErrTaskCancelled.
func (t *taskHelpers) HeartbeatTask(ctx context.Context, annos annotations.Annotations) (context.Context, error) {
+ ctx, span := tracer.Start(ctx, "taskHelpers.HeartbeatTask")
+ defer span.End()
+
l := ctxzap.Extract(ctx).With(zap.String("task_id", t.task.GetId()), zap.Stringer("task_type", tasks.GetType(t.task)))
rCtx, rCancel := context.WithCancelCause(ctx)
@@ -84,9 +93,9 @@ func (t *taskHelpers) HeartbeatTask(ctx context.Context, annos annotations.Annot
go func() {
attempts := 0
+ l = l.With(zap.Int("attempts", attempts))
for {
attempts++
- l = l.With(zap.Int("attempts", attempts))
if attempts >= taskMaximumHeartbeatFailures {
l.Error("heartbeat: failed after 10 attempts")
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/accounter.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/accounter.go
index 37c6dba3..33c03735 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/accounter.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/accounter.go
@@ -5,6 +5,7 @@ import (
"sync"
"time"
+ "go.opentelemetry.io/otel/trace"
"google.golang.org/protobuf/types/known/structpb"
v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
@@ -41,6 +42,9 @@ func (m *localAccountManager) Next(ctx context.Context) (*v1.Task, time.Duration
}
func (m *localAccountManager) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error {
+ ctx, span := tracer.Start(ctx, "localAccountManager.Process", trace.WithNewRoot())
+ defer span.End()
+
accountManager := provisioner.NewCreateAccountManager(cc, m.dbPath, m.login, m.email, m.profile)
err := accountManager.Run(ctx)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/deleter.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/deleter.go
index 7f2ef18b..d5db8cb1 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/deleter.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/deleter.go
@@ -5,6 +5,8 @@ import (
"sync"
"time"
+ "go.opentelemetry.io/otel/trace"
+
v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
"github.com/conductorone/baton-sdk/pkg/provisioner"
"github.com/conductorone/baton-sdk/pkg/tasks"
@@ -38,6 +40,9 @@ func (m *localResourceDeleter) Next(ctx context.Context) (*v1.Task, time.Duratio
}
func (m *localResourceDeleter) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error {
+ ctx, span := tracer.Start(ctx, "localResourceDeleter.Process", trace.WithNewRoot())
+ defer span.End()
+
accountManager := provisioner.NewResourceDeleter(cc, m.dbPath, m.resourceId, m.resourceType)
err := accountManager.Run(ctx)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/event_feed.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/event_feed.go
index 87f9cbd2..0415b4e6 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/event_feed.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/event_feed.go
@@ -6,6 +6,7 @@ import (
"sync"
"time"
+ "go.opentelemetry.io/otel/trace"
"google.golang.org/protobuf/encoding/protojson"
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
@@ -39,6 +40,9 @@ func (m *localEventFeed) Next(ctx context.Context) (*v1.Task, time.Duration, err
}
func (m *localEventFeed) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error {
+ ctx, span := tracer.Start(ctx, "localEventFeed.Process", trace.WithNewRoot())
+ defer span.End()
+
var pageToken string
for {
resp, err := cc.ListEvents(ctx, &v2.ListEventsRequest{
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/granter.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/granter.go
index ce0f59a6..33c091a7 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/granter.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/granter.go
@@ -5,6 +5,8 @@ import (
"sync"
"time"
+ "go.opentelemetry.io/otel/trace"
+
v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
"github.com/conductorone/baton-sdk/pkg/provisioner"
"github.com/conductorone/baton-sdk/pkg/tasks"
@@ -39,6 +41,9 @@ func (m *localGranter) Next(ctx context.Context) (*v1.Task, time.Duration, error
}
func (m *localGranter) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error {
+ ctx, span := tracer.Start(ctx, "localGranter.Process", trace.WithNewRoot())
+ defer span.End()
+
granter := provisioner.NewGranter(cc, m.dbPath, m.entitlementID, m.principalID, m.principalType)
err := granter.Run(ctx)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/local.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/local.go
new file mode 100644
index 00000000..93cc6be0
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/local.go
@@ -0,0 +1,5 @@
+package local
+
+import "go.opentelemetry.io/otel"
+
+var tracer = otel.Tracer("baton-sdk/pkg.tasks.local")
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/revoker.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/revoker.go
index 828e0f54..b0ef0e9b 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/revoker.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/revoker.go
@@ -5,6 +5,8 @@ import (
"sync"
"time"
+ "go.opentelemetry.io/otel/trace"
+
v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
"github.com/conductorone/baton-sdk/pkg/provisioner"
"github.com/conductorone/baton-sdk/pkg/tasks"
@@ -37,6 +39,9 @@ func (m *localRevoker) Next(ctx context.Context) (*v1.Task, time.Duration, error
}
func (m *localRevoker) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error {
+ ctx, span := tracer.Start(ctx, "localRevoker.Process", trace.WithNewRoot())
+ defer span.End()
+
granter := provisioner.NewRevoker(cc, m.dbPath, m.grantID)
err := granter.Run(ctx)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/rotator.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/rotator.go
index 24a3d0fc..4984b6f1 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/rotator.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/rotator.go
@@ -5,6 +5,8 @@ import (
"sync"
"time"
+ "go.opentelemetry.io/otel/trace"
+
v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
"github.com/conductorone/baton-sdk/pkg/provisioner"
"github.com/conductorone/baton-sdk/pkg/tasks"
@@ -38,6 +40,9 @@ func (m *localCredentialRotator) Next(ctx context.Context) (*v1.Task, time.Durat
}
func (m *localCredentialRotator) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error {
+ ctx, span := tracer.Start(ctx, "localCredentialRotator.Process", trace.WithNewRoot())
+ defer span.End()
+
accountManager := provisioner.NewCredentialRotator(cc, m.dbPath, m.resourceId, m.resourceType)
err := accountManager.Run(ctx)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/syncer.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/syncer.go
index c2e1e49c..d6675f2b 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/syncer.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/syncer.go
@@ -6,6 +6,8 @@ import (
"sync"
"time"
+ "go.opentelemetry.io/otel/trace"
+
v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
sdkSync "github.com/conductorone/baton-sdk/pkg/sync"
"github.com/conductorone/baton-sdk/pkg/tasks"
@@ -13,9 +15,11 @@ import (
)
type localSyncer struct {
- dbPath string
- o sync.Once
- tmpDir string
+ dbPath string
+ o sync.Once
+ tmpDir string
+ externalResourceC1Z string
+ externalResourceEntitlementIdFilter string
}
type Option func(*localSyncer)
@@ -26,6 +30,18 @@ func WithTmpDir(tmpDir string) Option {
}
}
+func WithExternalResourceC1Z(externalResourceC1Z string) Option {
+ return func(m *localSyncer) {
+ m.externalResourceC1Z = externalResourceC1Z
+ }
+}
+
+func WithExternalResourceEntitlementIdFilter(entitlementId string) Option {
+ return func(m *localSyncer) {
+ m.externalResourceEntitlementIdFilter = entitlementId
+ }
+}
+
func (m *localSyncer) GetTempDir() string {
return ""
}
@@ -45,7 +61,14 @@ func (m *localSyncer) Next(ctx context.Context) (*v1.Task, time.Duration, error)
}
func (m *localSyncer) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error {
- syncer, err := sdkSync.NewSyncer(ctx, cc, sdkSync.WithC1ZPath(m.dbPath), sdkSync.WithTmpDir(m.tmpDir))
+ ctx, span := tracer.Start(ctx, "localSyncer.Process", trace.WithNewRoot())
+ defer span.End()
+
+ syncer, err := sdkSync.NewSyncer(ctx, cc,
+ sdkSync.WithC1ZPath(m.dbPath),
+ sdkSync.WithTmpDir(m.tmpDir),
+ sdkSync.WithExternalResourceC1ZPath(m.externalResourceC1Z),
+ sdkSync.WithExternalResourceEntitlementIdFilter(m.externalResourceEntitlementIdFilter))
if err != nil {
return err
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/ticket.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/ticket.go
index e3ab56d4..385e8b47 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/ticket.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/local/ticket.go
@@ -7,10 +7,12 @@ import (
"sync"
"time"
- "github.com/conductorone/baton-sdk/pkg/types/resource"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
+ "go.opentelemetry.io/otel/trace"
"go.uber.org/zap"
+ "github.com/conductorone/baton-sdk/pkg/types/resource"
+
v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
v1 "github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1"
"github.com/conductorone/baton-sdk/pkg/tasks"
@@ -64,6 +66,9 @@ func (m *localBulkCreateTicket) Next(ctx context.Context) (*v1.Task, time.Durati
}
func (m *localBulkCreateTicket) Process(ctx context.Context, task *v1.Task, cc types.ConnectorClient) error {
+ ctx, span := tracer.Start(ctx, "localBulkCreateTicket.Process", trace.WithNewRoot())
+ defer span.End()
+
l := ctxzap.Extract(ctx)
templates, err := m.loadTicketTemplate(ctx)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/tasks.go b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/tasks.go
index 891c9d4c..c4ca3f67 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/tasks/tasks.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/tasks/tasks.go
@@ -58,6 +58,14 @@ func Is(task *v1.Task, target taskTypes.TaskType) bool {
_, ok = task.GetTaskType().(*v1.Task_BulkCreateTickets)
case taskTypes.BulkGetTicketsType:
_, ok = task.GetTaskType().(*v1.Task_BulkGetTickets)
+ case taskTypes.ActionListSchemasType:
+ _, ok = task.GetTaskType().(*v1.Task_ActionListSchemas)
+ case taskTypes.ActionGetSchemaType:
+ _, ok = task.GetTaskType().(*v1.Task_ActionGetSchema)
+ case taskTypes.ActionInvokeType:
+ _, ok = task.GetTaskType().(*v1.Task_ActionInvoke)
+ case taskTypes.ActionStatusType:
+ _, ok = task.GetTaskType().(*v1.Task_ActionStatus)
default:
return false
}
@@ -101,6 +109,14 @@ func GetType(task *v1.Task) taskTypes.TaskType {
return taskTypes.BulkCreateTicketsType
case *v1.Task_BulkGetTickets:
return taskTypes.BulkGetTicketsType
+ case *v1.Task_ActionListSchemas:
+ return taskTypes.ActionListSchemasType
+ case *v1.Task_ActionGetSchema:
+ return taskTypes.ActionGetSchemaType
+ case *v1.Task_ActionInvoke:
+ return taskTypes.ActionInvokeType
+ case *v1.Task_ActionStatus:
+ return taskTypes.ActionStatusType
default:
return taskTypes.UnknownType
}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/entitlement/entitlement.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/entitlement/entitlement.go
new file mode 100644
index 00000000..69699b79
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/entitlement/entitlement.go
@@ -0,0 +1,73 @@
+package entitlement
+
+import (
+ "fmt"
+
+ v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
+ "github.com/conductorone/baton-sdk/pkg/annotations"
+ "google.golang.org/protobuf/proto"
+)
+
+type EntitlementOption func(*v2.Entitlement)
+
+func WithAnnotation(msgs ...proto.Message) EntitlementOption {
+ return func(e *v2.Entitlement) {
+ annos := annotations.Annotations(e.Annotations)
+ for _, msg := range msgs {
+ annos.Append(msg)
+ }
+ e.Annotations = annos
+ }
+}
+
+func WithGrantableTo(grantableTo ...*v2.ResourceType) EntitlementOption {
+ return func(g *v2.Entitlement) {
+ g.GrantableTo = grantableTo
+ }
+}
+
+func WithDisplayName(displayName string) EntitlementOption {
+ return func(g *v2.Entitlement) {
+ g.DisplayName = displayName
+ }
+}
+
+func WithDescription(description string) EntitlementOption {
+ return func(g *v2.Entitlement) {
+ g.Description = description
+ }
+}
+
+func NewEntitlementID(resource *v2.Resource, permission string) string {
+ return fmt.Sprintf("%s:%s:%s", resource.Id.ResourceType, resource.Id.Resource, permission)
+}
+
+func NewPermissionEntitlement(resource *v2.Resource, name string, entitlementOptions ...EntitlementOption) *v2.Entitlement {
+ entitlement := &v2.Entitlement{
+ Id: NewEntitlementID(resource, name),
+ DisplayName: name,
+ Slug: name,
+ Purpose: v2.Entitlement_PURPOSE_VALUE_PERMISSION,
+ Resource: resource,
+ }
+
+ for _, entitlementOption := range entitlementOptions {
+ entitlementOption(entitlement)
+ }
+ return entitlement
+}
+
+func NewAssignmentEntitlement(resource *v2.Resource, name string, entitlementOptions ...EntitlementOption) *v2.Entitlement {
+ entitlement := &v2.Entitlement{
+ Id: NewEntitlementID(resource, name),
+ DisplayName: name,
+ Slug: name,
+ Purpose: v2.Entitlement_PURPOSE_VALUE_ASSIGNMENT,
+ Resource: resource,
+ }
+
+ for _, entitlementOption := range entitlementOptions {
+ entitlementOption(entitlement)
+ }
+ return entitlement
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/grant/grant.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/grant/grant.go
new file mode 100644
index 00000000..c662d7bf
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/grant/grant.go
@@ -0,0 +1,111 @@
+package grant
+
+import (
+ "fmt"
+
+ v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2"
+ "github.com/conductorone/baton-sdk/pkg/annotations"
+ eopt "github.com/conductorone/baton-sdk/pkg/types/entitlement"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/structpb"
+)
+
+type GrantOption func(*v2.Grant) error
+
+type GrantPrincipal interface {
+ proto.Message
+ GetBatonResource() bool
+}
+
+// Sometimes C1 doesn't have the grant ID, but does have the principal and entitlement.
+const UnknownGrantId string = "🧸_UNKNOWN_GRANT_ID"
+
+func WithGrantMetadata(metadata map[string]interface{}) GrantOption {
+ return func(g *v2.Grant) error {
+ md, err := structpb.NewStruct(metadata)
+ if err != nil {
+ return err
+ }
+
+ meta := &v2.GrantMetadata{Metadata: md}
+ annos := annotations.Annotations(g.Annotations)
+ annos.Update(meta)
+ g.Annotations = annos
+
+ return nil
+ }
+}
+
+func WithExternalPrincipalID(externalID *v2.ExternalId) GrantOption {
+ return func(g *v2.Grant) error {
+ g.Principal.ExternalId = externalID
+ return nil
+ }
+}
+
+func WithAnnotation(msgs ...proto.Message) GrantOption {
+ return func(g *v2.Grant) error {
+ annos := annotations.Annotations(g.Annotations)
+ for _, msg := range msgs {
+ annos.Append(msg)
+ }
+ g.Annotations = annos
+
+ return nil
+ }
+}
+
+// NewGrant returns a new grant for the given entitlement on the resource for the provided principal resource ID.
+func NewGrant(resource *v2.Resource, entitlementName string, principal GrantPrincipal, grantOptions ...GrantOption) *v2.Grant {
+ entitlement := &v2.Entitlement{
+ Id: eopt.NewEntitlementID(resource, entitlementName),
+ Resource: resource,
+ }
+
+ grant := &v2.Grant{
+ Entitlement: entitlement,
+ }
+
+ var resourceID *v2.ResourceId
+ switch p := principal.(type) {
+ case *v2.ResourceId:
+ resourceID = p
+ grant.Principal = &v2.Resource{Id: p}
+ case *v2.Resource:
+ grant.Principal = p
+ resourceID = p.Id
+ default:
+ panic("unexpected principal type")
+ }
+
+ if resourceID == nil {
+ panic("principal resource must have a valid resource ID")
+ }
+ grant.Id = fmt.Sprintf("%s:%s:%s", entitlement.Id, resourceID.ResourceType, resourceID.Resource)
+
+ for _, grantOption := range grantOptions {
+ err := grantOption(grant)
+ if err != nil {
+ panic(err)
+ }
+ }
+
+ return grant
+}
+
+func NewGrantID(principal GrantPrincipal, entitlement *v2.Entitlement) string {
+ var resourceID *v2.ResourceId
+ switch p := principal.(type) {
+ case *v2.ResourceId:
+ resourceID = p
+ case *v2.Resource:
+ resourceID = p.Id
+ default:
+ panic("unexpected principal type")
+ }
+
+ if resourceID == nil {
+ panic("principal resource must have a valid resource ID")
+ }
+ return fmt.Sprintf("%s:%s:%s", entitlement.Id, resourceID.ResourceType, resourceID.Resource)
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/secret_trait.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/secret_trait.go
index 2852a90f..520f677c 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/secret_trait.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/secret_trait.go
@@ -38,6 +38,13 @@ func WithSecretCreatedByID(createdById *v2.ResourceId) SecretTraitOption {
}
}
+func WithSecretIdentityID(identityId *v2.ResourceId) SecretTraitOption {
+ return func(t *v2.SecretTrait) error {
+ t.IdentityId = identityId
+ return nil
+ }
+}
+
// NewSecretTrait creates a new `SecretTrait` with the given options.
func NewSecretTrait(opts ...SecretTraitOption) (*v2.SecretTrait, error) {
SecretTrait := &v2.SecretTrait{}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/user_trait.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/user_trait.go
index aefcdc7c..f37ddf2a 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/user_trait.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/resource/user_trait.go
@@ -114,6 +114,13 @@ func WithSSOStatus(ssoStatus *v2.UserTrait_SSOStatus) UserTraitOption {
}
}
+func WithStructuredName(structuredName *v2.UserTrait_StructuredName) UserTraitOption {
+ return func(ut *v2.UserTrait) error {
+ ut.StructuredName = structuredName
+ return nil
+ }
+}
+
// NewUserTrait creates a new `UserTrait`.
func NewUserTrait(opts ...UserTraitOption) (*v2.UserTrait, error) {
userTrait := &v2.UserTrait{}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go
index ad89817a..71dd5dee 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/tasks/tasks.go
@@ -50,6 +50,14 @@ func (tt TaskType) String() string {
return "bulk_create_tickets"
case BulkGetTicketsType:
return "bulk_get_tickets"
+ case ActionListSchemasType:
+ return "list_action_schemas"
+ case ActionGetSchemaType:
+ return "get_action_schema"
+ case ActionInvokeType:
+ return "invoke_action"
+ case ActionStatusType:
+ return "action_status"
default:
return "unknown"
}
@@ -80,4 +88,8 @@ const (
StartDebugging
BulkCreateTicketsType
BulkGetTicketsType
+ ActionListSchemasType
+ ActionGetSchemaType
+ ActionInvokeType
+ ActionStatusType
)
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/types/types.go b/vendor/github.com/conductorone/baton-sdk/pkg/types/types.go
index 1803d2ff..b82cd451 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/types/types.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/types/types.go
@@ -17,10 +17,12 @@ type ConnectorServer interface {
connectorV2.AssetServiceServer
connectorV2.GrantManagerServiceServer
connectorV2.ResourceManagerServiceServer
+ connectorV2.ResourceDeleterServiceServer
connectorV2.AccountManagerServiceServer
connectorV2.CredentialManagerServiceServer
connectorV2.EventServiceServer
connectorV2.TicketsServiceServer
+ connectorV2.ActionServiceServer
}
// ConnectorClient is an interface for a type that implements all ConnectorV2 services.
@@ -33,10 +35,12 @@ type ConnectorClient interface {
connectorV2.AssetServiceClient
connectorV2.GrantManagerServiceClient
connectorV2.ResourceManagerServiceClient
+ connectorV2.ResourceDeleterServiceClient
connectorV2.AccountManagerServiceClient
connectorV2.CredentialManagerServiceClient
connectorV2.EventServiceClient
connectorV2.TicketsServiceClient
+ connectorV2.ActionServiceClient
}
// ClientWrapper is an interface that returns a connector client.
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/ugrpc/c1_credential_provider.go b/vendor/github.com/conductorone/baton-sdk/pkg/ugrpc/c1_credential_provider.go
index 8dbae2d5..05b21aa1 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/ugrpc/c1_credential_provider.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/ugrpc/c1_credential_provider.go
@@ -14,15 +14,15 @@ import (
"time"
"github.com/conductorone/baton-sdk/pkg/uhttp"
+ "github.com/go-jose/go-jose/v4"
+ "github.com/go-jose/go-jose/v4/json"
+ "github.com/go-jose/go-jose/v4/jwt"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
"github.com/pquerna/xjwt"
"golang.org/x/oauth2"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/status"
- "gopkg.in/square/go-jose.v2"
- "gopkg.in/square/go-jose.v2/json"
- "gopkg.in/square/go-jose.v2/jwt"
)
const (
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/body_print.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/body_print.go
new file mode 100644
index 00000000..861e084b
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/body_print.go
@@ -0,0 +1,40 @@
+package uhttp
+
+// Implements a debugging facility for request responses. This changes
+// the behavior of `BaseHttpClient` with an unexported flag.
+//
+// IMPORTANT: This feature is intended for development and debugging purposes only.
+// Do not enable in production as it may expose sensitive information in logs.
+//
+// Usage:
+// client := uhttp.NewBaseHttpClient(
+// httpClient,
+// uhttp.WithPrintBody(true), // Enable response body printing
+// )
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "os"
+)
+
+type printReader struct {
+ reader io.Reader
+}
+
+func (pr *printReader) Read(p []byte) (int, error) {
+ n, err := pr.reader.Read(p)
+ if n > 0 {
+ _, merr := fmt.Fprint(os.Stdout, string(p[:n]))
+ if merr != nil {
+ return -1, errors.Join(err, merr)
+ }
+ }
+
+ return n, err
+}
+
+func wrapPrintBody(body io.Reader) io.Reader {
+ return &printReader{reader: body}
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
index 47f4c074..c1a61de0 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uhttp/wrapper.go
@@ -10,6 +10,7 @@ import (
"io"
"net/http"
"net/url"
+ "os"
"syscall"
"time"
@@ -33,8 +34,6 @@ const (
authorizationHeader = "Authorization"
)
-const maxBodySize = 4096
-
type WrapperResponse struct {
Header http.Header
Body []byte
@@ -140,8 +139,8 @@ func WithJSONResponse(response interface{}) DoOption {
if !IsJSONContentType(contentHeader) {
if len(resp.Body) != 0 {
- // we want to see the body regardless
- return fmt.Errorf("unexpected content type for JSON response: %s. status code: %d. body: «%s»", contentHeader, resp.StatusCode, logBody(resp.Body, maxBodySize))
+ // to print the response, set the envvar BATON_DEBUG_PRINT_RESPONSE_BODY as non-empty, instead
+ return fmt.Errorf("unexpected content type for JSON response: %s. status code: %d", contentHeader, resp.StatusCode)
}
return fmt.Errorf("unexpected content type for JSON response: %s. status code: %d", contentHeader, resp.StatusCode)
}
@@ -150,7 +149,8 @@ func WithJSONResponse(response interface{}) DoOption {
}
err := json.Unmarshal(resp.Body, response)
if err != nil {
- return fmt.Errorf("failed to unmarshal json response: %w. status code: %d. body %v", err, resp.StatusCode, logBody(resp.Body, maxBodySize))
+ // to print the response, set the envvar BATON_DEBUG_PRINT_RESPONSE_BODY as non-empty, instead
+ return fmt.Errorf("failed to unmarshal json response: %w. status code: %d", err, resp.StatusCode)
}
return nil
}
@@ -164,19 +164,13 @@ func WithAlwaysJSONResponse(response interface{}) DoOption {
}
err := json.Unmarshal(resp.Body, response)
if err != nil {
- return fmt.Errorf("failed to unmarshal json response: %w. status code: %d. body %v", err, resp.StatusCode, logBody(resp.Body, maxBodySize))
+ // to print the response, set the envvar BATON_DEBUG_PRINT_RESPONSE_BODY as non-empty, instead
+ return fmt.Errorf("failed to unmarshal json response: %w. status code: %d", err, resp.StatusCode)
}
return nil
}
}
-func logBody(body []byte, size int) string {
- if len(body) > size {
- return string(body[:size]) + " ..."
- }
- return string(body)
-}
-
type ErrorResponse interface {
Message() string
}
@@ -190,12 +184,14 @@ func WithErrorResponse(resource ErrorResponse) DoOption {
contentHeader := resp.Header.Get(ContentType)
if !IsJSONContentType(contentHeader) {
- return fmt.Errorf("unexpected content type for JSON error response: %s. status code: %d. body: «%s»", contentHeader, resp.StatusCode, logBody(resp.Body, maxBodySize))
+ // to print the response, set the envvar BATON_DEBUG_PRINT_RESPONSE_BODY as non-empty, instead
+ return fmt.Errorf("unexpected content type for JSON error response: %s. status code: %d", contentHeader, resp.StatusCode)
}
// Decode the JSON response body into the ErrorResponse
if err := json.Unmarshal(resp.Body, &resource); err != nil {
- return fmt.Errorf("failed to unmarshal JSON error response: %w. status code: %d. body %v", err, resp.StatusCode, logBody(resp.Body, maxBodySize))
+ // to print the response, set the envvar BATON_DEBUG_PRINT_RESPONSE_BODY as non-empty, instead
+ return fmt.Errorf("failed to unmarshal JSON error response: %w. status code: %d", err, resp.StatusCode)
}
// Construct a more detailed error message
@@ -341,7 +337,12 @@ func (c *BaseHttpClient) Do(req *http.Request, options ...DoOption) (*http.Respo
}
// Replace resp.Body with a no-op closer so nobody has to worry about closing the reader.
- resp.Body = io.NopCloser(bytes.NewBuffer(body))
+ shouldPrint := os.Getenv("BATON_DEBUG_PRINT_RESPONSE_BODY")
+ if shouldPrint != "" {
+ resp.Body = io.NopCloser(wrapPrintBody(bytes.NewBuffer(body)))
+ } else {
+ resp.Body = io.NopCloser(bytes.NewBuffer(body))
+ }
wresp := WrapperResponse{
Header: resp.Header,
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/uotel/uotel.go b/vendor/github.com/conductorone/baton-sdk/pkg/uotel/uotel.go
new file mode 100644
index 00000000..b4fd3e27
--- /dev/null
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/uotel/uotel.go
@@ -0,0 +1,83 @@
+package uotel
+
+import (
+ "context"
+ "errors"
+ "fmt"
+
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
+ "go.opentelemetry.io/otel/propagation"
+ "go.opentelemetry.io/otel/sdk/resource"
+ sdktrace "go.opentelemetry.io/otel/sdk/trace"
+ semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials/insecure"
+)
+
+func InitOtel(ctx context.Context, endpoint string, serviceName string) (func(context.Context) error, error) {
+ if endpoint == "" {
+ return func(context.Context) error {
+ return nil
+ }, nil
+ }
+ conn, err := grpc.NewClient(endpoint,
+ grpc.WithTransportCredentials(insecure.NewCredentials()),
+ )
+ if err != nil {
+ return nil, fmt.Errorf("failed to create gRPC connection to collector: %w", err)
+ }
+
+ res, err := resource.New(ctx,
+ resource.WithAttributes(
+ semconv.ServiceNameKey.String(serviceName),
+ ),
+ )
+ if err != nil {
+ return nil, fmt.Errorf("failed to create otel resource: %w", err)
+ }
+
+ var shutdowns []func(context.Context) error
+
+ tracerShutdown, err := initTracerProvider(ctx, res, conn)
+ if err != nil {
+ return nil, fmt.Errorf("failed to initialize tracer provider: %w", err)
+ }
+ shutdowns = append(shutdowns, tracerShutdown)
+
+ shutdowns = append(shutdowns, func(context.Context) error {
+ return conn.Close()
+ })
+
+ return func(ctx context.Context) error {
+ var errs error
+ for _, shutdown := range shutdowns {
+ if err := shutdown(ctx); err != nil {
+ errs = errors.Join(errs, err)
+ }
+ }
+ return errs
+ }, nil
+}
+
+func initTracerProvider(ctx context.Context, res *resource.Resource, conn *grpc.ClientConn) (func(context.Context) error, error) {
+ traceExporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithGRPCConn(conn))
+ if err != nil {
+ return nil, fmt.Errorf("failed to create trace exporter: %w", err)
+ }
+
+ ssp := sdktrace.NewSimpleSpanProcessor(traceExporter)
+ tracerProvider := sdktrace.NewTracerProvider(
+ sdktrace.WithSampler(sdktrace.AlwaysSample()),
+ sdktrace.WithResource(res),
+ sdktrace.WithSpanProcessor(ssp),
+ )
+ otel.SetTracerProvider(tracerProvider)
+
+ otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(
+ propagation.TraceContext{},
+ propagation.Baggage{},
+ ))
+
+ return tracerProvider.Shutdown, nil
+}
diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/us3/s3.go b/vendor/github.com/conductorone/baton-sdk/pkg/us3/s3.go
index ed1dbe97..2f9f05c2 100644
--- a/vendor/github.com/conductorone/baton-sdk/pkg/us3/s3.go
+++ b/vendor/github.com/conductorone/baton-sdk/pkg/us3/s3.go
@@ -256,22 +256,6 @@ func NewClient(ctx context.Context, bucketName string, opts ...Option) (*S3Clien
)
}
- if cfg.endpointURL != "" {
- customResolver := awsSdk.EndpointResolverWithOptionsFunc(func(service string, region string, optFns ...interface{}) (awsSdk.Endpoint, error) {
- if service == s3.ServiceID && region == cfg.region {
- return awsSdk.Endpoint{
- PartitionID: "aws",
- URL: cfg.endpointURL,
- SigningRegion: cfg.region,
- HostnameImmutable: true,
- }, nil
- }
-
- return awsSdk.Endpoint{}, &awsSdk.EndpointNotFoundError{}
- })
- awsOpts = append(awsOpts, awsConfig.WithEndpointResolverWithOptions(customResolver))
- }
-
baseConfig, err := awsConfig.LoadDefaultConfig(ctx, awsOpts...)
if err != nil {
return nil, fmt.Errorf("error loading aws cfg: %w", err)
@@ -343,7 +327,14 @@ func (s *S3Client) newConfiguredS3Client(ctx context.Context) (*s3.Client, error
return nil, err
}
- s3svc := s3.NewFromConfig(callingConfig)
+ s3svc := s3.NewFromConfig(callingConfig,
+ func(o *s3.Options) {
+ if s.cfg.endpointURL == "" {
+ ep := s.cfg.endpointURL
+ o.BaseEndpoint = &ep
+ }
+ },
+ )
location, err := s3svc.GetBucketLocation(ctx, &s3.GetBucketLocationInput{
Bucket: awsSdk.String(s.cfg.bucketName),
})
diff --git a/vendor/github.com/conductorone/dpop/LICENSE b/vendor/github.com/conductorone/dpop/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/LICENSE b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/Makefile b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/Makefile
new file mode 100644
index 00000000..c56e0571
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/Makefile
@@ -0,0 +1,11 @@
+.PHONY: generate
+generate:
+ buf generate
+
+.PHONY: lint
+lint:
+ buf lint
+
+.PHONY: test
+test: generate
+ go test -v ./...
\ No newline at end of file
diff --git a/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/buf.gen.yaml b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/buf.gen.yaml
new file mode 100644
index 00000000..16c6ac76
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/buf.gen.yaml
@@ -0,0 +1,8 @@
+version: v1
+plugins:
+ - plugin: buf.build/protocolbuffers/go
+ out: .
+ opt: paths=source_relative
+ - plugin: buf.build/grpc/go
+ out: .
+ opt: paths=source_relative
\ No newline at end of file
diff --git a/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/buf.yaml b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/buf.yaml
new file mode 100644
index 00000000..02d4ac08
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/buf.yaml
@@ -0,0 +1,12 @@
+version: v1
+breaking:
+ use:
+ - FILE
+lint:
+ use:
+ - DEFAULT
+ except:
+ - PACKAGE_VERSION_SUFFIX
+ - PACKAGE_DIRECTORY_MATCH
+deps:
+ - buf.build/googleapis/googleapis
\ No newline at end of file
diff --git a/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/bufnet_resolver.go b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/bufnet_resolver.go
new file mode 100644
index 00000000..60064e90
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/bufnet_resolver.go
@@ -0,0 +1,44 @@
+package dpop_grpc
+
+import (
+ "google.golang.org/grpc/resolver"
+)
+
+const bufnetScheme = "bufnet"
+
+// bufnetResolverBuilder is a resolver builder for bufconn tests
+type bufnetResolverBuilder struct{}
+
+func (b *bufnetResolverBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) {
+ r := &bufnetResolver{
+ target: target,
+ cc: cc,
+ }
+ r.start()
+ return r, nil
+}
+
+func (b *bufnetResolverBuilder) Scheme() string {
+ return bufnetScheme
+}
+
+// bufnetResolver is a resolver for bufconn tests
+type bufnetResolver struct {
+ target resolver.Target
+ cc resolver.ClientConn
+}
+
+func (r *bufnetResolver) start() {
+ r.cc.UpdateState(resolver.State{
+ Addresses: []resolver.Address{{Addr: r.target.Endpoint()}},
+ })
+}
+
+func (r *bufnetResolver) ResolveNow(resolver.ResolveNowOptions) {}
+
+func (r *bufnetResolver) Close() {}
+
+// registerBufnetResolver registers the bufnet resolver builder
+func registerBufnetResolver() {
+ resolver.Register(&bufnetResolverBuilder{})
+}
diff --git a/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/client_credential.go b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/client_credential.go
new file mode 100644
index 00000000..4a8b4ce9
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/client_credential.go
@@ -0,0 +1,80 @@
+package dpop_grpc
+
+import (
+ "context"
+ "errors"
+ "net/url"
+
+ "github.com/conductorone/dpop/pkg/dpop"
+ "golang.org/x/oauth2"
+ "google.golang.org/grpc/credentials"
+)
+
+// DPoPCredentials implements the credentials.PerRPCCredentials interface
+// to provide DPoP proof generation and OAuth2 token injection for gRPC calls
+type DPoPCredentials struct {
+ proofer *dpop.Proofer
+ authority string
+ proofOpts []dpop.ProofOption
+ tokenSource oauth2.TokenSource
+ requireTLS bool
+}
+
+// NewDPoPCredentials creates a new DPoPCredentials instance
+func NewDPoPCredentials(
+ proofer *dpop.Proofer,
+ tokenSource oauth2.TokenSource,
+ authority string,
+ proofOpts []dpop.ProofOption,
+) (*DPoPCredentials, error) {
+ return &DPoPCredentials{
+ proofer: proofer,
+ authority: authority,
+ proofOpts: proofOpts,
+ tokenSource: tokenSource,
+ requireTLS: true,
+ }, nil
+}
+
+var _ credentials.PerRPCCredentials = (*DPoPCredentials)(nil)
+
+// GetRequestMetadata implements credentials.PerRPCCredentials.GetRequestMetadata
+func (d *DPoPCredentials) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) {
+ reqInfo, ok := credentials.RequestInfoFromContext(ctx)
+ if !ok {
+ return nil, errors.New("dpop_grpc: DPoPCredentials: GetRequestMetadata: missing request info")
+ }
+
+ // Construct the full URL for the method
+ fullURL := url.URL{
+ Scheme: "https",
+ Host: d.authority,
+ Path: reqInfo.Method,
+ }
+ // Get the OAuth2 token
+ token, err := d.tokenSource.Token()
+ if err != nil {
+ return nil, err
+ }
+
+ // Add access token to proof options
+ finalProofOpts := append([]dpop.ProofOption{}, d.proofOpts...)
+ finalProofOpts = append(finalProofOpts, dpop.WithAccessToken(token.AccessToken))
+
+ // Generate the proof
+ dpopProof, err := d.proofer.CreateProof(ctx, "POST", fullURL.String(), finalProofOpts...)
+ if err != nil {
+ return nil, err
+ }
+
+ // Return both DPoP and Authorization headers
+ return map[string]string{
+ dpop.HeaderName: dpopProof,
+ AuthorizationHeaderName: token.Type() + " " + token.AccessToken,
+ }, nil
+}
+
+// RequireTransportSecurity implements credentials.PerRPCCredentials.RequireTransportSecurity
+func (d *DPoPCredentials) RequireTransportSecurity() bool {
+ return d.requireTLS
+}
diff --git a/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/client_interceptor.go b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/client_interceptor.go
new file mode 100644
index 00000000..2b4236a1
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/client_interceptor.go
@@ -0,0 +1,119 @@
+// Package dpop_grpc provides gRPC client interceptors with DPoP support
+package dpop_grpc
+
+import (
+ "context"
+ "net/url"
+
+ "github.com/conductorone/dpop/pkg/dpop"
+ "github.com/go-jose/go-jose/v4"
+ "golang.org/x/oauth2"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/metadata"
+)
+
+const (
+ // AuthorizationHeaderName is the name of the Authorization header
+ AuthorizationHeaderName = "authorization"
+)
+
+// getFullMethodURL constructs the full URL for a gRPC method using the connection target
+func getFullMethodURL(cc *grpc.ClientConn, method string) (string, error) {
+ // Get the target URI from the connection
+ target := cc.Target()
+
+ // Parse the target as a URL
+ parsedURL, err := url.Parse(target)
+ if err != nil {
+ return "", err
+ }
+
+ outURL := url.URL{
+ Scheme: "https",
+ Host: parsedURL.Host,
+ Path: method,
+ }
+
+ return outURL.String(), nil
+}
+
+// ClientUnaryInterceptor creates a new unary client interceptor with DPoP and OAuth2 support
+func ClientUnaryInterceptor(key *jose.JSONWebKey, tokenSource oauth2.TokenSource, proofOpts []dpop.ProofOption) (grpc.UnaryClientInterceptor, error) {
+ proofer, err := dpop.NewProofer(key)
+ if err != nil {
+ return nil, err
+ }
+
+ return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, callOpts ...grpc.CallOption) error {
+ // Get the full method URL
+ fullURL, err := getFullMethodURL(cc, method)
+ if err != nil {
+ return err
+ }
+
+ token, err := tokenSource.Token()
+ if err != nil {
+ return err
+ }
+
+ // Add access token to proof options
+ finalProofOpts := append([]dpop.ProofOption{}, proofOpts...)
+ finalProofOpts = append(finalProofOpts, dpop.WithAccessToken(token.AccessToken))
+
+ // Generate the proof
+ dpopProof, err := proofer.CreateProof(ctx, "POST", fullURL, finalProofOpts...)
+ if err != nil {
+ return err
+ }
+
+ // Add both DPoP and Authorization headers to the outgoing context
+ ctx = metadata.AppendToOutgoingContext(ctx,
+ dpop.HeaderName, dpopProof,
+ AuthorizationHeaderName, token.Type()+" "+token.AccessToken,
+ )
+
+ // Call the next handler
+ return invoker(ctx, method, req, reply, cc, callOpts...)
+ }, nil
+}
+
+// ClientStreamInterceptor creates a new stream client interceptor with DPoP and OAuth2 support
+func ClientStreamInterceptor(key *jose.JSONWebKey, tokenSource oauth2.TokenSource, proofOpts []dpop.ProofOption) (grpc.StreamClientInterceptor, error) {
+ proofer, err := dpop.NewProofer(key)
+ if err != nil {
+ return nil, err
+ }
+
+ return func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, callOpts ...grpc.CallOption) (grpc.ClientStream, error) {
+ // Get the full method URL
+ fullURL, err := getFullMethodURL(cc, method)
+ if err != nil {
+ return nil, err
+ }
+
+ // Get the OAuth2 token
+ token, err := tokenSource.Token()
+ if err != nil {
+ return nil, err
+ }
+
+ // Add access token to proof options
+ finalProofOpts := append([]dpop.ProofOption{}, proofOpts...)
+ finalProofOpts = append(finalProofOpts, dpop.WithAccessToken(token.AccessToken))
+
+ // Generate the proof
+ dpopProof, err := proofer.CreateProof(ctx, "POST", fullURL, finalProofOpts...)
+ if err != nil {
+ return nil, err
+ }
+
+ // Add both DPoP and Authorization headers to the outgoing context
+ ctx = metadata.AppendToOutgoingContext(ctx,
+ dpop.HeaderName, dpopProof,
+ AuthorizationHeaderName, token.Type()+" "+token.AccessToken,
+ )
+
+ // Call the next handler
+ return streamer(ctx, desc, cc, method, callOpts...)
+ }, nil
+}
diff --git a/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/server_interceptor.go b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/server_interceptor.go
new file mode 100644
index 00000000..3d5e838d
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/integrations/dpop_grpc/server_interceptor.go
@@ -0,0 +1,263 @@
+// Package dpop_grpc provides gRPC server interceptors with DPoP support
+package dpop_grpc
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net/url"
+ "strings"
+
+ "github.com/conductorone/dpop/pkg/dpop"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+)
+
+var (
+ // ErrMissingDPoPHeader is returned when the DPoP header is missing
+ ErrMissingDPoPHeader = errors.New("missing DPoP header")
+
+ // ErrInvalidDPoPHeader is returned when the DPoP header is invalid
+ ErrInvalidDPoPHeader = errors.New("invalid DPoP header")
+
+ // ErrInvalidAuthScheme is returned when the Authorization header has an invalid scheme
+ ErrInvalidAuthScheme = errors.New("invalid authorization scheme")
+)
+
+const (
+ // AuthorizationHeader is the standard HTTP header for authorization
+ AuthorizationHeader = "authorization"
+ // DPoPScheme is the scheme used for DPoP bound tokens
+ DPoPScheme = "DPoP"
+ // BearerScheme is the scheme used for Bearer tokens
+ BearerScheme = "Bearer"
+)
+
+// serverOptions configures the behavior of the DPoP interceptor
+type serverOptions struct {
+ // validationOptions are the options for DPoP proof validation
+ validationOptions []dpop.Option
+
+ // nonceGenerator generates nonces for DPoP proofs
+ nonceGenerator dpop.NonceGenerator
+
+ // authority is the authority to use for DPoP proof validation
+ authority string
+}
+
+// ServerOption configures how we set up the DPoP interceptor
+type ServerOption func(*serverOptions)
+
+// WithValidationOptions sets the validation options for DPoP proof validation
+func WithValidationOptions(opts ...dpop.Option) ServerOption {
+ return func(o *serverOptions) {
+ o.validationOptions = opts
+ }
+}
+
+func WithAuthority(authority string) ServerOption {
+ return func(o *serverOptions) {
+ o.authority = authority
+ }
+}
+
+// WithNonceGenerator sets the nonce generator for DPoP proofs
+func WithNonceGenerator(ng dpop.NonceGenerator) ServerOption {
+ return func(o *serverOptions) {
+ o.nonceGenerator = ng
+ }
+}
+
+// defaultServerOptions returns the default options for the interceptor
+func defaultServerOptions() *serverOptions {
+ return &serverOptions{
+ validationOptions: nil, // Will use defaults from dpop.NewValidator
+ }
+}
+
+// ServerUnaryInterceptor creates a new unary server interceptor with DPoP support
+func ServerUnaryInterceptor(opts ...ServerOption) grpc.UnaryServerInterceptor {
+ options := defaultServerOptions()
+ for _, opt := range opts {
+ opt(options)
+ }
+
+ validator := dpop.NewValidator(options.validationOptions...)
+
+ return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
+ // Generate and set a new nonce for the next request
+ if options.nonceGenerator != nil {
+ nonce, err := options.nonceGenerator(ctx)
+ if err != nil {
+ return nil, status.Error(codes.Unauthenticated, fmt.Sprintf("failed to generate nonce: %v", err))
+ }
+ header := metadata.Pairs(dpop.NonceHeaderName, nonce)
+ grpc.SetHeader(ctx, header)
+ }
+
+ // Get the DPoP proof from the metadata
+ md, ok := metadata.FromIncomingContext(ctx)
+ if !ok {
+ return nil, status.Error(codes.Unauthenticated, "missing metadata")
+ }
+
+ // Get DPoP proof and Authorization header
+ proofs := md.Get(dpop.HeaderName)
+ authHeaders := md.Get(AuthorizationHeader)
+
+ // Parse Authorization header if present
+ var authScheme, accessToken string
+ if len(authHeaders) > 0 {
+ parts := strings.SplitN(authHeaders[0], " ", 2)
+ if len(parts) != 2 {
+ return nil, status.Error(codes.Unauthenticated, "invalid authorization scheme")
+ }
+ authScheme = parts[0]
+ accessToken = parts[1]
+ }
+
+ // If there's no DPoP proof and no DPoP Authorization header, proceed with the request
+ // This allows the interceptor to be used where some endpoints don't require DPoP
+ if len(proofs) == 0 && authScheme != DPoPScheme {
+ return handler(ctx, req)
+ }
+
+ // Here, we know this request must be DPoP validated, so make sure we have a proof
+ if len(proofs) == 0 {
+ return nil, status.Error(codes.Unauthenticated, "missing DPoP header")
+ }
+
+ // If we have an Authorization header, it must be DPoP
+ if len(authHeaders) > 0 && authScheme != DPoPScheme {
+ return nil, status.Error(codes.Unauthenticated, "invalid authorization scheme")
+ }
+
+ // Prepare validation options
+ var validationOpts []dpop.ValidationProofOption
+ if authScheme == DPoPScheme {
+ // If using DPoP scheme, the proof MUST be bound to the access token
+ validationOpts = append(validationOpts, dpop.WithProofExpectedAccessToken(accessToken))
+ }
+
+ // Validate the proof
+ fullURL := url.URL{
+ Scheme: "https",
+ Host: options.authority,
+ Path: info.FullMethod,
+ }
+ claims, err := validator.ValidateProof(ctx, proofs[0], "POST", fullURL.String(), validationOpts...)
+ if err != nil {
+ return nil, status.Error(codes.Unauthenticated, fmt.Sprintf("invalid DPoP proof: %v", err))
+ }
+
+ // Store the validated claims in the context
+ ctx = dpop.WithClaims(ctx, claims)
+
+ // Call the handler
+ return handler(ctx, req)
+ }
+}
+
+// ServerStreamInterceptor creates a new stream server interceptor with DPoP support
+func ServerStreamInterceptor(opts ...ServerOption) grpc.StreamServerInterceptor {
+ options := defaultServerOptions()
+ for _, opt := range opts {
+ opt(options)
+ }
+
+ validator := dpop.NewValidator(options.validationOptions...)
+
+ return func(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
+ ctx := ss.Context()
+
+ // Generate and set a new nonce for the next request
+ if options.nonceGenerator != nil {
+ nonce, err := options.nonceGenerator(ctx)
+ if err != nil {
+ return status.Error(codes.Unauthenticated, "failed to generate nonce")
+ }
+ header := metadata.Pairs(dpop.NonceHeaderName, nonce)
+ grpc.SetHeader(ctx, header)
+ }
+
+ // Get the DPoP proof from the metadata
+ md, ok := metadata.FromIncomingContext(ctx)
+ if !ok {
+ return status.Error(codes.Unauthenticated, "missing metadata")
+ }
+
+ // Get DPoP proof and Authorization header
+ proofs := md.Get(dpop.HeaderName)
+ authHeaders := md.Get(AuthorizationHeader)
+
+ // Parse Authorization header if present
+ var authScheme, accessToken string
+ if len(authHeaders) > 0 {
+ parts := strings.SplitN(authHeaders[0], " ", 2)
+ if len(parts) != 2 {
+ return status.Error(codes.Unauthenticated, "invalid authorization scheme")
+ }
+ authScheme = parts[0]
+ accessToken = parts[1]
+ }
+
+ // If there's no DPoP proof and no DPoP Authorization header, proceed with the request
+ // This allows the interceptor to be used where some endpoints don't require DPoP
+ if len(proofs) == 0 && authScheme != DPoPScheme {
+ return handler(srv, ss)
+ }
+
+ // Here, we know this request must be DPoP validated, so make sure we have a proof
+ if len(proofs) == 0 {
+ return status.Error(codes.Unauthenticated, "missing DPoP header")
+ }
+
+ // If we have an Authorization header, it must be DPoP
+ if len(authHeaders) > 0 && authScheme != DPoPScheme {
+ return status.Error(codes.Unauthenticated, "invalid authorization scheme")
+ }
+
+ // Prepare validation options
+ var validationOpts []dpop.ValidationProofOption
+ if authScheme == DPoPScheme {
+ // If using DPoP scheme, the proof MUST be bound to the access token
+ validationOpts = append(validationOpts, dpop.WithProofExpectedAccessToken(accessToken))
+ }
+
+ // Validate the proof
+ fullURL := url.URL{
+ Scheme: "https",
+ Host: options.authority,
+ Path: info.FullMethod,
+ }
+ claims, err := validator.ValidateProof(ctx, proofs[0], "POST", fullURL.String(), validationOpts...)
+ if err != nil {
+ return status.Error(codes.Unauthenticated, fmt.Sprintf("invalid DPoP proof: %v", err))
+ }
+
+ // Store the validated claims in the context
+ ctx = dpop.WithClaims(ctx, claims)
+
+ // Wrap the server stream to use the new context
+ wrappedStream := &wrappedServerStream{
+ ServerStream: ss,
+ ctx: ctx,
+ }
+
+ // Call the handler
+ return handler(srv, wrappedStream)
+ }
+}
+
+// wrappedServerStream wraps grpc.ServerStream to modify the context
+type wrappedServerStream struct {
+ grpc.ServerStream
+ ctx context.Context
+}
+
+// Context returns the wrapper's context
+func (w *wrappedServerStream) Context() context.Context {
+ return w.ctx
+}
diff --git a/vendor/github.com/conductorone/dpop/integrations/dpop_oauth2/LICENSE b/vendor/github.com/conductorone/dpop/integrations/dpop_oauth2/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/integrations/dpop_oauth2/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/conductorone/dpop/integrations/dpop_oauth2/nonce_store.go b/vendor/github.com/conductorone/dpop/integrations/dpop_oauth2/nonce_store.go
new file mode 100644
index 00000000..2295993b
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/integrations/dpop_oauth2/nonce_store.go
@@ -0,0 +1,31 @@
+package dpop_oauth2
+
+import (
+ "sync/atomic"
+)
+
+// NonceStore provides thread-safe storage and retrieval of the most recent DPoP nonce
+type NonceStore struct {
+ currentNonce atomic.Value
+}
+
+// NewNonceStore creates a new NonceStore
+func NewNonceStore() *NonceStore {
+ ns := &NonceStore{}
+ ns.currentNonce.Store("")
+ return ns
+}
+
+// GetNonce returns the current nonce value, or empty string if none is set
+func (ns *NonceStore) GetNonce() string {
+ val := ns.currentNonce.Load()
+ if val == nil {
+ return ""
+ }
+ return val.(string)
+}
+
+// SetNonce updates the current nonce value
+func (ns *NonceStore) SetNonce(nonce string) {
+ ns.currentNonce.Store(nonce)
+}
diff --git a/vendor/github.com/conductorone/dpop/integrations/dpop_oauth2/token_client_assertion.go b/vendor/github.com/conductorone/dpop/integrations/dpop_oauth2/token_client_assertion.go
new file mode 100644
index 00000000..c065ad06
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/integrations/dpop_oauth2/token_client_assertion.go
@@ -0,0 +1,331 @@
+package dpop_oauth2
+
+import (
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "net/http"
+ "net/url"
+ "strings"
+ "time"
+
+ "github.com/conductorone/dpop/pkg/dpop"
+ "github.com/go-jose/go-jose/v4"
+ "github.com/go-jose/go-jose/v4/jwt"
+ "golang.org/x/oauth2"
+)
+
+var (
+ // ErrMissingRequiredField indicates a required field was not provided
+ ErrMissingRequiredField = errors.New("dpop_oauth2: missing required field")
+
+ // ErrInvalidToken indicates the token response was invalid
+ ErrInvalidToken = errors.New("dpop_oauth2: invalid token response")
+
+ // ErrNonceMissing indicates the server requested a nonce but didn't provide one
+ ErrNonceMissing = errors.New("dpop_oauth2: server requested DPoP nonce but did not provide one")
+
+ // ErrTokenRequestFailed indicates the token request failed
+ ErrTokenRequestFailed = errors.New("dpop_oauth2: token request failed")
+
+ // ErrProofCreationFailed indicates failure to create or sign DPoP proof
+ ErrProofCreationFailed = errors.New("dpop_oauth2: failed to create or sign DPoP proof")
+)
+
+const (
+ assertionType = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer-with-identity-attestation"
+)
+
+// TokenRequest encapsulates all the data needed for a token request
+type TokenRequest struct {
+ Claims *jwt.Claims
+ Body url.Values
+ Headers http.Header
+ Marshaler ClaimsMarshaler
+}
+
+// TokenRequestOption is a function that modifies a token request
+type TokenRequestOption func(*TokenRequest) error
+
+// ClaimsMarshaler is a function that marshals JWT claims
+type ClaimsMarshaler func(*jwt.Claims) ([]byte, error)
+
+// defaultMarshaler is the default claims marshaler using JSON
+func defaultMarshaler(claims *jwt.Claims) ([]byte, error) {
+ return json.Marshal(claims)
+}
+
+// WithCustomParameters returns an option that adds additional body parameters
+func WithCustomParameters(fn func(url.Values) error) TokenRequestOption {
+ return func(tr *TokenRequest) error {
+ return fn(tr.Body)
+ }
+}
+
+// WithCustomHeaders returns an option that adds additional headers
+func WithCustomHeaders(fn func(http.Header) error) TokenRequestOption {
+ return func(tr *TokenRequest) error {
+ return fn(tr.Headers)
+ }
+}
+
+// WithCustomMarshaler returns an option that sets a custom claims marshaler
+func WithCustomMarshaler(m ClaimsMarshaler) TokenRequestOption {
+ return func(tr *TokenRequest) error {
+ tr.Marshaler = m
+ return nil
+ }
+}
+
+// TokenSourceOption configures the behavior of the token source
+type TokenSourceOption func(*tokenSourceOptions)
+
+type tokenSourceOptions struct {
+ baseCtx context.Context
+ httpClient *http.Client
+ proofOptions []dpop.ProofOption
+ nonceStore *NonceStore
+ requestOptions []TokenRequestOption
+}
+
+// WithBaseContext sets a custom base context for the token source
+func WithBaseContext(ctx context.Context) TokenSourceOption {
+ return func(opts *tokenSourceOptions) {
+ opts.baseCtx = ctx
+ }
+}
+
+// WithHTTPClient sets a custom HTTP client
+func WithHTTPClient(client *http.Client) TokenSourceOption {
+ return func(opts *tokenSourceOptions) {
+ opts.httpClient = client
+ }
+}
+
+// WithProofOptions sets additional DPoP proof options
+func WithProofOptions(options ...dpop.ProofOption) TokenSourceOption {
+ return func(opts *tokenSourceOptions) {
+ opts.proofOptions = append(opts.proofOptions, options...)
+ }
+}
+
+// WithNonceStore sets a nonce store for DPoP proofs
+func WithNonceStore(store *NonceStore) TokenSourceOption {
+ return func(opts *tokenSourceOptions) {
+ opts.nonceStore = store
+ }
+}
+
+// WithRequestOption adds a TokenRequestOption to modify the token request
+func WithRequestOption(opt TokenRequestOption) TokenSourceOption {
+ return func(opts *tokenSourceOptions) {
+ opts.requestOptions = append(opts.requestOptions, opt)
+ }
+}
+
+func NewTokenSource(proofer *dpop.Proofer, tokenURL *url.URL, clientID string, clientSecret *jose.JSONWebKey, opts ...TokenSourceOption) (*tokenSource, error) {
+ if proofer == nil {
+ return nil, fmt.Errorf("%w: dpop-proofer", ErrMissingRequiredField)
+ }
+
+ if clientID == "" {
+ return nil, fmt.Errorf("%w: client-id", ErrMissingRequiredField)
+ }
+
+ if clientSecret == nil {
+ return nil, fmt.Errorf("%w: client-secret", ErrMissingRequiredField)
+ }
+
+ if tokenURL == nil {
+ return nil, fmt.Errorf("%w: token-url", ErrMissingRequiredField)
+ }
+
+ options := &tokenSourceOptions{
+ baseCtx: context.Background(),
+ httpClient: http.DefaultClient,
+ }
+
+ for _, opt := range opts {
+ opt(options)
+ }
+
+ return &tokenSource{
+ baseCtx: options.baseCtx,
+ clientID: clientID,
+ clientSecret: clientSecret,
+ tokenURL: tokenURL,
+ httpClient: options.httpClient,
+ proofer: proofer,
+ requestOptions: options.requestOptions,
+ proofOptions: options.proofOptions,
+ nonceStore: options.nonceStore,
+ }, nil
+}
+
+type tokenSource struct {
+ baseCtx context.Context
+ clientID string
+ clientSecret *jose.JSONWebKey
+ tokenURL *url.URL
+ httpClient *http.Client
+ proofer *dpop.Proofer
+ requestOptions []TokenRequestOption
+ proofOptions []dpop.ProofOption
+ nonceStore *NonceStore
+}
+
+func (c *tokenSource) Token() (*oauth2.Token, error) {
+ ctx, done := context.WithTimeout(c.baseCtx, time.Second*30)
+ defer done()
+ return c.tryToken(ctx, true)
+}
+
+func (c *tokenSource) tryToken(ctx context.Context, firstAttempt bool) (*oauth2.Token, error) {
+ jsigner, err := jose.NewSigner(
+ jose.SigningKey{
+ Algorithm: jose.EdDSA,
+ Key: c.clientSecret,
+ },
+ nil)
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to create signer: %v", ErrProofCreationFailed, err)
+ }
+
+ // Our token host may include a port, but the audience never expects a port
+ aud := c.tokenURL.Hostname()
+ now := time.Now()
+
+ claims := &jwt.Claims{
+ Issuer: c.clientID,
+ Subject: c.clientID,
+ Audience: jwt.Audience{aud},
+ Expiry: jwt.NewNumericDate(now.Add(time.Minute * 2)),
+ IssuedAt: jwt.NewNumericDate(now),
+ NotBefore: jwt.NewNumericDate(now.Add(-time.Minute * 1)),
+ }
+
+ tr := &TokenRequest{
+ Claims: claims,
+ Body: url.Values{
+ "client_id": []string{c.clientID},
+ "grant_type": []string{"client_credentials"},
+ "client_assertion_type": []string{assertionType},
+ },
+ Headers: http.Header{"Content-Type": []string{"application/x-www-form-urlencoded"}},
+ Marshaler: defaultMarshaler,
+ }
+
+ for _, opt := range c.requestOptions {
+ err = opt(tr)
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to modify request: %v", ErrTokenRequestFailed, err)
+ }
+ }
+
+ marshalledClaims, err := tr.Marshaler(claims)
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to marshal claims: %v", ErrTokenRequestFailed, err)
+ }
+
+ method := http.MethodPost
+
+ proofOpts := make([]dpop.ProofOption, 0, len(c.proofOptions)+2)
+ proofOpts = append(proofOpts, c.proofOptions...)
+
+ // Add nonce if available from store
+ if c.nonceStore != nil {
+ nonce := c.nonceStore.GetNonce()
+ if nonce != "" {
+ proofOpts = append(proofOpts, dpop.WithStaticNonce(nonce))
+ }
+ }
+
+ dpopProof, err := c.proofer.CreateProof(ctx, method, c.tokenURL.String(), proofOpts...)
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to create proof: %v", ErrProofCreationFailed, err)
+ }
+
+ rv, err := jsigner.Sign(marshalledClaims)
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to sign proof: %v", ErrProofCreationFailed, err)
+ }
+
+ s, err := rv.CompactSerialize()
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to serialize proof: %v", ErrProofCreationFailed, err)
+ }
+
+ tr.Body["client_assertion"] = []string{s}
+
+ req, err := http.NewRequestWithContext(ctx, method, c.tokenURL.String(), strings.NewReader(tr.Body.Encode()))
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to create request: %v", ErrTokenRequestFailed, err)
+ }
+
+ req.Header.Set(dpop.HeaderName, dpopProof)
+ for k, v := range tr.Headers {
+ req.Header[k] = v
+ }
+
+ resp, err := c.httpClient.Do(req)
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to execute request: %v", ErrTokenRequestFailed, err)
+ }
+ defer resp.Body.Close()
+
+ // Check if we got a nonce challenge
+ if resp.StatusCode == http.StatusBadRequest {
+ var errorResp struct {
+ Error string `json:"error"`
+ ErrorDescription string `json:"error_description"`
+ }
+ if err := json.NewDecoder(resp.Body).Decode(&errorResp); err != nil {
+ return nil, fmt.Errorf("%w: failed to decode error response: %v", ErrTokenRequestFailed, err)
+ }
+
+ if errorResp.Error == "use_dpop_nonce" {
+ // Get the new nonce from header
+ nonce := resp.Header.Get(dpop.NonceHeaderName)
+ if nonce == "" {
+ return nil, ErrNonceMissing
+ }
+
+ // Store the nonce if we have a store
+ if c.nonceStore != nil {
+ c.nonceStore.SetNonce(nonce)
+ }
+
+ // Only retry once on first attempt
+ if !firstAttempt {
+ return nil, fmt.Errorf("%w: token request failed after retry: %s - %s", ErrTokenRequestFailed, errorResp.Error, errorResp.ErrorDescription)
+ }
+
+ // Try again with the new nonce
+ return c.tryToken(ctx, false)
+ }
+ return nil, fmt.Errorf("%w: %s - %s", ErrTokenRequestFailed, errorResp.Error, errorResp.ErrorDescription)
+ }
+
+ if resp.StatusCode != http.StatusOK {
+ return nil, fmt.Errorf("%w: unexpected status code: %s", ErrTokenRequestFailed, resp.Status)
+ }
+
+ token := &oauth2.Token{}
+ err = json.NewDecoder(resp.Body).Decode(token)
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to decode token response: %v", ErrInvalidToken, err)
+ }
+
+ if token.AccessToken == "" {
+ return nil, fmt.Errorf("%w: empty access token", ErrInvalidToken)
+ }
+
+ // Accept both DPoP and Bearer tokens
+ // If we sent a DPoP proof but got a Bearer token, that means the AS doesn't support DPoP
+ if !strings.EqualFold(token.TokenType, "DPoP") && !strings.EqualFold(token.TokenType, "Bearer") {
+ return nil, fmt.Errorf("%w: invalid token type: %s", ErrInvalidToken, token.TokenType)
+ }
+
+ return token, nil
+}
diff --git a/vendor/github.com/conductorone/dpop/pkg/dpop/claims.go b/vendor/github.com/conductorone/dpop/pkg/dpop/claims.go
new file mode 100644
index 00000000..ca361777
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/pkg/dpop/claims.go
@@ -0,0 +1,161 @@
+// Package dpop provides DPoP proof validation and creation
+package dpop
+
+import (
+ "encoding/json"
+ "fmt"
+
+ "github.com/go-jose/go-jose/v4"
+ "github.com/go-jose/go-jose/v4/jwt"
+)
+
+// Claims represents the claims in a DPoP proof
+type Claims struct {
+ *jwt.Claims
+ HTTPMethod string `json:"htm"`
+ HTTPUri string `json:"htu"`
+ Nonce string `json:"nonce,omitempty"`
+ TokenHash string `json:"ath,omitempty"`
+ Additional map[string]interface{} `json:"-"`
+
+ // publicKey is the public key used to verify the proof
+ // This field is populated during validation and is not part of the JSON
+ publicKey *jose.JSONWebKey `json:"-"`
+}
+
+// PublicKey returns the public key used to verify the proof
+func (c *Claims) PublicKey() *jose.JSONWebKey {
+ return c.publicKey
+}
+
+// knownJWTClaimsFields is used to detect if new fields are added to jwt.Claims
+// that we need to handle in MarshalJSON/UnmarshalJSON
+var knownJWTClaimsFields = []string{
+ "iss", // Issuer
+ "sub", // Subject
+ "aud", // Audience
+ "exp", // Expiry
+ "nbf", // NotBefore
+ "iat", // IssuedAt
+ "jti", // ID
+}
+
+// MarshalJSON implements json.Marshaler for Claims
+func (c *Claims) MarshalJSON() ([]byte, error) {
+ // Create a map to hold all claims
+ allClaims := make(map[string]interface{})
+
+ // Add the jwt.Claims fields directly
+ if c.Claims != nil {
+ if c.Claims.Issuer != "" {
+ allClaims["iss"] = c.Claims.Issuer
+ }
+ if c.Claims.Subject != "" {
+ allClaims["sub"] = c.Claims.Subject
+ }
+ if len(c.Claims.Audience) > 0 {
+ aud, err := c.Claims.Audience.MarshalJSON()
+ if err != nil {
+ return nil, fmt.Errorf("failed to marshal audience: %w", err)
+ }
+ allClaims["aud"] = json.RawMessage(aud)
+ }
+ if c.Claims.Expiry != nil {
+ exp, err := c.Claims.Expiry.MarshalJSON()
+ if err != nil {
+ return nil, fmt.Errorf("failed to marshal expiry: %w", err)
+ }
+ allClaims["exp"] = json.RawMessage(exp)
+ }
+ if c.Claims.NotBefore != nil {
+ nbf, err := c.Claims.NotBefore.MarshalJSON()
+ if err != nil {
+ return nil, fmt.Errorf("failed to marshal not before: %w", err)
+ }
+ allClaims["nbf"] = json.RawMessage(nbf)
+ }
+ if c.Claims.IssuedAt != nil {
+ iat, err := c.Claims.IssuedAt.MarshalJSON()
+ if err != nil {
+ return nil, fmt.Errorf("failed to marshal issued at: %w", err)
+ }
+ allClaims["iat"] = json.RawMessage(iat)
+ }
+ if c.Claims.ID != "" {
+ allClaims["jti"] = c.Claims.ID
+ }
+ }
+
+ // Add the explicit fields
+ allClaims["htm"] = c.HTTPMethod
+ allClaims["htu"] = c.HTTPUri
+ if c.TokenHash != "" {
+ allClaims["ath"] = c.TokenHash
+ }
+ if c.Nonce != "" {
+ allClaims["nonce"] = c.Nonce
+ }
+
+ // Add any additional claims
+ for k, v := range c.Additional {
+ // Don't override standard claims
+ if _, exists := allClaims[k]; !exists {
+ allClaims[k] = v
+ }
+ }
+
+ return json.Marshal(allClaims)
+}
+
+// UnmarshalJSON implements json.Unmarshaler for Claims
+func (c *Claims) UnmarshalJSON(data []byte) error {
+ // Create a map to hold all claims
+ var allClaims map[string]interface{}
+ if err := json.Unmarshal(data, &allClaims); err != nil {
+ return err
+ }
+
+ // Create a temporary struct to hold the standard fields
+ type StandardClaims struct {
+ HTTPMethod string `json:"htm"`
+ HTTPUri string `json:"htu"`
+ TokenHash string `json:"ath,omitempty"`
+ Nonce string `json:"nonce,omitempty"`
+ }
+
+ // Unmarshal the standard fields
+ var std StandardClaims
+ if err := json.Unmarshal(data, &std); err != nil {
+ return err
+ }
+
+ // Set the standard fields
+ c.HTTPMethod = std.HTTPMethod
+ c.HTTPUri = std.HTTPUri
+ c.TokenHash = std.TokenHash
+ c.Nonce = std.Nonce
+
+ // Create a new jwt.Claims and unmarshal into it
+ c.Claims = new(jwt.Claims)
+ if err := json.Unmarshal(data, c.Claims); err != nil {
+ return err
+ }
+
+ // Initialize the Additional map
+ c.Additional = make(map[string]interface{})
+
+ // Add any non-standard claims to Additional
+ standardFields := map[string]bool{
+ "htm": true, "htu": true, "ath": true, "nonce": true,
+ "iss": true, "sub": true, "aud": true, "exp": true,
+ "nbf": true, "iat": true, "jti": true,
+ }
+
+ for k, v := range allClaims {
+ if !standardFields[k] {
+ c.Additional[k] = v
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/conductorone/dpop/pkg/dpop/context.go b/vendor/github.com/conductorone/dpop/pkg/dpop/context.go
new file mode 100644
index 00000000..e52231b7
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/pkg/dpop/context.go
@@ -0,0 +1,22 @@
+package dpop
+
+import (
+ "context"
+)
+
+type contextKey string
+
+const (
+ claimsContextKey contextKey = "dpop-claims"
+)
+
+// WithClaims stores DPoP claims in the context
+func WithClaims(ctx context.Context, claims *Claims) context.Context {
+ return context.WithValue(ctx, claimsContextKey, claims)
+}
+
+// ClaimsFromContext retrieves DPoP claims from the context
+func ClaimsFromContext(ctx context.Context) (*Claims, bool) {
+ claims, ok := ctx.Value(claimsContextKey).(*Claims)
+ return claims, ok
+}
diff --git a/vendor/github.com/conductorone/dpop/pkg/dpop/headers.go b/vendor/github.com/conductorone/dpop/pkg/dpop/headers.go
new file mode 100644
index 00000000..5f67c354
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/pkg/dpop/headers.go
@@ -0,0 +1,9 @@
+package dpop
+
+// HeaderName is the standard DPoP header name as defined in the DPoP specification.
+// This header carries the DPoP proof JWT in requests and responses.
+const HeaderName = "DPoP"
+
+// NonceHeaderName is the standard DPoP nonce header name as defined in the DPoP specification.
+// This header is used by servers to provide a nonce value that clients must include in subsequent DPoP proofs.
+const NonceHeaderName = "DPoP-Nonce"
diff --git a/vendor/github.com/conductorone/dpop/pkg/dpop/jti.go b/vendor/github.com/conductorone/dpop/pkg/dpop/jti.go
new file mode 100644
index 00000000..ae034ce2
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/pkg/dpop/jti.go
@@ -0,0 +1,87 @@
+package dpop
+
+import (
+ "context"
+ "crypto/sha256"
+ "encoding/base64"
+ "fmt"
+ "time"
+
+ "github.com/jellydator/ttlcache/v3"
+)
+
+// CheckAndStoreJTI validates and stores a JTI.
+// Returns error if the JTI has been seen before.
+// The implementation should enforce a reasonable TTL and handle cleanup.
+type CheckAndStoreJTI func(ctx context.Context, jti string) error
+
+// MemoryJTIStore is a simple in-memory implementation of JTIStore using ttlcache
+type MemoryJTIStore struct {
+ cache *ttlcache.Cache[string, struct{}]
+}
+
+// MemoryJTIStoreOptions configures the behavior of the memory JTI store
+type MemoryJTIStoreOptions struct {
+ // TTL is the time-to-live for stored JTIs
+ TTL time.Duration
+}
+
+// DefaultMemoryJTIStoreOptions returns the default options for the memory JTI store
+func DefaultMemoryJTIStoreOptions() *MemoryJTIStoreOptions {
+ return &MemoryJTIStoreOptions{
+ TTL: 10 * time.Minute,
+ }
+}
+
+// NewMemoryJTIStore creates a new in-memory JTI store
+func NewMemoryJTIStore() *MemoryJTIStore {
+ return NewMemoryJTIStoreWithOptions(DefaultMemoryJTIStoreOptions())
+}
+
+// NewMemoryJTIStoreWithOptions creates a new in-memory JTI store with custom options
+func NewMemoryJTIStoreWithOptions(opts *MemoryJTIStoreOptions) *MemoryJTIStore {
+ if opts == nil {
+ opts = DefaultMemoryJTIStoreOptions()
+ }
+
+ cache := ttlcache.New[string, struct{}](
+ ttlcache.WithTTL[string, struct{}](opts.TTL),
+ )
+
+ // Start the background cleanup goroutine
+ go cache.Start()
+
+ return &MemoryJTIStore{
+ cache: cache,
+ }
+}
+
+// Stop cleanly shuts down the JTI store's background cleanup goroutine
+func (s *MemoryJTIStore) Stop() {
+ s.cache.Stop()
+}
+
+// makeKey creates a key from JTI
+func (s *MemoryJTIStore) makeKey(jti string) string {
+ h := sha256.New()
+ h.Write([]byte(jti))
+ return base64.RawURLEncoding.EncodeToString(h.Sum(nil))
+}
+
+// CheckAndStoreJTI implements JTIStore.CheckAndStoreJTI
+func (s *MemoryJTIStore) CheckAndStoreJTI(ctx context.Context, jti string) error {
+ if ctx.Err() != nil {
+ return ctx.Err()
+ }
+
+ s.cache.DeleteExpired()
+ key := s.makeKey(jti)
+
+ _, found := s.cache.GetOrSet(key, struct{}{})
+
+ if found {
+ return fmt.Errorf("duplicate jti")
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/conductorone/dpop/pkg/dpop/nonce.go b/vendor/github.com/conductorone/dpop/pkg/dpop/nonce.go
new file mode 100644
index 00000000..efa8c229
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/pkg/dpop/nonce.go
@@ -0,0 +1,140 @@
+package dpop
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/go-jose/go-jose/v4"
+ "github.com/go-jose/go-jose/v4/jwt"
+ "github.com/google/uuid"
+)
+
+// JWTNonce implements both NonceGenerator and NonceValidator using signed JWTs
+type JWTNonce struct {
+ // Window is the time window for which nonces are valid
+ Window time.Duration
+
+ // Signer is used to sign nonce JWTs
+ Signer jose.Signer
+
+ // Key is used to verify nonce JWTs
+ Key jose.JSONWebKey
+}
+
+// nonceClaims represents the claims in a nonce JWT
+type nonceClaims struct {
+ jwt.Claims
+ Random string `json:"rnd"` // Additional random component
+}
+
+// NewJWTNonce creates a new JWTNonce with the given signing key and verification key
+func NewJWTNonce(signingKey jose.JSONWebKey, verificationKey jose.JSONWebKey) (*JWTNonce, error) {
+ // Create signer with appropriate options
+ signer, err := jose.NewSigner(
+ jose.SigningKey{Algorithm: jose.EdDSA, Key: signingKey.Key},
+ &jose.SignerOptions{
+ ExtraHeaders: map[jose.HeaderKey]interface{}{
+ "typ": "dpop-nonce+jwt",
+ "kid": signingKey.KeyID,
+ },
+ },
+ )
+ if err != nil {
+ return nil, fmt.Errorf("failed to create signer: %w", err)
+ }
+
+ return &JWTNonce{
+ Window: 5 * time.Minute,
+ Signer: signer,
+ Key: verificationKey,
+ }, nil
+}
+
+// GenerateNonce generates a new signed nonce JWT
+func (v *JWTNonce) GenerateNonce(ctx context.Context) (string, error) {
+ if ctx.Err() != nil {
+ return "", ctx.Err()
+ }
+
+ // Generate random UUID for the nonce
+ random, err := uuid.NewRandom()
+ if err != nil {
+ return "", fmt.Errorf("failed to generate random nonce: %w", err)
+ }
+
+ now := time.Now()
+ claims := &nonceClaims{
+ Claims: jwt.Claims{
+ ID: random.String(),
+ IssuedAt: jwt.NewNumericDate(now),
+ NotBefore: jwt.NewNumericDate(now.Add(-30 * time.Second)), // Allow for clock skew
+ Expiry: jwt.NewNumericDate(now.Add(v.Window)),
+ },
+ Random: random.String(),
+ }
+
+ // Sign the claims
+ token, err := jwt.Signed(v.Signer).Claims(claims).Serialize()
+ if err != nil {
+ return "", fmt.Errorf("failed to sign nonce: %w", err)
+ }
+
+ return token, nil
+}
+
+// ValidateNonce validates a signed nonce JWT
+func (v *JWTNonce) ValidateNonce(ctx context.Context, nonce string) error {
+ if ctx.Err() != nil {
+ return ctx.Err()
+ }
+
+ // Parse and verify the JWT
+ token, err := jwt.ParseSigned(nonce, []jose.SignatureAlgorithm{jose.EdDSA})
+ if err != nil {
+ return fmt.Errorf("invalid nonce format: %w", err)
+ }
+
+ // Verify header
+ if len(token.Headers) != 1 {
+ return fmt.Errorf("invalid nonce: expected exactly one header")
+ }
+ header := token.Headers[0]
+ if header.KeyID != v.Key.KeyID {
+ return fmt.Errorf("invalid nonce: key ID mismatch")
+ }
+ if header.Algorithm != string(jose.EdDSA) {
+ return fmt.Errorf("invalid nonce: algorithm mismatch")
+ }
+ if header.ExtraHeaders["typ"] != "dpop-nonce+jwt" {
+ return fmt.Errorf("invalid nonce: type mismatch")
+ }
+
+ // Verify claims
+ var claims nonceClaims
+ if err := token.Claims(v.Key, &claims); err != nil {
+ return fmt.Errorf("invalid nonce signature: %w", err)
+ }
+
+ // Verify time-based claims
+ now := time.Now()
+ if claims.Claims.IssuedAt != nil && now.Before(claims.Claims.IssuedAt.Time()) {
+ return fmt.Errorf("nonce timestamp is in the future")
+ }
+
+ if claims.Claims.NotBefore != nil && now.Before(claims.Claims.NotBefore.Time()) {
+ return fmt.Errorf("nonce timestamp is in the future")
+ }
+
+ if claims.Claims.Expiry != nil && now.After(claims.Claims.Expiry.Time()) {
+ return fmt.Errorf("nonce has expired")
+ }
+
+ return nil
+}
+
+// Ensure JWTNonce implements both interfaces
+var (
+ _ NonceGenerator = (*JWTNonce)(nil).GenerateNonce
+ _ NonceValidator = (*JWTNonce)(nil).ValidateNonce
+)
diff --git a/vendor/github.com/conductorone/dpop/pkg/dpop/proofer.go b/vendor/github.com/conductorone/dpop/pkg/dpop/proofer.go
new file mode 100644
index 00000000..dc3bf5c1
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/pkg/dpop/proofer.go
@@ -0,0 +1,284 @@
+// Package dpop provides the core DPoP proof generation and validation functionality.
+package dpop
+
+import (
+ "context"
+ "crypto"
+ "crypto/ecdsa"
+ "crypto/ed25519"
+ "crypto/elliptic"
+ "crypto/rsa"
+ "crypto/sha256"
+ "encoding/base64"
+ "encoding/hex"
+ "errors"
+ "fmt"
+ "time"
+
+ "github.com/go-jose/go-jose/v4"
+ "github.com/go-jose/go-jose/v4/jwt"
+ "github.com/google/uuid"
+)
+
+const (
+ // DPoPHeaderTyp is the required type for DPoP JWTs
+ DPoPHeaderTyp = "dpop+jwt"
+
+ // DefaultProofValidityDuration is the default duration for which a proof is considered valid
+ DefaultProofValidityDuration = 5 * time.Minute
+)
+
+var (
+ // ErrInvalidKey is returned when an unsupported key type is provided
+ ErrInvalidKey = errors.New("invalid key: must be an ed25519 private key, RSA private key, or ECDSA P-256 private key")
+
+ // ErrInvalidRSAKeySize is returned when an RSA key is too small
+ ErrInvalidRSAKeySize = errors.New("invalid RSA key size: must be at least 2048 bits")
+
+ // ErrInvalidECDSACurve is returned when an ECDSA key uses an unsupported curve
+ ErrInvalidECDSACurve = errors.New("invalid ECDSA curve: must be P-256")
+)
+
+// ProofOption configures the behavior of proof generation
+type ProofOption func(*proofOptions)
+
+type proofOptions struct {
+ validityDuration time.Duration
+ nonceFunc func() (string, error)
+ accessToken string
+ additionalClaims map[string]interface{}
+ now func() time.Time
+ includeNotBefore bool
+ includeExpiry bool
+}
+
+// WithValidityDuration sets the duration for which the proof is valid
+func WithValidityDuration(d time.Duration) ProofOption {
+ return func(o *proofOptions) {
+ o.validityDuration = d
+ }
+}
+
+// WithNonceFunc sets a function that provides the most recent nonce for replay prevention
+func WithNonceFunc(f func() (string, error)) ProofOption {
+ return func(o *proofOptions) {
+ o.nonceFunc = f
+ }
+}
+
+// WithStaticNonce sets a static nonce value for replay prevention
+// This is a helper function for backward compatibility
+func WithStaticNonce(nonce string) ProofOption {
+ return WithNonceFunc(func() (string, error) {
+ return nonce, nil
+ })
+}
+
+// WithAccessToken sets an access token to bind to this proof
+func WithAccessToken(token string) ProofOption {
+ return func(o *proofOptions) {
+ o.accessToken = token
+ }
+}
+
+// WithAdditionalClaims sets additional claims to include in the proof
+func WithAdditionalClaims(claims map[string]interface{}) ProofOption {
+ return func(o *proofOptions) {
+ o.additionalClaims = claims
+ }
+}
+
+// WithProofNowFunc sets a custom time function for the proof
+func WithProofNowFunc(f func() time.Time) ProofOption {
+ return func(o *proofOptions) {
+ o.now = f
+ }
+}
+
+// WithNotBefore sets whether to include the nbf claim in the proof
+func WithNotBefore(include bool) ProofOption {
+ return func(o *proofOptions) {
+ o.includeNotBefore = include
+ }
+}
+
+// WithExpiry sets whether to include the exp claim in the proof
+func WithExpiry(include bool) ProofOption {
+ return func(o *proofOptions) {
+ o.includeExpiry = include
+ }
+}
+
+// defaultOptions returns the default options for proof generation
+func defaultOptions() *proofOptions {
+ return &proofOptions{
+ validityDuration: DefaultProofValidityDuration,
+ now: time.Now,
+ includeNotBefore: true, // For backward compatibility
+ includeExpiry: true, // For backward compatibility
+ }
+}
+
+// Proofer generates DPoP proofs
+type Proofer struct {
+ key *jose.JSONWebKey
+ keyID string
+ alg jose.SignatureAlgorithm
+}
+
+// NewProofer creates a new DPoP proofer with the given private key
+func NewProofer(key *jose.JSONWebKey) (*Proofer, error) {
+ if key == nil {
+ return nil, errors.New("key cannot be nil")
+ }
+
+ if key.IsPublic() {
+ return nil, errors.New("key must be a private key")
+ }
+
+ var alg jose.SignatureAlgorithm
+ switch key.Key.(type) {
+ case ed25519.PrivateKey:
+ alg = jose.EdDSA
+ case *rsa.PrivateKey:
+ alg = jose.RS256
+ // Check RSA key size
+ rsaKey := key.Key.(*rsa.PrivateKey)
+ if rsaKey.Size()*8 < 2048 {
+ return nil, ErrInvalidRSAKeySize
+ }
+ case *ecdsa.PrivateKey:
+ ecKey := key.Key.(*ecdsa.PrivateKey)
+ // Only support P-256 curve for now
+ if ecKey.Curve != elliptic.P256() {
+ return nil, ErrInvalidECDSACurve
+ }
+ alg = jose.ES256
+ default:
+ return nil, ErrInvalidKey
+ }
+
+ thumbprint, err := key.Thumbprint(crypto.SHA256)
+ if err != nil {
+ return nil, fmt.Errorf("failed to generate key thumbprint: %w", err)
+ }
+
+ return &Proofer{
+ key: key,
+ keyID: hex.EncodeToString(thumbprint),
+ alg: alg,
+ }, nil
+}
+
+// CreateProof generates a new DPoP proof for the given HTTP method and URL
+func (p *Proofer) CreateProof(ctx context.Context, method string, url string, opts ...ProofOption) (string, error) {
+ options := defaultOptions()
+ for _, opt := range opts {
+ if opt == nil {
+ continue
+ }
+ opt(options)
+ }
+
+ jti, err := uuid.NewRandom()
+ if err != nil {
+ return "", fmt.Errorf("failed to generate JTI: %w", err)
+ }
+
+ var now time.Time
+ if options.now != nil {
+ now = options.now()
+ } else {
+ now = time.Now()
+ }
+
+ claims := Claims{
+ Claims: &jwt.Claims{
+ ID: jti.String(),
+ IssuedAt: jwt.NewNumericDate(now),
+ },
+ HTTPMethod: method,
+ HTTPUri: url,
+ }
+
+ if options.includeNotBefore {
+ claims.Claims.NotBefore = jwt.NewNumericDate(now.Add(-30 * time.Second))
+ }
+
+ if options.includeExpiry {
+ claims.Claims.Expiry = jwt.NewNumericDate(now.Add(options.validityDuration))
+ }
+
+ // Get nonce if function is provided
+ if options.nonceFunc != nil {
+ nonce, err := options.nonceFunc()
+ if err != nil {
+ return "", fmt.Errorf("failed to get nonce: %w", err)
+ }
+ claims.Nonce = nonce
+ }
+
+ if options.accessToken != "" {
+ claims.TokenHash = hashAccessToken(options.accessToken)
+ }
+
+ // Create a copy of the public key
+ publicKey := p.key.Public()
+
+ signerOpts := &jose.SignerOptions{
+ EmbedJWK: false,
+ ExtraHeaders: map[jose.HeaderKey]interface{}{
+ "typ": DPoPHeaderTyp,
+ "jwk": publicKey,
+ },
+ }
+
+ signer, err := jose.NewSigner(jose.SigningKey{Algorithm: p.alg, Key: p.key.Key}, signerOpts)
+ if err != nil {
+ return "", fmt.Errorf("failed to create signer: %w", err)
+ }
+
+ // Create the final claims by merging the standard claims with any additional claims
+ finalClaims := make(map[string]interface{})
+
+ // Add the standard claims
+ finalClaims["jti"] = claims.ID
+ finalClaims["iat"] = claims.IssuedAt
+ if claims.Claims.NotBefore != nil {
+ finalClaims["nbf"] = claims.NotBefore
+ }
+ if claims.Claims.Expiry != nil {
+ finalClaims["exp"] = claims.Expiry
+ }
+ finalClaims["htm"] = claims.HTTPMethod
+ finalClaims["htu"] = claims.HTTPUri
+ if claims.Nonce != "" {
+ finalClaims["nonce"] = claims.Nonce
+ }
+ if claims.TokenHash != "" {
+ finalClaims["ath"] = claims.TokenHash
+ }
+
+ // Merge any additional claims
+ if options.additionalClaims != nil {
+ for k, v := range options.additionalClaims {
+ // Don't allow overriding of standard DPoP claims
+ if _, exists := finalClaims[k]; !exists {
+ finalClaims[k] = v
+ }
+ }
+ }
+
+ proof, err := jwt.Signed(signer).Claims(finalClaims).Serialize()
+ if err != nil {
+ return "", fmt.Errorf("failed to sign claims: %w", err)
+ }
+
+ return proof, nil
+}
+
+// hashAccessToken creates a base64url-encoded SHA-256 hash of an access token
+func hashAccessToken(token string) string {
+ hash := sha256.Sum256([]byte(token))
+ return base64.RawURLEncoding.EncodeToString(hash[:])
+}
diff --git a/vendor/github.com/conductorone/dpop/pkg/dpop/validator.go b/vendor/github.com/conductorone/dpop/pkg/dpop/validator.go
new file mode 100644
index 00000000..f2083fc9
--- /dev/null
+++ b/vendor/github.com/conductorone/dpop/pkg/dpop/validator.go
@@ -0,0 +1,403 @@
+package dpop
+
+import (
+ "context"
+ "crypto"
+ "crypto/subtle"
+ "encoding/base64"
+ "errors"
+ "fmt"
+ "strings"
+ "time"
+
+ "github.com/go-jose/go-jose/v4"
+ "github.com/go-jose/go-jose/v4/jwt"
+)
+
+var (
+ // ErrInvalidProof is returned when a proof is invalid
+ ErrInvalidProof = errors.New("invalid DPoP proof")
+
+ // ErrExpiredProof is returned when a proof has expired
+ ErrExpiredProof = errors.New("expired DPoP proof")
+
+ // ErrInvalidNonce is returned when a proof has an invalid nonce
+ ErrInvalidNonce = errors.New("invalid nonce in DPoP proof")
+
+ // ErrInvalidTokenBinding is returned when a proof has an invalid access token binding
+ ErrInvalidTokenBinding = errors.New("invalid access token binding in DPoP proof")
+)
+
+const (
+ // MaxJTISize is the maximum allowed size for the JTI claim in bytes
+ MaxJTISize = 1024 // 1KB should be more than enough for a UUID
+)
+
+// NonceGenerator is a function that generates server-provided nonces for DPoP proofs
+type NonceGenerator func(ctx context.Context) (string, error)
+
+// NonceValidator is a function that validates server-provided nonces for DPoP proofs
+type NonceValidator func(ctx context.Context, nonce string) error
+
+// AccessTokenBindingValidator validates that an access token is bound to a public key
+type AccessTokenBindingValidator func(ctx context.Context, accessToken string, publicKey *jose.JSONWebKey) error
+
+// validationOptions configures the behavior of a specific proof validation
+type validationOptions struct {
+ // ExpectedAccessToken is the expected access token bound to the proof
+ expectedAccessToken string
+
+ // ExpectedPublicKey is the expected public key that should be used to sign the proof
+ expectedPublicKey *jose.JSONWebKey
+}
+
+// ValidationProofOption is a function that configures a validationOptions
+type ValidationProofOption func(*validationOptions)
+
+// WithProofExpectedAccessToken sets the expected access token for a specific proof validation
+func WithProofExpectedAccessToken(token string) ValidationProofOption {
+ return func(opts *validationOptions) {
+ opts.expectedAccessToken = token
+ }
+}
+
+// WithProofExpectedPublicKey sets the expected public key that should be used to sign the proof
+func WithProofExpectedPublicKey(key *jose.JSONWebKey) ValidationProofOption {
+ return func(opts *validationOptions) {
+ opts.expectedPublicKey = key
+ }
+}
+
+// options configures the behavior of proof validation
+type options struct {
+ // MaxClockSkew is the maximum allowed clock skew for proof validation
+ maxClockSkew time.Duration
+
+ // NonceValidator is used to validate server-provided nonces
+ nonceValidator NonceValidator
+
+ // AllowedSignatureAlgorithms specifies which signature algorithms are accepted
+ allowedSignatureAlgorithms []jose.SignatureAlgorithm
+
+ // JTIStore is used to track JTIs for replay prevention
+ jtiStore CheckAndStoreJTI
+
+ // Now returns the current time for proof validation
+ now func() time.Time
+
+ // AccessTokenBindingValidator validates that an access token is bound to a public key
+ accessTokenBindingValidator AccessTokenBindingValidator
+}
+
+// Option is a function that configures a validationOptions
+type Option func(*options)
+
+// WithMaxClockSkew sets the maximum allowed clock skew
+func WithMaxClockSkew(d time.Duration) Option {
+ return func(opts *options) {
+ opts.maxClockSkew = d
+ }
+}
+
+// WithNonceValidator sets the nonce validator function
+func WithNonceValidator(v NonceValidator) Option {
+ return func(opts *options) {
+ opts.nonceValidator = v
+ }
+}
+
+// WithAllowedSignatureAlgorithms sets the allowed signature algorithms
+func WithAllowedSignatureAlgorithms(algs []jose.SignatureAlgorithm) Option {
+ return func(opts *options) {
+ opts.allowedSignatureAlgorithms = algs
+ }
+}
+
+// WithJTIStore sets the JTI store
+func WithJTIStore(store CheckAndStoreJTI) Option {
+ return func(opts *options) {
+ opts.jtiStore = store
+ }
+}
+
+// WithNowFunc sets the function used to get the current time
+func WithNowFunc(f func() time.Time) Option {
+ return func(opts *options) {
+ opts.now = f
+ }
+}
+
+// WithAccessTokenBindingValidator sets the access token binding validator
+func WithAccessTokenBindingValidator(v AccessTokenBindingValidator) Option {
+ return func(opts *options) {
+ opts.accessTokenBindingValidator = v
+ }
+}
+
+// Validator validates DPoP proofs
+type Validator struct {
+ opts *options
+}
+
+// NewValidator creates a new DPoP validator with the given options
+func NewValidator(opts ...Option) *Validator {
+ o := &options{}
+
+ for _, option := range opts {
+ if option == nil {
+ continue
+ }
+ option(o)
+ }
+
+ if len(o.allowedSignatureAlgorithms) == 0 {
+ o.allowedSignatureAlgorithms = []jose.SignatureAlgorithm{
+ jose.EdDSA,
+ jose.RS256,
+ jose.ES256,
+ }
+ }
+
+ if o.maxClockSkew == 0 {
+ o.maxClockSkew = 30 * time.Second
+ }
+
+ if o.jtiStore == nil {
+ o.jtiStore = NewMemoryJTIStore().CheckAndStoreJTI
+ }
+
+ if o.now == nil {
+ o.now = time.Now
+ }
+
+ return &Validator{opts: o}
+}
+
+// ValidateProof validates a DPoP proof for the given HTTP method and URL
+func (v *Validator) ValidateProof(ctx context.Context, proof string, method string, url string, options ...ValidationProofOption) (*Claims, error) {
+ // Initialize validation proof options
+ proofOpts := &validationOptions{}
+ for _, option := range options {
+ option(proofOpts)
+ }
+
+ token, err := jwt.ParseSigned(proof, v.opts.allowedSignatureAlgorithms)
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to parse token: %v", ErrInvalidProof, err)
+ }
+
+ if len(token.Headers) != 1 {
+ return nil, fmt.Errorf("%w: expected 1 header, got %d", ErrInvalidProof, len(token.Headers))
+ }
+
+ header := token.Headers[0]
+ // Verify the token type
+ if typ, ok := header.ExtraHeaders["typ"]; !ok || typ != DPoPHeaderTyp {
+ return nil, fmt.Errorf("%w: invalid token type", ErrInvalidProof)
+ }
+
+ proofKey := header.JSONWebKey
+ // Extract the embedded JWK
+ if proofKey == nil {
+ return nil, fmt.Errorf("%w: no embedded JWK", ErrInvalidProof)
+ }
+
+ if !proofKey.IsPublic() {
+ return nil, fmt.Errorf("%w: expected public key", ErrInvalidProof)
+ }
+
+ if !proofKey.Valid() {
+ return nil, fmt.Errorf("%w: invalid JWK", ErrInvalidProof)
+ }
+
+ if proofOpts.expectedPublicKey != nil {
+ expectedThumbprint, err := proofOpts.expectedPublicKey.Thumbprint(crypto.SHA256)
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to generate expected thumbprint: %v", ErrInvalidProof, err)
+ }
+ proofThumbprint, err := proofKey.Thumbprint(crypto.SHA256)
+ if err != nil {
+ return nil, fmt.Errorf("%w: failed to generate proof thumbprint: %v", ErrInvalidProof, err)
+ }
+ if subtle.ConstantTimeCompare(expectedThumbprint, proofThumbprint) != 1 {
+ return nil, fmt.Errorf("%w: invalid key binding", ErrInvalidProof)
+ }
+ }
+
+ // Verify the claims
+ var claims Claims
+ if err := token.Claims(proofKey, &claims); err != nil {
+ return nil, fmt.Errorf("%w: failed to verify claims: %v", ErrInvalidProof, err)
+ }
+
+ // Store the public key in the claims
+ claims.publicKey = proofKey
+
+ // Validate the proof
+ if err := v.validateClaims(ctx, &claims, method, url, proofOpts); err != nil {
+ return nil, err
+ }
+
+ return &claims, nil
+}
+
+// validateClaims validates the claims in a DPoP proof
+func (v *Validator) validateClaims(ctx context.Context, claims *Claims, method, url string, proofOpts *validationOptions) error {
+ now := v.opts.now()
+
+ // Check required claims
+ if claims.Claims.ID == "" {
+ return fmt.Errorf("%w: missing required claim: jti", ErrInvalidProof)
+ }
+ if claims.Claims.IssuedAt == nil {
+ return fmt.Errorf("%w: missing required claim: iat", ErrInvalidProof)
+ }
+
+ // Check that iat is ~now() (with skew leeway)
+ iatTime := claims.Claims.IssuedAt.Time()
+ if now.Add(-v.opts.maxClockSkew).After(iatTime) || now.Add(v.opts.maxClockSkew).Before(iatTime) {
+ return fmt.Errorf("%w: issued at time is not within acceptable range of current time", ErrInvalidProof)
+ }
+
+ // nbf is optional, but if present, validate it
+ if claims.Claims.NotBefore != nil {
+ if now.Add(v.opts.maxClockSkew).Before(claims.Claims.NotBefore.Time()) {
+ return fmt.Errorf("%w: not yet valid", ErrExpiredProof)
+ }
+ }
+
+ // exp is optional, but if present, validate it
+ if claims.Claims.Expiry != nil {
+ if now.Add(-v.opts.maxClockSkew).After(claims.Claims.Expiry.Time()) {
+ return fmt.Errorf("%w: token has expired", ErrExpiredProof)
+ }
+ }
+
+ // Validate HTTP method
+ if !strings.EqualFold(claims.HTTPMethod, method) {
+ return fmt.Errorf("%w: method mismatch", ErrInvalidProof)
+ }
+
+ // Validate URL
+ if !strings.EqualFold(claims.HTTPUri, url) {
+ return fmt.Errorf("%w: URI mismatch", ErrInvalidProof)
+ }
+
+ // Validate access token binding
+ if proofOpts.expectedAccessToken != "" {
+ if claims.TokenHash == "" {
+ return fmt.Errorf("%w: missing token hash", ErrInvalidTokenBinding)
+ }
+
+ // First validate the token hash
+ expectedHash := hashAccessToken(proofOpts.expectedAccessToken)
+ if subtle.ConstantTimeCompare([]byte(claims.TokenHash), []byte(expectedHash)) != 1 {
+ return ErrInvalidTokenBinding
+ }
+
+ // If we have an access token, we must also validate that it is bound to public key in the proof.
+ if v.opts.accessTokenBindingValidator == nil {
+ return fmt.Errorf("%w: no access token binding validator provided", ErrInvalidTokenBinding)
+ }
+ if err := v.opts.accessTokenBindingValidator(ctx, proofOpts.expectedAccessToken, claims.publicKey); err != nil {
+ return err
+ }
+ } else {
+ // If we do not expect an access token, assert that we do not have a token hash in the proof
+ if claims.TokenHash != "" {
+ return fmt.Errorf("%w: unexpected token hash", ErrInvalidTokenBinding)
+ }
+ }
+
+ // Validate nonce if validator is configured
+ if v.opts.nonceValidator != nil {
+ if claims.Nonce == "" {
+ return fmt.Errorf("%w: nonce required but not provided", ErrInvalidNonce)
+ }
+ if err := v.opts.nonceValidator(ctx, claims.Nonce); err != nil {
+ return err // Return the error directly from the nonce validator
+ }
+ } else {
+ // If we do not expect a nonce, assert that we do not have one in the proof
+ if claims.Nonce != "" {
+ return fmt.Errorf("%w: unexpected nonce", ErrInvalidNonce)
+ }
+ }
+
+ if claims.Claims.ID == "" {
+ return fmt.Errorf("%w: jti required but not provided", ErrInvalidProof)
+ }
+
+ if len(claims.Claims.ID) > MaxJTISize {
+ return fmt.Errorf("%w: jti too large", ErrInvalidProof)
+ }
+
+ // Check for JTI replay if store is configured
+ if v.opts.jtiStore != nil {
+ if err := v.opts.jtiStore(ctx, claims.Claims.ID); err != nil {
+ return fmt.Errorf("failed to check/store JTI: %w", err)
+ }
+ }
+
+ return nil
+}
+
+// NewJWTAccessTokenBindingValidator creates a validator that checks if a JWT access token
+// is bound to a DPoP proof via the cnf/jkt claim
+func NewJWTAccessTokenBindingValidator(allowedSignatureAlgorithms []jose.SignatureAlgorithm) AccessTokenBindingValidator {
+ return func(ctx context.Context, accessToken string, publicKey *jose.JSONWebKey) error {
+ // Parse the JWT
+ token, err := jwt.ParseSigned(accessToken, allowedSignatureAlgorithms)
+ if err != nil {
+ return fmt.Errorf("%w: failed to parse access token: %v", ErrInvalidTokenBinding, err)
+ }
+
+ // Extract the claims without verification (we're only looking at the cnf claim)
+ var claims map[string]interface{}
+ if err := token.UnsafeClaimsWithoutVerification(&claims); err != nil {
+ return fmt.Errorf("%w: failed to extract claims: %v", ErrInvalidTokenBinding, err)
+ }
+
+ // Check for cnf claim
+ cnfRaw, ok := claims["cnf"]
+ if !ok {
+ return fmt.Errorf("%w: no cnf claim in access token", ErrInvalidTokenBinding)
+ }
+
+ // Convert to map
+ cnf, ok := cnfRaw.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("%w: invalid cnf claim format", ErrInvalidTokenBinding)
+ }
+
+ // Check for jkt claim
+ jktRaw, ok := cnf["jkt"]
+ if !ok {
+ return fmt.Errorf("%w: no jkt in cnf claim", ErrInvalidTokenBinding)
+ }
+
+ jkt, ok := jktRaw.(string)
+ if !ok {
+ return fmt.Errorf("%w: invalid jkt format", ErrInvalidTokenBinding)
+ }
+
+ // Calculate thumbprint of the proof key
+ proofThumbprint, err := publicKey.Thumbprint(crypto.SHA256)
+ if err != nil {
+ return fmt.Errorf("%w: failed to generate proof thumbprint: %v", ErrInvalidTokenBinding, err)
+ }
+
+ // Decode the expected thumbprint
+ expectedThumbprint, err := base64.RawURLEncoding.DecodeString(jkt)
+ if err != nil {
+ return fmt.Errorf("%w: invalid jkt format in token: %v", ErrInvalidTokenBinding, err)
+ }
+
+ // Compare thumbprints
+ if subtle.ConstantTimeCompare(proofThumbprint, expectedThumbprint) != 1 {
+ return fmt.Errorf("%w: jkt mismatch", ErrInvalidTokenBinding)
+ }
+
+ return nil
+ }
+}
diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD
index a9d38c51..ef634dd8 100644
--- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD
+++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD
@@ -1,9 +1,10 @@
-load("@com_google_protobuf//:protobuf.bzl", "py_proto_library")
+load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
-load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library")
+load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_java//java:defs.bzl", "java_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
-load("@io_bazel_rules_go//go:def.bzl", "go_library")
+load("@rules_python//python:proto.bzl", "py_proto_library")
package(
default_visibility =
@@ -27,8 +28,7 @@ cc_proto_library(
py_proto_library(
name = "validate_py",
- srcs = ["validate.proto"],
- deps = ["@com_google_protobuf//:protobuf_python"],
+ deps = [":validate_proto"],
)
go_proto_library(
diff --git a/vendor/github.com/go-jose/go-jose/v3/.gitignore b/vendor/github.com/go-jose/go-jose/v4/.gitignore
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/.gitignore
rename to vendor/github.com/go-jose/go-jose/v4/.gitignore
diff --git a/vendor/github.com/go-jose/go-jose/v3/.golangci.yml b/vendor/github.com/go-jose/go-jose/v4/.golangci.yml
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/.golangci.yml
rename to vendor/github.com/go-jose/go-jose/v4/.golangci.yml
diff --git a/vendor/github.com/go-jose/go-jose/v3/.travis.yml b/vendor/github.com/go-jose/go-jose/v4/.travis.yml
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/.travis.yml
rename to vendor/github.com/go-jose/go-jose/v4/.travis.yml
diff --git a/vendor/github.com/go-jose/go-jose/v3/CHANGELOG.md b/vendor/github.com/go-jose/go-jose/v4/CHANGELOG.md
similarity index 84%
rename from vendor/github.com/go-jose/go-jose/v3/CHANGELOG.md
rename to vendor/github.com/go-jose/go-jose/v4/CHANGELOG.md
index ce2a54eb..6f717dbd 100644
--- a/vendor/github.com/go-jose/go-jose/v3/CHANGELOG.md
+++ b/vendor/github.com/go-jose/go-jose/v4/CHANGELOG.md
@@ -1,3 +1,27 @@
+# v4.0.4
+
+## Fixed
+
+ - Reverted "Allow unmarshalling JSONWebKeySets with unsupported key types" as a
+ breaking change. See #136 / #137.
+
+# v4.0.3
+
+## Changed
+
+ - Allow unmarshalling JSONWebKeySets with unsupported key types (#130)
+ - Document that OpaqueKeyEncrypter can't be implemented (for now) (#129)
+ - Dependency updates
+
+# v4.0.2
+
+## Changed
+
+ - Improved documentation of Verify() to note that JSONWebKeySet is a supported
+ argument type (#104)
+ - Defined exported error values for missing x5c header and unsupported elliptic
+ curves error cases (#117)
+
# v4.0.1
## Fixed
@@ -45,12 +69,6 @@ token".
[1]: https://i.blackhat.com/BH-US-23/Presentations/US-23-Tervoort-Three-New-Attacks-Against-JSON-Web-Tokens.pdf
-# v3.0.3
-
-## Fixed
-
- - Limit decompression output size to prevent a DoS. Backport from v4.0.1.
-
# v3.0.2
## Fixed
diff --git a/vendor/github.com/go-jose/go-jose/v3/CONTRIBUTING.md b/vendor/github.com/go-jose/go-jose/v4/CONTRIBUTING.md
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/CONTRIBUTING.md
rename to vendor/github.com/go-jose/go-jose/v4/CONTRIBUTING.md
diff --git a/vendor/gopkg.in/square/go-jose.v2/LICENSE b/vendor/github.com/go-jose/go-jose/v4/LICENSE
similarity index 100%
rename from vendor/gopkg.in/square/go-jose.v2/LICENSE
rename to vendor/github.com/go-jose/go-jose/v4/LICENSE
diff --git a/vendor/github.com/go-jose/go-jose/v3/README.md b/vendor/github.com/go-jose/go-jose/v4/README.md
similarity index 82%
rename from vendor/github.com/go-jose/go-jose/v3/README.md
rename to vendor/github.com/go-jose/go-jose/v4/README.md
index 282cd9e1..79a7c5ec 100644
--- a/vendor/github.com/go-jose/go-jose/v3/README.md
+++ b/vendor/github.com/go-jose/go-jose/v4/README.md
@@ -1,17 +1,9 @@
# Go JOSE
-### Versions
-
-[Version 4](https://github.com/go-jose/go-jose)
-([branch](https://github.com/go-jose/go-jose/),
-[doc](https://pkg.go.dev/github.com/go-jose/go-jose/v4), [releases](https://github.com/go-jose/go-jose/releases)) is the current stable version:
-
- import "github.com/go-jose/go-jose/v4"
-
-The old [square/go-jose](https://github.com/square/go-jose) repo contains the prior v1 and v2 versions, which
-are deprecated.
-
-### Summary
+[](https://pkg.go.dev/github.com/go-jose/go-jose/v4)
+[](https://pkg.go.dev/github.com/go-jose/go-jose/v4/jwt)
+[](https://raw.githubusercontent.com/go-jose/go-jose/master/LICENSE)
+[](https://github.com/go-jose/go-jose/actions)
Package jose aims to provide an implementation of the Javascript Object Signing
and Encryption set of standards. This includes support for JSON Web Encryption,
@@ -43,6 +35,20 @@ of [case-insensitive matching](https://www.ietf.org/mail-archive/web/json/curren
This is to avoid differences in interpretation of messages between go-jose and
libraries in other languages.
+### Versions
+
+[Version 4](https://github.com/go-jose/go-jose)
+([branch](https://github.com/go-jose/go-jose/tree/main),
+[doc](https://pkg.go.dev/github.com/go-jose/go-jose/v4), [releases](https://github.com/go-jose/go-jose/releases)) is the current stable version:
+
+ import "github.com/go-jose/go-jose/v4"
+
+The old [square/go-jose](https://github.com/square/go-jose) repo contains the prior v1 and v2 versions, which
+are still useable but not actively developed anymore.
+
+Version 3, in this repo, is still receiving security fixes but not functionality
+updates.
+
### Supported algorithms
See below for a table of supported algorithms. Algorithm identifiers match
@@ -98,11 +104,11 @@ allows attaching a key id.
## Examples
-[](https://pkg.go.dev/github.com/go-jose/go-jose/v3)
-[](https://pkg.go.dev/github.com/go-jose/go-jose/v3/jwt)
+[](https://pkg.go.dev/github.com/go-jose/go-jose/v4)
+[](https://pkg.go.dev/github.com/go-jose/go-jose/v4/jwt)
Examples can be found in the Godoc
reference for this package. The
-[`jose-util`](https://github.com/go-jose/go-jose/tree/v3/jose-util)
+[`jose-util`](https://github.com/go-jose/go-jose/tree/v4/jose-util)
subdirectory also contains a small command-line utility which might be useful
as an example as well.
diff --git a/vendor/github.com/go-jose/go-jose/v3/SECURITY.md b/vendor/github.com/go-jose/go-jose/v4/SECURITY.md
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/SECURITY.md
rename to vendor/github.com/go-jose/go-jose/v4/SECURITY.md
diff --git a/vendor/github.com/go-jose/go-jose/v3/asymmetric.go b/vendor/github.com/go-jose/go-jose/v4/asymmetric.go
similarity index 99%
rename from vendor/github.com/go-jose/go-jose/v3/asymmetric.go
rename to vendor/github.com/go-jose/go-jose/v4/asymmetric.go
index d4d4961b..f8d5774e 100644
--- a/vendor/github.com/go-jose/go-jose/v3/asymmetric.go
+++ b/vendor/github.com/go-jose/go-jose/v4/asymmetric.go
@@ -29,8 +29,8 @@ import (
"fmt"
"math/big"
- josecipher "github.com/go-jose/go-jose/v3/cipher"
- "github.com/go-jose/go-jose/v3/json"
+ josecipher "github.com/go-jose/go-jose/v4/cipher"
+ "github.com/go-jose/go-jose/v4/json"
)
// A generic RSA-based encrypter/verifier
diff --git a/vendor/github.com/go-jose/go-jose/v3/cipher/cbc_hmac.go b/vendor/github.com/go-jose/go-jose/v4/cipher/cbc_hmac.go
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/cipher/cbc_hmac.go
rename to vendor/github.com/go-jose/go-jose/v4/cipher/cbc_hmac.go
diff --git a/vendor/github.com/go-jose/go-jose/v3/cipher/concat_kdf.go b/vendor/github.com/go-jose/go-jose/v4/cipher/concat_kdf.go
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/cipher/concat_kdf.go
rename to vendor/github.com/go-jose/go-jose/v4/cipher/concat_kdf.go
diff --git a/vendor/github.com/go-jose/go-jose/v3/cipher/ecdh_es.go b/vendor/github.com/go-jose/go-jose/v4/cipher/ecdh_es.go
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/cipher/ecdh_es.go
rename to vendor/github.com/go-jose/go-jose/v4/cipher/ecdh_es.go
diff --git a/vendor/github.com/go-jose/go-jose/v3/cipher/key_wrap.go b/vendor/github.com/go-jose/go-jose/v4/cipher/key_wrap.go
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/cipher/key_wrap.go
rename to vendor/github.com/go-jose/go-jose/v4/cipher/key_wrap.go
diff --git a/vendor/github.com/go-jose/go-jose/v3/crypter.go b/vendor/github.com/go-jose/go-jose/v4/crypter.go
similarity index 98%
rename from vendor/github.com/go-jose/go-jose/v3/crypter.go
rename to vendor/github.com/go-jose/go-jose/v4/crypter.go
index 8870e890..d81b03b4 100644
--- a/vendor/github.com/go-jose/go-jose/v3/crypter.go
+++ b/vendor/github.com/go-jose/go-jose/v4/crypter.go
@@ -22,7 +22,7 @@ import (
"errors"
"fmt"
- "github.com/go-jose/go-jose/v3/json"
+ "github.com/go-jose/go-jose/v4/json"
)
// Encrypter represents an encrypter which produces an encrypted JWE object.
@@ -459,7 +459,10 @@ func (obj JSONWebEncryption) Decrypt(decryptionKey interface{}) ([]byte, error)
return nil, fmt.Errorf("go-jose/go-jose: unsupported crit header")
}
- key := tryJWKS(decryptionKey, obj.Header)
+ key, err := tryJWKS(decryptionKey, obj.Header)
+ if err != nil {
+ return nil, err
+ }
decrypter, err := newDecrypter(key)
if err != nil {
return nil, err
@@ -529,7 +532,10 @@ func (obj JSONWebEncryption) DecryptMulti(decryptionKey interface{}) (int, Heade
return -1, Header{}, nil, fmt.Errorf("go-jose/go-jose: unsupported crit header")
}
- key := tryJWKS(decryptionKey, obj.Header)
+ key, err := tryJWKS(decryptionKey, obj.Header)
+ if err != nil {
+ return -1, Header{}, nil, err
+ }
decrypter, err := newDecrypter(key)
if err != nil {
return -1, Header{}, nil, err
diff --git a/vendor/github.com/go-jose/go-jose/v3/doc.go b/vendor/github.com/go-jose/go-jose/v4/doc.go
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/doc.go
rename to vendor/github.com/go-jose/go-jose/v4/doc.go
diff --git a/vendor/github.com/go-jose/go-jose/v3/encoding.go b/vendor/github.com/go-jose/go-jose/v4/encoding.go
similarity index 92%
rename from vendor/github.com/go-jose/go-jose/v3/encoding.go
rename to vendor/github.com/go-jose/go-jose/v4/encoding.go
index 9f07cfdc..4f6e0d4a 100644
--- a/vendor/github.com/go-jose/go-jose/v3/encoding.go
+++ b/vendor/github.com/go-jose/go-jose/v4/encoding.go
@@ -27,7 +27,7 @@ import (
"strings"
"unicode"
- "github.com/go-jose/go-jose/v3/json"
+ "github.com/go-jose/go-jose/v4/json"
)
// Helper function to serialize known-good objects.
@@ -106,10 +106,7 @@ func inflate(input []byte) ([]byte, error) {
output := new(bytes.Buffer)
reader := flate.NewReader(bytes.NewBuffer(input))
- maxCompressedSize := 10 * int64(len(input))
- if maxCompressedSize < 250000 {
- maxCompressedSize = 250000
- }
+ maxCompressedSize := max(250_000, 10*int64(len(input)))
limit := maxCompressedSize + 1
n, err := io.CopyN(output, reader, limit)
@@ -167,7 +164,7 @@ func (b *byteBuffer) UnmarshalJSON(data []byte) error {
return nil
}
- decoded, err := base64URLDecode(encoded)
+ decoded, err := base64.RawURLEncoding.DecodeString(encoded)
if err != nil {
return err
}
@@ -197,12 +194,6 @@ func (b byteBuffer) toInt() int {
return int(b.bigInt().Int64())
}
-// base64URLDecode is implemented as defined in https://www.rfc-editor.org/rfc/rfc7515.html#appendix-C
-func base64URLDecode(value string) ([]byte, error) {
- value = strings.TrimRight(value, "=")
- return base64.RawURLEncoding.DecodeString(value)
-}
-
func base64EncodeLen(sl []byte) int {
return base64.RawURLEncoding.EncodedLen(len(sl))
}
diff --git a/vendor/github.com/go-jose/go-jose/v3/json/LICENSE b/vendor/github.com/go-jose/go-jose/v4/json/LICENSE
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/json/LICENSE
rename to vendor/github.com/go-jose/go-jose/v4/json/LICENSE
diff --git a/vendor/github.com/go-jose/go-jose/v3/json/README.md b/vendor/github.com/go-jose/go-jose/v4/json/README.md
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/json/README.md
rename to vendor/github.com/go-jose/go-jose/v4/json/README.md
diff --git a/vendor/github.com/go-jose/go-jose/v3/json/decode.go b/vendor/github.com/go-jose/go-jose/v4/json/decode.go
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/json/decode.go
rename to vendor/github.com/go-jose/go-jose/v4/json/decode.go
diff --git a/vendor/github.com/go-jose/go-jose/v3/json/encode.go b/vendor/github.com/go-jose/go-jose/v4/json/encode.go
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/json/encode.go
rename to vendor/github.com/go-jose/go-jose/v4/json/encode.go
diff --git a/vendor/github.com/go-jose/go-jose/v3/json/indent.go b/vendor/github.com/go-jose/go-jose/v4/json/indent.go
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/json/indent.go
rename to vendor/github.com/go-jose/go-jose/v4/json/indent.go
diff --git a/vendor/github.com/go-jose/go-jose/v3/json/scanner.go b/vendor/github.com/go-jose/go-jose/v4/json/scanner.go
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/json/scanner.go
rename to vendor/github.com/go-jose/go-jose/v4/json/scanner.go
diff --git a/vendor/github.com/go-jose/go-jose/v3/json/stream.go b/vendor/github.com/go-jose/go-jose/v4/json/stream.go
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/json/stream.go
rename to vendor/github.com/go-jose/go-jose/v4/json/stream.go
diff --git a/vendor/github.com/go-jose/go-jose/v3/json/tags.go b/vendor/github.com/go-jose/go-jose/v4/json/tags.go
similarity index 100%
rename from vendor/github.com/go-jose/go-jose/v3/json/tags.go
rename to vendor/github.com/go-jose/go-jose/v4/json/tags.go
diff --git a/vendor/github.com/go-jose/go-jose/v3/jwe.go b/vendor/github.com/go-jose/go-jose/v4/jwe.go
similarity index 63%
rename from vendor/github.com/go-jose/go-jose/v3/jwe.go
rename to vendor/github.com/go-jose/go-jose/v4/jwe.go
index 4267ac75..89f03ee3 100644
--- a/vendor/github.com/go-jose/go-jose/v3/jwe.go
+++ b/vendor/github.com/go-jose/go-jose/v4/jwe.go
@@ -18,10 +18,11 @@ package jose
import (
"encoding/base64"
+ "errors"
"fmt"
"strings"
- "github.com/go-jose/go-jose/v3/json"
+ "github.com/go-jose/go-jose/v4/json"
)
// rawJSONWebEncryption represents a raw JWE JSON object. Used for parsing/serializing.
@@ -104,29 +105,75 @@ func (obj JSONWebEncryption) computeAuthData() []byte {
return output
}
-// ParseEncrypted parses an encrypted message in compact or JWE JSON Serialization format.
-func ParseEncrypted(input string) (*JSONWebEncryption, error) {
+func containsKeyAlgorithm(haystack []KeyAlgorithm, needle KeyAlgorithm) bool {
+ for _, algorithm := range haystack {
+ if algorithm == needle {
+ return true
+ }
+ }
+ return false
+}
+
+func containsContentEncryption(haystack []ContentEncryption, needle ContentEncryption) bool {
+ for _, algorithm := range haystack {
+ if algorithm == needle {
+ return true
+ }
+ }
+ return false
+}
+
+// ParseEncrypted parses an encrypted message in JWE Compact or JWE JSON Serialization.
+//
+// https://datatracker.ietf.org/doc/html/rfc7516#section-3.1
+// https://datatracker.ietf.org/doc/html/rfc7516#section-3.2
+//
+// The keyAlgorithms and contentEncryption parameters are used to validate the "alg" and "enc"
+// header parameters respectively. They must be nonempty, and each "alg" or "enc" header in
+// parsed data must contain a value that is present in the corresponding parameter. That
+// includes the protected and unprotected headers as well as all recipients. To accept
+// multiple algorithms, pass a slice of all the algorithms you want to accept.
+func ParseEncrypted(input string,
+ keyEncryptionAlgorithms []KeyAlgorithm,
+ contentEncryption []ContentEncryption,
+) (*JSONWebEncryption, error) {
input = stripWhitespace(input)
if strings.HasPrefix(input, "{") {
- return parseEncryptedFull(input)
+ return ParseEncryptedJSON(input, keyEncryptionAlgorithms, contentEncryption)
}
- return parseEncryptedCompact(input)
+ return ParseEncryptedCompact(input, keyEncryptionAlgorithms, contentEncryption)
}
-// parseEncryptedFull parses a message in compact format.
-func parseEncryptedFull(input string) (*JSONWebEncryption, error) {
+// ParseEncryptedJSON parses a message in JWE JSON Serialization.
+//
+// https://datatracker.ietf.org/doc/html/rfc7516#section-3.2
+func ParseEncryptedJSON(
+ input string,
+ keyEncryptionAlgorithms []KeyAlgorithm,
+ contentEncryption []ContentEncryption,
+) (*JSONWebEncryption, error) {
var parsed rawJSONWebEncryption
err := json.Unmarshal([]byte(input), &parsed)
if err != nil {
return nil, err
}
- return parsed.sanitized()
+ return parsed.sanitized(keyEncryptionAlgorithms, contentEncryption)
}
// sanitized produces a cleaned-up JWE object from the raw JSON.
-func (parsed *rawJSONWebEncryption) sanitized() (*JSONWebEncryption, error) {
+func (parsed *rawJSONWebEncryption) sanitized(
+ keyEncryptionAlgorithms []KeyAlgorithm,
+ contentEncryption []ContentEncryption,
+) (*JSONWebEncryption, error) {
+ if len(keyEncryptionAlgorithms) == 0 {
+ return nil, errors.New("go-jose/go-jose: no key algorithms provided")
+ }
+ if len(contentEncryption) == 0 {
+ return nil, errors.New("go-jose/go-jose: no content encryption algorithms provided")
+ }
+
obj := &JSONWebEncryption{
original: parsed,
unprotected: parsed.Unprotected,
@@ -170,7 +217,7 @@ func (parsed *rawJSONWebEncryption) sanitized() (*JSONWebEncryption, error) {
} else {
obj.recipients = make([]recipientInfo, len(parsed.Recipients))
for r := range parsed.Recipients {
- encryptedKey, err := base64URLDecode(parsed.Recipients[r].EncryptedKey)
+ encryptedKey, err := base64.RawURLEncoding.DecodeString(parsed.Recipients[r].EncryptedKey)
if err != nil {
return nil, err
}
@@ -185,10 +232,31 @@ func (parsed *rawJSONWebEncryption) sanitized() (*JSONWebEncryption, error) {
}
}
- for _, recipient := range obj.recipients {
+ for i, recipient := range obj.recipients {
headers := obj.mergedHeaders(&recipient)
- if headers.getAlgorithm() == "" || headers.getEncryption() == "" {
- return nil, fmt.Errorf("go-jose/go-jose: message is missing alg/enc headers")
+ if headers.getAlgorithm() == "" {
+ return nil, fmt.Errorf(`go-jose/go-jose: recipient %d: missing header "alg"`, i)
+ }
+ if headers.getEncryption() == "" {
+ return nil, fmt.Errorf(`go-jose/go-jose: recipient %d: missing header "enc"`, i)
+ }
+ err := validateAlgEnc(headers, keyEncryptionAlgorithms, contentEncryption)
+ if err != nil {
+ return nil, fmt.Errorf("go-jose/go-jose: recipient %d: %s", i, err)
+ }
+
+ }
+
+ if obj.protected != nil {
+ err := validateAlgEnc(*obj.protected, keyEncryptionAlgorithms, contentEncryption)
+ if err != nil {
+ return nil, fmt.Errorf("go-jose/go-jose: protected header: %s", err)
+ }
+ }
+ if obj.unprotected != nil {
+ err := validateAlgEnc(*obj.unprotected, keyEncryptionAlgorithms, contentEncryption)
+ if err != nil {
+ return nil, fmt.Errorf("go-jose/go-jose: unprotected header: %s", err)
}
}
@@ -200,34 +268,52 @@ func (parsed *rawJSONWebEncryption) sanitized() (*JSONWebEncryption, error) {
return obj, nil
}
-// parseEncryptedCompact parses a message in compact format.
-func parseEncryptedCompact(input string) (*JSONWebEncryption, error) {
+func validateAlgEnc(headers rawHeader, keyAlgorithms []KeyAlgorithm, contentEncryption []ContentEncryption) error {
+ alg := headers.getAlgorithm()
+ enc := headers.getEncryption()
+ if alg != "" && !containsKeyAlgorithm(keyAlgorithms, alg) {
+ return fmt.Errorf("unexpected key algorithm %q; expected %q", alg, keyAlgorithms)
+ }
+ if alg != "" && !containsContentEncryption(contentEncryption, enc) {
+ return fmt.Errorf("unexpected content encryption algorithm %q; expected %q", enc, contentEncryption)
+ }
+ return nil
+}
+
+// ParseEncryptedCompact parses a message in JWE Compact Serialization.
+//
+// https://datatracker.ietf.org/doc/html/rfc7516#section-3.1
+func ParseEncryptedCompact(
+ input string,
+ keyAlgorithms []KeyAlgorithm,
+ contentEncryption []ContentEncryption,
+) (*JSONWebEncryption, error) {
parts := strings.Split(input, ".")
if len(parts) != 5 {
return nil, fmt.Errorf("go-jose/go-jose: compact JWE format must have five parts")
}
- rawProtected, err := base64URLDecode(parts[0])
+ rawProtected, err := base64.RawURLEncoding.DecodeString(parts[0])
if err != nil {
return nil, err
}
- encryptedKey, err := base64URLDecode(parts[1])
+ encryptedKey, err := base64.RawURLEncoding.DecodeString(parts[1])
if err != nil {
return nil, err
}
- iv, err := base64URLDecode(parts[2])
+ iv, err := base64.RawURLEncoding.DecodeString(parts[2])
if err != nil {
return nil, err
}
- ciphertext, err := base64URLDecode(parts[3])
+ ciphertext, err := base64.RawURLEncoding.DecodeString(parts[3])
if err != nil {
return nil, err
}
- tag, err := base64URLDecode(parts[4])
+ tag, err := base64.RawURLEncoding.DecodeString(parts[4])
if err != nil {
return nil, err
}
@@ -240,7 +326,7 @@ func parseEncryptedCompact(input string) (*JSONWebEncryption, error) {
Tag: newBuffer(tag),
}
- return raw.sanitized()
+ return raw.sanitized(keyAlgorithms, contentEncryption)
}
// CompactSerialize serializes an object using the compact serialization format.
diff --git a/vendor/github.com/go-jose/go-jose/v3/jwk.go b/vendor/github.com/go-jose/go-jose/v4/jwk.go
similarity index 96%
rename from vendor/github.com/go-jose/go-jose/v3/jwk.go
rename to vendor/github.com/go-jose/go-jose/v4/jwk.go
index e4021959..8a528421 100644
--- a/vendor/github.com/go-jose/go-jose/v3/jwk.go
+++ b/vendor/github.com/go-jose/go-jose/v4/jwk.go
@@ -35,7 +35,7 @@ import (
"reflect"
"strings"
- "github.com/go-jose/go-jose/v3/json"
+ "github.com/go-jose/go-jose/v4/json"
)
// rawJSONWebKey represents a public or private key in JWK format, used for parsing/serializing.
@@ -266,7 +266,7 @@ func (k *JSONWebKey) UnmarshalJSON(data []byte) (err error) {
// x5t parameters are base64url-encoded SHA thumbprints
// See RFC 7517, Section 4.8, https://tools.ietf.org/html/rfc7517#section-4.8
- x5tSHA1bytes, err := base64URLDecode(raw.X5tSHA1)
+ x5tSHA1bytes, err := base64.RawURLEncoding.DecodeString(raw.X5tSHA1)
if err != nil {
return errors.New("go-jose/go-jose: invalid JWK, x5t header has invalid encoding")
}
@@ -286,7 +286,7 @@ func (k *JSONWebKey) UnmarshalJSON(data []byte) (err error) {
k.CertificateThumbprintSHA1 = x5tSHA1bytes
- x5tSHA256bytes, err := base64URLDecode(raw.X5tSHA256)
+ x5tSHA256bytes, err := base64.RawURLEncoding.DecodeString(raw.X5tSHA256)
if err != nil {
return errors.New("go-jose/go-jose: invalid JWK, x5t#S256 header has invalid encoding")
}
@@ -779,7 +779,13 @@ func (key rawJSONWebKey) symmetricKey() ([]byte, error) {
return key.K.bytes(), nil
}
-func tryJWKS(key interface{}, headers ...Header) interface{} {
+var (
+ // ErrJWKSKidNotFound is returned when a JWKS does not contain a JWK with a
+ // key ID which matches one in the provided tokens headers.
+ ErrJWKSKidNotFound = errors.New("go-jose/go-jose: JWK with matching kid not found in JWK Set")
+)
+
+func tryJWKS(key interface{}, headers ...Header) (interface{}, error) {
var jwks JSONWebKeySet
switch jwksType := key.(type) {
@@ -788,9 +794,11 @@ func tryJWKS(key interface{}, headers ...Header) interface{} {
case JSONWebKeySet:
jwks = jwksType
default:
- return key
+ // If the specified key is not a JWKS, return as is.
+ return key, nil
}
+ // Determine the KID to search for from the headers.
var kid string
for _, header := range headers {
if header.KeyID != "" {
@@ -799,14 +807,17 @@ func tryJWKS(key interface{}, headers ...Header) interface{} {
}
}
+ // If no KID is specified in the headers, reject.
if kid == "" {
- return key
+ return nil, ErrJWKSKidNotFound
}
+ // Find the JWK with the matching KID. If no JWK with the specified KID is
+ // found, reject.
keys := jwks.Key(kid)
if len(keys) == 0 {
- return key
+ return nil, ErrJWKSKidNotFound
}
- return keys[0].Key
+ return keys[0].Key, nil
}
diff --git a/vendor/github.com/go-jose/go-jose/v3/jws.go b/vendor/github.com/go-jose/go-jose/v4/jws.go
similarity index 80%
rename from vendor/github.com/go-jose/go-jose/v3/jws.go
rename to vendor/github.com/go-jose/go-jose/v4/jws.go
index e37007db..3a912301 100644
--- a/vendor/github.com/go-jose/go-jose/v3/jws.go
+++ b/vendor/github.com/go-jose/go-jose/v4/jws.go
@@ -23,7 +23,7 @@ import (
"fmt"
"strings"
- "github.com/go-jose/go-jose/v3/json"
+ "github.com/go-jose/go-jose/v4/json"
)
// rawJSONWebSignature represents a raw JWS JSON object. Used for parsing/serializing.
@@ -75,22 +75,41 @@ type Signature struct {
original *rawSignatureInfo
}
-// ParseSigned parses a signed message in compact or JWS JSON Serialization format.
-func ParseSigned(signature string) (*JSONWebSignature, error) {
+// ParseSigned parses a signed message in JWS Compact or JWS JSON Serialization.
+//
+// https://datatracker.ietf.org/doc/html/rfc7515#section-7
+func ParseSigned(
+ signature string,
+ signatureAlgorithms []SignatureAlgorithm,
+) (*JSONWebSignature, error) {
signature = stripWhitespace(signature)
if strings.HasPrefix(signature, "{") {
- return parseSignedFull(signature)
+ return ParseSignedJSON(signature, signatureAlgorithms)
}
- return parseSignedCompact(signature, nil)
+ return parseSignedCompact(signature, nil, signatureAlgorithms)
+}
+
+// ParseSignedCompact parses a message in JWS Compact Serialization.
+//
+// https://datatracker.ietf.org/doc/html/rfc7515#section-7.1
+func ParseSignedCompact(
+ signature string,
+ signatureAlgorithms []SignatureAlgorithm,
+) (*JSONWebSignature, error) {
+ return parseSignedCompact(signature, nil, signatureAlgorithms)
}
// ParseDetached parses a signed message in compact serialization format with detached payload.
-func ParseDetached(signature string, payload []byte) (*JSONWebSignature, error) {
+func ParseDetached(
+ signature string,
+ payload []byte,
+ signatureAlgorithms []SignatureAlgorithm,
+) (*JSONWebSignature, error) {
if payload == nil {
return nil, errors.New("go-jose/go-jose: nil payload")
}
- return parseSignedCompact(stripWhitespace(signature), payload)
+ return parseSignedCompact(stripWhitespace(signature), payload, signatureAlgorithms)
}
// Get a header value
@@ -137,19 +156,36 @@ func (obj JSONWebSignature) computeAuthData(payload []byte, signature *Signature
return authData.Bytes(), nil
}
-// parseSignedFull parses a message in full format.
-func parseSignedFull(input string) (*JSONWebSignature, error) {
+// ParseSignedJSON parses a message in JWS JSON Serialization.
+//
+// https://datatracker.ietf.org/doc/html/rfc7515#section-7.2
+func ParseSignedJSON(
+ input string,
+ signatureAlgorithms []SignatureAlgorithm,
+) (*JSONWebSignature, error) {
var parsed rawJSONWebSignature
err := json.Unmarshal([]byte(input), &parsed)
if err != nil {
return nil, err
}
- return parsed.sanitized()
+ return parsed.sanitized(signatureAlgorithms)
+}
+
+func containsSignatureAlgorithm(haystack []SignatureAlgorithm, needle SignatureAlgorithm) bool {
+ for _, algorithm := range haystack {
+ if algorithm == needle {
+ return true
+ }
+ }
+ return false
}
// sanitized produces a cleaned-up JWS object from the raw JSON.
-func (parsed *rawJSONWebSignature) sanitized() (*JSONWebSignature, error) {
+func (parsed *rawJSONWebSignature) sanitized(signatureAlgorithms []SignatureAlgorithm) (*JSONWebSignature, error) {
+ if len(signatureAlgorithms) == 0 {
+ return nil, errors.New("go-jose/go-jose: no signature algorithms specified")
+ }
if parsed.Payload == nil {
return nil, fmt.Errorf("go-jose/go-jose: missing payload in JWS message")
}
@@ -198,6 +234,12 @@ func (parsed *rawJSONWebSignature) sanitized() (*JSONWebSignature, error) {
return nil, err
}
+ alg := SignatureAlgorithm(signature.Header.Algorithm)
+ if !containsSignatureAlgorithm(signatureAlgorithms, alg) {
+ return nil, fmt.Errorf("go-jose/go-jose: unexpected signature algorithm %q; expected %q",
+ alg, signatureAlgorithms)
+ }
+
if signature.header != nil {
signature.Unprotected, err = signature.header.sanitized()
if err != nil {
@@ -241,6 +283,12 @@ func (parsed *rawJSONWebSignature) sanitized() (*JSONWebSignature, error) {
return nil, err
}
+ alg := SignatureAlgorithm(obj.Signatures[i].Header.Algorithm)
+ if !containsSignatureAlgorithm(signatureAlgorithms, alg) {
+ return nil, fmt.Errorf("go-jose/go-jose: unexpected signature algorithm %q; expected %q",
+ alg, signatureAlgorithms)
+ }
+
if obj.Signatures[i].header != nil {
obj.Signatures[i].Unprotected, err = obj.Signatures[i].header.sanitized()
if err != nil {
@@ -274,7 +322,11 @@ func (parsed *rawJSONWebSignature) sanitized() (*JSONWebSignature, error) {
}
// parseSignedCompact parses a message in compact format.
-func parseSignedCompact(input string, payload []byte) (*JSONWebSignature, error) {
+func parseSignedCompact(
+ input string,
+ payload []byte,
+ signatureAlgorithms []SignatureAlgorithm,
+) (*JSONWebSignature, error) {
parts := strings.Split(input, ".")
if len(parts) != 3 {
return nil, fmt.Errorf("go-jose/go-jose: compact JWS format must have three parts")
@@ -284,19 +336,19 @@ func parseSignedCompact(input string, payload []byte) (*JSONWebSignature, error)
return nil, fmt.Errorf("go-jose/go-jose: payload is not detached")
}
- rawProtected, err := base64URLDecode(parts[0])
+ rawProtected, err := base64.RawURLEncoding.DecodeString(parts[0])
if err != nil {
return nil, err
}
if payload == nil {
- payload, err = base64URLDecode(parts[1])
+ payload, err = base64.RawURLEncoding.DecodeString(parts[1])
if err != nil {
return nil, err
}
}
- signature, err := base64URLDecode(parts[2])
+ signature, err := base64.RawURLEncoding.DecodeString(parts[2])
if err != nil {
return nil, err
}
@@ -306,7 +358,7 @@ func parseSignedCompact(input string, payload []byte) (*JSONWebSignature, error)
Protected: newBuffer(rawProtected),
Signature: newBuffer(signature),
}
- return raw.sanitized()
+ return raw.sanitized(signatureAlgorithms)
}
func (obj JSONWebSignature) compactSerialize(detached bool) (string, error) {
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwt/builder.go b/vendor/github.com/go-jose/go-jose/v4/jwt/builder.go
similarity index 83%
rename from vendor/gopkg.in/square/go-jose.v2/jwt/builder.go
rename to vendor/github.com/go-jose/go-jose/v4/jwt/builder.go
index 3afa9030..d68bb372 100644
--- a/vendor/gopkg.in/square/go-jose.v2/jwt/builder.go
+++ b/vendor/github.com/go-jose/go-jose/v4/jwt/builder.go
@@ -21,13 +21,13 @@ import (
"bytes"
"reflect"
- "gopkg.in/square/go-jose.v2/json"
+ "github.com/go-jose/go-jose/v4/json"
- "gopkg.in/square/go-jose.v2"
+ "github.com/go-jose/go-jose/v4"
)
// Builder is a utility for making JSON Web Tokens. Calls can be chained, and
-// errors are accumulated until the final call to CompactSerialize/FullSerialize.
+// errors are accumulated until the final call to Serialize.
type Builder interface {
// Claims encodes claims into JWE/JWS form. Multiple calls will merge claims
// into single JSON object. If you are passing private claims, make sure to set
@@ -36,15 +36,13 @@ type Builder interface {
Claims(i interface{}) Builder
// Token builds a JSONWebToken from provided data.
Token() (*JSONWebToken, error)
- // FullSerialize serializes a token using the full serialization format.
- FullSerialize() (string, error)
- // CompactSerialize serializes a token using the compact serialization format.
- CompactSerialize() (string, error)
+ // Serialize serializes a token.
+ Serialize() (string, error)
}
// NestedBuilder is a utility for making Signed-Then-Encrypted JSON Web Tokens.
// Calls can be chained, and errors are accumulated until final call to
-// CompactSerialize/FullSerialize.
+// Serialize.
type NestedBuilder interface {
// Claims encodes claims into JWE/JWS form. Multiple calls will merge claims
// into single JSON object. If you are passing private claims, make sure to set
@@ -53,10 +51,8 @@ type NestedBuilder interface {
Claims(i interface{}) NestedBuilder
// Token builds a NestedJSONWebToken from provided data.
Token() (*NestedJSONWebToken, error)
- // FullSerialize serializes a token using the full serialization format.
- FullSerialize() (string, error)
- // CompactSerialize serializes a token using the compact serialization format.
- CompactSerialize() (string, error)
+ // Serialize serializes a token.
+ Serialize() (string, error)
}
type builder struct {
@@ -194,7 +190,7 @@ func (b *signedBuilder) Token() (*JSONWebToken, error) {
return b.builder.token(sig.Verify, h)
}
-func (b *signedBuilder) CompactSerialize() (string, error) {
+func (b *signedBuilder) Serialize() (string, error) {
sig, err := b.sign()
if err != nil {
return "", err
@@ -203,15 +199,6 @@ func (b *signedBuilder) CompactSerialize() (string, error) {
return sig.CompactSerialize()
}
-func (b *signedBuilder) FullSerialize() (string, error) {
- sig, err := b.sign()
- if err != nil {
- return "", err
- }
-
- return sig.FullSerialize(), nil
-}
-
func (b *signedBuilder) sign() (*jose.JSONWebSignature, error) {
if b.err != nil {
return nil, b.err
@@ -232,7 +219,7 @@ func (b *encryptedBuilder) Claims(i interface{}) Builder {
}
}
-func (b *encryptedBuilder) CompactSerialize() (string, error) {
+func (b *encryptedBuilder) Serialize() (string, error) {
enc, err := b.encrypt()
if err != nil {
return "", err
@@ -241,15 +228,6 @@ func (b *encryptedBuilder) CompactSerialize() (string, error) {
return enc.CompactSerialize()
}
-func (b *encryptedBuilder) FullSerialize() (string, error) {
- enc, err := b.encrypt()
- if err != nil {
- return "", err
- }
-
- return enc.FullSerialize(), nil
-}
-
func (b *encryptedBuilder) Token() (*JSONWebToken, error) {
enc, err := b.encrypt()
if err != nil {
@@ -280,6 +258,8 @@ func (b *nestedBuilder) Claims(i interface{}) NestedBuilder {
}
}
+// Token produced a token suitable for serialization. It cannot be decrypted
+// without serializing and then deserializing.
func (b *nestedBuilder) Token() (*NestedJSONWebToken, error) {
enc, err := b.signAndEncrypt()
if err != nil {
@@ -287,12 +267,13 @@ func (b *nestedBuilder) Token() (*NestedJSONWebToken, error) {
}
return &NestedJSONWebToken{
- enc: enc,
- Headers: []jose.Header{enc.Header},
+ allowedSignatureAlgorithms: nil,
+ enc: enc,
+ Headers: []jose.Header{enc.Header},
}, nil
}
-func (b *nestedBuilder) CompactSerialize() (string, error) {
+func (b *nestedBuilder) Serialize() (string, error) {
enc, err := b.signAndEncrypt()
if err != nil {
return "", err
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwt/claims.go b/vendor/github.com/go-jose/go-jose/v4/jwt/claims.go
similarity index 91%
rename from vendor/gopkg.in/square/go-jose.v2/jwt/claims.go
rename to vendor/github.com/go-jose/go-jose/v4/jwt/claims.go
index 5f40ef3b..e73412a3 100644
--- a/vendor/gopkg.in/square/go-jose.v2/jwt/claims.go
+++ b/vendor/github.com/go-jose/go-jose/v4/jwt/claims.go
@@ -21,7 +21,7 @@ import (
"strconv"
"time"
- "gopkg.in/square/go-jose.v2/json"
+ "github.com/go-jose/go-jose/v4/json"
)
// Claims represents public claim values (as specified in RFC 7519).
@@ -111,6 +111,15 @@ func (s *Audience) UnmarshalJSON(b []byte) error {
return nil
}
+// MarshalJSON converts audience to json representation.
+func (s Audience) MarshalJSON() ([]byte, error) {
+ if len(s) == 1 {
+ return json.Marshal(s[0])
+ }
+ return json.Marshal([]string(s))
+}
+
+// Contains checks whether a given string is included in the Audience
func (s Audience) Contains(v string) bool {
for _, a := range s {
if a == v {
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwt/doc.go b/vendor/github.com/go-jose/go-jose/v4/jwt/doc.go
similarity index 99%
rename from vendor/gopkg.in/square/go-jose.v2/jwt/doc.go
rename to vendor/github.com/go-jose/go-jose/v4/jwt/doc.go
index 4cf97b54..30b886ef 100644
--- a/vendor/gopkg.in/square/go-jose.v2/jwt/doc.go
+++ b/vendor/github.com/go-jose/go-jose/v4/jwt/doc.go
@@ -15,8 +15,6 @@
*/
/*
-
Package jwt provides an implementation of the JSON Web Token standard.
-
*/
package jwt
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwt/errors.go b/vendor/github.com/go-jose/go-jose/v4/jwt/errors.go
similarity index 54%
rename from vendor/gopkg.in/square/go-jose.v2/jwt/errors.go
rename to vendor/github.com/go-jose/go-jose/v4/jwt/errors.go
index 09f76ae4..27388e54 100644
--- a/vendor/gopkg.in/square/go-jose.v2/jwt/errors.go
+++ b/vendor/github.com/go-jose/go-jose/v4/jwt/errors.go
@@ -20,34 +20,34 @@ package jwt
import "errors"
// ErrUnmarshalAudience indicates that aud claim could not be unmarshalled.
-var ErrUnmarshalAudience = errors.New("square/go-jose/jwt: expected string or array value to unmarshal to Audience")
+var ErrUnmarshalAudience = errors.New("go-jose/go-jose/jwt: expected string or array value to unmarshal to Audience")
// ErrUnmarshalNumericDate indicates that JWT NumericDate could not be unmarshalled.
-var ErrUnmarshalNumericDate = errors.New("square/go-jose/jwt: expected number value to unmarshal NumericDate")
+var ErrUnmarshalNumericDate = errors.New("go-jose/go-jose/jwt: expected number value to unmarshal NumericDate")
// ErrInvalidClaims indicates that given claims have invalid type.
-var ErrInvalidClaims = errors.New("square/go-jose/jwt: expected claims to be value convertible into JSON object")
+var ErrInvalidClaims = errors.New("go-jose/go-jose/jwt: expected claims to be value convertible into JSON object")
// ErrInvalidIssuer indicates invalid iss claim.
-var ErrInvalidIssuer = errors.New("square/go-jose/jwt: validation failed, invalid issuer claim (iss)")
+var ErrInvalidIssuer = errors.New("go-jose/go-jose/jwt: validation failed, invalid issuer claim (iss)")
// ErrInvalidSubject indicates invalid sub claim.
-var ErrInvalidSubject = errors.New("square/go-jose/jwt: validation failed, invalid subject claim (sub)")
+var ErrInvalidSubject = errors.New("go-jose/go-jose/jwt: validation failed, invalid subject claim (sub)")
// ErrInvalidAudience indicated invalid aud claim.
-var ErrInvalidAudience = errors.New("square/go-jose/jwt: validation failed, invalid audience claim (aud)")
+var ErrInvalidAudience = errors.New("go-jose/go-jose/jwt: validation failed, invalid audience claim (aud)")
// ErrInvalidID indicates invalid jti claim.
-var ErrInvalidID = errors.New("square/go-jose/jwt: validation failed, invalid ID claim (jti)")
+var ErrInvalidID = errors.New("go-jose/go-jose/jwt: validation failed, invalid ID claim (jti)")
// ErrNotValidYet indicates that token is used before time indicated in nbf claim.
-var ErrNotValidYet = errors.New("square/go-jose/jwt: validation failed, token not valid yet (nbf)")
+var ErrNotValidYet = errors.New("go-jose/go-jose/jwt: validation failed, token not valid yet (nbf)")
// ErrExpired indicates that token is used after expiry time indicated in exp claim.
-var ErrExpired = errors.New("square/go-jose/jwt: validation failed, token is expired (exp)")
+var ErrExpired = errors.New("go-jose/go-jose/jwt: validation failed, token is expired (exp)")
// ErrIssuedInTheFuture indicates that the iat field is in the future.
-var ErrIssuedInTheFuture = errors.New("square/go-jose/jwt: validation field, token issued in the future (iat)")
+var ErrIssuedInTheFuture = errors.New("go-jose/go-jose/jwt: validation field, token issued in the future (iat)")
// ErrInvalidContentType indicates that token requires JWT cty header.
-var ErrInvalidContentType = errors.New("square/go-jose/jwt: expected content type to be JWT (cty header)")
+var ErrInvalidContentType = errors.New("go-jose/go-jose/jwt: expected content type to be JWT (cty header)")
diff --git a/vendor/github.com/go-jose/go-jose/v4/jwt/jwt.go b/vendor/github.com/go-jose/go-jose/v4/jwt/jwt.go
new file mode 100644
index 00000000..c4998d78
--- /dev/null
+++ b/vendor/github.com/go-jose/go-jose/v4/jwt/jwt.go
@@ -0,0 +1,198 @@
+/*-
+ * Copyright 2016 Zbigniew Mandziejewicz
+ * Copyright 2016 Square, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jwt
+
+import (
+ "fmt"
+ "strings"
+
+ jose "github.com/go-jose/go-jose/v4"
+ "github.com/go-jose/go-jose/v4/json"
+)
+
+// JSONWebToken represents a JSON Web Token (as specified in RFC7519).
+type JSONWebToken struct {
+ payload func(k interface{}) ([]byte, error)
+ unverifiedPayload func() []byte
+ Headers []jose.Header
+}
+
+type NestedJSONWebToken struct {
+ enc *jose.JSONWebEncryption
+ Headers []jose.Header
+ // Used when parsing and decrypting an input
+ allowedSignatureAlgorithms []jose.SignatureAlgorithm
+}
+
+// Claims deserializes a JSONWebToken into dest using the provided key.
+func (t *JSONWebToken) Claims(key interface{}, dest ...interface{}) error {
+ b, err := t.payload(key)
+ if err != nil {
+ return err
+ }
+
+ for _, d := range dest {
+ if err := json.Unmarshal(b, d); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+// UnsafeClaimsWithoutVerification deserializes the claims of a
+// JSONWebToken into the dests. For signed JWTs, the claims are not
+// verified. This function won't work for encrypted JWTs.
+func (t *JSONWebToken) UnsafeClaimsWithoutVerification(dest ...interface{}) error {
+ if t.unverifiedPayload == nil {
+ return fmt.Errorf("go-jose/go-jose: Cannot get unverified claims")
+ }
+ claims := t.unverifiedPayload()
+ for _, d := range dest {
+ if err := json.Unmarshal(claims, d); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (t *NestedJSONWebToken) Decrypt(decryptionKey interface{}) (*JSONWebToken, error) {
+ b, err := t.enc.Decrypt(decryptionKey)
+ if err != nil {
+ return nil, err
+ }
+
+ sig, err := ParseSigned(string(b), t.allowedSignatureAlgorithms)
+ if err != nil {
+ return nil, err
+ }
+
+ return sig, nil
+}
+
+// ParseSigned parses token from JWS form.
+func ParseSigned(s string, signatureAlgorithms []jose.SignatureAlgorithm) (*JSONWebToken, error) {
+ sig, err := jose.ParseSignedCompact(s, signatureAlgorithms)
+ if err != nil {
+ return nil, err
+ }
+ headers := make([]jose.Header, len(sig.Signatures))
+ for i, signature := range sig.Signatures {
+ headers[i] = signature.Header
+ }
+
+ return &JSONWebToken{
+ payload: sig.Verify,
+ unverifiedPayload: sig.UnsafePayloadWithoutVerification,
+ Headers: headers,
+ }, nil
+}
+
+func validateKeyEncryptionAlgorithm(algs []jose.KeyAlgorithm) error {
+ for _, alg := range algs {
+ switch alg {
+ case jose.ED25519,
+ jose.RSA1_5,
+ jose.RSA_OAEP,
+ jose.RSA_OAEP_256,
+ jose.ECDH_ES,
+ jose.ECDH_ES_A128KW,
+ jose.ECDH_ES_A192KW,
+ jose.ECDH_ES_A256KW:
+ return fmt.Errorf("asymmetric encryption algorithms not supported for JWT: "+
+ "invalid key encryption algorithm: %s", alg)
+ case jose.PBES2_HS256_A128KW,
+ jose.PBES2_HS384_A192KW,
+ jose.PBES2_HS512_A256KW:
+ return fmt.Errorf("password-based encryption not supported for JWT: "+
+ "invalid key encryption algorithm: %s", alg)
+ }
+ }
+ return nil
+}
+
+func parseEncryptedCompact(
+ s string,
+ keyAlgorithms []jose.KeyAlgorithm,
+ contentEncryption []jose.ContentEncryption,
+) (*jose.JSONWebEncryption, error) {
+ err := validateKeyEncryptionAlgorithm(keyAlgorithms)
+ if err != nil {
+ return nil, err
+ }
+ enc, err := jose.ParseEncryptedCompact(s, keyAlgorithms, contentEncryption)
+ if err != nil {
+ return nil, err
+ }
+ return enc, nil
+}
+
+// ParseEncrypted parses token from JWE form.
+//
+// The keyAlgorithms and contentEncryption parameters are used to validate the "alg" and "enc"
+// header parameters respectively. They must be nonempty, and each "alg" or "enc" header in
+// parsed data must contain a value that is present in the corresponding parameter. That
+// includes the protected and unprotected headers as well as all recipients. To accept
+// multiple algorithms, pass a slice of all the algorithms you want to accept.
+func ParseEncrypted(s string,
+ keyAlgorithms []jose.KeyAlgorithm,
+ contentEncryption []jose.ContentEncryption,
+) (*JSONWebToken, error) {
+ enc, err := parseEncryptedCompact(s, keyAlgorithms, contentEncryption)
+ if err != nil {
+ return nil, err
+ }
+
+ return &JSONWebToken{
+ payload: enc.Decrypt,
+ Headers: []jose.Header{enc.Header},
+ }, nil
+}
+
+// ParseSignedAndEncrypted parses signed-then-encrypted token from JWE form.
+//
+// The encryptionKeyAlgorithms and contentEncryption parameters are used to validate the "alg" and "enc"
+// header parameters, respectively, of the outer JWE. They must be nonempty, and each "alg" or "enc"
+// header in parsed data must contain a value that is present in the corresponding parameter. That
+// includes the protected and unprotected headers as well as all recipients. To accept
+// multiple algorithms, pass a slice of all the algorithms you want to accept.
+//
+// The signatureAlgorithms parameter is used to validate the "alg" header parameter of the
+// inner JWS. It must be nonempty, and the "alg" header in the inner JWS must contain a value
+// that is present in the parameter.
+func ParseSignedAndEncrypted(s string,
+ encryptionKeyAlgorithms []jose.KeyAlgorithm,
+ contentEncryption []jose.ContentEncryption,
+ signatureAlgorithms []jose.SignatureAlgorithm,
+) (*NestedJSONWebToken, error) {
+ enc, err := parseEncryptedCompact(s, encryptionKeyAlgorithms, contentEncryption)
+ if err != nil {
+ return nil, err
+ }
+
+ contentType, _ := enc.Header.ExtraHeaders[jose.HeaderContentType].(string)
+ if strings.ToUpper(contentType) != "JWT" {
+ return nil, ErrInvalidContentType
+ }
+
+ return &NestedJSONWebToken{
+ allowedSignatureAlgorithms: signatureAlgorithms,
+ enc: enc,
+ Headers: []jose.Header{enc.Header},
+ }, nil
+}
diff --git a/vendor/gopkg.in/square/go-jose.v2/jwt/validation.go b/vendor/github.com/go-jose/go-jose/v4/jwt/validation.go
similarity index 72%
rename from vendor/gopkg.in/square/go-jose.v2/jwt/validation.go
rename to vendor/github.com/go-jose/go-jose/v4/jwt/validation.go
index 6f3ff4e8..841a93ee 100644
--- a/vendor/gopkg.in/square/go-jose.v2/jwt/validation.go
+++ b/vendor/github.com/go-jose/go-jose/v4/jwt/validation.go
@@ -25,14 +25,17 @@ const (
)
// Expected defines values used for protected claims validation.
-// If field has zero value then validation is skipped.
+// If field has zero value then validation is skipped, with the exception of
+// Time, where the zero value means "now." To skip validating them, set the
+// corresponding field in the Claims struct to nil.
type Expected struct {
// Issuer matches the "iss" claim exactly.
Issuer string
// Subject matches the "sub" claim exactly.
Subject string
- // Audience matches the values in "aud" claim, regardless of their order.
- Audience Audience
+ // AnyAudience matches if there is a non-empty intersection between
+ // its values and the values in the "aud" claim.
+ AnyAudience Audience
// ID matches the "jti" claim exactly.
ID string
// Time matches the "exp", "nbf" and "iat" claims with leeway.
@@ -61,7 +64,7 @@ func (c Claims) Validate(e Expected) error {
// ValidateWithLeeway checks claims in a token against expected values. A
// custom leeway may be specified for comparing time values. You may pass a
-// zero value to check time values with no leeway, but you should not that
+// zero value to check time values with no leeway, but you should note that
// numeric date values are rounded to the nearest second and sub-second
// precision is not supported.
//
@@ -86,28 +89,38 @@ func (c Claims) ValidateWithLeeway(e Expected, leeway time.Duration) error {
return ErrInvalidID
}
- if len(e.Audience) != 0 {
- for _, v := range e.Audience {
- if !c.Audience.Contains(v) {
- return ErrInvalidAudience
+ if len(e.AnyAudience) != 0 {
+ var intersection bool
+ for _, v := range e.AnyAudience {
+ if c.Audience.Contains(v) {
+ intersection = true
+ break
}
}
- }
- if !e.Time.IsZero() {
- if c.NotBefore != nil && e.Time.Add(leeway).Before(c.NotBefore.Time()) {
- return ErrNotValidYet
+ if !intersection {
+ return ErrInvalidAudience
}
+ }
- if c.Expiry != nil && e.Time.Add(-leeway).After(c.Expiry.Time()) {
- return ErrExpired
- }
+ // validate using the e.Time, or time.Now if not provided
+ validationTime := e.Time
+ if validationTime.IsZero() {
+ validationTime = time.Now()
+ }
- // IssuedAt is optional but cannot be in the future. This is not required by the RFC, but
- // something is misconfigured if this happens and we should not trust it.
- if c.IssuedAt != nil && e.Time.Add(leeway).Before(c.IssuedAt.Time()) {
- return ErrIssuedInTheFuture
- }
+ if c.NotBefore != nil && validationTime.Add(leeway).Before(c.NotBefore.Time()) {
+ return ErrNotValidYet
+ }
+
+ if c.Expiry != nil && validationTime.Add(-leeway).After(c.Expiry.Time()) {
+ return ErrExpired
+ }
+
+ // IssuedAt is optional but cannot be in the future. This is not required by the RFC, but
+ // something is misconfigured if this happens and we should not trust it.
+ if c.IssuedAt != nil && validationTime.Add(leeway).Before(c.IssuedAt.Time()) {
+ return ErrIssuedInTheFuture
}
return nil
diff --git a/vendor/github.com/go-jose/go-jose/v3/opaque.go b/vendor/github.com/go-jose/go-jose/v4/opaque.go
similarity index 97%
rename from vendor/github.com/go-jose/go-jose/v3/opaque.go
rename to vendor/github.com/go-jose/go-jose/v4/opaque.go
index 68db085e..42942723 100644
--- a/vendor/github.com/go-jose/go-jose/v3/opaque.go
+++ b/vendor/github.com/go-jose/go-jose/v4/opaque.go
@@ -83,6 +83,9 @@ func (o *opaqueVerifier) verifyPayload(payload []byte, signature []byte, alg Sig
}
// OpaqueKeyEncrypter is an interface that supports encrypting keys with an opaque key.
+//
+// Note: this cannot currently be implemented outside this package because of its
+// unexported method.
type OpaqueKeyEncrypter interface {
// KeyID returns the kid
KeyID() string
diff --git a/vendor/github.com/go-jose/go-jose/v3/shared.go b/vendor/github.com/go-jose/go-jose/v4/shared.go
similarity index 97%
rename from vendor/github.com/go-jose/go-jose/v3/shared.go
rename to vendor/github.com/go-jose/go-jose/v4/shared.go
index 489a04e3..1ec33961 100644
--- a/vendor/github.com/go-jose/go-jose/v3/shared.go
+++ b/vendor/github.com/go-jose/go-jose/v4/shared.go
@@ -23,7 +23,7 @@ import (
"errors"
"fmt"
- "github.com/go-jose/go-jose/v3/json"
+ "github.com/go-jose/go-jose/v4/json"
)
// KeyAlgorithm represents a key management algorithm.
@@ -71,6 +71,12 @@ var (
// ErrUnprotectedNonce indicates that while parsing a JWS or JWE object, a
// nonce header parameter was included in an unprotected header object.
ErrUnprotectedNonce = errors.New("go-jose/go-jose: Nonce parameter included in unprotected header")
+
+ // ErrMissingX5cHeader indicates that the JWT header is missing x5c headers.
+ ErrMissingX5cHeader = errors.New("go-jose/go-jose: no x5c header present in message")
+
+ // ErrUnsupportedEllipticCurve indicates unsupported or unknown elliptic curve has been found.
+ ErrUnsupportedEllipticCurve = errors.New("go-jose/go-jose: unsupported/unknown elliptic curve")
)
// Key management algorithms
@@ -199,7 +205,7 @@ type Header struct {
// not be validated with the given verify options.
func (h Header) Certificates(opts x509.VerifyOptions) ([][]*x509.Certificate, error) {
if len(h.certificates) == 0 {
- return nil, errors.New("go-jose/go-jose: no x5c header present in message")
+ return nil, ErrMissingX5cHeader
}
leaf := h.certificates[0]
@@ -501,7 +507,7 @@ func curveName(crv elliptic.Curve) (string, error) {
case elliptic.P521():
return "P-521", nil
default:
- return "", fmt.Errorf("go-jose/go-jose: unsupported/unknown elliptic curve")
+ return "", ErrUnsupportedEllipticCurve
}
}
diff --git a/vendor/github.com/go-jose/go-jose/v3/signing.go b/vendor/github.com/go-jose/go-jose/v4/signing.go
similarity index 95%
rename from vendor/github.com/go-jose/go-jose/v3/signing.go
rename to vendor/github.com/go-jose/go-jose/v4/signing.go
index 52f3d856..3dec0112 100644
--- a/vendor/github.com/go-jose/go-jose/v3/signing.go
+++ b/vendor/github.com/go-jose/go-jose/v4/signing.go
@@ -25,7 +25,7 @@ import (
"errors"
"fmt"
- "github.com/go-jose/go-jose/v3/json"
+ "github.com/go-jose/go-jose/v4/json"
)
// NonceSource represents a source of random nonces to go into JWS objects
@@ -49,6 +49,11 @@ type Signer interface {
// - JSONWebKey
// - []byte (an HMAC key)
// - Any type that satisfies the OpaqueSigner interface
+//
+// If the key is an HMAC key, it must have at least as many bytes as the relevant hash output:
+// - HS256: 32 bytes
+// - HS384: 48 bytes
+// - HS512: 64 bytes
type SigningKey struct {
Algorithm SignatureAlgorithm
Key interface{}
@@ -353,8 +358,15 @@ func (ctx *genericSigner) Options() SignerOptions {
// - *rsa.PublicKey
// - *JSONWebKey
// - JSONWebKey
+// - *JSONWebKeySet
+// - JSONWebKeySet
// - []byte (an HMAC key)
// - Any type that implements the OpaqueVerifier interface.
+//
+// If the key is an HMAC key, it must have at least as many bytes as the relevant hash output:
+// - HS256: 32 bytes
+// - HS384: 48 bytes
+// - HS512: 64 bytes
func (obj JSONWebSignature) Verify(verificationKey interface{}) ([]byte, error) {
err := obj.DetachedVerify(obj.payload, verificationKey)
if err != nil {
@@ -378,7 +390,10 @@ func (obj JSONWebSignature) UnsafePayloadWithoutVerification() []byte {
// The verificationKey argument must have one of the types allowed for the
// verificationKey argument of JSONWebSignature.Verify().
func (obj JSONWebSignature) DetachedVerify(payload []byte, verificationKey interface{}) error {
- key := tryJWKS(verificationKey, obj.headers()...)
+ key, err := tryJWKS(verificationKey, obj.headers()...)
+ if err != nil {
+ return err
+ }
verifier, err := newVerifier(key)
if err != nil {
return err
@@ -443,7 +458,10 @@ func (obj JSONWebSignature) VerifyMulti(verificationKey interface{}) (int, Signa
// The verificationKey argument must have one of the types allowed for the
// verificationKey argument of JSONWebSignature.Verify().
func (obj JSONWebSignature) DetachedVerifyMulti(payload []byte, verificationKey interface{}) (int, Signature, error) {
- key := tryJWKS(verificationKey, obj.headers()...)
+ key, err := tryJWKS(verificationKey, obj.headers()...)
+ if err != nil {
+ return -1, Signature{}, err
+ }
verifier, err := newVerifier(key)
if err != nil {
return -1, Signature{}, err
diff --git a/vendor/github.com/go-jose/go-jose/v3/symmetric.go b/vendor/github.com/go-jose/go-jose/v4/symmetric.go
similarity index 96%
rename from vendor/github.com/go-jose/go-jose/v3/symmetric.go
rename to vendor/github.com/go-jose/go-jose/v4/symmetric.go
index 10d8e19f..a69103b0 100644
--- a/vendor/github.com/go-jose/go-jose/v3/symmetric.go
+++ b/vendor/github.com/go-jose/go-jose/v4/symmetric.go
@@ -32,7 +32,7 @@ import (
"golang.org/x/crypto/pbkdf2"
- josecipher "github.com/go-jose/go-jose/v3/cipher"
+ josecipher "github.com/go-jose/go-jose/v4/cipher"
)
// RandReader is a cryptographically secure random number generator (stubbed out in tests).
@@ -454,7 +454,7 @@ func (ctx *symmetricKeyCipher) decryptKey(headers rawHeader, recipient *recipien
func (ctx symmetricMac) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {
mac, err := ctx.hmac(payload, alg)
if err != nil {
- return Signature{}, errors.New("go-jose/go-jose: failed to compute hmac")
+ return Signature{}, err
}
return Signature{
@@ -486,12 +486,24 @@ func (ctx symmetricMac) verifyPayload(payload []byte, mac []byte, alg SignatureA
func (ctx symmetricMac) hmac(payload []byte, alg SignatureAlgorithm) ([]byte, error) {
var hash func() hash.Hash
+ // https://datatracker.ietf.org/doc/html/rfc7518#section-3.2
+ // A key of the same size as the hash output (for instance, 256 bits for
+ // "HS256") or larger MUST be used
switch alg {
case HS256:
+ if len(ctx.key)*8 < 256 {
+ return nil, ErrInvalidKeySize
+ }
hash = sha256.New
case HS384:
+ if len(ctx.key)*8 < 384 {
+ return nil, ErrInvalidKeySize
+ }
hash = sha512.New384
case HS512:
+ if len(ctx.key)*8 < 512 {
+ return nil, ErrInvalidKeySize
+ }
hash = sha512.New
default:
return nil, ErrUnsupportedAlgorithm
diff --git a/vendor/github.com/go-logr/logr/.golangci.yaml b/vendor/github.com/go-logr/logr/.golangci.yaml
new file mode 100644
index 00000000..0cffafa7
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/.golangci.yaml
@@ -0,0 +1,26 @@
+run:
+ timeout: 1m
+ tests: true
+
+linters:
+ disable-all: true
+ enable:
+ - asciicheck
+ - errcheck
+ - forcetypeassert
+ - gocritic
+ - gofmt
+ - goimports
+ - gosimple
+ - govet
+ - ineffassign
+ - misspell
+ - revive
+ - staticcheck
+ - typecheck
+ - unused
+
+issues:
+ exclude-use-default: false
+ max-issues-per-linter: 0
+ max-same-issues: 10
diff --git a/vendor/github.com/go-logr/logr/CHANGELOG.md b/vendor/github.com/go-logr/logr/CHANGELOG.md
new file mode 100644
index 00000000..c3569600
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/CHANGELOG.md
@@ -0,0 +1,6 @@
+# CHANGELOG
+
+## v1.0.0-rc1
+
+This is the first logged release. Major changes (including breaking changes)
+have occurred since earlier tags.
diff --git a/vendor/github.com/go-logr/logr/CONTRIBUTING.md b/vendor/github.com/go-logr/logr/CONTRIBUTING.md
new file mode 100644
index 00000000..5d37e294
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/CONTRIBUTING.md
@@ -0,0 +1,17 @@
+# Contributing
+
+Logr is open to pull-requests, provided they fit within the intended scope of
+the project. Specifically, this library aims to be VERY small and minimalist,
+with no external dependencies.
+
+## Compatibility
+
+This project intends to follow [semantic versioning](http://semver.org) and
+is very strict about compatibility. Any proposed changes MUST follow those
+rules.
+
+## Performance
+
+As a logging library, logr must be as light-weight as possible. Any proposed
+code change must include results of running the [benchmark](./benchmark)
+before and after the change.
diff --git a/vendor/github.com/go-logr/logr/LICENSE b/vendor/github.com/go-logr/logr/LICENSE
new file mode 100644
index 00000000..8dada3ed
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/go-logr/logr/README.md b/vendor/github.com/go-logr/logr/README.md
new file mode 100644
index 00000000..7c7f0c69
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/README.md
@@ -0,0 +1,407 @@
+# A minimal logging API for Go
+
+[](https://pkg.go.dev/github.com/go-logr/logr)
+[](https://goreportcard.com/report/github.com/go-logr/logr)
+[](https://securityscorecards.dev/viewer/?platform=github.com&org=go-logr&repo=logr)
+
+logr offers an(other) opinion on how Go programs and libraries can do logging
+without becoming coupled to a particular logging implementation. This is not
+an implementation of logging - it is an API. In fact it is two APIs with two
+different sets of users.
+
+The `Logger` type is intended for application and library authors. It provides
+a relatively small API which can be used everywhere you want to emit logs. It
+defers the actual act of writing logs (to files, to stdout, or whatever) to the
+`LogSink` interface.
+
+The `LogSink` interface is intended for logging library implementers. It is a
+pure interface which can be implemented by logging frameworks to provide the actual logging
+functionality.
+
+This decoupling allows application and library developers to write code in
+terms of `logr.Logger` (which has very low dependency fan-out) while the
+implementation of logging is managed "up stack" (e.g. in or near `main()`.)
+Application developers can then switch out implementations as necessary.
+
+Many people assert that libraries should not be logging, and as such efforts
+like this are pointless. Those people are welcome to convince the authors of
+the tens-of-thousands of libraries that *DO* write logs that they are all
+wrong. In the meantime, logr takes a more practical approach.
+
+## Typical usage
+
+Somewhere, early in an application's life, it will make a decision about which
+logging library (implementation) it actually wants to use. Something like:
+
+```
+ func main() {
+ // ... other setup code ...
+
+ // Create the "root" logger. We have chosen the "logimpl" implementation,
+ // which takes some initial parameters and returns a logr.Logger.
+ logger := logimpl.New(param1, param2)
+
+ // ... other setup code ...
+```
+
+Most apps will call into other libraries, create structures to govern the flow,
+etc. The `logr.Logger` object can be passed to these other libraries, stored
+in structs, or even used as a package-global variable, if needed. For example:
+
+```
+ app := createTheAppObject(logger)
+ app.Run()
+```
+
+Outside of this early setup, no other packages need to know about the choice of
+implementation. They write logs in terms of the `logr.Logger` that they
+received:
+
+```
+ type appObject struct {
+ // ... other fields ...
+ logger logr.Logger
+ // ... other fields ...
+ }
+
+ func (app *appObject) Run() {
+ app.logger.Info("starting up", "timestamp", time.Now())
+
+ // ... app code ...
+```
+
+## Background
+
+If the Go standard library had defined an interface for logging, this project
+probably would not be needed. Alas, here we are.
+
+When the Go developers started developing such an interface with
+[slog](https://github.com/golang/go/issues/56345), they adopted some of the
+logr design but also left out some parts and changed others:
+
+| Feature | logr | slog |
+|---------|------|------|
+| High-level API | `Logger` (passed by value) | `Logger` (passed by [pointer](https://github.com/golang/go/issues/59126)) |
+| Low-level API | `LogSink` | `Handler` |
+| Stack unwinding | done by `LogSink` | done by `Logger` |
+| Skipping helper functions | `WithCallDepth`, `WithCallStackHelper` | [not supported by Logger](https://github.com/golang/go/issues/59145) |
+| Generating a value for logging on demand | `Marshaler` | `LogValuer` |
+| Log levels | >= 0, higher meaning "less important" | positive and negative, with 0 for "info" and higher meaning "more important" |
+| Error log entries | always logged, don't have a verbosity level | normal log entries with level >= `LevelError` |
+| Passing logger via context | `NewContext`, `FromContext` | no API |
+| Adding a name to a logger | `WithName` | no API |
+| Modify verbosity of log entries in a call chain | `V` | no API |
+| Grouping of key/value pairs | not supported | `WithGroup`, `GroupValue` |
+| Pass context for extracting additional values | no API | API variants like `InfoCtx` |
+
+The high-level slog API is explicitly meant to be one of many different APIs
+that can be layered on top of a shared `slog.Handler`. logr is one such
+alternative API, with [interoperability](#slog-interoperability) provided by
+some conversion functions.
+
+### Inspiration
+
+Before you consider this package, please read [this blog post by the
+inimitable Dave Cheney][warning-makes-no-sense]. We really appreciate what
+he has to say, and it largely aligns with our own experiences.
+
+### Differences from Dave's ideas
+
+The main differences are:
+
+1. Dave basically proposes doing away with the notion of a logging API in favor
+of `fmt.Printf()`. We disagree, especially when you consider things like output
+locations, timestamps, file and line decorations, and structured logging. This
+package restricts the logging API to just 2 types of logs: info and error.
+
+Info logs are things you want to tell the user which are not errors. Error
+logs are, well, errors. If your code receives an `error` from a subordinate
+function call and is logging that `error` *and not returning it*, use error
+logs.
+
+2. Verbosity-levels on info logs. This gives developers a chance to indicate
+arbitrary grades of importance for info logs, without assigning names with
+semantic meaning such as "warning", "trace", and "debug." Superficially this
+may feel very similar, but the primary difference is the lack of semantics.
+Because verbosity is a numerical value, it's safe to assume that an app running
+with higher verbosity means more (and less important) logs will be generated.
+
+## Implementations (non-exhaustive)
+
+There are implementations for the following logging libraries:
+
+- **a function** (can bridge to non-structured libraries): [funcr](https://github.com/go-logr/logr/tree/master/funcr)
+- **a testing.T** (for use in Go tests, with JSON-like output): [testr](https://github.com/go-logr/logr/tree/master/testr)
+- **github.com/google/glog**: [glogr](https://github.com/go-logr/glogr)
+- **k8s.io/klog** (for Kubernetes): [klogr](https://git.k8s.io/klog/klogr)
+- **a testing.T** (with klog-like text output): [ktesting](https://git.k8s.io/klog/ktesting)
+- **go.uber.org/zap**: [zapr](https://github.com/go-logr/zapr)
+- **log** (the Go standard library logger): [stdr](https://github.com/go-logr/stdr)
+- **github.com/sirupsen/logrus**: [logrusr](https://github.com/bombsimon/logrusr)
+- **github.com/wojas/genericr**: [genericr](https://github.com/wojas/genericr) (makes it easy to implement your own backend)
+- **logfmt** (Heroku style [logging](https://www.brandur.org/logfmt)): [logfmtr](https://github.com/iand/logfmtr)
+- **github.com/rs/zerolog**: [zerologr](https://github.com/go-logr/zerologr)
+- **github.com/go-kit/log**: [gokitlogr](https://github.com/tonglil/gokitlogr) (also compatible with github.com/go-kit/kit/log since v0.12.0)
+- **bytes.Buffer** (writing to a buffer): [bufrlogr](https://github.com/tonglil/buflogr) (useful for ensuring values were logged, like during testing)
+
+## slog interoperability
+
+Interoperability goes both ways, using the `logr.Logger` API with a `slog.Handler`
+and using the `slog.Logger` API with a `logr.LogSink`. `FromSlogHandler` and
+`ToSlogHandler` convert between a `logr.Logger` and a `slog.Handler`.
+As usual, `slog.New` can be used to wrap such a `slog.Handler` in the high-level
+slog API.
+
+### Using a `logr.LogSink` as backend for slog
+
+Ideally, a logr sink implementation should support both logr and slog by
+implementing both the normal logr interface(s) and `SlogSink`. Because
+of a conflict in the parameters of the common `Enabled` method, it is [not
+possible to implement both slog.Handler and logr.Sink in the same
+type](https://github.com/golang/go/issues/59110).
+
+If both are supported, log calls can go from the high-level APIs to the backend
+without the need to convert parameters. `FromSlogHandler` and `ToSlogHandler` can
+convert back and forth without adding additional wrappers, with one exception:
+when `Logger.V` was used to adjust the verbosity for a `slog.Handler`, then
+`ToSlogHandler` has to use a wrapper which adjusts the verbosity for future
+log calls.
+
+Such an implementation should also support values that implement specific
+interfaces from both packages for logging (`logr.Marshaler`, `slog.LogValuer`,
+`slog.GroupValue`). logr does not convert those.
+
+Not supporting slog has several drawbacks:
+- Recording source code locations works correctly if the handler gets called
+ through `slog.Logger`, but may be wrong in other cases. That's because a
+ `logr.Sink` does its own stack unwinding instead of using the program counter
+ provided by the high-level API.
+- slog levels <= 0 can be mapped to logr levels by negating the level without a
+ loss of information. But all slog levels > 0 (e.g. `slog.LevelWarning` as
+ used by `slog.Logger.Warn`) must be mapped to 0 before calling the sink
+ because logr does not support "more important than info" levels.
+- The slog group concept is supported by prefixing each key in a key/value
+ pair with the group names, separated by a dot. For structured output like
+ JSON it would be better to group the key/value pairs inside an object.
+- Special slog values and interfaces don't work as expected.
+- The overhead is likely to be higher.
+
+These drawbacks are severe enough that applications using a mixture of slog and
+logr should switch to a different backend.
+
+### Using a `slog.Handler` as backend for logr
+
+Using a plain `slog.Handler` without support for logr works better than the
+other direction:
+- All logr verbosity levels can be mapped 1:1 to their corresponding slog level
+ by negating them.
+- Stack unwinding is done by the `SlogSink` and the resulting program
+ counter is passed to the `slog.Handler`.
+- Names added via `Logger.WithName` are gathered and recorded in an additional
+ attribute with `logger` as key and the names separated by slash as value.
+- `Logger.Error` is turned into a log record with `slog.LevelError` as level
+ and an additional attribute with `err` as key, if an error was provided.
+
+The main drawback is that `logr.Marshaler` will not be supported. Types should
+ideally support both `logr.Marshaler` and `slog.Valuer`. If compatibility
+with logr implementations without slog support is not important, then
+`slog.Valuer` is sufficient.
+
+### Context support for slog
+
+Storing a logger in a `context.Context` is not supported by
+slog. `NewContextWithSlogLogger` and `FromContextAsSlogLogger` can be
+used to fill this gap. They store and retrieve a `slog.Logger` pointer
+under the same context key that is also used by `NewContext` and
+`FromContext` for `logr.Logger` value.
+
+When `NewContextWithSlogLogger` is followed by `FromContext`, the latter will
+automatically convert the `slog.Logger` to a
+`logr.Logger`. `FromContextAsSlogLogger` does the same for the other direction.
+
+With this approach, binaries which use either slog or logr are as efficient as
+possible with no unnecessary allocations. This is also why the API stores a
+`slog.Logger` pointer: when storing a `slog.Handler`, creating a `slog.Logger`
+on retrieval would need to allocate one.
+
+The downside is that switching back and forth needs more allocations. Because
+logr is the API that is already in use by different packages, in particular
+Kubernetes, the recommendation is to use the `logr.Logger` API in code which
+uses contextual logging.
+
+An alternative to adding values to a logger and storing that logger in the
+context is to store the values in the context and to configure a logging
+backend to extract those values when emitting log entries. This only works when
+log calls are passed the context, which is not supported by the logr API.
+
+With the slog API, it is possible, but not
+required. https://github.com/veqryn/slog-context is a package for slog which
+provides additional support code for this approach. It also contains wrappers
+for the context functions in logr, so developers who prefer to not use the logr
+APIs directly can use those instead and the resulting code will still be
+interoperable with logr.
+
+## FAQ
+
+### Conceptual
+
+#### Why structured logging?
+
+- **Structured logs are more easily queryable**: Since you've got
+ key-value pairs, it's much easier to query your structured logs for
+ particular values by filtering on the contents of a particular key --
+ think searching request logs for error codes, Kubernetes reconcilers for
+ the name and namespace of the reconciled object, etc.
+
+- **Structured logging makes it easier to have cross-referenceable logs**:
+ Similarly to searchability, if you maintain conventions around your
+ keys, it becomes easy to gather all log lines related to a particular
+ concept.
+
+- **Structured logs allow better dimensions of filtering**: if you have
+ structure to your logs, you've got more precise control over how much
+ information is logged -- you might choose in a particular configuration
+ to log certain keys but not others, only log lines where a certain key
+ matches a certain value, etc., instead of just having v-levels and names
+ to key off of.
+
+- **Structured logs better represent structured data**: sometimes, the
+ data that you want to log is inherently structured (think tuple-link
+ objects.) Structured logs allow you to preserve that structure when
+ outputting.
+
+#### Why V-levels?
+
+**V-levels give operators an easy way to control the chattiness of log
+operations**. V-levels provide a way for a given package to distinguish
+the relative importance or verbosity of a given log message. Then, if
+a particular logger or package is logging too many messages, the user
+of the package can simply change the v-levels for that library.
+
+#### Why not named levels, like Info/Warning/Error?
+
+Read [Dave Cheney's post][warning-makes-no-sense]. Then read [Differences
+from Dave's ideas](#differences-from-daves-ideas).
+
+#### Why not allow format strings, too?
+
+**Format strings negate many of the benefits of structured logs**:
+
+- They're not easily searchable without resorting to fuzzy searching,
+ regular expressions, etc.
+
+- They don't store structured data well, since contents are flattened into
+ a string.
+
+- They're not cross-referenceable.
+
+- They don't compress easily, since the message is not constant.
+
+(Unless you turn positional parameters into key-value pairs with numerical
+keys, at which point you've gotten key-value logging with meaningless
+keys.)
+
+### Practical
+
+#### Why key-value pairs, and not a map?
+
+Key-value pairs are *much* easier to optimize, especially around
+allocations. Zap (a structured logger that inspired logr's interface) has
+[performance measurements](https://github.com/uber-go/zap#performance)
+that show this quite nicely.
+
+While the interface ends up being a little less obvious, you get
+potentially better performance, plus avoid making users type
+`map[string]string{}` every time they want to log.
+
+#### What if my V-levels differ between libraries?
+
+That's fine. Control your V-levels on a per-logger basis, and use the
+`WithName` method to pass different loggers to different libraries.
+
+Generally, you should take care to ensure that you have relatively
+consistent V-levels within a given logger, however, as this makes deciding
+on what verbosity of logs to request easier.
+
+#### But I really want to use a format string!
+
+That's not actually a question. Assuming your question is "how do
+I convert my mental model of logging with format strings to logging with
+constant messages":
+
+1. Figure out what the error actually is, as you'd write in a TL;DR style,
+ and use that as a message.
+
+2. For every place you'd write a format specifier, look to the word before
+ it, and add that as a key value pair.
+
+For instance, consider the following examples (all taken from spots in the
+Kubernetes codebase):
+
+- `klog.V(4).Infof("Client is returning errors: code %v, error %v",
+ responseCode, err)` becomes `logger.Error(err, "client returned an
+ error", "code", responseCode)`
+
+- `klog.V(4).Infof("Got a Retry-After %ds response for attempt %d to %v",
+ seconds, retries, url)` becomes `logger.V(4).Info("got a retry-after
+ response when requesting url", "attempt", retries, "after
+ seconds", seconds, "url", url)`
+
+If you *really* must use a format string, use it in a key's value, and
+call `fmt.Sprintf` yourself. For instance: `log.Printf("unable to
+reflect over type %T")` becomes `logger.Info("unable to reflect over
+type", "type", fmt.Sprintf("%T"))`. In general though, the cases where
+this is necessary should be few and far between.
+
+#### How do I choose my V-levels?
+
+This is basically the only hard constraint: increase V-levels to denote
+more verbose or more debug-y logs.
+
+Otherwise, you can start out with `0` as "you always want to see this",
+`1` as "common logging that you might *possibly* want to turn off", and
+`10` as "I would like to performance-test your log collection stack."
+
+Then gradually choose levels in between as you need them, working your way
+down from 10 (for debug and trace style logs) and up from 1 (for chattier
+info-type logs). For reference, slog pre-defines -4 for debug logs
+(corresponds to 4 in logr), which matches what is
+[recommended for Kubernetes](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md#what-method-to-use).
+
+#### How do I choose my keys?
+
+Keys are fairly flexible, and can hold more or less any string
+value. For best compatibility with implementations and consistency
+with existing code in other projects, there are a few conventions you
+should consider.
+
+- Make your keys human-readable.
+- Constant keys are generally a good idea.
+- Be consistent across your codebase.
+- Keys should naturally match parts of the message string.
+- Use lower case for simple keys and
+ [lowerCamelCase](https://en.wiktionary.org/wiki/lowerCamelCase) for
+ more complex ones. Kubernetes is one example of a project that has
+ [adopted that
+ convention](https://github.com/kubernetes/community/blob/HEAD/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments).
+
+While key names are mostly unrestricted (and spaces are acceptable),
+it's generally a good idea to stick to printable ascii characters, or at
+least match the general character set of your log lines.
+
+#### Why should keys be constant values?
+
+The point of structured logging is to make later log processing easier. Your
+keys are, effectively, the schema of each log message. If you use different
+keys across instances of the same log line, you will make your structured logs
+much harder to use. `Sprintf()` is for values, not for keys!
+
+#### Why is this not a pure interface?
+
+The Logger type is implemented as a struct in order to allow the Go compiler to
+optimize things like high-V `Info` logs that are not triggered. Not all of
+these implementations are implemented yet, but this structure was suggested as
+a way to ensure they *can* be implemented. All of the real work is behind the
+`LogSink` interface.
+
+[warning-makes-no-sense]: http://dave.cheney.net/2015/11/05/lets-talk-about-logging
diff --git a/vendor/github.com/go-logr/logr/SECURITY.md b/vendor/github.com/go-logr/logr/SECURITY.md
new file mode 100644
index 00000000..1ca756fc
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/SECURITY.md
@@ -0,0 +1,18 @@
+# Security Policy
+
+If you have discovered a security vulnerability in this project, please report it
+privately. **Do not disclose it as a public issue.** This gives us time to work with you
+to fix the issue before public exposure, reducing the chance that the exploit will be
+used before a patch is released.
+
+You may submit the report in the following ways:
+
+- send an email to go-logr-security@googlegroups.com
+- send us a [private vulnerability report](https://github.com/go-logr/logr/security/advisories/new)
+
+Please provide the following information in your report:
+
+- A description of the vulnerability and its impact
+- How to reproduce the issue
+
+We ask that you give us 90 days to work on a fix before public exposure.
diff --git a/vendor/github.com/go-logr/logr/context.go b/vendor/github.com/go-logr/logr/context.go
new file mode 100644
index 00000000..de8bcc3a
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/context.go
@@ -0,0 +1,33 @@
+/*
+Copyright 2023 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package logr
+
+// contextKey is how we find Loggers in a context.Context. With Go < 1.21,
+// the value is always a Logger value. With Go >= 1.21, the value can be a
+// Logger value or a slog.Logger pointer.
+type contextKey struct{}
+
+// notFoundError exists to carry an IsNotFound method.
+type notFoundError struct{}
+
+func (notFoundError) Error() string {
+ return "no logr.Logger was present"
+}
+
+func (notFoundError) IsNotFound() bool {
+ return true
+}
diff --git a/vendor/github.com/go-logr/logr/context_noslog.go b/vendor/github.com/go-logr/logr/context_noslog.go
new file mode 100644
index 00000000..f012f9a1
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/context_noslog.go
@@ -0,0 +1,49 @@
+//go:build !go1.21
+// +build !go1.21
+
+/*
+Copyright 2019 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package logr
+
+import (
+ "context"
+)
+
+// FromContext returns a Logger from ctx or an error if no Logger is found.
+func FromContext(ctx context.Context) (Logger, error) {
+ if v, ok := ctx.Value(contextKey{}).(Logger); ok {
+ return v, nil
+ }
+
+ return Logger{}, notFoundError{}
+}
+
+// FromContextOrDiscard returns a Logger from ctx. If no Logger is found, this
+// returns a Logger that discards all log messages.
+func FromContextOrDiscard(ctx context.Context) Logger {
+ if v, ok := ctx.Value(contextKey{}).(Logger); ok {
+ return v
+ }
+
+ return Discard()
+}
+
+// NewContext returns a new Context, derived from ctx, which carries the
+// provided Logger.
+func NewContext(ctx context.Context, logger Logger) context.Context {
+ return context.WithValue(ctx, contextKey{}, logger)
+}
diff --git a/vendor/github.com/go-logr/logr/context_slog.go b/vendor/github.com/go-logr/logr/context_slog.go
new file mode 100644
index 00000000..065ef0b8
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/context_slog.go
@@ -0,0 +1,83 @@
+//go:build go1.21
+// +build go1.21
+
+/*
+Copyright 2019 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package logr
+
+import (
+ "context"
+ "fmt"
+ "log/slog"
+)
+
+// FromContext returns a Logger from ctx or an error if no Logger is found.
+func FromContext(ctx context.Context) (Logger, error) {
+ v := ctx.Value(contextKey{})
+ if v == nil {
+ return Logger{}, notFoundError{}
+ }
+
+ switch v := v.(type) {
+ case Logger:
+ return v, nil
+ case *slog.Logger:
+ return FromSlogHandler(v.Handler()), nil
+ default:
+ // Not reached.
+ panic(fmt.Sprintf("unexpected value type for logr context key: %T", v))
+ }
+}
+
+// FromContextAsSlogLogger returns a slog.Logger from ctx or nil if no such Logger is found.
+func FromContextAsSlogLogger(ctx context.Context) *slog.Logger {
+ v := ctx.Value(contextKey{})
+ if v == nil {
+ return nil
+ }
+
+ switch v := v.(type) {
+ case Logger:
+ return slog.New(ToSlogHandler(v))
+ case *slog.Logger:
+ return v
+ default:
+ // Not reached.
+ panic(fmt.Sprintf("unexpected value type for logr context key: %T", v))
+ }
+}
+
+// FromContextOrDiscard returns a Logger from ctx. If no Logger is found, this
+// returns a Logger that discards all log messages.
+func FromContextOrDiscard(ctx context.Context) Logger {
+ if logger, err := FromContext(ctx); err == nil {
+ return logger
+ }
+ return Discard()
+}
+
+// NewContext returns a new Context, derived from ctx, which carries the
+// provided Logger.
+func NewContext(ctx context.Context, logger Logger) context.Context {
+ return context.WithValue(ctx, contextKey{}, logger)
+}
+
+// NewContextWithSlogLogger returns a new Context, derived from ctx, which carries the
+// provided slog.Logger.
+func NewContextWithSlogLogger(ctx context.Context, logger *slog.Logger) context.Context {
+ return context.WithValue(ctx, contextKey{}, logger)
+}
diff --git a/vendor/github.com/go-logr/logr/discard.go b/vendor/github.com/go-logr/logr/discard.go
new file mode 100644
index 00000000..99fe8be9
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/discard.go
@@ -0,0 +1,24 @@
+/*
+Copyright 2020 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package logr
+
+// Discard returns a Logger that discards all messages logged to it. It can be
+// used whenever the caller is not interested in the logs. Logger instances
+// produced by this function always compare as equal.
+func Discard() Logger {
+ return New(nil)
+}
diff --git a/vendor/github.com/go-logr/logr/funcr/funcr.go b/vendor/github.com/go-logr/logr/funcr/funcr.go
new file mode 100644
index 00000000..30568e76
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/funcr/funcr.go
@@ -0,0 +1,914 @@
+/*
+Copyright 2021 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package funcr implements formatting of structured log messages and
+// optionally captures the call site and timestamp.
+//
+// The simplest way to use it is via its implementation of a
+// github.com/go-logr/logr.LogSink with output through an arbitrary
+// "write" function. See New and NewJSON for details.
+//
+// # Custom LogSinks
+//
+// For users who need more control, a funcr.Formatter can be embedded inside
+// your own custom LogSink implementation. This is useful when the LogSink
+// needs to implement additional methods, for example.
+//
+// # Formatting
+//
+// This will respect logr.Marshaler, fmt.Stringer, and error interfaces for
+// values which are being logged. When rendering a struct, funcr will use Go's
+// standard JSON tags (all except "string").
+package funcr
+
+import (
+ "bytes"
+ "encoding"
+ "encoding/json"
+ "fmt"
+ "path/filepath"
+ "reflect"
+ "runtime"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/go-logr/logr"
+)
+
+// New returns a logr.Logger which is implemented by an arbitrary function.
+func New(fn func(prefix, args string), opts Options) logr.Logger {
+ return logr.New(newSink(fn, NewFormatter(opts)))
+}
+
+// NewJSON returns a logr.Logger which is implemented by an arbitrary function
+// and produces JSON output.
+func NewJSON(fn func(obj string), opts Options) logr.Logger {
+ fnWrapper := func(_, obj string) {
+ fn(obj)
+ }
+ return logr.New(newSink(fnWrapper, NewFormatterJSON(opts)))
+}
+
+// Underlier exposes access to the underlying logging function. Since
+// callers only have a logr.Logger, they have to know which
+// implementation is in use, so this interface is less of an
+// abstraction and more of a way to test type conversion.
+type Underlier interface {
+ GetUnderlying() func(prefix, args string)
+}
+
+func newSink(fn func(prefix, args string), formatter Formatter) logr.LogSink {
+ l := &fnlogger{
+ Formatter: formatter,
+ write: fn,
+ }
+ // For skipping fnlogger.Info and fnlogger.Error.
+ l.Formatter.AddCallDepth(1)
+ return l
+}
+
+// Options carries parameters which influence the way logs are generated.
+type Options struct {
+ // LogCaller tells funcr to add a "caller" key to some or all log lines.
+ // This has some overhead, so some users might not want it.
+ LogCaller MessageClass
+
+ // LogCallerFunc tells funcr to also log the calling function name. This
+ // has no effect if caller logging is not enabled (see Options.LogCaller).
+ LogCallerFunc bool
+
+ // LogTimestamp tells funcr to add a "ts" key to log lines. This has some
+ // overhead, so some users might not want it.
+ LogTimestamp bool
+
+ // TimestampFormat tells funcr how to render timestamps when LogTimestamp
+ // is enabled. If not specified, a default format will be used. For more
+ // details, see docs for Go's time.Layout.
+ TimestampFormat string
+
+ // LogInfoLevel tells funcr what key to use to log the info level.
+ // If not specified, the info level will be logged as "level".
+ // If this is set to "", the info level will not be logged at all.
+ LogInfoLevel *string
+
+ // Verbosity tells funcr which V logs to produce. Higher values enable
+ // more logs. Info logs at or below this level will be written, while logs
+ // above this level will be discarded.
+ Verbosity int
+
+ // RenderBuiltinsHook allows users to mutate the list of key-value pairs
+ // while a log line is being rendered. The kvList argument follows logr
+ // conventions - each pair of slice elements is comprised of a string key
+ // and an arbitrary value (verified and sanitized before calling this
+ // hook). The value returned must follow the same conventions. This hook
+ // can be used to audit or modify logged data. For example, you might want
+ // to prefix all of funcr's built-in keys with some string. This hook is
+ // only called for built-in (provided by funcr itself) key-value pairs.
+ // Equivalent hooks are offered for key-value pairs saved via
+ // logr.Logger.WithValues or Formatter.AddValues (see RenderValuesHook) and
+ // for user-provided pairs (see RenderArgsHook).
+ RenderBuiltinsHook func(kvList []any) []any
+
+ // RenderValuesHook is the same as RenderBuiltinsHook, except that it is
+ // only called for key-value pairs saved via logr.Logger.WithValues. See
+ // RenderBuiltinsHook for more details.
+ RenderValuesHook func(kvList []any) []any
+
+ // RenderArgsHook is the same as RenderBuiltinsHook, except that it is only
+ // called for key-value pairs passed directly to Info and Error. See
+ // RenderBuiltinsHook for more details.
+ RenderArgsHook func(kvList []any) []any
+
+ // MaxLogDepth tells funcr how many levels of nested fields (e.g. a struct
+ // that contains a struct, etc.) it may log. Every time it finds a struct,
+ // slice, array, or map the depth is increased by one. When the maximum is
+ // reached, the value will be converted to a string indicating that the max
+ // depth has been exceeded. If this field is not specified, a default
+ // value will be used.
+ MaxLogDepth int
+}
+
+// MessageClass indicates which category or categories of messages to consider.
+type MessageClass int
+
+const (
+ // None ignores all message classes.
+ None MessageClass = iota
+ // All considers all message classes.
+ All
+ // Info only considers info messages.
+ Info
+ // Error only considers error messages.
+ Error
+)
+
+// fnlogger inherits some of its LogSink implementation from Formatter
+// and just needs to add some glue code.
+type fnlogger struct {
+ Formatter
+ write func(prefix, args string)
+}
+
+func (l fnlogger) WithName(name string) logr.LogSink {
+ l.Formatter.AddName(name)
+ return &l
+}
+
+func (l fnlogger) WithValues(kvList ...any) logr.LogSink {
+ l.Formatter.AddValues(kvList)
+ return &l
+}
+
+func (l fnlogger) WithCallDepth(depth int) logr.LogSink {
+ l.Formatter.AddCallDepth(depth)
+ return &l
+}
+
+func (l fnlogger) Info(level int, msg string, kvList ...any) {
+ prefix, args := l.FormatInfo(level, msg, kvList)
+ l.write(prefix, args)
+}
+
+func (l fnlogger) Error(err error, msg string, kvList ...any) {
+ prefix, args := l.FormatError(err, msg, kvList)
+ l.write(prefix, args)
+}
+
+func (l fnlogger) GetUnderlying() func(prefix, args string) {
+ return l.write
+}
+
+// Assert conformance to the interfaces.
+var _ logr.LogSink = &fnlogger{}
+var _ logr.CallDepthLogSink = &fnlogger{}
+var _ Underlier = &fnlogger{}
+
+// NewFormatter constructs a Formatter which emits a JSON-like key=value format.
+func NewFormatter(opts Options) Formatter {
+ return newFormatter(opts, outputKeyValue)
+}
+
+// NewFormatterJSON constructs a Formatter which emits strict JSON.
+func NewFormatterJSON(opts Options) Formatter {
+ return newFormatter(opts, outputJSON)
+}
+
+// Defaults for Options.
+const defaultTimestampFormat = "2006-01-02 15:04:05.000000"
+const defaultMaxLogDepth = 16
+
+func newFormatter(opts Options, outfmt outputFormat) Formatter {
+ if opts.TimestampFormat == "" {
+ opts.TimestampFormat = defaultTimestampFormat
+ }
+ if opts.MaxLogDepth == 0 {
+ opts.MaxLogDepth = defaultMaxLogDepth
+ }
+ if opts.LogInfoLevel == nil {
+ opts.LogInfoLevel = new(string)
+ *opts.LogInfoLevel = "level"
+ }
+ f := Formatter{
+ outputFormat: outfmt,
+ prefix: "",
+ values: nil,
+ depth: 0,
+ opts: &opts,
+ }
+ return f
+}
+
+// Formatter is an opaque struct which can be embedded in a LogSink
+// implementation. It should be constructed with NewFormatter. Some of
+// its methods directly implement logr.LogSink.
+type Formatter struct {
+ outputFormat outputFormat
+ prefix string
+ values []any
+ valuesStr string
+ depth int
+ opts *Options
+ groupName string // for slog groups
+ groups []groupDef
+}
+
+// outputFormat indicates which outputFormat to use.
+type outputFormat int
+
+const (
+ // outputKeyValue emits a JSON-like key=value format, but not strict JSON.
+ outputKeyValue outputFormat = iota
+ // outputJSON emits strict JSON.
+ outputJSON
+)
+
+// groupDef represents a saved group. The values may be empty, but we don't
+// know if we need to render the group until the final record is rendered.
+type groupDef struct {
+ name string
+ values string
+}
+
+// PseudoStruct is a list of key-value pairs that gets logged as a struct.
+type PseudoStruct []any
+
+// render produces a log line, ready to use.
+func (f Formatter) render(builtins, args []any) string {
+ // Empirically bytes.Buffer is faster than strings.Builder for this.
+ buf := bytes.NewBuffer(make([]byte, 0, 1024))
+
+ if f.outputFormat == outputJSON {
+ buf.WriteByte('{') // for the whole record
+ }
+
+ // Render builtins
+ vals := builtins
+ if hook := f.opts.RenderBuiltinsHook; hook != nil {
+ vals = hook(f.sanitize(vals))
+ }
+ f.flatten(buf, vals, false) // keys are ours, no need to escape
+ continuing := len(builtins) > 0
+
+ // Turn the inner-most group into a string
+ argsStr := func() string {
+ buf := bytes.NewBuffer(make([]byte, 0, 1024))
+
+ vals = args
+ if hook := f.opts.RenderArgsHook; hook != nil {
+ vals = hook(f.sanitize(vals))
+ }
+ f.flatten(buf, vals, true) // escape user-provided keys
+
+ return buf.String()
+ }()
+
+ // Render the stack of groups from the inside out.
+ bodyStr := f.renderGroup(f.groupName, f.valuesStr, argsStr)
+ for i := len(f.groups) - 1; i >= 0; i-- {
+ grp := &f.groups[i]
+ if grp.values == "" && bodyStr == "" {
+ // no contents, so we must elide the whole group
+ continue
+ }
+ bodyStr = f.renderGroup(grp.name, grp.values, bodyStr)
+ }
+
+ if bodyStr != "" {
+ if continuing {
+ buf.WriteByte(f.comma())
+ }
+ buf.WriteString(bodyStr)
+ }
+
+ if f.outputFormat == outputJSON {
+ buf.WriteByte('}') // for the whole record
+ }
+
+ return buf.String()
+}
+
+// renderGroup returns a string representation of the named group with rendered
+// values and args. If the name is empty, this will return the values and args,
+// joined. If the name is not empty, this will return a single key-value pair,
+// where the value is a grouping of the values and args. If the values and
+// args are both empty, this will return an empty string, even if the name was
+// specified.
+func (f Formatter) renderGroup(name string, values string, args string) string {
+ buf := bytes.NewBuffer(make([]byte, 0, 1024))
+
+ needClosingBrace := false
+ if name != "" && (values != "" || args != "") {
+ buf.WriteString(f.quoted(name, true)) // escape user-provided keys
+ buf.WriteByte(f.colon())
+ buf.WriteByte('{')
+ needClosingBrace = true
+ }
+
+ continuing := false
+ if values != "" {
+ buf.WriteString(values)
+ continuing = true
+ }
+
+ if args != "" {
+ if continuing {
+ buf.WriteByte(f.comma())
+ }
+ buf.WriteString(args)
+ }
+
+ if needClosingBrace {
+ buf.WriteByte('}')
+ }
+
+ return buf.String()
+}
+
+// flatten renders a list of key-value pairs into a buffer. If escapeKeys is
+// true, the keys are assumed to have non-JSON-compatible characters in them
+// and must be evaluated for escapes.
+//
+// This function returns a potentially modified version of kvList, which
+// ensures that there is a value for every key (adding a value if needed) and
+// that each key is a string (substituting a key if needed).
+func (f Formatter) flatten(buf *bytes.Buffer, kvList []any, escapeKeys bool) []any {
+ // This logic overlaps with sanitize() but saves one type-cast per key,
+ // which can be measurable.
+ if len(kvList)%2 != 0 {
+ kvList = append(kvList, noValue)
+ }
+ copied := false
+ for i := 0; i < len(kvList); i += 2 {
+ k, ok := kvList[i].(string)
+ if !ok {
+ if !copied {
+ newList := make([]any, len(kvList))
+ copy(newList, kvList)
+ kvList = newList
+ copied = true
+ }
+ k = f.nonStringKey(kvList[i])
+ kvList[i] = k
+ }
+ v := kvList[i+1]
+
+ if i > 0 {
+ if f.outputFormat == outputJSON {
+ buf.WriteByte(f.comma())
+ } else {
+ // In theory the format could be something we don't understand. In
+ // practice, we control it, so it won't be.
+ buf.WriteByte(' ')
+ }
+ }
+
+ buf.WriteString(f.quoted(k, escapeKeys))
+ buf.WriteByte(f.colon())
+ buf.WriteString(f.pretty(v))
+ }
+ return kvList
+}
+
+func (f Formatter) quoted(str string, escape bool) string {
+ if escape {
+ return prettyString(str)
+ }
+ // this is faster
+ return `"` + str + `"`
+}
+
+func (f Formatter) comma() byte {
+ if f.outputFormat == outputJSON {
+ return ','
+ }
+ return ' '
+}
+
+func (f Formatter) colon() byte {
+ if f.outputFormat == outputJSON {
+ return ':'
+ }
+ return '='
+}
+
+func (f Formatter) pretty(value any) string {
+ return f.prettyWithFlags(value, 0, 0)
+}
+
+const (
+ flagRawStruct = 0x1 // do not print braces on structs
+)
+
+// TODO: This is not fast. Most of the overhead goes here.
+func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string {
+ if depth > f.opts.MaxLogDepth {
+ return `""`
+ }
+
+ // Handle types that take full control of logging.
+ if v, ok := value.(logr.Marshaler); ok {
+ // Replace the value with what the type wants to get logged.
+ // That then gets handled below via reflection.
+ value = invokeMarshaler(v)
+ }
+
+ // Handle types that want to format themselves.
+ switch v := value.(type) {
+ case fmt.Stringer:
+ value = invokeStringer(v)
+ case error:
+ value = invokeError(v)
+ }
+
+ // Handling the most common types without reflect is a small perf win.
+ switch v := value.(type) {
+ case bool:
+ return strconv.FormatBool(v)
+ case string:
+ return prettyString(v)
+ case int:
+ return strconv.FormatInt(int64(v), 10)
+ case int8:
+ return strconv.FormatInt(int64(v), 10)
+ case int16:
+ return strconv.FormatInt(int64(v), 10)
+ case int32:
+ return strconv.FormatInt(int64(v), 10)
+ case int64:
+ return strconv.FormatInt(int64(v), 10)
+ case uint:
+ return strconv.FormatUint(uint64(v), 10)
+ case uint8:
+ return strconv.FormatUint(uint64(v), 10)
+ case uint16:
+ return strconv.FormatUint(uint64(v), 10)
+ case uint32:
+ return strconv.FormatUint(uint64(v), 10)
+ case uint64:
+ return strconv.FormatUint(v, 10)
+ case uintptr:
+ return strconv.FormatUint(uint64(v), 10)
+ case float32:
+ return strconv.FormatFloat(float64(v), 'f', -1, 32)
+ case float64:
+ return strconv.FormatFloat(v, 'f', -1, 64)
+ case complex64:
+ return `"` + strconv.FormatComplex(complex128(v), 'f', -1, 64) + `"`
+ case complex128:
+ return `"` + strconv.FormatComplex(v, 'f', -1, 128) + `"`
+ case PseudoStruct:
+ buf := bytes.NewBuffer(make([]byte, 0, 1024))
+ v = f.sanitize(v)
+ if flags&flagRawStruct == 0 {
+ buf.WriteByte('{')
+ }
+ for i := 0; i < len(v); i += 2 {
+ if i > 0 {
+ buf.WriteByte(f.comma())
+ }
+ k, _ := v[i].(string) // sanitize() above means no need to check success
+ // arbitrary keys might need escaping
+ buf.WriteString(prettyString(k))
+ buf.WriteByte(f.colon())
+ buf.WriteString(f.prettyWithFlags(v[i+1], 0, depth+1))
+ }
+ if flags&flagRawStruct == 0 {
+ buf.WriteByte('}')
+ }
+ return buf.String()
+ }
+
+ buf := bytes.NewBuffer(make([]byte, 0, 256))
+ t := reflect.TypeOf(value)
+ if t == nil {
+ return "null"
+ }
+ v := reflect.ValueOf(value)
+ switch t.Kind() {
+ case reflect.Bool:
+ return strconv.FormatBool(v.Bool())
+ case reflect.String:
+ return prettyString(v.String())
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ return strconv.FormatInt(int64(v.Int()), 10)
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ return strconv.FormatUint(uint64(v.Uint()), 10)
+ case reflect.Float32:
+ return strconv.FormatFloat(float64(v.Float()), 'f', -1, 32)
+ case reflect.Float64:
+ return strconv.FormatFloat(v.Float(), 'f', -1, 64)
+ case reflect.Complex64:
+ return `"` + strconv.FormatComplex(complex128(v.Complex()), 'f', -1, 64) + `"`
+ case reflect.Complex128:
+ return `"` + strconv.FormatComplex(v.Complex(), 'f', -1, 128) + `"`
+ case reflect.Struct:
+ if flags&flagRawStruct == 0 {
+ buf.WriteByte('{')
+ }
+ printComma := false // testing i>0 is not enough because of JSON omitted fields
+ for i := 0; i < t.NumField(); i++ {
+ fld := t.Field(i)
+ if fld.PkgPath != "" {
+ // reflect says this field is only defined for non-exported fields.
+ continue
+ }
+ if !v.Field(i).CanInterface() {
+ // reflect isn't clear exactly what this means, but we can't use it.
+ continue
+ }
+ name := ""
+ omitempty := false
+ if tag, found := fld.Tag.Lookup("json"); found {
+ if tag == "-" {
+ continue
+ }
+ if comma := strings.Index(tag, ","); comma != -1 {
+ if n := tag[:comma]; n != "" {
+ name = n
+ }
+ rest := tag[comma:]
+ if strings.Contains(rest, ",omitempty,") || strings.HasSuffix(rest, ",omitempty") {
+ omitempty = true
+ }
+ } else {
+ name = tag
+ }
+ }
+ if omitempty && isEmpty(v.Field(i)) {
+ continue
+ }
+ if printComma {
+ buf.WriteByte(f.comma())
+ }
+ printComma = true // if we got here, we are rendering a field
+ if fld.Anonymous && fld.Type.Kind() == reflect.Struct && name == "" {
+ buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), flags|flagRawStruct, depth+1))
+ continue
+ }
+ if name == "" {
+ name = fld.Name
+ }
+ // field names can't contain characters which need escaping
+ buf.WriteString(f.quoted(name, false))
+ buf.WriteByte(f.colon())
+ buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), 0, depth+1))
+ }
+ if flags&flagRawStruct == 0 {
+ buf.WriteByte('}')
+ }
+ return buf.String()
+ case reflect.Slice, reflect.Array:
+ // If this is outputing as JSON make sure this isn't really a json.RawMessage.
+ // If so just emit "as-is" and don't pretty it as that will just print
+ // it as [X,Y,Z,...] which isn't terribly useful vs the string form you really want.
+ if f.outputFormat == outputJSON {
+ if rm, ok := value.(json.RawMessage); ok {
+ // If it's empty make sure we emit an empty value as the array style would below.
+ if len(rm) > 0 {
+ buf.Write(rm)
+ } else {
+ buf.WriteString("null")
+ }
+ return buf.String()
+ }
+ }
+ buf.WriteByte('[')
+ for i := 0; i < v.Len(); i++ {
+ if i > 0 {
+ buf.WriteByte(f.comma())
+ }
+ e := v.Index(i)
+ buf.WriteString(f.prettyWithFlags(e.Interface(), 0, depth+1))
+ }
+ buf.WriteByte(']')
+ return buf.String()
+ case reflect.Map:
+ buf.WriteByte('{')
+ // This does not sort the map keys, for best perf.
+ it := v.MapRange()
+ i := 0
+ for it.Next() {
+ if i > 0 {
+ buf.WriteByte(f.comma())
+ }
+ // If a map key supports TextMarshaler, use it.
+ keystr := ""
+ if m, ok := it.Key().Interface().(encoding.TextMarshaler); ok {
+ txt, err := m.MarshalText()
+ if err != nil {
+ keystr = fmt.Sprintf("", err.Error())
+ } else {
+ keystr = string(txt)
+ }
+ keystr = prettyString(keystr)
+ } else {
+ // prettyWithFlags will produce already-escaped values
+ keystr = f.prettyWithFlags(it.Key().Interface(), 0, depth+1)
+ if t.Key().Kind() != reflect.String {
+ // JSON only does string keys. Unlike Go's standard JSON, we'll
+ // convert just about anything to a string.
+ keystr = prettyString(keystr)
+ }
+ }
+ buf.WriteString(keystr)
+ buf.WriteByte(f.colon())
+ buf.WriteString(f.prettyWithFlags(it.Value().Interface(), 0, depth+1))
+ i++
+ }
+ buf.WriteByte('}')
+ return buf.String()
+ case reflect.Ptr, reflect.Interface:
+ if v.IsNil() {
+ return "null"
+ }
+ return f.prettyWithFlags(v.Elem().Interface(), 0, depth)
+ }
+ return fmt.Sprintf(`""`, t.Kind().String())
+}
+
+func prettyString(s string) string {
+ // Avoid escaping (which does allocations) if we can.
+ if needsEscape(s) {
+ return strconv.Quote(s)
+ }
+ b := bytes.NewBuffer(make([]byte, 0, 1024))
+ b.WriteByte('"')
+ b.WriteString(s)
+ b.WriteByte('"')
+ return b.String()
+}
+
+// needsEscape determines whether the input string needs to be escaped or not,
+// without doing any allocations.
+func needsEscape(s string) bool {
+ for _, r := range s {
+ if !strconv.IsPrint(r) || r == '\\' || r == '"' {
+ return true
+ }
+ }
+ return false
+}
+
+func isEmpty(v reflect.Value) bool {
+ switch v.Kind() {
+ case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
+ return v.Len() == 0
+ case reflect.Bool:
+ return !v.Bool()
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ return v.Int() == 0
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ return v.Uint() == 0
+ case reflect.Float32, reflect.Float64:
+ return v.Float() == 0
+ case reflect.Complex64, reflect.Complex128:
+ return v.Complex() == 0
+ case reflect.Interface, reflect.Ptr:
+ return v.IsNil()
+ }
+ return false
+}
+
+func invokeMarshaler(m logr.Marshaler) (ret any) {
+ defer func() {
+ if r := recover(); r != nil {
+ ret = fmt.Sprintf("", r)
+ }
+ }()
+ return m.MarshalLog()
+}
+
+func invokeStringer(s fmt.Stringer) (ret string) {
+ defer func() {
+ if r := recover(); r != nil {
+ ret = fmt.Sprintf("", r)
+ }
+ }()
+ return s.String()
+}
+
+func invokeError(e error) (ret string) {
+ defer func() {
+ if r := recover(); r != nil {
+ ret = fmt.Sprintf("", r)
+ }
+ }()
+ return e.Error()
+}
+
+// Caller represents the original call site for a log line, after considering
+// logr.Logger.WithCallDepth and logr.Logger.WithCallStackHelper. The File and
+// Line fields will always be provided, while the Func field is optional.
+// Users can set the render hook fields in Options to examine logged key-value
+// pairs, one of which will be {"caller", Caller} if the Options.LogCaller
+// field is enabled for the given MessageClass.
+type Caller struct {
+ // File is the basename of the file for this call site.
+ File string `json:"file"`
+ // Line is the line number in the file for this call site.
+ Line int `json:"line"`
+ // Func is the function name for this call site, or empty if
+ // Options.LogCallerFunc is not enabled.
+ Func string `json:"function,omitempty"`
+}
+
+func (f Formatter) caller() Caller {
+ // +1 for this frame, +1 for Info/Error.
+ pc, file, line, ok := runtime.Caller(f.depth + 2)
+ if !ok {
+ return Caller{"", 0, ""}
+ }
+ fn := ""
+ if f.opts.LogCallerFunc {
+ if fp := runtime.FuncForPC(pc); fp != nil {
+ fn = fp.Name()
+ }
+ }
+
+ return Caller{filepath.Base(file), line, fn}
+}
+
+const noValue = ""
+
+func (f Formatter) nonStringKey(v any) string {
+ return fmt.Sprintf("", f.snippet(v))
+}
+
+// snippet produces a short snippet string of an arbitrary value.
+func (f Formatter) snippet(v any) string {
+ const snipLen = 16
+
+ snip := f.pretty(v)
+ if len(snip) > snipLen {
+ snip = snip[:snipLen]
+ }
+ return snip
+}
+
+// sanitize ensures that a list of key-value pairs has a value for every key
+// (adding a value if needed) and that each key is a string (substituting a key
+// if needed).
+func (f Formatter) sanitize(kvList []any) []any {
+ if len(kvList)%2 != 0 {
+ kvList = append(kvList, noValue)
+ }
+ for i := 0; i < len(kvList); i += 2 {
+ _, ok := kvList[i].(string)
+ if !ok {
+ kvList[i] = f.nonStringKey(kvList[i])
+ }
+ }
+ return kvList
+}
+
+// startGroup opens a new group scope (basically a sub-struct), which locks all
+// the current saved values and starts them anew. This is needed to satisfy
+// slog.
+func (f *Formatter) startGroup(name string) {
+ // Unnamed groups are just inlined.
+ if name == "" {
+ return
+ }
+
+ n := len(f.groups)
+ f.groups = append(f.groups[:n:n], groupDef{f.groupName, f.valuesStr})
+
+ // Start collecting new values.
+ f.groupName = name
+ f.valuesStr = ""
+ f.values = nil
+}
+
+// Init configures this Formatter from runtime info, such as the call depth
+// imposed by logr itself.
+// Note that this receiver is a pointer, so depth can be saved.
+func (f *Formatter) Init(info logr.RuntimeInfo) {
+ f.depth += info.CallDepth
+}
+
+// Enabled checks whether an info message at the given level should be logged.
+func (f Formatter) Enabled(level int) bool {
+ return level <= f.opts.Verbosity
+}
+
+// GetDepth returns the current depth of this Formatter. This is useful for
+// implementations which do their own caller attribution.
+func (f Formatter) GetDepth() int {
+ return f.depth
+}
+
+// FormatInfo renders an Info log message into strings. The prefix will be
+// empty when no names were set (via AddNames), or when the output is
+// configured for JSON.
+func (f Formatter) FormatInfo(level int, msg string, kvList []any) (prefix, argsStr string) {
+ args := make([]any, 0, 64) // using a constant here impacts perf
+ prefix = f.prefix
+ if f.outputFormat == outputJSON {
+ args = append(args, "logger", prefix)
+ prefix = ""
+ }
+ if f.opts.LogTimestamp {
+ args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat))
+ }
+ if policy := f.opts.LogCaller; policy == All || policy == Info {
+ args = append(args, "caller", f.caller())
+ }
+ if key := *f.opts.LogInfoLevel; key != "" {
+ args = append(args, key, level)
+ }
+ args = append(args, "msg", msg)
+ return prefix, f.render(args, kvList)
+}
+
+// FormatError renders an Error log message into strings. The prefix will be
+// empty when no names were set (via AddNames), or when the output is
+// configured for JSON.
+func (f Formatter) FormatError(err error, msg string, kvList []any) (prefix, argsStr string) {
+ args := make([]any, 0, 64) // using a constant here impacts perf
+ prefix = f.prefix
+ if f.outputFormat == outputJSON {
+ args = append(args, "logger", prefix)
+ prefix = ""
+ }
+ if f.opts.LogTimestamp {
+ args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat))
+ }
+ if policy := f.opts.LogCaller; policy == All || policy == Error {
+ args = append(args, "caller", f.caller())
+ }
+ args = append(args, "msg", msg)
+ var loggableErr any
+ if err != nil {
+ loggableErr = err.Error()
+ }
+ args = append(args, "error", loggableErr)
+ return prefix, f.render(args, kvList)
+}
+
+// AddName appends the specified name. funcr uses '/' characters to separate
+// name elements. Callers should not pass '/' in the provided name string, but
+// this library does not actually enforce that.
+func (f *Formatter) AddName(name string) {
+ if len(f.prefix) > 0 {
+ f.prefix += "/"
+ }
+ f.prefix += name
+}
+
+// AddValues adds key-value pairs to the set of saved values to be logged with
+// each log line.
+func (f *Formatter) AddValues(kvList []any) {
+ // Three slice args forces a copy.
+ n := len(f.values)
+ f.values = append(f.values[:n:n], kvList...)
+
+ vals := f.values
+ if hook := f.opts.RenderValuesHook; hook != nil {
+ vals = hook(f.sanitize(vals))
+ }
+
+ // Pre-render values, so we don't have to do it on each Info/Error call.
+ buf := bytes.NewBuffer(make([]byte, 0, 1024))
+ f.flatten(buf, vals, true) // escape user-provided keys
+ f.valuesStr = buf.String()
+}
+
+// AddCallDepth increases the number of stack-frames to skip when attributing
+// the log line to a file and line.
+func (f *Formatter) AddCallDepth(depth int) {
+ f.depth += depth
+}
diff --git a/vendor/github.com/go-logr/logr/funcr/slogsink.go b/vendor/github.com/go-logr/logr/funcr/slogsink.go
new file mode 100644
index 00000000..7bd84761
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/funcr/slogsink.go
@@ -0,0 +1,105 @@
+//go:build go1.21
+// +build go1.21
+
+/*
+Copyright 2023 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package funcr
+
+import (
+ "context"
+ "log/slog"
+
+ "github.com/go-logr/logr"
+)
+
+var _ logr.SlogSink = &fnlogger{}
+
+const extraSlogSinkDepth = 3 // 2 for slog, 1 for SlogSink
+
+func (l fnlogger) Handle(_ context.Context, record slog.Record) error {
+ kvList := make([]any, 0, 2*record.NumAttrs())
+ record.Attrs(func(attr slog.Attr) bool {
+ kvList = attrToKVs(attr, kvList)
+ return true
+ })
+
+ if record.Level >= slog.LevelError {
+ l.WithCallDepth(extraSlogSinkDepth).Error(nil, record.Message, kvList...)
+ } else {
+ level := l.levelFromSlog(record.Level)
+ l.WithCallDepth(extraSlogSinkDepth).Info(level, record.Message, kvList...)
+ }
+ return nil
+}
+
+func (l fnlogger) WithAttrs(attrs []slog.Attr) logr.SlogSink {
+ kvList := make([]any, 0, 2*len(attrs))
+ for _, attr := range attrs {
+ kvList = attrToKVs(attr, kvList)
+ }
+ l.AddValues(kvList)
+ return &l
+}
+
+func (l fnlogger) WithGroup(name string) logr.SlogSink {
+ l.startGroup(name)
+ return &l
+}
+
+// attrToKVs appends a slog.Attr to a logr-style kvList. It handle slog Groups
+// and other details of slog.
+func attrToKVs(attr slog.Attr, kvList []any) []any {
+ attrVal := attr.Value.Resolve()
+ if attrVal.Kind() == slog.KindGroup {
+ groupVal := attrVal.Group()
+ grpKVs := make([]any, 0, 2*len(groupVal))
+ for _, attr := range groupVal {
+ grpKVs = attrToKVs(attr, grpKVs)
+ }
+ if attr.Key == "" {
+ // slog says we have to inline these
+ kvList = append(kvList, grpKVs...)
+ } else {
+ kvList = append(kvList, attr.Key, PseudoStruct(grpKVs))
+ }
+ } else if attr.Key != "" {
+ kvList = append(kvList, attr.Key, attrVal.Any())
+ }
+
+ return kvList
+}
+
+// levelFromSlog adjusts the level by the logger's verbosity and negates it.
+// It ensures that the result is >= 0. This is necessary because the result is
+// passed to a LogSink and that API did not historically document whether
+// levels could be negative or what that meant.
+//
+// Some example usage:
+//
+// logrV0 := getMyLogger()
+// logrV2 := logrV0.V(2)
+// slogV2 := slog.New(logr.ToSlogHandler(logrV2))
+// slogV2.Debug("msg") // =~ logrV2.V(4) =~ logrV0.V(6)
+// slogV2.Info("msg") // =~ logrV2.V(0) =~ logrV0.V(2)
+// slogv2.Warn("msg") // =~ logrV2.V(-4) =~ logrV0.V(0)
+func (l fnlogger) levelFromSlog(level slog.Level) int {
+ result := -level
+ if result < 0 {
+ result = 0 // because LogSink doesn't expect negative V levels
+ }
+ return int(result)
+}
diff --git a/vendor/github.com/go-logr/logr/logr.go b/vendor/github.com/go-logr/logr/logr.go
new file mode 100644
index 00000000..b4428e10
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/logr.go
@@ -0,0 +1,520 @@
+/*
+Copyright 2019 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This design derives from Dave Cheney's blog:
+// http://dave.cheney.net/2015/11/05/lets-talk-about-logging
+
+// Package logr defines a general-purpose logging API and abstract interfaces
+// to back that API. Packages in the Go ecosystem can depend on this package,
+// while callers can implement logging with whatever backend is appropriate.
+//
+// # Usage
+//
+// Logging is done using a Logger instance. Logger is a concrete type with
+// methods, which defers the actual logging to a LogSink interface. The main
+// methods of Logger are Info() and Error(). Arguments to Info() and Error()
+// are key/value pairs rather than printf-style formatted strings, emphasizing
+// "structured logging".
+//
+// With Go's standard log package, we might write:
+//
+// log.Printf("setting target value %s", targetValue)
+//
+// With logr's structured logging, we'd write:
+//
+// logger.Info("setting target", "value", targetValue)
+//
+// Errors are much the same. Instead of:
+//
+// log.Printf("failed to open the pod bay door for user %s: %v", user, err)
+//
+// We'd write:
+//
+// logger.Error(err, "failed to open the pod bay door", "user", user)
+//
+// Info() and Error() are very similar, but they are separate methods so that
+// LogSink implementations can choose to do things like attach additional
+// information (such as stack traces) on calls to Error(). Error() messages are
+// always logged, regardless of the current verbosity. If there is no error
+// instance available, passing nil is valid.
+//
+// # Verbosity
+//
+// Often we want to log information only when the application in "verbose
+// mode". To write log lines that are more verbose, Logger has a V() method.
+// The higher the V-level of a log line, the less critical it is considered.
+// Log-lines with V-levels that are not enabled (as per the LogSink) will not
+// be written. Level V(0) is the default, and logger.V(0).Info() has the same
+// meaning as logger.Info(). Negative V-levels have the same meaning as V(0).
+// Error messages do not have a verbosity level and are always logged.
+//
+// Where we might have written:
+//
+// if flVerbose >= 2 {
+// log.Printf("an unusual thing happened")
+// }
+//
+// We can write:
+//
+// logger.V(2).Info("an unusual thing happened")
+//
+// # Logger Names
+//
+// Logger instances can have name strings so that all messages logged through
+// that instance have additional context. For example, you might want to add
+// a subsystem name:
+//
+// logger.WithName("compactor").Info("started", "time", time.Now())
+//
+// The WithName() method returns a new Logger, which can be passed to
+// constructors or other functions for further use. Repeated use of WithName()
+// will accumulate name "segments". These name segments will be joined in some
+// way by the LogSink implementation. It is strongly recommended that name
+// segments contain simple identifiers (letters, digits, and hyphen), and do
+// not contain characters that could muddle the log output or confuse the
+// joining operation (e.g. whitespace, commas, periods, slashes, brackets,
+// quotes, etc).
+//
+// # Saved Values
+//
+// Logger instances can store any number of key/value pairs, which will be
+// logged alongside all messages logged through that instance. For example,
+// you might want to create a Logger instance per managed object:
+//
+// With the standard log package, we might write:
+//
+// log.Printf("decided to set field foo to value %q for object %s/%s",
+// targetValue, object.Namespace, object.Name)
+//
+// With logr we'd write:
+//
+// // Elsewhere: set up the logger to log the object name.
+// obj.logger = mainLogger.WithValues(
+// "name", obj.name, "namespace", obj.namespace)
+//
+// // later on...
+// obj.logger.Info("setting foo", "value", targetValue)
+//
+// # Best Practices
+//
+// Logger has very few hard rules, with the goal that LogSink implementations
+// might have a lot of freedom to differentiate. There are, however, some
+// things to consider.
+//
+// The log message consists of a constant message attached to the log line.
+// This should generally be a simple description of what's occurring, and should
+// never be a format string. Variable information can then be attached using
+// named values.
+//
+// Keys are arbitrary strings, but should generally be constant values. Values
+// may be any Go value, but how the value is formatted is determined by the
+// LogSink implementation.
+//
+// Logger instances are meant to be passed around by value. Code that receives
+// such a value can call its methods without having to check whether the
+// instance is ready for use.
+//
+// The zero logger (= Logger{}) is identical to Discard() and discards all log
+// entries. Code that receives a Logger by value can simply call it, the methods
+// will never crash. For cases where passing a logger is optional, a pointer to Logger
+// should be used.
+//
+// # Key Naming Conventions
+//
+// Keys are not strictly required to conform to any specification or regex, but
+// it is recommended that they:
+// - be human-readable and meaningful (not auto-generated or simple ordinals)
+// - be constant (not dependent on input data)
+// - contain only printable characters
+// - not contain whitespace or punctuation
+// - use lower case for simple keys and lowerCamelCase for more complex ones
+//
+// These guidelines help ensure that log data is processed properly regardless
+// of the log implementation. For example, log implementations will try to
+// output JSON data or will store data for later database (e.g. SQL) queries.
+//
+// While users are generally free to use key names of their choice, it's
+// generally best to avoid using the following keys, as they're frequently used
+// by implementations:
+// - "caller": the calling information (file/line) of a particular log line
+// - "error": the underlying error value in the `Error` method
+// - "level": the log level
+// - "logger": the name of the associated logger
+// - "msg": the log message
+// - "stacktrace": the stack trace associated with a particular log line or
+// error (often from the `Error` message)
+// - "ts": the timestamp for a log line
+//
+// Implementations are encouraged to make use of these keys to represent the
+// above concepts, when necessary (for example, in a pure-JSON output form, it
+// would be necessary to represent at least message and timestamp as ordinary
+// named values).
+//
+// # Break Glass
+//
+// Implementations may choose to give callers access to the underlying
+// logging implementation. The recommended pattern for this is:
+//
+// // Underlier exposes access to the underlying logging implementation.
+// // Since callers only have a logr.Logger, they have to know which
+// // implementation is in use, so this interface is less of an abstraction
+// // and more of way to test type conversion.
+// type Underlier interface {
+// GetUnderlying()
+// }
+//
+// Logger grants access to the sink to enable type assertions like this:
+//
+// func DoSomethingWithImpl(log logr.Logger) {
+// if underlier, ok := log.GetSink().(impl.Underlier); ok {
+// implLogger := underlier.GetUnderlying()
+// ...
+// }
+// }
+//
+// Custom `With*` functions can be implemented by copying the complete
+// Logger struct and replacing the sink in the copy:
+//
+// // WithFooBar changes the foobar parameter in the log sink and returns a
+// // new logger with that modified sink. It does nothing for loggers where
+// // the sink doesn't support that parameter.
+// func WithFoobar(log logr.Logger, foobar int) logr.Logger {
+// if foobarLogSink, ok := log.GetSink().(FoobarSink); ok {
+// log = log.WithSink(foobarLogSink.WithFooBar(foobar))
+// }
+// return log
+// }
+//
+// Don't use New to construct a new Logger with a LogSink retrieved from an
+// existing Logger. Source code attribution might not work correctly and
+// unexported fields in Logger get lost.
+//
+// Beware that the same LogSink instance may be shared by different logger
+// instances. Calling functions that modify the LogSink will affect all of
+// those.
+package logr
+
+// New returns a new Logger instance. This is primarily used by libraries
+// implementing LogSink, rather than end users. Passing a nil sink will create
+// a Logger which discards all log lines.
+func New(sink LogSink) Logger {
+ logger := Logger{}
+ logger.setSink(sink)
+ if sink != nil {
+ sink.Init(runtimeInfo)
+ }
+ return logger
+}
+
+// setSink stores the sink and updates any related fields. It mutates the
+// logger and thus is only safe to use for loggers that are not currently being
+// used concurrently.
+func (l *Logger) setSink(sink LogSink) {
+ l.sink = sink
+}
+
+// GetSink returns the stored sink.
+func (l Logger) GetSink() LogSink {
+ return l.sink
+}
+
+// WithSink returns a copy of the logger with the new sink.
+func (l Logger) WithSink(sink LogSink) Logger {
+ l.setSink(sink)
+ return l
+}
+
+// Logger is an interface to an abstract logging implementation. This is a
+// concrete type for performance reasons, but all the real work is passed on to
+// a LogSink. Implementations of LogSink should provide their own constructors
+// that return Logger, not LogSink.
+//
+// The underlying sink can be accessed through GetSink and be modified through
+// WithSink. This enables the implementation of custom extensions (see "Break
+// Glass" in the package documentation). Normally the sink should be used only
+// indirectly.
+type Logger struct {
+ sink LogSink
+ level int
+}
+
+// Enabled tests whether this Logger is enabled. For example, commandline
+// flags might be used to set the logging verbosity and disable some info logs.
+func (l Logger) Enabled() bool {
+ // Some implementations of LogSink look at the caller in Enabled (e.g.
+ // different verbosity levels per package or file), but we only pass one
+ // CallDepth in (via Init). This means that all calls from Logger to the
+ // LogSink's Enabled, Info, and Error methods must have the same number of
+ // frames. In other words, Logger methods can't call other Logger methods
+ // which call these LogSink methods unless we do it the same in all paths.
+ return l.sink != nil && l.sink.Enabled(l.level)
+}
+
+// Info logs a non-error message with the given key/value pairs as context.
+//
+// The msg argument should be used to add some constant description to the log
+// line. The key/value pairs can then be used to add additional variable
+// information. The key/value pairs must alternate string keys and arbitrary
+// values.
+func (l Logger) Info(msg string, keysAndValues ...any) {
+ if l.sink == nil {
+ return
+ }
+ if l.sink.Enabled(l.level) { // see comment in Enabled
+ if withHelper, ok := l.sink.(CallStackHelperLogSink); ok {
+ withHelper.GetCallStackHelper()()
+ }
+ l.sink.Info(l.level, msg, keysAndValues...)
+ }
+}
+
+// Error logs an error, with the given message and key/value pairs as context.
+// It functions similarly to Info, but may have unique behavior, and should be
+// preferred for logging errors (see the package documentations for more
+// information). The log message will always be emitted, regardless of
+// verbosity level.
+//
+// The msg argument should be used to add context to any underlying error,
+// while the err argument should be used to attach the actual error that
+// triggered this log line, if present. The err parameter is optional
+// and nil may be passed instead of an error instance.
+func (l Logger) Error(err error, msg string, keysAndValues ...any) {
+ if l.sink == nil {
+ return
+ }
+ if withHelper, ok := l.sink.(CallStackHelperLogSink); ok {
+ withHelper.GetCallStackHelper()()
+ }
+ l.sink.Error(err, msg, keysAndValues...)
+}
+
+// V returns a new Logger instance for a specific verbosity level, relative to
+// this Logger. In other words, V-levels are additive. A higher verbosity
+// level means a log message is less important. Negative V-levels are treated
+// as 0.
+func (l Logger) V(level int) Logger {
+ if l.sink == nil {
+ return l
+ }
+ if level < 0 {
+ level = 0
+ }
+ l.level += level
+ return l
+}
+
+// GetV returns the verbosity level of the logger. If the logger's LogSink is
+// nil as in the Discard logger, this will always return 0.
+func (l Logger) GetV() int {
+ // 0 if l.sink nil because of the if check in V above.
+ return l.level
+}
+
+// WithValues returns a new Logger instance with additional key/value pairs.
+// See Info for documentation on how key/value pairs work.
+func (l Logger) WithValues(keysAndValues ...any) Logger {
+ if l.sink == nil {
+ return l
+ }
+ l.setSink(l.sink.WithValues(keysAndValues...))
+ return l
+}
+
+// WithName returns a new Logger instance with the specified name element added
+// to the Logger's name. Successive calls with WithName append additional
+// suffixes to the Logger's name. It's strongly recommended that name segments
+// contain only letters, digits, and hyphens (see the package documentation for
+// more information).
+func (l Logger) WithName(name string) Logger {
+ if l.sink == nil {
+ return l
+ }
+ l.setSink(l.sink.WithName(name))
+ return l
+}
+
+// WithCallDepth returns a Logger instance that offsets the call stack by the
+// specified number of frames when logging call site information, if possible.
+// This is useful for users who have helper functions between the "real" call
+// site and the actual calls to Logger methods. If depth is 0 the attribution
+// should be to the direct caller of this function. If depth is 1 the
+// attribution should skip 1 call frame, and so on. Successive calls to this
+// are additive.
+//
+// If the underlying log implementation supports a WithCallDepth(int) method,
+// it will be called and the result returned. If the implementation does not
+// support CallDepthLogSink, the original Logger will be returned.
+//
+// To skip one level, WithCallStackHelper() should be used instead of
+// WithCallDepth(1) because it works with implementions that support the
+// CallDepthLogSink and/or CallStackHelperLogSink interfaces.
+func (l Logger) WithCallDepth(depth int) Logger {
+ if l.sink == nil {
+ return l
+ }
+ if withCallDepth, ok := l.sink.(CallDepthLogSink); ok {
+ l.setSink(withCallDepth.WithCallDepth(depth))
+ }
+ return l
+}
+
+// WithCallStackHelper returns a new Logger instance that skips the direct
+// caller when logging call site information, if possible. This is useful for
+// users who have helper functions between the "real" call site and the actual
+// calls to Logger methods and want to support loggers which depend on marking
+// each individual helper function, like loggers based on testing.T.
+//
+// In addition to using that new logger instance, callers also must call the
+// returned function.
+//
+// If the underlying log implementation supports a WithCallDepth(int) method,
+// WithCallDepth(1) will be called to produce a new logger. If it supports a
+// WithCallStackHelper() method, that will be also called. If the
+// implementation does not support either of these, the original Logger will be
+// returned.
+func (l Logger) WithCallStackHelper() (func(), Logger) {
+ if l.sink == nil {
+ return func() {}, l
+ }
+ var helper func()
+ if withCallDepth, ok := l.sink.(CallDepthLogSink); ok {
+ l.setSink(withCallDepth.WithCallDepth(1))
+ }
+ if withHelper, ok := l.sink.(CallStackHelperLogSink); ok {
+ helper = withHelper.GetCallStackHelper()
+ } else {
+ helper = func() {}
+ }
+ return helper, l
+}
+
+// IsZero returns true if this logger is an uninitialized zero value
+func (l Logger) IsZero() bool {
+ return l.sink == nil
+}
+
+// RuntimeInfo holds information that the logr "core" library knows which
+// LogSinks might want to know.
+type RuntimeInfo struct {
+ // CallDepth is the number of call frames the logr library adds between the
+ // end-user and the LogSink. LogSink implementations which choose to print
+ // the original logging site (e.g. file & line) should climb this many
+ // additional frames to find it.
+ CallDepth int
+}
+
+// runtimeInfo is a static global. It must not be changed at run time.
+var runtimeInfo = RuntimeInfo{
+ CallDepth: 1,
+}
+
+// LogSink represents a logging implementation. End-users will generally not
+// interact with this type.
+type LogSink interface {
+ // Init receives optional information about the logr library for LogSink
+ // implementations that need it.
+ Init(info RuntimeInfo)
+
+ // Enabled tests whether this LogSink is enabled at the specified V-level.
+ // For example, commandline flags might be used to set the logging
+ // verbosity and disable some info logs.
+ Enabled(level int) bool
+
+ // Info logs a non-error message with the given key/value pairs as context.
+ // The level argument is provided for optional logging. This method will
+ // only be called when Enabled(level) is true. See Logger.Info for more
+ // details.
+ Info(level int, msg string, keysAndValues ...any)
+
+ // Error logs an error, with the given message and key/value pairs as
+ // context. See Logger.Error for more details.
+ Error(err error, msg string, keysAndValues ...any)
+
+ // WithValues returns a new LogSink with additional key/value pairs. See
+ // Logger.WithValues for more details.
+ WithValues(keysAndValues ...any) LogSink
+
+ // WithName returns a new LogSink with the specified name appended. See
+ // Logger.WithName for more details.
+ WithName(name string) LogSink
+}
+
+// CallDepthLogSink represents a LogSink that knows how to climb the call stack
+// to identify the original call site and can offset the depth by a specified
+// number of frames. This is useful for users who have helper functions
+// between the "real" call site and the actual calls to Logger methods.
+// Implementations that log information about the call site (such as file,
+// function, or line) would otherwise log information about the intermediate
+// helper functions.
+//
+// This is an optional interface and implementations are not required to
+// support it.
+type CallDepthLogSink interface {
+ // WithCallDepth returns a LogSink that will offset the call
+ // stack by the specified number of frames when logging call
+ // site information.
+ //
+ // If depth is 0, the LogSink should skip exactly the number
+ // of call frames defined in RuntimeInfo.CallDepth when Info
+ // or Error are called, i.e. the attribution should be to the
+ // direct caller of Logger.Info or Logger.Error.
+ //
+ // If depth is 1 the attribution should skip 1 call frame, and so on.
+ // Successive calls to this are additive.
+ WithCallDepth(depth int) LogSink
+}
+
+// CallStackHelperLogSink represents a LogSink that knows how to climb
+// the call stack to identify the original call site and can skip
+// intermediate helper functions if they mark themselves as
+// helper. Go's testing package uses that approach.
+//
+// This is useful for users who have helper functions between the
+// "real" call site and the actual calls to Logger methods.
+// Implementations that log information about the call site (such as
+// file, function, or line) would otherwise log information about the
+// intermediate helper functions.
+//
+// This is an optional interface and implementations are not required
+// to support it. Implementations that choose to support this must not
+// simply implement it as WithCallDepth(1), because
+// Logger.WithCallStackHelper will call both methods if they are
+// present. This should only be implemented for LogSinks that actually
+// need it, as with testing.T.
+type CallStackHelperLogSink interface {
+ // GetCallStackHelper returns a function that must be called
+ // to mark the direct caller as helper function when logging
+ // call site information.
+ GetCallStackHelper() func()
+}
+
+// Marshaler is an optional interface that logged values may choose to
+// implement. Loggers with structured output, such as JSON, should
+// log the object return by the MarshalLog method instead of the
+// original value.
+type Marshaler interface {
+ // MarshalLog can be used to:
+ // - ensure that structs are not logged as strings when the original
+ // value has a String method: return a different type without a
+ // String method
+ // - select which fields of a complex type should get logged:
+ // return a simpler struct with fewer fields
+ // - log unexported fields: return a different struct
+ // with exported fields
+ //
+ // It may return any value of any type.
+ MarshalLog() any
+}
diff --git a/vendor/github.com/go-logr/logr/sloghandler.go b/vendor/github.com/go-logr/logr/sloghandler.go
new file mode 100644
index 00000000..82d1ba49
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/sloghandler.go
@@ -0,0 +1,192 @@
+//go:build go1.21
+// +build go1.21
+
+/*
+Copyright 2023 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package logr
+
+import (
+ "context"
+ "log/slog"
+)
+
+type slogHandler struct {
+ // May be nil, in which case all logs get discarded.
+ sink LogSink
+ // Non-nil if sink is non-nil and implements SlogSink.
+ slogSink SlogSink
+
+ // groupPrefix collects values from WithGroup calls. It gets added as
+ // prefix to value keys when handling a log record.
+ groupPrefix string
+
+ // levelBias can be set when constructing the handler to influence the
+ // slog.Level of log records. A positive levelBias reduces the
+ // slog.Level value. slog has no API to influence this value after the
+ // handler got created, so it can only be set indirectly through
+ // Logger.V.
+ levelBias slog.Level
+}
+
+var _ slog.Handler = &slogHandler{}
+
+// groupSeparator is used to concatenate WithGroup names and attribute keys.
+const groupSeparator = "."
+
+// GetLevel is used for black box unit testing.
+func (l *slogHandler) GetLevel() slog.Level {
+ return l.levelBias
+}
+
+func (l *slogHandler) Enabled(_ context.Context, level slog.Level) bool {
+ return l.sink != nil && (level >= slog.LevelError || l.sink.Enabled(l.levelFromSlog(level)))
+}
+
+func (l *slogHandler) Handle(ctx context.Context, record slog.Record) error {
+ if l.slogSink != nil {
+ // Only adjust verbosity level of log entries < slog.LevelError.
+ if record.Level < slog.LevelError {
+ record.Level -= l.levelBias
+ }
+ return l.slogSink.Handle(ctx, record)
+ }
+
+ // No need to check for nil sink here because Handle will only be called
+ // when Enabled returned true.
+
+ kvList := make([]any, 0, 2*record.NumAttrs())
+ record.Attrs(func(attr slog.Attr) bool {
+ kvList = attrToKVs(attr, l.groupPrefix, kvList)
+ return true
+ })
+ if record.Level >= slog.LevelError {
+ l.sinkWithCallDepth().Error(nil, record.Message, kvList...)
+ } else {
+ level := l.levelFromSlog(record.Level)
+ l.sinkWithCallDepth().Info(level, record.Message, kvList...)
+ }
+ return nil
+}
+
+// sinkWithCallDepth adjusts the stack unwinding so that when Error or Info
+// are called by Handle, code in slog gets skipped.
+//
+// This offset currently (Go 1.21.0) works for calls through
+// slog.New(ToSlogHandler(...)). There's no guarantee that the call
+// chain won't change. Wrapping the handler will also break unwinding. It's
+// still better than not adjusting at all....
+//
+// This cannot be done when constructing the handler because FromSlogHandler needs
+// access to the original sink without this adjustment. A second copy would
+// work, but then WithAttrs would have to be called for both of them.
+func (l *slogHandler) sinkWithCallDepth() LogSink {
+ if sink, ok := l.sink.(CallDepthLogSink); ok {
+ return sink.WithCallDepth(2)
+ }
+ return l.sink
+}
+
+func (l *slogHandler) WithAttrs(attrs []slog.Attr) slog.Handler {
+ if l.sink == nil || len(attrs) == 0 {
+ return l
+ }
+
+ clone := *l
+ if l.slogSink != nil {
+ clone.slogSink = l.slogSink.WithAttrs(attrs)
+ clone.sink = clone.slogSink
+ } else {
+ kvList := make([]any, 0, 2*len(attrs))
+ for _, attr := range attrs {
+ kvList = attrToKVs(attr, l.groupPrefix, kvList)
+ }
+ clone.sink = l.sink.WithValues(kvList...)
+ }
+ return &clone
+}
+
+func (l *slogHandler) WithGroup(name string) slog.Handler {
+ if l.sink == nil {
+ return l
+ }
+ if name == "" {
+ // slog says to inline empty groups
+ return l
+ }
+ clone := *l
+ if l.slogSink != nil {
+ clone.slogSink = l.slogSink.WithGroup(name)
+ clone.sink = clone.slogSink
+ } else {
+ clone.groupPrefix = addPrefix(clone.groupPrefix, name)
+ }
+ return &clone
+}
+
+// attrToKVs appends a slog.Attr to a logr-style kvList. It handle slog Groups
+// and other details of slog.
+func attrToKVs(attr slog.Attr, groupPrefix string, kvList []any) []any {
+ attrVal := attr.Value.Resolve()
+ if attrVal.Kind() == slog.KindGroup {
+ groupVal := attrVal.Group()
+ grpKVs := make([]any, 0, 2*len(groupVal))
+ prefix := groupPrefix
+ if attr.Key != "" {
+ prefix = addPrefix(groupPrefix, attr.Key)
+ }
+ for _, attr := range groupVal {
+ grpKVs = attrToKVs(attr, prefix, grpKVs)
+ }
+ kvList = append(kvList, grpKVs...)
+ } else if attr.Key != "" {
+ kvList = append(kvList, addPrefix(groupPrefix, attr.Key), attrVal.Any())
+ }
+
+ return kvList
+}
+
+func addPrefix(prefix, name string) string {
+ if prefix == "" {
+ return name
+ }
+ if name == "" {
+ return prefix
+ }
+ return prefix + groupSeparator + name
+}
+
+// levelFromSlog adjusts the level by the logger's verbosity and negates it.
+// It ensures that the result is >= 0. This is necessary because the result is
+// passed to a LogSink and that API did not historically document whether
+// levels could be negative or what that meant.
+//
+// Some example usage:
+//
+// logrV0 := getMyLogger()
+// logrV2 := logrV0.V(2)
+// slogV2 := slog.New(logr.ToSlogHandler(logrV2))
+// slogV2.Debug("msg") // =~ logrV2.V(4) =~ logrV0.V(6)
+// slogV2.Info("msg") // =~ logrV2.V(0) =~ logrV0.V(2)
+// slogv2.Warn("msg") // =~ logrV2.V(-4) =~ logrV0.V(0)
+func (l *slogHandler) levelFromSlog(level slog.Level) int {
+ result := -level
+ result += l.levelBias // in case the original Logger had a V level
+ if result < 0 {
+ result = 0 // because LogSink doesn't expect negative V levels
+ }
+ return int(result)
+}
diff --git a/vendor/github.com/go-logr/logr/slogr.go b/vendor/github.com/go-logr/logr/slogr.go
new file mode 100644
index 00000000..28a83d02
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/slogr.go
@@ -0,0 +1,100 @@
+//go:build go1.21
+// +build go1.21
+
+/*
+Copyright 2023 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package logr
+
+import (
+ "context"
+ "log/slog"
+)
+
+// FromSlogHandler returns a Logger which writes to the slog.Handler.
+//
+// The logr verbosity level is mapped to slog levels such that V(0) becomes
+// slog.LevelInfo and V(4) becomes slog.LevelDebug.
+func FromSlogHandler(handler slog.Handler) Logger {
+ if handler, ok := handler.(*slogHandler); ok {
+ if handler.sink == nil {
+ return Discard()
+ }
+ return New(handler.sink).V(int(handler.levelBias))
+ }
+ return New(&slogSink{handler: handler})
+}
+
+// ToSlogHandler returns a slog.Handler which writes to the same sink as the Logger.
+//
+// The returned logger writes all records with level >= slog.LevelError as
+// error log entries with LogSink.Error, regardless of the verbosity level of
+// the Logger:
+//
+// logger :=
+// slog.New(ToSlogHandler(logger.V(10))).Error(...) -> logSink.Error(...)
+//
+// The level of all other records gets reduced by the verbosity
+// level of the Logger and the result is negated. If it happens
+// to be negative, then it gets replaced by zero because a LogSink
+// is not expected to handled negative levels:
+//
+// slog.New(ToSlogHandler(logger)).Debug(...) -> logger.GetSink().Info(level=4, ...)
+// slog.New(ToSlogHandler(logger)).Warning(...) -> logger.GetSink().Info(level=0, ...)
+// slog.New(ToSlogHandler(logger)).Info(...) -> logger.GetSink().Info(level=0, ...)
+// slog.New(ToSlogHandler(logger.V(4))).Info(...) -> logger.GetSink().Info(level=4, ...)
+func ToSlogHandler(logger Logger) slog.Handler {
+ if sink, ok := logger.GetSink().(*slogSink); ok && logger.GetV() == 0 {
+ return sink.handler
+ }
+
+ handler := &slogHandler{sink: logger.GetSink(), levelBias: slog.Level(logger.GetV())}
+ if slogSink, ok := handler.sink.(SlogSink); ok {
+ handler.slogSink = slogSink
+ }
+ return handler
+}
+
+// SlogSink is an optional interface that a LogSink can implement to support
+// logging through the slog.Logger or slog.Handler APIs better. It then should
+// also support special slog values like slog.Group. When used as a
+// slog.Handler, the advantages are:
+//
+// - stack unwinding gets avoided in favor of logging the pre-recorded PC,
+// as intended by slog
+// - proper grouping of key/value pairs via WithGroup
+// - verbosity levels > slog.LevelInfo can be recorded
+// - less overhead
+//
+// Both APIs (Logger and slog.Logger/Handler) then are supported equally
+// well. Developers can pick whatever API suits them better and/or mix
+// packages which use either API in the same binary with a common logging
+// implementation.
+//
+// This interface is necessary because the type implementing the LogSink
+// interface cannot also implement the slog.Handler interface due to the
+// different prototype of the common Enabled method.
+//
+// An implementation could support both interfaces in two different types, but then
+// additional interfaces would be needed to convert between those types in FromSlogHandler
+// and ToSlogHandler.
+type SlogSink interface {
+ LogSink
+
+ Handle(ctx context.Context, record slog.Record) error
+ WithAttrs(attrs []slog.Attr) SlogSink
+ WithGroup(name string) SlogSink
+}
diff --git a/vendor/github.com/go-logr/logr/slogsink.go b/vendor/github.com/go-logr/logr/slogsink.go
new file mode 100644
index 00000000..4060fcbc
--- /dev/null
+++ b/vendor/github.com/go-logr/logr/slogsink.go
@@ -0,0 +1,120 @@
+//go:build go1.21
+// +build go1.21
+
+/*
+Copyright 2023 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package logr
+
+import (
+ "context"
+ "log/slog"
+ "runtime"
+ "time"
+)
+
+var (
+ _ LogSink = &slogSink{}
+ _ CallDepthLogSink = &slogSink{}
+ _ Underlier = &slogSink{}
+)
+
+// Underlier is implemented by the LogSink returned by NewFromLogHandler.
+type Underlier interface {
+ // GetUnderlying returns the Handler used by the LogSink.
+ GetUnderlying() slog.Handler
+}
+
+const (
+ // nameKey is used to log the `WithName` values as an additional attribute.
+ nameKey = "logger"
+
+ // errKey is used to log the error parameter of Error as an additional attribute.
+ errKey = "err"
+)
+
+type slogSink struct {
+ callDepth int
+ name string
+ handler slog.Handler
+}
+
+func (l *slogSink) Init(info RuntimeInfo) {
+ l.callDepth = info.CallDepth
+}
+
+func (l *slogSink) GetUnderlying() slog.Handler {
+ return l.handler
+}
+
+func (l *slogSink) WithCallDepth(depth int) LogSink {
+ newLogger := *l
+ newLogger.callDepth += depth
+ return &newLogger
+}
+
+func (l *slogSink) Enabled(level int) bool {
+ return l.handler.Enabled(context.Background(), slog.Level(-level))
+}
+
+func (l *slogSink) Info(level int, msg string, kvList ...interface{}) {
+ l.log(nil, msg, slog.Level(-level), kvList...)
+}
+
+func (l *slogSink) Error(err error, msg string, kvList ...interface{}) {
+ l.log(err, msg, slog.LevelError, kvList...)
+}
+
+func (l *slogSink) log(err error, msg string, level slog.Level, kvList ...interface{}) {
+ var pcs [1]uintptr
+ // skip runtime.Callers, this function, Info/Error, and all helper functions above that.
+ runtime.Callers(3+l.callDepth, pcs[:])
+
+ record := slog.NewRecord(time.Now(), level, msg, pcs[0])
+ if l.name != "" {
+ record.AddAttrs(slog.String(nameKey, l.name))
+ }
+ if err != nil {
+ record.AddAttrs(slog.Any(errKey, err))
+ }
+ record.Add(kvList...)
+ _ = l.handler.Handle(context.Background(), record)
+}
+
+func (l slogSink) WithName(name string) LogSink {
+ if l.name != "" {
+ l.name += "/"
+ }
+ l.name += name
+ return &l
+}
+
+func (l slogSink) WithValues(kvList ...interface{}) LogSink {
+ l.handler = l.handler.WithAttrs(kvListToAttrs(kvList...))
+ return &l
+}
+
+func kvListToAttrs(kvList ...interface{}) []slog.Attr {
+ // We don't need the record itself, only its Add method.
+ record := slog.NewRecord(time.Time{}, 0, "", 0)
+ record.Add(kvList...)
+ attrs := make([]slog.Attr, 0, record.NumAttrs())
+ record.Attrs(func(attr slog.Attr) bool {
+ attrs = append(attrs, attr)
+ return true
+ })
+ return attrs
+}
diff --git a/vendor/github.com/go-logr/stdr/LICENSE b/vendor/github.com/go-logr/stdr/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/vendor/github.com/go-logr/stdr/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/go-logr/stdr/README.md b/vendor/github.com/go-logr/stdr/README.md
new file mode 100644
index 00000000..51586678
--- /dev/null
+++ b/vendor/github.com/go-logr/stdr/README.md
@@ -0,0 +1,6 @@
+# Minimal Go logging using logr and Go's standard library
+
+[](https://pkg.go.dev/github.com/go-logr/stdr)
+
+This package implements the [logr interface](https://github.com/go-logr/logr)
+in terms of Go's standard log package(https://pkg.go.dev/log).
diff --git a/vendor/github.com/go-logr/stdr/stdr.go b/vendor/github.com/go-logr/stdr/stdr.go
new file mode 100644
index 00000000..93a8aab5
--- /dev/null
+++ b/vendor/github.com/go-logr/stdr/stdr.go
@@ -0,0 +1,170 @@
+/*
+Copyright 2019 The logr Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package stdr implements github.com/go-logr/logr.Logger in terms of
+// Go's standard log package.
+package stdr
+
+import (
+ "log"
+ "os"
+
+ "github.com/go-logr/logr"
+ "github.com/go-logr/logr/funcr"
+)
+
+// The global verbosity level. See SetVerbosity().
+var globalVerbosity int
+
+// SetVerbosity sets the global level against which all info logs will be
+// compared. If this is greater than or equal to the "V" of the logger, the
+// message will be logged. A higher value here means more logs will be written.
+// The previous verbosity value is returned. This is not concurrent-safe -
+// callers must be sure to call it from only one goroutine.
+func SetVerbosity(v int) int {
+ old := globalVerbosity
+ globalVerbosity = v
+ return old
+}
+
+// New returns a logr.Logger which is implemented by Go's standard log package,
+// or something like it. If std is nil, this will use a default logger
+// instead.
+//
+// Example: stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile)))
+func New(std StdLogger) logr.Logger {
+ return NewWithOptions(std, Options{})
+}
+
+// NewWithOptions returns a logr.Logger which is implemented by Go's standard
+// log package, or something like it. See New for details.
+func NewWithOptions(std StdLogger, opts Options) logr.Logger {
+ if std == nil {
+ // Go's log.Default() is only available in 1.16 and higher.
+ std = log.New(os.Stderr, "", log.LstdFlags)
+ }
+
+ if opts.Depth < 0 {
+ opts.Depth = 0
+ }
+
+ fopts := funcr.Options{
+ LogCaller: funcr.MessageClass(opts.LogCaller),
+ }
+
+ sl := &logger{
+ Formatter: funcr.NewFormatter(fopts),
+ std: std,
+ }
+
+ // For skipping our own logger.Info/Error.
+ sl.Formatter.AddCallDepth(1 + opts.Depth)
+
+ return logr.New(sl)
+}
+
+// Options carries parameters which influence the way logs are generated.
+type Options struct {
+ // Depth biases the assumed number of call frames to the "true" caller.
+ // This is useful when the calling code calls a function which then calls
+ // stdr (e.g. a logging shim to another API). Values less than zero will
+ // be treated as zero.
+ Depth int
+
+ // LogCaller tells stdr to add a "caller" key to some or all log lines.
+ // Go's log package has options to log this natively, too.
+ LogCaller MessageClass
+
+ // TODO: add an option to log the date/time
+}
+
+// MessageClass indicates which category or categories of messages to consider.
+type MessageClass int
+
+const (
+ // None ignores all message classes.
+ None MessageClass = iota
+ // All considers all message classes.
+ All
+ // Info only considers info messages.
+ Info
+ // Error only considers error messages.
+ Error
+)
+
+// StdLogger is the subset of the Go stdlib log.Logger API that is needed for
+// this adapter.
+type StdLogger interface {
+ // Output is the same as log.Output and log.Logger.Output.
+ Output(calldepth int, logline string) error
+}
+
+type logger struct {
+ funcr.Formatter
+ std StdLogger
+}
+
+var _ logr.LogSink = &logger{}
+var _ logr.CallDepthLogSink = &logger{}
+
+func (l logger) Enabled(level int) bool {
+ return globalVerbosity >= level
+}
+
+func (l logger) Info(level int, msg string, kvList ...interface{}) {
+ prefix, args := l.FormatInfo(level, msg, kvList)
+ if prefix != "" {
+ args = prefix + ": " + args
+ }
+ _ = l.std.Output(l.Formatter.GetDepth()+1, args)
+}
+
+func (l logger) Error(err error, msg string, kvList ...interface{}) {
+ prefix, args := l.FormatError(err, msg, kvList)
+ if prefix != "" {
+ args = prefix + ": " + args
+ }
+ _ = l.std.Output(l.Formatter.GetDepth()+1, args)
+}
+
+func (l logger) WithName(name string) logr.LogSink {
+ l.Formatter.AddName(name)
+ return &l
+}
+
+func (l logger) WithValues(kvList ...interface{}) logr.LogSink {
+ l.Formatter.AddValues(kvList)
+ return &l
+}
+
+func (l logger) WithCallDepth(depth int) logr.LogSink {
+ l.Formatter.AddCallDepth(depth)
+ return &l
+}
+
+// Underlier exposes access to the underlying logging implementation. Since
+// callers only have a logr.Logger, they have to know which implementation is
+// in use, so this interface is less of an abstraction and more of way to test
+// type conversion.
+type Underlier interface {
+ GetUnderlying() StdLogger
+}
+
+// GetUnderlying returns the StdLogger underneath this logger. Since StdLogger
+// is itself an interface, the result may or may not be a Go log.Logger.
+func (l logger) GetUnderlying() StdLogger {
+ return l.std
+}
diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
deleted file mode 100644
index 0ef27d33..00000000
--- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: github.com/golang/protobuf/ptypes/any/any.proto
-
-package any
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- anypb "google.golang.org/protobuf/types/known/anypb"
- reflect "reflect"
-)
-
-// Symbols defined in public import of google/protobuf/any.proto.
-
-type Any = anypb.Any
-
-var File_github_com_golang_protobuf_ptypes_any_any_proto protoreflect.FileDescriptor
-
-var file_github_com_golang_protobuf_ptypes_any_any_proto_rawDesc = []byte{
- 0x0a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c,
- 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79,
- 0x70, 0x65, 0x73, 0x2f, 0x61, 0x6e, 0x79, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x2b, 0x5a, 0x29,
- 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e,
- 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, 0x70, 0x65,
- 0x73, 0x2f, 0x61, 0x6e, 0x79, 0x3b, 0x61, 0x6e, 0x79, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x33,
-}
-
-var file_github_com_golang_protobuf_ptypes_any_any_proto_goTypes = []interface{}{}
-var file_github_com_golang_protobuf_ptypes_any_any_proto_depIdxs = []int32{
- 0, // [0:0] is the sub-list for method output_type
- 0, // [0:0] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_github_com_golang_protobuf_ptypes_any_any_proto_init() }
-func file_github_com_golang_protobuf_ptypes_any_any_proto_init() {
- if File_github_com_golang_protobuf_ptypes_any_any_proto != nil {
- return
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_github_com_golang_protobuf_ptypes_any_any_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 0,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_github_com_golang_protobuf_ptypes_any_any_proto_goTypes,
- DependencyIndexes: file_github_com_golang_protobuf_ptypes_any_any_proto_depIdxs,
- }.Build()
- File_github_com_golang_protobuf_ptypes_any_any_proto = out.File
- file_github_com_golang_protobuf_ptypes_any_any_proto_rawDesc = nil
- file_github_com_golang_protobuf_ptypes_any_any_proto_goTypes = nil
- file_github_com_golang_protobuf_ptypes_any_any_proto_depIdxs = nil
-}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE
new file mode 100644
index 00000000..36451625
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2015, Gengo, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ * Neither the name of Gengo, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/BUILD.bazel b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/BUILD.bazel
new file mode 100644
index 00000000..b8fbb2b7
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/BUILD.bazel
@@ -0,0 +1,35 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+package(default_visibility = ["//visibility:public"])
+
+go_library(
+ name = "httprule",
+ srcs = [
+ "compile.go",
+ "parse.go",
+ "types.go",
+ ],
+ importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule",
+ deps = ["//utilities"],
+)
+
+go_test(
+ name = "httprule_test",
+ size = "small",
+ srcs = [
+ "compile_test.go",
+ "parse_test.go",
+ "types_test.go",
+ ],
+ embed = [":httprule"],
+ deps = [
+ "//utilities",
+ "@org_golang_google_grpc//grpclog",
+ ],
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":httprule",
+ visibility = ["//:__subpackages__"],
+)
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/compile.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/compile.go
new file mode 100644
index 00000000..3cd93729
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/compile.go
@@ -0,0 +1,121 @@
+package httprule
+
+import (
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+)
+
+const (
+ opcodeVersion = 1
+)
+
+// Template is a compiled representation of path templates.
+type Template struct {
+ // Version is the version number of the format.
+ Version int
+ // OpCodes is a sequence of operations.
+ OpCodes []int
+ // Pool is a constant pool
+ Pool []string
+ // Verb is a VERB part in the template.
+ Verb string
+ // Fields is a list of field paths bound in this template.
+ Fields []string
+ // Original template (example: /v1/a_bit_of_everything)
+ Template string
+}
+
+// Compiler compiles utilities representation of path templates into marshallable operations.
+// They can be unmarshalled by runtime.NewPattern.
+type Compiler interface {
+ Compile() Template
+}
+
+type op struct {
+ // code is the opcode of the operation
+ code utilities.OpCode
+
+ // str is a string operand of the code.
+ // num is ignored if str is not empty.
+ str string
+
+ // num is a numeric operand of the code.
+ num int
+}
+
+func (w wildcard) compile() []op {
+ return []op{
+ {code: utilities.OpPush},
+ }
+}
+
+func (w deepWildcard) compile() []op {
+ return []op{
+ {code: utilities.OpPushM},
+ }
+}
+
+func (l literal) compile() []op {
+ return []op{
+ {
+ code: utilities.OpLitPush,
+ str: string(l),
+ },
+ }
+}
+
+func (v variable) compile() []op {
+ var ops []op
+ for _, s := range v.segments {
+ ops = append(ops, s.compile()...)
+ }
+ ops = append(ops, op{
+ code: utilities.OpConcatN,
+ num: len(v.segments),
+ }, op{
+ code: utilities.OpCapture,
+ str: v.path,
+ })
+
+ return ops
+}
+
+func (t template) Compile() Template {
+ var rawOps []op
+ for _, s := range t.segments {
+ rawOps = append(rawOps, s.compile()...)
+ }
+
+ var (
+ ops []int
+ pool []string
+ fields []string
+ )
+ consts := make(map[string]int)
+ for _, op := range rawOps {
+ ops = append(ops, int(op.code))
+ if op.str == "" {
+ ops = append(ops, op.num)
+ } else {
+ // eof segment literal represents the "/" path pattern
+ if op.str == eof {
+ op.str = ""
+ }
+ if _, ok := consts[op.str]; !ok {
+ consts[op.str] = len(pool)
+ pool = append(pool, op.str)
+ }
+ ops = append(ops, consts[op.str])
+ }
+ if op.code == utilities.OpCapture {
+ fields = append(fields, op.str)
+ }
+ }
+ return Template{
+ Version: opcodeVersion,
+ OpCodes: ops,
+ Pool: pool,
+ Verb: t.verb,
+ Fields: fields,
+ Template: t.template,
+ }
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/fuzz.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/fuzz.go
new file mode 100644
index 00000000..c056bd30
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/fuzz.go
@@ -0,0 +1,11 @@
+//go:build gofuzz
+// +build gofuzz
+
+package httprule
+
+func Fuzz(data []byte) int {
+ if _, err := Parse(string(data)); err != nil {
+ return 0
+ }
+ return 0
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/parse.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/parse.go
new file mode 100644
index 00000000..65ffcf5c
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/parse.go
@@ -0,0 +1,368 @@
+package httprule
+
+import (
+ "errors"
+ "fmt"
+ "strings"
+)
+
+// InvalidTemplateError indicates that the path template is not valid.
+type InvalidTemplateError struct {
+ tmpl string
+ msg string
+}
+
+func (e InvalidTemplateError) Error() string {
+ return fmt.Sprintf("%s: %s", e.msg, e.tmpl)
+}
+
+// Parse parses the string representation of path template
+func Parse(tmpl string) (Compiler, error) {
+ if !strings.HasPrefix(tmpl, "/") {
+ return template{}, InvalidTemplateError{tmpl: tmpl, msg: "no leading /"}
+ }
+ tokens, verb := tokenize(tmpl[1:])
+
+ p := parser{tokens: tokens}
+ segs, err := p.topLevelSegments()
+ if err != nil {
+ return template{}, InvalidTemplateError{tmpl: tmpl, msg: err.Error()}
+ }
+
+ return template{
+ segments: segs,
+ verb: verb,
+ template: tmpl,
+ }, nil
+}
+
+func tokenize(path string) (tokens []string, verb string) {
+ if path == "" {
+ return []string{eof}, ""
+ }
+
+ const (
+ init = iota
+ field
+ nested
+ )
+ st := init
+ for path != "" {
+ var idx int
+ switch st {
+ case init:
+ idx = strings.IndexAny(path, "/{")
+ case field:
+ idx = strings.IndexAny(path, ".=}")
+ case nested:
+ idx = strings.IndexAny(path, "/}")
+ }
+ if idx < 0 {
+ tokens = append(tokens, path)
+ break
+ }
+ switch r := path[idx]; r {
+ case '/', '.':
+ case '{':
+ st = field
+ case '=':
+ st = nested
+ case '}':
+ st = init
+ }
+ if idx == 0 {
+ tokens = append(tokens, path[idx:idx+1])
+ } else {
+ tokens = append(tokens, path[:idx], path[idx:idx+1])
+ }
+ path = path[idx+1:]
+ }
+
+ l := len(tokens)
+ // See
+ // https://github.com/grpc-ecosystem/grpc-gateway/pull/1947#issuecomment-774523693 ;
+ // although normal and backwards-compat logic here is to use the last index
+ // of a colon, if the final segment is a variable followed by a colon, the
+ // part following the colon must be a verb. Hence if the previous token is
+ // an end var marker, we switch the index we're looking for to Index instead
+ // of LastIndex, so that we correctly grab the remaining part of the path as
+ // the verb.
+ var penultimateTokenIsEndVar bool
+ switch l {
+ case 0, 1:
+ // Not enough to be variable so skip this logic and don't result in an
+ // invalid index
+ default:
+ penultimateTokenIsEndVar = tokens[l-2] == "}"
+ }
+ t := tokens[l-1]
+ var idx int
+ if penultimateTokenIsEndVar {
+ idx = strings.Index(t, ":")
+ } else {
+ idx = strings.LastIndex(t, ":")
+ }
+ if idx == 0 {
+ tokens, verb = tokens[:l-1], t[1:]
+ } else if idx > 0 {
+ tokens[l-1], verb = t[:idx], t[idx+1:]
+ }
+ tokens = append(tokens, eof)
+ return tokens, verb
+}
+
+// parser is a parser of the template syntax defined in github.com/googleapis/googleapis/google/api/http.proto.
+type parser struct {
+ tokens []string
+ accepted []string
+}
+
+// topLevelSegments is the target of this parser.
+func (p *parser) topLevelSegments() ([]segment, error) {
+ if _, err := p.accept(typeEOF); err == nil {
+ p.tokens = p.tokens[:0]
+ return []segment{literal(eof)}, nil
+ }
+ segs, err := p.segments()
+ if err != nil {
+ return nil, err
+ }
+ if _, err := p.accept(typeEOF); err != nil {
+ return nil, fmt.Errorf("unexpected token %q after segments %q", p.tokens[0], strings.Join(p.accepted, ""))
+ }
+ return segs, nil
+}
+
+func (p *parser) segments() ([]segment, error) {
+ s, err := p.segment()
+ if err != nil {
+ return nil, err
+ }
+
+ segs := []segment{s}
+ for {
+ if _, err := p.accept("/"); err != nil {
+ return segs, nil
+ }
+ s, err := p.segment()
+ if err != nil {
+ return segs, err
+ }
+ segs = append(segs, s)
+ }
+}
+
+func (p *parser) segment() (segment, error) {
+ if _, err := p.accept("*"); err == nil {
+ return wildcard{}, nil
+ }
+ if _, err := p.accept("**"); err == nil {
+ return deepWildcard{}, nil
+ }
+ if l, err := p.literal(); err == nil {
+ return l, nil
+ }
+
+ v, err := p.variable()
+ if err != nil {
+ return nil, fmt.Errorf("segment neither wildcards, literal or variable: %w", err)
+ }
+ return v, nil
+}
+
+func (p *parser) literal() (segment, error) {
+ lit, err := p.accept(typeLiteral)
+ if err != nil {
+ return nil, err
+ }
+ return literal(lit), nil
+}
+
+func (p *parser) variable() (segment, error) {
+ if _, err := p.accept("{"); err != nil {
+ return nil, err
+ }
+
+ path, err := p.fieldPath()
+ if err != nil {
+ return nil, err
+ }
+
+ var segs []segment
+ if _, err := p.accept("="); err == nil {
+ segs, err = p.segments()
+ if err != nil {
+ return nil, fmt.Errorf("invalid segment in variable %q: %w", path, err)
+ }
+ } else {
+ segs = []segment{wildcard{}}
+ }
+
+ if _, err := p.accept("}"); err != nil {
+ return nil, fmt.Errorf("unterminated variable segment: %s", path)
+ }
+ return variable{
+ path: path,
+ segments: segs,
+ }, nil
+}
+
+func (p *parser) fieldPath() (string, error) {
+ c, err := p.accept(typeIdent)
+ if err != nil {
+ return "", err
+ }
+ components := []string{c}
+ for {
+ if _, err := p.accept("."); err != nil {
+ return strings.Join(components, "."), nil
+ }
+ c, err := p.accept(typeIdent)
+ if err != nil {
+ return "", fmt.Errorf("invalid field path component: %w", err)
+ }
+ components = append(components, c)
+ }
+}
+
+// A termType is a type of terminal symbols.
+type termType string
+
+// These constants define some of valid values of termType.
+// They improve readability of parse functions.
+//
+// You can also use "/", "*", "**", "." or "=" as valid values.
+const (
+ typeIdent = termType("ident")
+ typeLiteral = termType("literal")
+ typeEOF = termType("$")
+)
+
+// eof is the terminal symbol which always appears at the end of token sequence.
+const eof = "\u0000"
+
+// accept tries to accept a token in "p".
+// This function consumes a token and returns it if it matches to the specified "term".
+// If it doesn't match, the function does not consume any tokens and return an error.
+func (p *parser) accept(term termType) (string, error) {
+ t := p.tokens[0]
+ switch term {
+ case "/", "*", "**", ".", "=", "{", "}":
+ if t != string(term) && t != "/" {
+ return "", fmt.Errorf("expected %q but got %q", term, t)
+ }
+ case typeEOF:
+ if t != eof {
+ return "", fmt.Errorf("expected EOF but got %q", t)
+ }
+ case typeIdent:
+ if err := expectIdent(t); err != nil {
+ return "", err
+ }
+ case typeLiteral:
+ if err := expectPChars(t); err != nil {
+ return "", err
+ }
+ default:
+ return "", fmt.Errorf("unknown termType %q", term)
+ }
+ p.tokens = p.tokens[1:]
+ p.accepted = append(p.accepted, t)
+ return t, nil
+}
+
+// expectPChars determines if "t" consists of only pchars defined in RFC3986.
+//
+// https://www.ietf.org/rfc/rfc3986.txt, P.49
+//
+// pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
+// unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
+// sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
+// / "*" / "+" / "," / ";" / "="
+// pct-encoded = "%" HEXDIG HEXDIG
+func expectPChars(t string) error {
+ const (
+ init = iota
+ pct1
+ pct2
+ )
+ st := init
+ for _, r := range t {
+ if st != init {
+ if !isHexDigit(r) {
+ return fmt.Errorf("invalid hexdigit: %c(%U)", r, r)
+ }
+ switch st {
+ case pct1:
+ st = pct2
+ case pct2:
+ st = init
+ }
+ continue
+ }
+
+ // unreserved
+ switch {
+ case 'A' <= r && r <= 'Z':
+ continue
+ case 'a' <= r && r <= 'z':
+ continue
+ case '0' <= r && r <= '9':
+ continue
+ }
+ switch r {
+ case '-', '.', '_', '~':
+ // unreserved
+ case '!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '=':
+ // sub-delims
+ case ':', '@':
+ // rest of pchar
+ case '%':
+ // pct-encoded
+ st = pct1
+ default:
+ return fmt.Errorf("invalid character in path segment: %q(%U)", r, r)
+ }
+ }
+ if st != init {
+ return fmt.Errorf("invalid percent-encoding in %q", t)
+ }
+ return nil
+}
+
+// expectIdent determines if "ident" is a valid identifier in .proto schema ([[:alpha:]_][[:alphanum:]_]*).
+func expectIdent(ident string) error {
+ if ident == "" {
+ return errors.New("empty identifier")
+ }
+ for pos, r := range ident {
+ switch {
+ case '0' <= r && r <= '9':
+ if pos == 0 {
+ return fmt.Errorf("identifier starting with digit: %s", ident)
+ }
+ continue
+ case 'A' <= r && r <= 'Z':
+ continue
+ case 'a' <= r && r <= 'z':
+ continue
+ case r == '_':
+ continue
+ default:
+ return fmt.Errorf("invalid character %q(%U) in identifier: %s", r, r, ident)
+ }
+ }
+ return nil
+}
+
+func isHexDigit(r rune) bool {
+ switch {
+ case '0' <= r && r <= '9':
+ return true
+ case 'A' <= r && r <= 'F':
+ return true
+ case 'a' <= r && r <= 'f':
+ return true
+ }
+ return false
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/types.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/types.go
new file mode 100644
index 00000000..5a814a00
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/types.go
@@ -0,0 +1,60 @@
+package httprule
+
+import (
+ "fmt"
+ "strings"
+)
+
+type template struct {
+ segments []segment
+ verb string
+ template string
+}
+
+type segment interface {
+ fmt.Stringer
+ compile() (ops []op)
+}
+
+type wildcard struct{}
+
+type deepWildcard struct{}
+
+type literal string
+
+type variable struct {
+ path string
+ segments []segment
+}
+
+func (wildcard) String() string {
+ return "*"
+}
+
+func (deepWildcard) String() string {
+ return "**"
+}
+
+func (l literal) String() string {
+ return string(l)
+}
+
+func (v variable) String() string {
+ var segs []string
+ for _, s := range v.segments {
+ segs = append(segs, s.String())
+ }
+ return fmt.Sprintf("{%s=%s}", v.path, strings.Join(segs, "/"))
+}
+
+func (t template) String() string {
+ var segs []string
+ for _, s := range t.segments {
+ segs = append(segs, s.String())
+ }
+ str := strings.Join(segs, "/")
+ if t.verb != "" {
+ str = fmt.Sprintf("%s:%s", str, t.verb)
+ }
+ return "/" + str
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/BUILD.bazel b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/BUILD.bazel
new file mode 100644
index 00000000..a65d88eb
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/BUILD.bazel
@@ -0,0 +1,97 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+package(default_visibility = ["//visibility:public"])
+
+go_library(
+ name = "runtime",
+ srcs = [
+ "context.go",
+ "convert.go",
+ "doc.go",
+ "errors.go",
+ "fieldmask.go",
+ "handler.go",
+ "marshal_httpbodyproto.go",
+ "marshal_json.go",
+ "marshal_jsonpb.go",
+ "marshal_proto.go",
+ "marshaler.go",
+ "marshaler_registry.go",
+ "mux.go",
+ "pattern.go",
+ "proto2_convert.go",
+ "query.go",
+ ],
+ importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/runtime",
+ deps = [
+ "//internal/httprule",
+ "//utilities",
+ "@org_golang_google_genproto_googleapis_api//httpbody",
+ "@org_golang_google_grpc//codes",
+ "@org_golang_google_grpc//grpclog",
+ "@org_golang_google_grpc//health/grpc_health_v1",
+ "@org_golang_google_grpc//metadata",
+ "@org_golang_google_grpc//status",
+ "@org_golang_google_protobuf//encoding/protojson",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//reflect/protoreflect",
+ "@org_golang_google_protobuf//reflect/protoregistry",
+ "@org_golang_google_protobuf//types/known/durationpb",
+ "@org_golang_google_protobuf//types/known/fieldmaskpb",
+ "@org_golang_google_protobuf//types/known/structpb",
+ "@org_golang_google_protobuf//types/known/timestamppb",
+ "@org_golang_google_protobuf//types/known/wrapperspb",
+ ],
+)
+
+go_test(
+ name = "runtime_test",
+ size = "small",
+ srcs = [
+ "context_test.go",
+ "convert_test.go",
+ "errors_test.go",
+ "fieldmask_test.go",
+ "handler_test.go",
+ "marshal_httpbodyproto_test.go",
+ "marshal_json_test.go",
+ "marshal_jsonpb_test.go",
+ "marshal_proto_test.go",
+ "marshaler_registry_test.go",
+ "mux_internal_test.go",
+ "mux_test.go",
+ "pattern_test.go",
+ "query_fuzz_test.go",
+ "query_test.go",
+ ],
+ embed = [":runtime"],
+ deps = [
+ "//runtime/internal/examplepb",
+ "//utilities",
+ "@com_github_google_go_cmp//cmp",
+ "@com_github_google_go_cmp//cmp/cmpopts",
+ "@org_golang_google_genproto_googleapis_api//httpbody",
+ "@org_golang_google_genproto_googleapis_rpc//errdetails",
+ "@org_golang_google_genproto_googleapis_rpc//status",
+ "@org_golang_google_grpc//:grpc",
+ "@org_golang_google_grpc//codes",
+ "@org_golang_google_grpc//health/grpc_health_v1",
+ "@org_golang_google_grpc//metadata",
+ "@org_golang_google_grpc//status",
+ "@org_golang_google_protobuf//encoding/protojson",
+ "@org_golang_google_protobuf//proto",
+ "@org_golang_google_protobuf//testing/protocmp",
+ "@org_golang_google_protobuf//types/known/durationpb",
+ "@org_golang_google_protobuf//types/known/emptypb",
+ "@org_golang_google_protobuf//types/known/fieldmaskpb",
+ "@org_golang_google_protobuf//types/known/structpb",
+ "@org_golang_google_protobuf//types/known/timestamppb",
+ "@org_golang_google_protobuf//types/known/wrapperspb",
+ ],
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":runtime",
+ visibility = ["//visibility:public"],
+)
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go
new file mode 100644
index 00000000..2f2b3424
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go
@@ -0,0 +1,417 @@
+package runtime
+
+import (
+ "context"
+ "encoding/base64"
+ "fmt"
+ "net"
+ "net/http"
+ "net/textproto"
+ "strconv"
+ "strings"
+ "sync"
+ "time"
+
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+)
+
+// MetadataHeaderPrefix is the http prefix that represents custom metadata
+// parameters to or from a gRPC call.
+const MetadataHeaderPrefix = "Grpc-Metadata-"
+
+// MetadataPrefix is prepended to permanent HTTP header keys (as specified
+// by the IANA) when added to the gRPC context.
+const MetadataPrefix = "grpcgateway-"
+
+// MetadataTrailerPrefix is prepended to gRPC metadata as it is converted to
+// HTTP headers in a response handled by grpc-gateway
+const MetadataTrailerPrefix = "Grpc-Trailer-"
+
+const metadataGrpcTimeout = "Grpc-Timeout"
+const metadataHeaderBinarySuffix = "-Bin"
+
+const xForwardedFor = "X-Forwarded-For"
+const xForwardedHost = "X-Forwarded-Host"
+
+// DefaultContextTimeout is used for gRPC call context.WithTimeout whenever a Grpc-Timeout inbound
+// header isn't present. If the value is 0 the sent `context` will not have a timeout.
+var DefaultContextTimeout = 0 * time.Second
+
+// malformedHTTPHeaders lists the headers that the gRPC server may reject outright as malformed.
+// See https://github.com/grpc/grpc-go/pull/4803#issuecomment-986093310 for more context.
+var malformedHTTPHeaders = map[string]struct{}{
+ "connection": {},
+}
+
+type (
+ rpcMethodKey struct{}
+ httpPathPatternKey struct{}
+ httpPatternKey struct{}
+
+ AnnotateContextOption func(ctx context.Context) context.Context
+)
+
+func WithHTTPPathPattern(pattern string) AnnotateContextOption {
+ return func(ctx context.Context) context.Context {
+ return withHTTPPathPattern(ctx, pattern)
+ }
+}
+
+func decodeBinHeader(v string) ([]byte, error) {
+ if len(v)%4 == 0 {
+ // Input was padded, or padding was not necessary.
+ return base64.StdEncoding.DecodeString(v)
+ }
+ return base64.RawStdEncoding.DecodeString(v)
+}
+
+/*
+AnnotateContext adds context information such as metadata from the request.
+
+At a minimum, the RemoteAddr is included in the fashion of "X-Forwarded-For",
+except that the forwarded destination is not another HTTP service but rather
+a gRPC service.
+*/
+func AnnotateContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcMethodName string, options ...AnnotateContextOption) (context.Context, error) {
+ ctx, md, err := annotateContext(ctx, mux, req, rpcMethodName, options...)
+ if err != nil {
+ return nil, err
+ }
+ if md == nil {
+ return ctx, nil
+ }
+
+ return metadata.NewOutgoingContext(ctx, md), nil
+}
+
+// AnnotateIncomingContext adds context information such as metadata from the request.
+// Attach metadata as incoming context.
+func AnnotateIncomingContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcMethodName string, options ...AnnotateContextOption) (context.Context, error) {
+ ctx, md, err := annotateContext(ctx, mux, req, rpcMethodName, options...)
+ if err != nil {
+ return nil, err
+ }
+ if md == nil {
+ return ctx, nil
+ }
+
+ return metadata.NewIncomingContext(ctx, md), nil
+}
+
+func isValidGRPCMetadataKey(key string) bool {
+ // Must be a valid gRPC "Header-Name" as defined here:
+ // https://github.com/grpc/grpc/blob/4b05dc88b724214d0c725c8e7442cbc7a61b1374/doc/PROTOCOL-HTTP2.md
+ // This means 0-9 a-z _ - .
+ // Only lowercase letters are valid in the wire protocol, but the client library will normalize
+ // uppercase ASCII to lowercase, so uppercase ASCII is also acceptable.
+ bytes := []byte(key) // gRPC validates strings on the byte level, not Unicode.
+ for _, ch := range bytes {
+ validLowercaseLetter := ch >= 'a' && ch <= 'z'
+ validUppercaseLetter := ch >= 'A' && ch <= 'Z'
+ validDigit := ch >= '0' && ch <= '9'
+ validOther := ch == '.' || ch == '-' || ch == '_'
+ if !validLowercaseLetter && !validUppercaseLetter && !validDigit && !validOther {
+ return false
+ }
+ }
+ return true
+}
+
+func isValidGRPCMetadataTextValue(textValue string) bool {
+ // Must be a valid gRPC "ASCII-Value" as defined here:
+ // https://github.com/grpc/grpc/blob/4b05dc88b724214d0c725c8e7442cbc7a61b1374/doc/PROTOCOL-HTTP2.md
+ // This means printable ASCII (including/plus spaces); 0x20 to 0x7E inclusive.
+ bytes := []byte(textValue) // gRPC validates strings on the byte level, not Unicode.
+ for _, ch := range bytes {
+ if ch < 0x20 || ch > 0x7E {
+ return false
+ }
+ }
+ return true
+}
+
+func annotateContext(ctx context.Context, mux *ServeMux, req *http.Request, rpcMethodName string, options ...AnnotateContextOption) (context.Context, metadata.MD, error) {
+ ctx = withRPCMethod(ctx, rpcMethodName)
+ for _, o := range options {
+ ctx = o(ctx)
+ }
+ timeout := DefaultContextTimeout
+ if tm := req.Header.Get(metadataGrpcTimeout); tm != "" {
+ var err error
+ timeout, err = timeoutDecode(tm)
+ if err != nil {
+ return nil, nil, status.Errorf(codes.InvalidArgument, "invalid grpc-timeout: %s", tm)
+ }
+ }
+ var pairs []string
+ for key, vals := range req.Header {
+ key = textproto.CanonicalMIMEHeaderKey(key)
+ switch key {
+ case xForwardedFor, xForwardedHost:
+ // Handled separately below
+ continue
+ }
+
+ for _, val := range vals {
+ // For backwards-compatibility, pass through 'authorization' header with no prefix.
+ if key == "Authorization" {
+ pairs = append(pairs, "authorization", val)
+ }
+ if h, ok := mux.incomingHeaderMatcher(key); ok {
+ if !isValidGRPCMetadataKey(h) {
+ grpclog.Errorf("HTTP header name %q is not valid as gRPC metadata key; skipping", h)
+ continue
+ }
+ // Handles "-bin" metadata in grpc, since grpc will do another base64
+ // encode before sending to server, we need to decode it first.
+ if strings.HasSuffix(key, metadataHeaderBinarySuffix) {
+ b, err := decodeBinHeader(val)
+ if err != nil {
+ return nil, nil, status.Errorf(codes.InvalidArgument, "invalid binary header %s: %s", key, err)
+ }
+
+ val = string(b)
+ } else if !isValidGRPCMetadataTextValue(val) {
+ grpclog.Errorf("Value of HTTP header %q contains non-ASCII value (not valid as gRPC metadata): skipping", h)
+ continue
+ }
+ pairs = append(pairs, h, val)
+ }
+ }
+ }
+ if host := req.Header.Get(xForwardedHost); host != "" {
+ pairs = append(pairs, strings.ToLower(xForwardedHost), host)
+ } else if req.Host != "" {
+ pairs = append(pairs, strings.ToLower(xForwardedHost), req.Host)
+ }
+
+ xff := req.Header.Values(xForwardedFor)
+ if addr := req.RemoteAddr; addr != "" {
+ if remoteIP, _, err := net.SplitHostPort(addr); err == nil {
+ xff = append(xff, remoteIP)
+ }
+ }
+ if len(xff) > 0 {
+ pairs = append(pairs, strings.ToLower(xForwardedFor), strings.Join(xff, ", "))
+ }
+
+ if timeout != 0 {
+ ctx, _ = context.WithTimeout(ctx, timeout)
+ }
+ if len(pairs) == 0 {
+ return ctx, nil, nil
+ }
+ md := metadata.Pairs(pairs...)
+ for _, mda := range mux.metadataAnnotators {
+ md = metadata.Join(md, mda(ctx, req))
+ }
+ return ctx, md, nil
+}
+
+// ServerMetadata consists of metadata sent from gRPC server.
+type ServerMetadata struct {
+ HeaderMD metadata.MD
+ TrailerMD metadata.MD
+}
+
+type serverMetadataKey struct{}
+
+// NewServerMetadataContext creates a new context with ServerMetadata
+func NewServerMetadataContext(ctx context.Context, md ServerMetadata) context.Context {
+ if ctx == nil {
+ ctx = context.Background()
+ }
+ return context.WithValue(ctx, serverMetadataKey{}, md)
+}
+
+// ServerMetadataFromContext returns the ServerMetadata in ctx
+func ServerMetadataFromContext(ctx context.Context) (md ServerMetadata, ok bool) {
+ if ctx == nil {
+ return md, false
+ }
+ md, ok = ctx.Value(serverMetadataKey{}).(ServerMetadata)
+ return
+}
+
+// ServerTransportStream implements grpc.ServerTransportStream.
+// It should only be used by the generated files to support grpc.SendHeader
+// outside of gRPC server use.
+type ServerTransportStream struct {
+ mu sync.Mutex
+ header metadata.MD
+ trailer metadata.MD
+}
+
+// Method returns the method for the stream.
+func (s *ServerTransportStream) Method() string {
+ return ""
+}
+
+// Header returns the header metadata of the stream.
+func (s *ServerTransportStream) Header() metadata.MD {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.header.Copy()
+}
+
+// SetHeader sets the header metadata.
+func (s *ServerTransportStream) SetHeader(md metadata.MD) error {
+ if md.Len() == 0 {
+ return nil
+ }
+
+ s.mu.Lock()
+ s.header = metadata.Join(s.header, md)
+ s.mu.Unlock()
+ return nil
+}
+
+// SendHeader sets the header metadata.
+func (s *ServerTransportStream) SendHeader(md metadata.MD) error {
+ return s.SetHeader(md)
+}
+
+// Trailer returns the cached trailer metadata.
+func (s *ServerTransportStream) Trailer() metadata.MD {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.trailer.Copy()
+}
+
+// SetTrailer sets the trailer metadata.
+func (s *ServerTransportStream) SetTrailer(md metadata.MD) error {
+ if md.Len() == 0 {
+ return nil
+ }
+
+ s.mu.Lock()
+ s.trailer = metadata.Join(s.trailer, md)
+ s.mu.Unlock()
+ return nil
+}
+
+func timeoutDecode(s string) (time.Duration, error) {
+ size := len(s)
+ if size < 2 {
+ return 0, fmt.Errorf("timeout string is too short: %q", s)
+ }
+ d, ok := timeoutUnitToDuration(s[size-1])
+ if !ok {
+ return 0, fmt.Errorf("timeout unit is not recognized: %q", s)
+ }
+ t, err := strconv.ParseInt(s[:size-1], 10, 64)
+ if err != nil {
+ return 0, err
+ }
+ return d * time.Duration(t), nil
+}
+
+func timeoutUnitToDuration(u uint8) (d time.Duration, ok bool) {
+ switch u {
+ case 'H':
+ return time.Hour, true
+ case 'M':
+ return time.Minute, true
+ case 'S':
+ return time.Second, true
+ case 'm':
+ return time.Millisecond, true
+ case 'u':
+ return time.Microsecond, true
+ case 'n':
+ return time.Nanosecond, true
+ default:
+ return
+ }
+}
+
+// isPermanentHTTPHeader checks whether hdr belongs to the list of
+// permanent request headers maintained by IANA.
+// http://www.iana.org/assignments/message-headers/message-headers.xml
+func isPermanentHTTPHeader(hdr string) bool {
+ switch hdr {
+ case
+ "Accept",
+ "Accept-Charset",
+ "Accept-Language",
+ "Accept-Ranges",
+ "Authorization",
+ "Cache-Control",
+ "Content-Type",
+ "Cookie",
+ "Date",
+ "Expect",
+ "From",
+ "Host",
+ "If-Match",
+ "If-Modified-Since",
+ "If-None-Match",
+ "If-Schedule-Tag-Match",
+ "If-Unmodified-Since",
+ "Max-Forwards",
+ "Origin",
+ "Pragma",
+ "Referer",
+ "User-Agent",
+ "Via",
+ "Warning":
+ return true
+ }
+ return false
+}
+
+// isMalformedHTTPHeader checks whether header belongs to the list of
+// "malformed headers" and would be rejected by the gRPC server.
+func isMalformedHTTPHeader(header string) bool {
+ _, isMalformed := malformedHTTPHeaders[strings.ToLower(header)]
+ return isMalformed
+}
+
+// RPCMethod returns the method string for the server context. The returned
+// string is in the format of "/package.service/method".
+func RPCMethod(ctx context.Context) (string, bool) {
+ m := ctx.Value(rpcMethodKey{})
+ if m == nil {
+ return "", false
+ }
+ ms, ok := m.(string)
+ if !ok {
+ return "", false
+ }
+ return ms, true
+}
+
+func withRPCMethod(ctx context.Context, rpcMethodName string) context.Context {
+ return context.WithValue(ctx, rpcMethodKey{}, rpcMethodName)
+}
+
+// HTTPPathPattern returns the HTTP path pattern string relating to the HTTP handler, if one exists.
+// The format of the returned string is defined by the google.api.http path template type.
+func HTTPPathPattern(ctx context.Context) (string, bool) {
+ m := ctx.Value(httpPathPatternKey{})
+ if m == nil {
+ return "", false
+ }
+ ms, ok := m.(string)
+ if !ok {
+ return "", false
+ }
+ return ms, true
+}
+
+func withHTTPPathPattern(ctx context.Context, httpPathPattern string) context.Context {
+ return context.WithValue(ctx, httpPathPatternKey{}, httpPathPattern)
+}
+
+// HTTPPattern returns the HTTP path pattern struct relating to the HTTP handler, if one exists.
+func HTTPPattern(ctx context.Context) (Pattern, bool) {
+ v, ok := ctx.Value(httpPatternKey{}).(Pattern)
+ return v, ok
+}
+
+func withHTTPPattern(ctx context.Context, httpPattern Pattern) context.Context {
+ return context.WithValue(ctx, httpPatternKey{}, httpPattern)
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go
new file mode 100644
index 00000000..2e50082a
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go
@@ -0,0 +1,318 @@
+package runtime
+
+import (
+ "encoding/base64"
+ "fmt"
+ "strconv"
+ "strings"
+
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/types/known/durationpb"
+ "google.golang.org/protobuf/types/known/timestamppb"
+ "google.golang.org/protobuf/types/known/wrapperspb"
+)
+
+// String just returns the given string.
+// It is just for compatibility to other types.
+func String(val string) (string, error) {
+ return val, nil
+}
+
+// StringSlice converts 'val' where individual strings are separated by
+// 'sep' into a string slice.
+func StringSlice(val, sep string) ([]string, error) {
+ return strings.Split(val, sep), nil
+}
+
+// Bool converts the given string representation of a boolean value into bool.
+func Bool(val string) (bool, error) {
+ return strconv.ParseBool(val)
+}
+
+// BoolSlice converts 'val' where individual booleans are separated by
+// 'sep' into a bool slice.
+func BoolSlice(val, sep string) ([]bool, error) {
+ s := strings.Split(val, sep)
+ values := make([]bool, len(s))
+ for i, v := range s {
+ value, err := Bool(v)
+ if err != nil {
+ return nil, err
+ }
+ values[i] = value
+ }
+ return values, nil
+}
+
+// Float64 converts the given string representation into representation of a floating point number into float64.
+func Float64(val string) (float64, error) {
+ return strconv.ParseFloat(val, 64)
+}
+
+// Float64Slice converts 'val' where individual floating point numbers are separated by
+// 'sep' into a float64 slice.
+func Float64Slice(val, sep string) ([]float64, error) {
+ s := strings.Split(val, sep)
+ values := make([]float64, len(s))
+ for i, v := range s {
+ value, err := Float64(v)
+ if err != nil {
+ return nil, err
+ }
+ values[i] = value
+ }
+ return values, nil
+}
+
+// Float32 converts the given string representation of a floating point number into float32.
+func Float32(val string) (float32, error) {
+ f, err := strconv.ParseFloat(val, 32)
+ if err != nil {
+ return 0, err
+ }
+ return float32(f), nil
+}
+
+// Float32Slice converts 'val' where individual floating point numbers are separated by
+// 'sep' into a float32 slice.
+func Float32Slice(val, sep string) ([]float32, error) {
+ s := strings.Split(val, sep)
+ values := make([]float32, len(s))
+ for i, v := range s {
+ value, err := Float32(v)
+ if err != nil {
+ return nil, err
+ }
+ values[i] = value
+ }
+ return values, nil
+}
+
+// Int64 converts the given string representation of an integer into int64.
+func Int64(val string) (int64, error) {
+ return strconv.ParseInt(val, 0, 64)
+}
+
+// Int64Slice converts 'val' where individual integers are separated by
+// 'sep' into an int64 slice.
+func Int64Slice(val, sep string) ([]int64, error) {
+ s := strings.Split(val, sep)
+ values := make([]int64, len(s))
+ for i, v := range s {
+ value, err := Int64(v)
+ if err != nil {
+ return nil, err
+ }
+ values[i] = value
+ }
+ return values, nil
+}
+
+// Int32 converts the given string representation of an integer into int32.
+func Int32(val string) (int32, error) {
+ i, err := strconv.ParseInt(val, 0, 32)
+ if err != nil {
+ return 0, err
+ }
+ return int32(i), nil
+}
+
+// Int32Slice converts 'val' where individual integers are separated by
+// 'sep' into an int32 slice.
+func Int32Slice(val, sep string) ([]int32, error) {
+ s := strings.Split(val, sep)
+ values := make([]int32, len(s))
+ for i, v := range s {
+ value, err := Int32(v)
+ if err != nil {
+ return nil, err
+ }
+ values[i] = value
+ }
+ return values, nil
+}
+
+// Uint64 converts the given string representation of an integer into uint64.
+func Uint64(val string) (uint64, error) {
+ return strconv.ParseUint(val, 0, 64)
+}
+
+// Uint64Slice converts 'val' where individual integers are separated by
+// 'sep' into a uint64 slice.
+func Uint64Slice(val, sep string) ([]uint64, error) {
+ s := strings.Split(val, sep)
+ values := make([]uint64, len(s))
+ for i, v := range s {
+ value, err := Uint64(v)
+ if err != nil {
+ return nil, err
+ }
+ values[i] = value
+ }
+ return values, nil
+}
+
+// Uint32 converts the given string representation of an integer into uint32.
+func Uint32(val string) (uint32, error) {
+ i, err := strconv.ParseUint(val, 0, 32)
+ if err != nil {
+ return 0, err
+ }
+ return uint32(i), nil
+}
+
+// Uint32Slice converts 'val' where individual integers are separated by
+// 'sep' into a uint32 slice.
+func Uint32Slice(val, sep string) ([]uint32, error) {
+ s := strings.Split(val, sep)
+ values := make([]uint32, len(s))
+ for i, v := range s {
+ value, err := Uint32(v)
+ if err != nil {
+ return nil, err
+ }
+ values[i] = value
+ }
+ return values, nil
+}
+
+// Bytes converts the given string representation of a byte sequence into a slice of bytes
+// A bytes sequence is encoded in URL-safe base64 without padding
+func Bytes(val string) ([]byte, error) {
+ b, err := base64.StdEncoding.DecodeString(val)
+ if err != nil {
+ b, err = base64.URLEncoding.DecodeString(val)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return b, nil
+}
+
+// BytesSlice converts 'val' where individual bytes sequences, encoded in URL-safe
+// base64 without padding, are separated by 'sep' into a slice of byte slices.
+func BytesSlice(val, sep string) ([][]byte, error) {
+ s := strings.Split(val, sep)
+ values := make([][]byte, len(s))
+ for i, v := range s {
+ value, err := Bytes(v)
+ if err != nil {
+ return nil, err
+ }
+ values[i] = value
+ }
+ return values, nil
+}
+
+// Timestamp converts the given RFC3339 formatted string into a timestamp.Timestamp.
+func Timestamp(val string) (*timestamppb.Timestamp, error) {
+ var r timestamppb.Timestamp
+ val = strconv.Quote(strings.Trim(val, `"`))
+ unmarshaler := &protojson.UnmarshalOptions{}
+ if err := unmarshaler.Unmarshal([]byte(val), &r); err != nil {
+ return nil, err
+ }
+ return &r, nil
+}
+
+// Duration converts the given string into a timestamp.Duration.
+func Duration(val string) (*durationpb.Duration, error) {
+ var r durationpb.Duration
+ val = strconv.Quote(strings.Trim(val, `"`))
+ unmarshaler := &protojson.UnmarshalOptions{}
+ if err := unmarshaler.Unmarshal([]byte(val), &r); err != nil {
+ return nil, err
+ }
+ return &r, nil
+}
+
+// Enum converts the given string into an int32 that should be type casted into the
+// correct enum proto type.
+func Enum(val string, enumValMap map[string]int32) (int32, error) {
+ e, ok := enumValMap[val]
+ if ok {
+ return e, nil
+ }
+
+ i, err := Int32(val)
+ if err != nil {
+ return 0, fmt.Errorf("%s is not valid", val)
+ }
+ for _, v := range enumValMap {
+ if v == i {
+ return i, nil
+ }
+ }
+ return 0, fmt.Errorf("%s is not valid", val)
+}
+
+// EnumSlice converts 'val' where individual enums are separated by 'sep'
+// into a int32 slice. Each individual int32 should be type casted into the
+// correct enum proto type.
+func EnumSlice(val, sep string, enumValMap map[string]int32) ([]int32, error) {
+ s := strings.Split(val, sep)
+ values := make([]int32, len(s))
+ for i, v := range s {
+ value, err := Enum(v, enumValMap)
+ if err != nil {
+ return nil, err
+ }
+ values[i] = value
+ }
+ return values, nil
+}
+
+// Support for google.protobuf.wrappers on top of primitive types
+
+// StringValue well-known type support as wrapper around string type
+func StringValue(val string) (*wrapperspb.StringValue, error) {
+ return wrapperspb.String(val), nil
+}
+
+// FloatValue well-known type support as wrapper around float32 type
+func FloatValue(val string) (*wrapperspb.FloatValue, error) {
+ parsedVal, err := Float32(val)
+ return wrapperspb.Float(parsedVal), err
+}
+
+// DoubleValue well-known type support as wrapper around float64 type
+func DoubleValue(val string) (*wrapperspb.DoubleValue, error) {
+ parsedVal, err := Float64(val)
+ return wrapperspb.Double(parsedVal), err
+}
+
+// BoolValue well-known type support as wrapper around bool type
+func BoolValue(val string) (*wrapperspb.BoolValue, error) {
+ parsedVal, err := Bool(val)
+ return wrapperspb.Bool(parsedVal), err
+}
+
+// Int32Value well-known type support as wrapper around int32 type
+func Int32Value(val string) (*wrapperspb.Int32Value, error) {
+ parsedVal, err := Int32(val)
+ return wrapperspb.Int32(parsedVal), err
+}
+
+// UInt32Value well-known type support as wrapper around uint32 type
+func UInt32Value(val string) (*wrapperspb.UInt32Value, error) {
+ parsedVal, err := Uint32(val)
+ return wrapperspb.UInt32(parsedVal), err
+}
+
+// Int64Value well-known type support as wrapper around int64 type
+func Int64Value(val string) (*wrapperspb.Int64Value, error) {
+ parsedVal, err := Int64(val)
+ return wrapperspb.Int64(parsedVal), err
+}
+
+// UInt64Value well-known type support as wrapper around uint64 type
+func UInt64Value(val string) (*wrapperspb.UInt64Value, error) {
+ parsedVal, err := Uint64(val)
+ return wrapperspb.UInt64(parsedVal), err
+}
+
+// BytesValue well-known type support as wrapper around bytes[] type
+func BytesValue(val string) (*wrapperspb.BytesValue, error) {
+ parsedVal, err := Bytes(val)
+ return wrapperspb.Bytes(parsedVal), err
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/doc.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/doc.go
new file mode 100644
index 00000000..b6e5ddf7
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/doc.go
@@ -0,0 +1,5 @@
+/*
+Package runtime contains runtime helper functions used by
+servers which protoc-gen-grpc-gateway generates.
+*/
+package runtime
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go
new file mode 100644
index 00000000..41cd4f50
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go
@@ -0,0 +1,206 @@
+package runtime
+
+import (
+ "context"
+ "errors"
+ "io"
+ "net/http"
+
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/status"
+)
+
+// ErrorHandlerFunc is the signature used to configure error handling.
+type ErrorHandlerFunc func(context.Context, *ServeMux, Marshaler, http.ResponseWriter, *http.Request, error)
+
+// StreamErrorHandlerFunc is the signature used to configure stream error handling.
+type StreamErrorHandlerFunc func(context.Context, error) *status.Status
+
+// RoutingErrorHandlerFunc is the signature used to configure error handling for routing errors.
+type RoutingErrorHandlerFunc func(context.Context, *ServeMux, Marshaler, http.ResponseWriter, *http.Request, int)
+
+// HTTPStatusError is the error to use when needing to provide a different HTTP status code for an error
+// passed to the DefaultRoutingErrorHandler.
+type HTTPStatusError struct {
+ HTTPStatus int
+ Err error
+}
+
+func (e *HTTPStatusError) Error() string {
+ return e.Err.Error()
+}
+
+// HTTPStatusFromCode converts a gRPC error code into the corresponding HTTP response status.
+// See: https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
+func HTTPStatusFromCode(code codes.Code) int {
+ switch code {
+ case codes.OK:
+ return http.StatusOK
+ case codes.Canceled:
+ return 499
+ case codes.Unknown:
+ return http.StatusInternalServerError
+ case codes.InvalidArgument:
+ return http.StatusBadRequest
+ case codes.DeadlineExceeded:
+ return http.StatusGatewayTimeout
+ case codes.NotFound:
+ return http.StatusNotFound
+ case codes.AlreadyExists:
+ return http.StatusConflict
+ case codes.PermissionDenied:
+ return http.StatusForbidden
+ case codes.Unauthenticated:
+ return http.StatusUnauthorized
+ case codes.ResourceExhausted:
+ return http.StatusTooManyRequests
+ case codes.FailedPrecondition:
+ // Note, this deliberately doesn't translate to the similarly named '412 Precondition Failed' HTTP response status.
+ return http.StatusBadRequest
+ case codes.Aborted:
+ return http.StatusConflict
+ case codes.OutOfRange:
+ return http.StatusBadRequest
+ case codes.Unimplemented:
+ return http.StatusNotImplemented
+ case codes.Internal:
+ return http.StatusInternalServerError
+ case codes.Unavailable:
+ return http.StatusServiceUnavailable
+ case codes.DataLoss:
+ return http.StatusInternalServerError
+ default:
+ grpclog.Warningf("Unknown gRPC error code: %v", code)
+ return http.StatusInternalServerError
+ }
+}
+
+// HTTPError uses the mux-configured error handler.
+func HTTPError(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, r *http.Request, err error) {
+ mux.errorHandler(ctx, mux, marshaler, w, r, err)
+}
+
+// HTTPStreamError uses the mux-configured stream error handler to notify error to the client without closing the connection.
+func HTTPStreamError(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, r *http.Request, err error) {
+ st := mux.streamErrorHandler(ctx, err)
+ msg := errorChunk(st)
+ buf, err := marshaler.Marshal(msg)
+ if err != nil {
+ grpclog.Errorf("Failed to marshal an error: %v", err)
+ return
+ }
+ if _, err := w.Write(buf); err != nil {
+ grpclog.Errorf("Failed to notify error to client: %v", err)
+ return
+ }
+}
+
+// DefaultHTTPErrorHandler is the default error handler.
+// If "err" is a gRPC Status, the function replies with the status code mapped by HTTPStatusFromCode.
+// If "err" is a HTTPStatusError, the function replies with the status code provide by that struct. This is
+// intended to allow passing through of specific statuses via the function set via WithRoutingErrorHandler
+// for the ServeMux constructor to handle edge cases which the standard mappings in HTTPStatusFromCode
+// are insufficient for.
+// If otherwise, it replies with http.StatusInternalServerError.
+//
+// The response body written by this function is a Status message marshaled by the Marshaler.
+func DefaultHTTPErrorHandler(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, r *http.Request, err error) {
+ // return Internal when Marshal failed
+ const fallback = `{"code": 13, "message": "failed to marshal error message"}`
+ const fallbackRewriter = `{"code": 13, "message": "failed to rewrite error message"}`
+
+ var customStatus *HTTPStatusError
+ if errors.As(err, &customStatus) {
+ err = customStatus.Err
+ }
+
+ s := status.Convert(err)
+
+ w.Header().Del("Trailer")
+ w.Header().Del("Transfer-Encoding")
+
+ respRw, err := mux.forwardResponseRewriter(ctx, s.Proto())
+ if err != nil {
+ grpclog.Errorf("Failed to rewrite error message %q: %v", s, err)
+ w.WriteHeader(http.StatusInternalServerError)
+ if _, err := io.WriteString(w, fallbackRewriter); err != nil {
+ grpclog.Errorf("Failed to write response: %v", err)
+ }
+ return
+ }
+
+ contentType := marshaler.ContentType(respRw)
+ w.Header().Set("Content-Type", contentType)
+
+ if s.Code() == codes.Unauthenticated {
+ w.Header().Set("WWW-Authenticate", s.Message())
+ }
+
+ buf, merr := marshaler.Marshal(respRw)
+ if merr != nil {
+ grpclog.Errorf("Failed to marshal error message %q: %v", s, merr)
+ w.WriteHeader(http.StatusInternalServerError)
+ if _, err := io.WriteString(w, fallback); err != nil {
+ grpclog.Errorf("Failed to write response: %v", err)
+ }
+ return
+ }
+
+ md, ok := ServerMetadataFromContext(ctx)
+ if !ok {
+ grpclog.Error("Failed to extract ServerMetadata from context")
+ }
+
+ handleForwardResponseServerMetadata(w, mux, md)
+
+ // RFC 7230 https://tools.ietf.org/html/rfc7230#section-4.1.2
+ // Unless the request includes a TE header field indicating "trailers"
+ // is acceptable, as described in Section 4.3, a server SHOULD NOT
+ // generate trailer fields that it believes are necessary for the user
+ // agent to receive.
+ doForwardTrailers := requestAcceptsTrailers(r)
+
+ if doForwardTrailers {
+ handleForwardResponseTrailerHeader(w, mux, md)
+ w.Header().Set("Transfer-Encoding", "chunked")
+ }
+
+ st := HTTPStatusFromCode(s.Code())
+ if customStatus != nil {
+ st = customStatus.HTTPStatus
+ }
+
+ w.WriteHeader(st)
+ if _, err := w.Write(buf); err != nil {
+ grpclog.Errorf("Failed to write response: %v", err)
+ }
+
+ if doForwardTrailers {
+ handleForwardResponseTrailer(w, mux, md)
+ }
+}
+
+func DefaultStreamErrorHandler(_ context.Context, err error) *status.Status {
+ return status.Convert(err)
+}
+
+// DefaultRoutingErrorHandler is our default handler for routing errors.
+// By default http error codes mapped on the following error codes:
+//
+// NotFound -> grpc.NotFound
+// StatusBadRequest -> grpc.InvalidArgument
+// MethodNotAllowed -> grpc.Unimplemented
+// Other -> grpc.Internal, method is not expecting to be called for anything else
+func DefaultRoutingErrorHandler(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, r *http.Request, httpStatus int) {
+ sterr := status.Error(codes.Internal, "Unexpected routing error")
+ switch httpStatus {
+ case http.StatusBadRequest:
+ sterr = status.Error(codes.InvalidArgument, http.StatusText(httpStatus))
+ case http.StatusMethodNotAllowed:
+ sterr = status.Error(codes.Unimplemented, http.StatusText(httpStatus))
+ case http.StatusNotFound:
+ sterr = status.Error(codes.NotFound, http.StatusText(httpStatus))
+ }
+ mux.errorHandler(ctx, mux, marshaler, w, r, sterr)
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go
new file mode 100644
index 00000000..2fcd7af3
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go
@@ -0,0 +1,168 @@
+package runtime
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "sort"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ field_mask "google.golang.org/protobuf/types/known/fieldmaskpb"
+)
+
+func getFieldByName(fields protoreflect.FieldDescriptors, name string) protoreflect.FieldDescriptor {
+ fd := fields.ByName(protoreflect.Name(name))
+ if fd != nil {
+ return fd
+ }
+
+ return fields.ByJSONName(name)
+}
+
+// FieldMaskFromRequestBody creates a FieldMask printing all complete paths from the JSON body.
+func FieldMaskFromRequestBody(r io.Reader, msg proto.Message) (*field_mask.FieldMask, error) {
+ fm := &field_mask.FieldMask{}
+ var root interface{}
+
+ if err := json.NewDecoder(r).Decode(&root); err != nil {
+ if errors.Is(err, io.EOF) {
+ return fm, nil
+ }
+ return nil, err
+ }
+
+ queue := []fieldMaskPathItem{{node: root, msg: msg.ProtoReflect()}}
+ for len(queue) > 0 {
+ // dequeue an item
+ item := queue[0]
+ queue = queue[1:]
+
+ m, ok := item.node.(map[string]interface{})
+ switch {
+ case ok && len(m) > 0:
+ // if the item is an object, then enqueue all of its children
+ for k, v := range m {
+ if item.msg == nil {
+ return nil, errors.New("JSON structure did not match request type")
+ }
+
+ fd := getFieldByName(item.msg.Descriptor().Fields(), k)
+ if fd == nil {
+ return nil, fmt.Errorf("could not find field %q in %q", k, item.msg.Descriptor().FullName())
+ }
+
+ if isDynamicProtoMessage(fd.Message()) {
+ for _, p := range buildPathsBlindly(string(fd.FullName().Name()), v) {
+ newPath := p
+ if item.path != "" {
+ newPath = item.path + "." + newPath
+ }
+ queue = append(queue, fieldMaskPathItem{path: newPath})
+ }
+ continue
+ }
+
+ if isProtobufAnyMessage(fd.Message()) && !fd.IsList() {
+ _, hasTypeField := v.(map[string]interface{})["@type"]
+ if hasTypeField {
+ queue = append(queue, fieldMaskPathItem{path: k})
+ continue
+ } else {
+ return nil, fmt.Errorf("could not find field @type in %q in message %q", k, item.msg.Descriptor().FullName())
+ }
+
+ }
+
+ child := fieldMaskPathItem{
+ node: v,
+ }
+ if item.path == "" {
+ child.path = string(fd.FullName().Name())
+ } else {
+ child.path = item.path + "." + string(fd.FullName().Name())
+ }
+
+ switch {
+ case fd.IsList(), fd.IsMap():
+ // As per: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto#L85-L86
+ // Do not recurse into repeated fields. The repeated field goes on the end of the path and we stop.
+ fm.Paths = append(fm.Paths, child.path)
+ case fd.Message() != nil:
+ child.msg = item.msg.Get(fd).Message()
+ fallthrough
+ default:
+ queue = append(queue, child)
+ }
+ }
+ case ok && len(m) == 0:
+ fallthrough
+ case len(item.path) > 0:
+ // otherwise, it's a leaf node so print its path
+ fm.Paths = append(fm.Paths, item.path)
+ }
+ }
+
+ // Sort for deterministic output in the presence
+ // of repeated fields.
+ sort.Strings(fm.Paths)
+
+ return fm, nil
+}
+
+func isProtobufAnyMessage(md protoreflect.MessageDescriptor) bool {
+ return md != nil && (md.FullName() == "google.protobuf.Any")
+}
+
+func isDynamicProtoMessage(md protoreflect.MessageDescriptor) bool {
+ return md != nil && (md.FullName() == "google.protobuf.Struct" || md.FullName() == "google.protobuf.Value")
+}
+
+// buildPathsBlindly does not attempt to match proto field names to the
+// json value keys. Instead it relies completely on the structure of
+// the unmarshalled json contained within in.
+// Returns a slice containing all subpaths with the root at the
+// passed in name and json value.
+func buildPathsBlindly(name string, in interface{}) []string {
+ m, ok := in.(map[string]interface{})
+ if !ok {
+ return []string{name}
+ }
+
+ var paths []string
+ queue := []fieldMaskPathItem{{path: name, node: m}}
+ for len(queue) > 0 {
+ cur := queue[0]
+ queue = queue[1:]
+
+ m, ok := cur.node.(map[string]interface{})
+ if !ok {
+ // This should never happen since we should always check that we only add
+ // nodes of type map[string]interface{} to the queue.
+ continue
+ }
+ for k, v := range m {
+ if mi, ok := v.(map[string]interface{}); ok {
+ queue = append(queue, fieldMaskPathItem{path: cur.path + "." + k, node: mi})
+ } else {
+ // This is not a struct, so there are no more levels to descend.
+ curPath := cur.path + "." + k
+ paths = append(paths, curPath)
+ }
+ }
+ }
+ return paths
+}
+
+// fieldMaskPathItem stores an in-progress deconstruction of a path for a fieldmask
+type fieldMaskPathItem struct {
+ // the list of prior fields leading up to node connected by dots
+ path string
+
+ // a generic decoded json object the current item to inspect for further path extraction
+ node interface{}
+
+ // parent message
+ msg protoreflect.Message
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
new file mode 100644
index 00000000..f0727cf7
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go
@@ -0,0 +1,253 @@
+package runtime
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "net/textproto"
+ "strconv"
+ "strings"
+
+ "google.golang.org/genproto/googleapis/api/httpbody"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// ForwardResponseStream forwards the stream from gRPC server to REST client.
+func ForwardResponseStream(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, req *http.Request, recv func() (proto.Message, error), opts ...func(context.Context, http.ResponseWriter, proto.Message) error) {
+ rc := http.NewResponseController(w)
+ md, ok := ServerMetadataFromContext(ctx)
+ if !ok {
+ grpclog.Error("Failed to extract ServerMetadata from context")
+ http.Error(w, "unexpected error", http.StatusInternalServerError)
+ return
+ }
+ handleForwardResponseServerMetadata(w, mux, md)
+
+ w.Header().Set("Transfer-Encoding", "chunked")
+ if err := handleForwardResponseOptions(ctx, w, nil, opts); err != nil {
+ HTTPError(ctx, mux, marshaler, w, req, err)
+ return
+ }
+
+ var delimiter []byte
+ if d, ok := marshaler.(Delimited); ok {
+ delimiter = d.Delimiter()
+ } else {
+ delimiter = []byte("\n")
+ }
+
+ var wroteHeader bool
+ for {
+ resp, err := recv()
+ if errors.Is(err, io.EOF) {
+ return
+ }
+ if err != nil {
+ handleForwardResponseStreamError(ctx, wroteHeader, marshaler, w, req, mux, err, delimiter)
+ return
+ }
+ if err := handleForwardResponseOptions(ctx, w, resp, opts); err != nil {
+ handleForwardResponseStreamError(ctx, wroteHeader, marshaler, w, req, mux, err, delimiter)
+ return
+ }
+
+ respRw, err := mux.forwardResponseRewriter(ctx, resp)
+ if err != nil {
+ grpclog.Errorf("Rewrite error: %v", err)
+ handleForwardResponseStreamError(ctx, wroteHeader, marshaler, w, req, mux, err, delimiter)
+ return
+ }
+
+ if !wroteHeader {
+ var contentType string
+ if sct, ok := marshaler.(StreamContentType); ok {
+ contentType = sct.StreamContentType(respRw)
+ } else {
+ contentType = marshaler.ContentType(respRw)
+ }
+ w.Header().Set("Content-Type", contentType)
+ }
+
+ var buf []byte
+ httpBody, isHTTPBody := respRw.(*httpbody.HttpBody)
+ switch {
+ case respRw == nil:
+ buf, err = marshaler.Marshal(errorChunk(status.New(codes.Internal, "empty response")))
+ case isHTTPBody:
+ buf = httpBody.GetData()
+ default:
+ result := map[string]interface{}{"result": respRw}
+ if rb, ok := respRw.(responseBody); ok {
+ result["result"] = rb.XXX_ResponseBody()
+ }
+
+ buf, err = marshaler.Marshal(result)
+ }
+
+ if err != nil {
+ grpclog.Errorf("Failed to marshal response chunk: %v", err)
+ handleForwardResponseStreamError(ctx, wroteHeader, marshaler, w, req, mux, err, delimiter)
+ return
+ }
+ if _, err := w.Write(buf); err != nil {
+ grpclog.Errorf("Failed to send response chunk: %v", err)
+ return
+ }
+ wroteHeader = true
+ if _, err := w.Write(delimiter); err != nil {
+ grpclog.Errorf("Failed to send delimiter chunk: %v", err)
+ return
+ }
+ err = rc.Flush()
+ if err != nil {
+ if errors.Is(err, http.ErrNotSupported) {
+ grpclog.Errorf("Flush not supported in %T", w)
+ http.Error(w, "unexpected type of web server", http.StatusInternalServerError)
+ return
+ }
+ grpclog.Errorf("Failed to flush response to client: %v", err)
+ return
+ }
+ }
+}
+
+func handleForwardResponseServerMetadata(w http.ResponseWriter, mux *ServeMux, md ServerMetadata) {
+ for k, vs := range md.HeaderMD {
+ if h, ok := mux.outgoingHeaderMatcher(k); ok {
+ for _, v := range vs {
+ w.Header().Add(h, v)
+ }
+ }
+ }
+}
+
+func handleForwardResponseTrailerHeader(w http.ResponseWriter, mux *ServeMux, md ServerMetadata) {
+ for k := range md.TrailerMD {
+ if h, ok := mux.outgoingTrailerMatcher(k); ok {
+ w.Header().Add("Trailer", textproto.CanonicalMIMEHeaderKey(h))
+ }
+ }
+}
+
+func handleForwardResponseTrailer(w http.ResponseWriter, mux *ServeMux, md ServerMetadata) {
+ for k, vs := range md.TrailerMD {
+ if h, ok := mux.outgoingTrailerMatcher(k); ok {
+ for _, v := range vs {
+ w.Header().Add(h, v)
+ }
+ }
+ }
+}
+
+// responseBody interface contains method for getting field for marshaling to the response body
+// this method is generated for response struct from the value of `response_body` in the `google.api.HttpRule`
+type responseBody interface {
+ XXX_ResponseBody() interface{}
+}
+
+// ForwardResponseMessage forwards the message "resp" from gRPC server to REST client.
+func ForwardResponseMessage(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, req *http.Request, resp proto.Message, opts ...func(context.Context, http.ResponseWriter, proto.Message) error) {
+ md, ok := ServerMetadataFromContext(ctx)
+ if !ok {
+ grpclog.Error("Failed to extract ServerMetadata from context")
+ }
+
+ handleForwardResponseServerMetadata(w, mux, md)
+
+ // RFC 7230 https://tools.ietf.org/html/rfc7230#section-4.1.2
+ // Unless the request includes a TE header field indicating "trailers"
+ // is acceptable, as described in Section 4.3, a server SHOULD NOT
+ // generate trailer fields that it believes are necessary for the user
+ // agent to receive.
+ doForwardTrailers := requestAcceptsTrailers(req)
+
+ if doForwardTrailers {
+ handleForwardResponseTrailerHeader(w, mux, md)
+ w.Header().Set("Transfer-Encoding", "chunked")
+ }
+
+ contentType := marshaler.ContentType(resp)
+ w.Header().Set("Content-Type", contentType)
+
+ if err := handleForwardResponseOptions(ctx, w, resp, opts); err != nil {
+ HTTPError(ctx, mux, marshaler, w, req, err)
+ return
+ }
+ respRw, err := mux.forwardResponseRewriter(ctx, resp)
+ if err != nil {
+ grpclog.Errorf("Rewrite error: %v", err)
+ HTTPError(ctx, mux, marshaler, w, req, err)
+ return
+ }
+ var buf []byte
+ if rb, ok := respRw.(responseBody); ok {
+ buf, err = marshaler.Marshal(rb.XXX_ResponseBody())
+ } else {
+ buf, err = marshaler.Marshal(respRw)
+ }
+ if err != nil {
+ grpclog.Errorf("Marshal error: %v", err)
+ HTTPError(ctx, mux, marshaler, w, req, err)
+ return
+ }
+
+ if !doForwardTrailers && mux.writeContentLength {
+ w.Header().Set("Content-Length", strconv.Itoa(len(buf)))
+ }
+
+ if _, err = w.Write(buf); err != nil && !errors.Is(err, http.ErrBodyNotAllowed) {
+ grpclog.Errorf("Failed to write response: %v", err)
+ }
+
+ if doForwardTrailers {
+ handleForwardResponseTrailer(w, mux, md)
+ }
+}
+
+func requestAcceptsTrailers(req *http.Request) bool {
+ te := req.Header.Get("TE")
+ return strings.Contains(strings.ToLower(te), "trailers")
+}
+
+func handleForwardResponseOptions(ctx context.Context, w http.ResponseWriter, resp proto.Message, opts []func(context.Context, http.ResponseWriter, proto.Message) error) error {
+ if len(opts) == 0 {
+ return nil
+ }
+ for _, opt := range opts {
+ if err := opt(ctx, w, resp); err != nil {
+ return fmt.Errorf("error handling ForwardResponseOptions: %w", err)
+ }
+ }
+ return nil
+}
+
+func handleForwardResponseStreamError(ctx context.Context, wroteHeader bool, marshaler Marshaler, w http.ResponseWriter, req *http.Request, mux *ServeMux, err error, delimiter []byte) {
+ st := mux.streamErrorHandler(ctx, err)
+ msg := errorChunk(st)
+ if !wroteHeader {
+ w.Header().Set("Content-Type", marshaler.ContentType(msg))
+ w.WriteHeader(HTTPStatusFromCode(st.Code()))
+ }
+ buf, err := marshaler.Marshal(msg)
+ if err != nil {
+ grpclog.Errorf("Failed to marshal an error: %v", err)
+ return
+ }
+ if _, err := w.Write(buf); err != nil {
+ grpclog.Errorf("Failed to notify error to client: %v", err)
+ return
+ }
+ if _, err := w.Write(delimiter); err != nil {
+ grpclog.Errorf("Failed to send delimiter chunk: %v", err)
+ return
+ }
+}
+
+func errorChunk(st *status.Status) map[string]proto.Message {
+ return map[string]proto.Message{"error": st.Proto()}
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_httpbodyproto.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_httpbodyproto.go
new file mode 100644
index 00000000..6de2e220
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_httpbodyproto.go
@@ -0,0 +1,32 @@
+package runtime
+
+import (
+ "google.golang.org/genproto/googleapis/api/httpbody"
+)
+
+// HTTPBodyMarshaler is a Marshaler which supports marshaling of a
+// google.api.HttpBody message as the full response body if it is
+// the actual message used as the response. If not, then this will
+// simply fallback to the Marshaler specified as its default Marshaler.
+type HTTPBodyMarshaler struct {
+ Marshaler
+}
+
+// ContentType returns its specified content type in case v is a
+// google.api.HttpBody message, otherwise it will fall back to the default Marshalers
+// content type.
+func (h *HTTPBodyMarshaler) ContentType(v interface{}) string {
+ if httpBody, ok := v.(*httpbody.HttpBody); ok {
+ return httpBody.GetContentType()
+ }
+ return h.Marshaler.ContentType(v)
+}
+
+// Marshal marshals "v" by returning the body bytes if v is a
+// google.api.HttpBody message, otherwise it falls back to the default Marshaler.
+func (h *HTTPBodyMarshaler) Marshal(v interface{}) ([]byte, error) {
+ if httpBody, ok := v.(*httpbody.HttpBody); ok {
+ return httpBody.GetData(), nil
+ }
+ return h.Marshaler.Marshal(v)
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_json.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_json.go
new file mode 100644
index 00000000..fe52081a
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_json.go
@@ -0,0 +1,50 @@
+package runtime
+
+import (
+ "encoding/json"
+ "io"
+)
+
+// JSONBuiltin is a Marshaler which marshals/unmarshals into/from JSON
+// with the standard "encoding/json" package of Golang.
+// Although it is generally faster for simple proto messages than JSONPb,
+// it does not support advanced features of protobuf, e.g. map, oneof, ....
+//
+// The NewEncoder and NewDecoder types return *json.Encoder and
+// *json.Decoder respectively.
+type JSONBuiltin struct{}
+
+// ContentType always Returns "application/json".
+func (*JSONBuiltin) ContentType(_ interface{}) string {
+ return "application/json"
+}
+
+// Marshal marshals "v" into JSON
+func (j *JSONBuiltin) Marshal(v interface{}) ([]byte, error) {
+ return json.Marshal(v)
+}
+
+// MarshalIndent is like Marshal but applies Indent to format the output
+func (j *JSONBuiltin) MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) {
+ return json.MarshalIndent(v, prefix, indent)
+}
+
+// Unmarshal unmarshals JSON data into "v".
+func (j *JSONBuiltin) Unmarshal(data []byte, v interface{}) error {
+ return json.Unmarshal(data, v)
+}
+
+// NewDecoder returns a Decoder which reads JSON stream from "r".
+func (j *JSONBuiltin) NewDecoder(r io.Reader) Decoder {
+ return json.NewDecoder(r)
+}
+
+// NewEncoder returns an Encoder which writes JSON stream into "w".
+func (j *JSONBuiltin) NewEncoder(w io.Writer) Encoder {
+ return json.NewEncoder(w)
+}
+
+// Delimiter for newline encoded JSON streams.
+func (j *JSONBuiltin) Delimiter() []byte {
+ return []byte("\n")
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go
new file mode 100644
index 00000000..8376d1e0
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go
@@ -0,0 +1,349 @@
+package runtime
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "io"
+ "reflect"
+ "strconv"
+
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
+)
+
+// JSONPb is a Marshaler which marshals/unmarshals into/from JSON
+// with the "google.golang.org/protobuf/encoding/protojson" marshaler.
+// It supports the full functionality of protobuf unlike JSONBuiltin.
+//
+// The NewDecoder method returns a DecoderWrapper, so the underlying
+// *json.Decoder methods can be used.
+type JSONPb struct {
+ protojson.MarshalOptions
+ protojson.UnmarshalOptions
+}
+
+// ContentType always returns "application/json".
+func (*JSONPb) ContentType(_ interface{}) string {
+ return "application/json"
+}
+
+// Marshal marshals "v" into JSON.
+func (j *JSONPb) Marshal(v interface{}) ([]byte, error) {
+ var buf bytes.Buffer
+ if err := j.marshalTo(&buf, v); err != nil {
+ return nil, err
+ }
+ return buf.Bytes(), nil
+}
+
+func (j *JSONPb) marshalTo(w io.Writer, v interface{}) error {
+ p, ok := v.(proto.Message)
+ if !ok {
+ buf, err := j.marshalNonProtoField(v)
+ if err != nil {
+ return err
+ }
+ if j.Indent != "" {
+ b := &bytes.Buffer{}
+ if err := json.Indent(b, buf, "", j.Indent); err != nil {
+ return err
+ }
+ buf = b.Bytes()
+ }
+ _, err = w.Write(buf)
+ return err
+ }
+
+ b, err := j.MarshalOptions.Marshal(p)
+ if err != nil {
+ return err
+ }
+
+ _, err = w.Write(b)
+ return err
+}
+
+var (
+ // protoMessageType is stored to prevent constant lookup of the same type at runtime.
+ protoMessageType = reflect.TypeOf((*proto.Message)(nil)).Elem()
+)
+
+// marshalNonProto marshals a non-message field of a protobuf message.
+// This function does not correctly marshal arbitrary data structures into JSON,
+// it is only capable of marshaling non-message field values of protobuf,
+// i.e. primitive types, enums; pointers to primitives or enums; maps from
+// integer/string types to primitives/enums/pointers to messages.
+func (j *JSONPb) marshalNonProtoField(v interface{}) ([]byte, error) {
+ if v == nil {
+ return []byte("null"), nil
+ }
+ rv := reflect.ValueOf(v)
+ for rv.Kind() == reflect.Ptr {
+ if rv.IsNil() {
+ return []byte("null"), nil
+ }
+ rv = rv.Elem()
+ }
+
+ if rv.Kind() == reflect.Slice {
+ if rv.IsNil() {
+ if j.EmitUnpopulated {
+ return []byte("[]"), nil
+ }
+ return []byte("null"), nil
+ }
+
+ if rv.Type().Elem().Implements(protoMessageType) {
+ var buf bytes.Buffer
+ if err := buf.WriteByte('['); err != nil {
+ return nil, err
+ }
+ for i := 0; i < rv.Len(); i++ {
+ if i != 0 {
+ if err := buf.WriteByte(','); err != nil {
+ return nil, err
+ }
+ }
+ if err := j.marshalTo(&buf, rv.Index(i).Interface().(proto.Message)); err != nil {
+ return nil, err
+ }
+ }
+ if err := buf.WriteByte(']'); err != nil {
+ return nil, err
+ }
+
+ return buf.Bytes(), nil
+ }
+
+ if rv.Type().Elem().Implements(typeProtoEnum) {
+ var buf bytes.Buffer
+ if err := buf.WriteByte('['); err != nil {
+ return nil, err
+ }
+ for i := 0; i < rv.Len(); i++ {
+ if i != 0 {
+ if err := buf.WriteByte(','); err != nil {
+ return nil, err
+ }
+ }
+ var err error
+ if j.UseEnumNumbers {
+ _, err = buf.WriteString(strconv.FormatInt(rv.Index(i).Int(), 10))
+ } else {
+ _, err = buf.WriteString("\"" + rv.Index(i).Interface().(protoEnum).String() + "\"")
+ }
+ if err != nil {
+ return nil, err
+ }
+ }
+ if err := buf.WriteByte(']'); err != nil {
+ return nil, err
+ }
+
+ return buf.Bytes(), nil
+ }
+ }
+
+ if rv.Kind() == reflect.Map {
+ m := make(map[string]*json.RawMessage)
+ for _, k := range rv.MapKeys() {
+ buf, err := j.Marshal(rv.MapIndex(k).Interface())
+ if err != nil {
+ return nil, err
+ }
+ m[fmt.Sprintf("%v", k.Interface())] = (*json.RawMessage)(&buf)
+ }
+ return json.Marshal(m)
+ }
+ if enum, ok := rv.Interface().(protoEnum); ok && !j.UseEnumNumbers {
+ return json.Marshal(enum.String())
+ }
+ return json.Marshal(rv.Interface())
+}
+
+// Unmarshal unmarshals JSON "data" into "v"
+func (j *JSONPb) Unmarshal(data []byte, v interface{}) error {
+ return unmarshalJSONPb(data, j.UnmarshalOptions, v)
+}
+
+// NewDecoder returns a Decoder which reads JSON stream from "r".
+func (j *JSONPb) NewDecoder(r io.Reader) Decoder {
+ d := json.NewDecoder(r)
+ return DecoderWrapper{
+ Decoder: d,
+ UnmarshalOptions: j.UnmarshalOptions,
+ }
+}
+
+// DecoderWrapper is a wrapper around a *json.Decoder that adds
+// support for protos to the Decode method.
+type DecoderWrapper struct {
+ *json.Decoder
+ protojson.UnmarshalOptions
+}
+
+// Decode wraps the embedded decoder's Decode method to support
+// protos using a jsonpb.Unmarshaler.
+func (d DecoderWrapper) Decode(v interface{}) error {
+ return decodeJSONPb(d.Decoder, d.UnmarshalOptions, v)
+}
+
+// NewEncoder returns an Encoder which writes JSON stream into "w".
+func (j *JSONPb) NewEncoder(w io.Writer) Encoder {
+ return EncoderFunc(func(v interface{}) error {
+ if err := j.marshalTo(w, v); err != nil {
+ return err
+ }
+ // mimic json.Encoder by adding a newline (makes output
+ // easier to read when it contains multiple encoded items)
+ _, err := w.Write(j.Delimiter())
+ return err
+ })
+}
+
+func unmarshalJSONPb(data []byte, unmarshaler protojson.UnmarshalOptions, v interface{}) error {
+ d := json.NewDecoder(bytes.NewReader(data))
+ return decodeJSONPb(d, unmarshaler, v)
+}
+
+func decodeJSONPb(d *json.Decoder, unmarshaler protojson.UnmarshalOptions, v interface{}) error {
+ p, ok := v.(proto.Message)
+ if !ok {
+ return decodeNonProtoField(d, unmarshaler, v)
+ }
+
+ // Decode into bytes for marshalling
+ var b json.RawMessage
+ if err := d.Decode(&b); err != nil {
+ return err
+ }
+
+ return unmarshaler.Unmarshal([]byte(b), p)
+}
+
+func decodeNonProtoField(d *json.Decoder, unmarshaler protojson.UnmarshalOptions, v interface{}) error {
+ rv := reflect.ValueOf(v)
+ if rv.Kind() != reflect.Ptr {
+ return fmt.Errorf("%T is not a pointer", v)
+ }
+ for rv.Kind() == reflect.Ptr {
+ if rv.IsNil() {
+ rv.Set(reflect.New(rv.Type().Elem()))
+ }
+ if rv.Type().ConvertibleTo(typeProtoMessage) {
+ // Decode into bytes for marshalling
+ var b json.RawMessage
+ if err := d.Decode(&b); err != nil {
+ return err
+ }
+
+ return unmarshaler.Unmarshal([]byte(b), rv.Interface().(proto.Message))
+ }
+ rv = rv.Elem()
+ }
+ if rv.Kind() == reflect.Map {
+ if rv.IsNil() {
+ rv.Set(reflect.MakeMap(rv.Type()))
+ }
+ conv, ok := convFromType[rv.Type().Key().Kind()]
+ if !ok {
+ return fmt.Errorf("unsupported type of map field key: %v", rv.Type().Key())
+ }
+
+ m := make(map[string]*json.RawMessage)
+ if err := d.Decode(&m); err != nil {
+ return err
+ }
+ for k, v := range m {
+ result := conv.Call([]reflect.Value{reflect.ValueOf(k)})
+ if err := result[1].Interface(); err != nil {
+ return err.(error)
+ }
+ bk := result[0]
+ bv := reflect.New(rv.Type().Elem())
+ if v == nil {
+ null := json.RawMessage("null")
+ v = &null
+ }
+ if err := unmarshalJSONPb([]byte(*v), unmarshaler, bv.Interface()); err != nil {
+ return err
+ }
+ rv.SetMapIndex(bk, bv.Elem())
+ }
+ return nil
+ }
+ if rv.Kind() == reflect.Slice {
+ if rv.Type().Elem().Kind() == reflect.Uint8 {
+ var sl []byte
+ if err := d.Decode(&sl); err != nil {
+ return err
+ }
+ if sl != nil {
+ rv.SetBytes(sl)
+ }
+ return nil
+ }
+
+ var sl []json.RawMessage
+ if err := d.Decode(&sl); err != nil {
+ return err
+ }
+ if sl != nil {
+ rv.Set(reflect.MakeSlice(rv.Type(), 0, 0))
+ }
+ for _, item := range sl {
+ bv := reflect.New(rv.Type().Elem())
+ if err := unmarshalJSONPb([]byte(item), unmarshaler, bv.Interface()); err != nil {
+ return err
+ }
+ rv.Set(reflect.Append(rv, bv.Elem()))
+ }
+ return nil
+ }
+ if _, ok := rv.Interface().(protoEnum); ok {
+ var repr interface{}
+ if err := d.Decode(&repr); err != nil {
+ return err
+ }
+ switch v := repr.(type) {
+ case string:
+ // TODO(yugui) Should use proto.StructProperties?
+ return fmt.Errorf("unmarshaling of symbolic enum %q not supported: %T", repr, rv.Interface())
+ case float64:
+ rv.Set(reflect.ValueOf(int32(v)).Convert(rv.Type()))
+ return nil
+ default:
+ return fmt.Errorf("cannot assign %#v into Go type %T", repr, rv.Interface())
+ }
+ }
+ return d.Decode(v)
+}
+
+type protoEnum interface {
+ fmt.Stringer
+ EnumDescriptor() ([]byte, []int)
+}
+
+var typeProtoEnum = reflect.TypeOf((*protoEnum)(nil)).Elem()
+
+var typeProtoMessage = reflect.TypeOf((*proto.Message)(nil)).Elem()
+
+// Delimiter for newline encoded JSON streams.
+func (j *JSONPb) Delimiter() []byte {
+ return []byte("\n")
+}
+
+var (
+ convFromType = map[reflect.Kind]reflect.Value{
+ reflect.String: reflect.ValueOf(String),
+ reflect.Bool: reflect.ValueOf(Bool),
+ reflect.Float64: reflect.ValueOf(Float64),
+ reflect.Float32: reflect.ValueOf(Float32),
+ reflect.Int64: reflect.ValueOf(Int64),
+ reflect.Int32: reflect.ValueOf(Int32),
+ reflect.Uint64: reflect.ValueOf(Uint64),
+ reflect.Uint32: reflect.ValueOf(Uint32),
+ reflect.Slice: reflect.ValueOf(Bytes),
+ }
+)
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_proto.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_proto.go
new file mode 100644
index 00000000..398c780d
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_proto.go
@@ -0,0 +1,60 @@
+package runtime
+
+import (
+ "errors"
+ "io"
+
+ "google.golang.org/protobuf/proto"
+)
+
+// ProtoMarshaller is a Marshaller which marshals/unmarshals into/from serialize proto bytes
+type ProtoMarshaller struct{}
+
+// ContentType always returns "application/octet-stream".
+func (*ProtoMarshaller) ContentType(_ interface{}) string {
+ return "application/octet-stream"
+}
+
+// Marshal marshals "value" into Proto
+func (*ProtoMarshaller) Marshal(value interface{}) ([]byte, error) {
+ message, ok := value.(proto.Message)
+ if !ok {
+ return nil, errors.New("unable to marshal non proto field")
+ }
+ return proto.Marshal(message)
+}
+
+// Unmarshal unmarshals proto "data" into "value"
+func (*ProtoMarshaller) Unmarshal(data []byte, value interface{}) error {
+ message, ok := value.(proto.Message)
+ if !ok {
+ return errors.New("unable to unmarshal non proto field")
+ }
+ return proto.Unmarshal(data, message)
+}
+
+// NewDecoder returns a Decoder which reads proto stream from "reader".
+func (marshaller *ProtoMarshaller) NewDecoder(reader io.Reader) Decoder {
+ return DecoderFunc(func(value interface{}) error {
+ buffer, err := io.ReadAll(reader)
+ if err != nil {
+ return err
+ }
+ return marshaller.Unmarshal(buffer, value)
+ })
+}
+
+// NewEncoder returns an Encoder which writes proto stream into "writer".
+func (marshaller *ProtoMarshaller) NewEncoder(writer io.Writer) Encoder {
+ return EncoderFunc(func(value interface{}) error {
+ buffer, err := marshaller.Marshal(value)
+ if err != nil {
+ return err
+ }
+ if _, err := writer.Write(buffer); err != nil {
+ return err
+ }
+
+ return nil
+ })
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler.go
new file mode 100644
index 00000000..b1dfc37a
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler.go
@@ -0,0 +1,58 @@
+package runtime
+
+import (
+ "io"
+)
+
+// Marshaler defines a conversion between byte sequence and gRPC payloads / fields.
+type Marshaler interface {
+ // Marshal marshals "v" into byte sequence.
+ Marshal(v interface{}) ([]byte, error)
+ // Unmarshal unmarshals "data" into "v".
+ // "v" must be a pointer value.
+ Unmarshal(data []byte, v interface{}) error
+ // NewDecoder returns a Decoder which reads byte sequence from "r".
+ NewDecoder(r io.Reader) Decoder
+ // NewEncoder returns an Encoder which writes bytes sequence into "w".
+ NewEncoder(w io.Writer) Encoder
+ // ContentType returns the Content-Type which this marshaler is responsible for.
+ // The parameter describes the type which is being marshalled, which can sometimes
+ // affect the content type returned.
+ ContentType(v interface{}) string
+}
+
+// Decoder decodes a byte sequence
+type Decoder interface {
+ Decode(v interface{}) error
+}
+
+// Encoder encodes gRPC payloads / fields into byte sequence.
+type Encoder interface {
+ Encode(v interface{}) error
+}
+
+// DecoderFunc adapts an decoder function into Decoder.
+type DecoderFunc func(v interface{}) error
+
+// Decode delegates invocations to the underlying function itself.
+func (f DecoderFunc) Decode(v interface{}) error { return f(v) }
+
+// EncoderFunc adapts an encoder function into Encoder
+type EncoderFunc func(v interface{}) error
+
+// Encode delegates invocations to the underlying function itself.
+func (f EncoderFunc) Encode(v interface{}) error { return f(v) }
+
+// Delimited defines the streaming delimiter.
+type Delimited interface {
+ // Delimiter returns the record separator for the stream.
+ Delimiter() []byte
+}
+
+// StreamContentType defines the streaming content type.
+type StreamContentType interface {
+ // StreamContentType returns the content type for a stream. This shares the
+ // same behaviour as for `Marshaler.ContentType`, but is called, if present,
+ // in the case of a streamed response.
+ StreamContentType(v interface{}) string
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go
new file mode 100644
index 00000000..07c28112
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go
@@ -0,0 +1,109 @@
+package runtime
+
+import (
+ "errors"
+ "mime"
+ "net/http"
+
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/protobuf/encoding/protojson"
+)
+
+// MIMEWildcard is the fallback MIME type used for requests which do not match
+// a registered MIME type.
+const MIMEWildcard = "*"
+
+var (
+ acceptHeader = http.CanonicalHeaderKey("Accept")
+ contentTypeHeader = http.CanonicalHeaderKey("Content-Type")
+
+ defaultMarshaler = &HTTPBodyMarshaler{
+ Marshaler: &JSONPb{
+ MarshalOptions: protojson.MarshalOptions{
+ EmitUnpopulated: true,
+ },
+ UnmarshalOptions: protojson.UnmarshalOptions{
+ DiscardUnknown: true,
+ },
+ },
+ }
+)
+
+// MarshalerForRequest returns the inbound/outbound marshalers for this request.
+// It checks the registry on the ServeMux for the MIME type set by the Content-Type header.
+// If it isn't set (or the request Content-Type is empty), checks for "*".
+// If there are multiple Content-Type headers set, choose the first one that it can
+// exactly match in the registry.
+// Otherwise, it follows the above logic for "*"/InboundMarshaler/OutboundMarshaler.
+func MarshalerForRequest(mux *ServeMux, r *http.Request) (inbound Marshaler, outbound Marshaler) {
+ for _, acceptVal := range r.Header[acceptHeader] {
+ if m, ok := mux.marshalers.mimeMap[acceptVal]; ok {
+ outbound = m
+ break
+ }
+ }
+
+ for _, contentTypeVal := range r.Header[contentTypeHeader] {
+ contentType, _, err := mime.ParseMediaType(contentTypeVal)
+ if err != nil {
+ grpclog.Errorf("Failed to parse Content-Type %s: %v", contentTypeVal, err)
+ continue
+ }
+ if m, ok := mux.marshalers.mimeMap[contentType]; ok {
+ inbound = m
+ break
+ }
+ }
+
+ if inbound == nil {
+ inbound = mux.marshalers.mimeMap[MIMEWildcard]
+ }
+ if outbound == nil {
+ outbound = inbound
+ }
+
+ return inbound, outbound
+}
+
+// marshalerRegistry is a mapping from MIME types to Marshalers.
+type marshalerRegistry struct {
+ mimeMap map[string]Marshaler
+}
+
+// add adds a marshaler for a case-sensitive MIME type string ("*" to match any
+// MIME type).
+func (m marshalerRegistry) add(mime string, marshaler Marshaler) error {
+ if len(mime) == 0 {
+ return errors.New("empty MIME type")
+ }
+
+ m.mimeMap[mime] = marshaler
+
+ return nil
+}
+
+// makeMarshalerMIMERegistry returns a new registry of marshalers.
+// It allows for a mapping of case-sensitive Content-Type MIME type string to runtime.Marshaler interfaces.
+//
+// For example, you could allow the client to specify the use of the runtime.JSONPb marshaler
+// with an "application/jsonpb" Content-Type and the use of the runtime.JSONBuiltin marshaler
+// with an "application/json" Content-Type.
+// "*" can be used to match any Content-Type.
+// This can be attached to a ServerMux with the marshaler option.
+func makeMarshalerMIMERegistry() marshalerRegistry {
+ return marshalerRegistry{
+ mimeMap: map[string]Marshaler{
+ MIMEWildcard: defaultMarshaler,
+ },
+ }
+}
+
+// WithMarshalerOption returns a ServeMuxOption which associates inbound and outbound
+// Marshalers to a MIME type in mux.
+func WithMarshalerOption(mime string, marshaler Marshaler) ServeMuxOption {
+ return func(mux *ServeMux) {
+ if err := mux.marshalers.add(mime, marshaler); err != nil {
+ panic(err)
+ }
+ }
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
new file mode 100644
index 00000000..19255ec4
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go
@@ -0,0 +1,545 @@
+package runtime
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net/http"
+ "net/textproto"
+ "regexp"
+ "strings"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/health/grpc_health_v1"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// UnescapingMode defines the behavior of ServeMux when unescaping path parameters.
+type UnescapingMode int
+
+const (
+ // UnescapingModeLegacy is the default V2 behavior, which escapes the entire
+ // path string before doing any routing.
+ UnescapingModeLegacy UnescapingMode = iota
+
+ // UnescapingModeAllExceptReserved unescapes all path parameters except RFC 6570
+ // reserved characters.
+ UnescapingModeAllExceptReserved
+
+ // UnescapingModeAllExceptSlash unescapes URL path parameters except path
+ // separators, which will be left as "%2F".
+ UnescapingModeAllExceptSlash
+
+ // UnescapingModeAllCharacters unescapes all URL path parameters.
+ UnescapingModeAllCharacters
+
+ // UnescapingModeDefault is the default escaping type.
+ // TODO(v3): default this to UnescapingModeAllExceptReserved per grpc-httpjson-transcoding's
+ // reference implementation
+ UnescapingModeDefault = UnescapingModeLegacy
+)
+
+var encodedPathSplitter = regexp.MustCompile("(/|%2F)")
+
+// A HandlerFunc handles a specific pair of path pattern and HTTP method.
+type HandlerFunc func(w http.ResponseWriter, r *http.Request, pathParams map[string]string)
+
+// A Middleware handler wraps another HandlerFunc to do some pre- and/or post-processing of the request. This is used as an alternative to gRPC interceptors when using the direct-to-implementation
+// registration methods. It is generally recommended to use gRPC client or server interceptors instead
+// where possible.
+type Middleware func(HandlerFunc) HandlerFunc
+
+// ServeMux is a request multiplexer for grpc-gateway.
+// It matches http requests to patterns and invokes the corresponding handler.
+type ServeMux struct {
+ // handlers maps HTTP method to a list of handlers.
+ handlers map[string][]handler
+ middlewares []Middleware
+ forwardResponseOptions []func(context.Context, http.ResponseWriter, proto.Message) error
+ forwardResponseRewriter ForwardResponseRewriter
+ marshalers marshalerRegistry
+ incomingHeaderMatcher HeaderMatcherFunc
+ outgoingHeaderMatcher HeaderMatcherFunc
+ outgoingTrailerMatcher HeaderMatcherFunc
+ metadataAnnotators []func(context.Context, *http.Request) metadata.MD
+ errorHandler ErrorHandlerFunc
+ streamErrorHandler StreamErrorHandlerFunc
+ routingErrorHandler RoutingErrorHandlerFunc
+ disablePathLengthFallback bool
+ unescapingMode UnescapingMode
+ writeContentLength bool
+}
+
+// ServeMuxOption is an option that can be given to a ServeMux on construction.
+type ServeMuxOption func(*ServeMux)
+
+// ForwardResponseRewriter is the signature of a function that is capable of rewriting messages
+// before they are forwarded in a unary, stream, or error response.
+type ForwardResponseRewriter func(ctx context.Context, response proto.Message) (any, error)
+
+// WithForwardResponseRewriter returns a ServeMuxOption that allows for implementers to insert logic
+// that can rewrite the final response before it is forwarded.
+//
+// The response rewriter function is called during unary message forwarding, stream message
+// forwarding and when errors are being forwarded.
+//
+// NOTE: Using this option will likely make what is generated by `protoc-gen-openapiv2` incorrect.
+// Since this option involves making runtime changes to the response shape or type.
+func WithForwardResponseRewriter(fwdResponseRewriter ForwardResponseRewriter) ServeMuxOption {
+ return func(sm *ServeMux) {
+ sm.forwardResponseRewriter = fwdResponseRewriter
+ }
+}
+
+// WithForwardResponseOption returns a ServeMuxOption representing the forwardResponseOption.
+//
+// forwardResponseOption is an option that will be called on the relevant context.Context,
+// http.ResponseWriter, and proto.Message before every forwarded response.
+//
+// The message may be nil in the case where just a header is being sent.
+func WithForwardResponseOption(forwardResponseOption func(context.Context, http.ResponseWriter, proto.Message) error) ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ serveMux.forwardResponseOptions = append(serveMux.forwardResponseOptions, forwardResponseOption)
+ }
+}
+
+// WithUnescapingMode sets the escaping type. See the definitions of UnescapingMode
+// for more information.
+func WithUnescapingMode(mode UnescapingMode) ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ serveMux.unescapingMode = mode
+ }
+}
+
+// WithMiddlewares sets server middleware for all handlers. This is useful as an alternative to gRPC
+// interceptors when using the direct-to-implementation registration methods and cannot rely
+// on gRPC interceptors. It's recommended to use gRPC interceptors instead if possible.
+func WithMiddlewares(middlewares ...Middleware) ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ serveMux.middlewares = append(serveMux.middlewares, middlewares...)
+ }
+}
+
+// SetQueryParameterParser sets the query parameter parser, used to populate message from query parameters.
+// Configuring this will mean the generated OpenAPI output is no longer correct, and it should be
+// done with careful consideration.
+func SetQueryParameterParser(queryParameterParser QueryParameterParser) ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ currentQueryParser = queryParameterParser
+ }
+}
+
+// HeaderMatcherFunc checks whether a header key should be forwarded to/from gRPC context.
+type HeaderMatcherFunc func(string) (string, bool)
+
+// DefaultHeaderMatcher is used to pass http request headers to/from gRPC context. This adds permanent HTTP header
+// keys (as specified by the IANA, e.g: Accept, Cookie, Host) to the gRPC metadata with the grpcgateway- prefix. If you want to know which headers are considered permanent, you can view the isPermanentHTTPHeader function.
+// HTTP headers that start with 'Grpc-Metadata-' are mapped to gRPC metadata after removing the prefix 'Grpc-Metadata-'.
+// Other headers are not added to the gRPC metadata.
+func DefaultHeaderMatcher(key string) (string, bool) {
+ switch key = textproto.CanonicalMIMEHeaderKey(key); {
+ case isPermanentHTTPHeader(key):
+ return MetadataPrefix + key, true
+ case strings.HasPrefix(key, MetadataHeaderPrefix):
+ return key[len(MetadataHeaderPrefix):], true
+ }
+ return "", false
+}
+
+func defaultOutgoingHeaderMatcher(key string) (string, bool) {
+ return fmt.Sprintf("%s%s", MetadataHeaderPrefix, key), true
+}
+
+func defaultOutgoingTrailerMatcher(key string) (string, bool) {
+ return fmt.Sprintf("%s%s", MetadataTrailerPrefix, key), true
+}
+
+// WithIncomingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for incoming request to gateway.
+//
+// This matcher will be called with each header in http.Request. If matcher returns true, that header will be
+// passed to gRPC context. To transform the header before passing to gRPC context, matcher should return the modified header.
+func WithIncomingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption {
+ for _, header := range fn.matchedMalformedHeaders() {
+ grpclog.Warningf("The configured forwarding filter would allow %q to be sent to the gRPC server, which will likely cause errors. See https://github.com/grpc/grpc-go/pull/4803#issuecomment-986093310 for more information.", header)
+ }
+
+ return func(mux *ServeMux) {
+ mux.incomingHeaderMatcher = fn
+ }
+}
+
+// matchedMalformedHeaders returns the malformed headers that would be forwarded to gRPC server.
+func (fn HeaderMatcherFunc) matchedMalformedHeaders() []string {
+ if fn == nil {
+ return nil
+ }
+ headers := make([]string, 0)
+ for header := range malformedHTTPHeaders {
+ out, accept := fn(header)
+ if accept && isMalformedHTTPHeader(out) {
+ headers = append(headers, out)
+ }
+ }
+ return headers
+}
+
+// WithOutgoingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for outgoing response from gateway.
+//
+// This matcher will be called with each header in response header metadata. If matcher returns true, that header will be
+// passed to http response returned from gateway. To transform the header before passing to response,
+// matcher should return the modified header.
+func WithOutgoingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption {
+ return func(mux *ServeMux) {
+ mux.outgoingHeaderMatcher = fn
+ }
+}
+
+// WithOutgoingTrailerMatcher returns a ServeMuxOption representing a headerMatcher for outgoing response from gateway.
+//
+// This matcher will be called with each header in response trailer metadata. If matcher returns true, that header will be
+// passed to http response returned from gateway. To transform the header before passing to response,
+// matcher should return the modified header.
+func WithOutgoingTrailerMatcher(fn HeaderMatcherFunc) ServeMuxOption {
+ return func(mux *ServeMux) {
+ mux.outgoingTrailerMatcher = fn
+ }
+}
+
+// WithMetadata returns a ServeMuxOption for passing metadata to a gRPC context.
+//
+// This can be used by services that need to read from http.Request and modify gRPC context. A common use case
+// is reading token from cookie and adding it in gRPC context.
+func WithMetadata(annotator func(context.Context, *http.Request) metadata.MD) ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ serveMux.metadataAnnotators = append(serveMux.metadataAnnotators, annotator)
+ }
+}
+
+// WithErrorHandler returns a ServeMuxOption for configuring a custom error handler.
+//
+// This can be used to configure a custom error response.
+func WithErrorHandler(fn ErrorHandlerFunc) ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ serveMux.errorHandler = fn
+ }
+}
+
+// WithStreamErrorHandler returns a ServeMuxOption that will use the given custom stream
+// error handler, which allows for customizing the error trailer for server-streaming
+// calls.
+//
+// For stream errors that occur before any response has been written, the mux's
+// ErrorHandler will be invoked. However, once data has been written, the errors must
+// be handled differently: they must be included in the response body. The response body's
+// final message will include the error details returned by the stream error handler.
+func WithStreamErrorHandler(fn StreamErrorHandlerFunc) ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ serveMux.streamErrorHandler = fn
+ }
+}
+
+// WithRoutingErrorHandler returns a ServeMuxOption for configuring a custom error handler to handle http routing errors.
+//
+// Method called for errors which can happen before gRPC route selected or executed.
+// The following error codes: StatusMethodNotAllowed StatusNotFound StatusBadRequest
+func WithRoutingErrorHandler(fn RoutingErrorHandlerFunc) ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ serveMux.routingErrorHandler = fn
+ }
+}
+
+// WithDisablePathLengthFallback returns a ServeMuxOption for disable path length fallback.
+func WithDisablePathLengthFallback() ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ serveMux.disablePathLengthFallback = true
+ }
+}
+
+// WithWriteContentLength returns a ServeMuxOption to enable writing content length on non-streaming responses
+func WithWriteContentLength() ServeMuxOption {
+ return func(serveMux *ServeMux) {
+ serveMux.writeContentLength = true
+ }
+}
+
+// WithHealthEndpointAt returns a ServeMuxOption that will add an endpoint to the created ServeMux at the path specified by endpointPath.
+// When called the handler will forward the request to the upstream grpc service health check (defined in the
+// gRPC Health Checking Protocol).
+//
+// See here https://grpc-ecosystem.github.io/grpc-gateway/docs/operations/health_check/ for more information on how
+// to setup the protocol in the grpc server.
+//
+// If you define a service as query parameter, this will also be forwarded as service in the HealthCheckRequest.
+func WithHealthEndpointAt(healthCheckClient grpc_health_v1.HealthClient, endpointPath string) ServeMuxOption {
+ return func(s *ServeMux) {
+ // error can be ignored since pattern is definitely valid
+ _ = s.HandlePath(
+ http.MethodGet, endpointPath, func(w http.ResponseWriter, r *http.Request, _ map[string]string,
+ ) {
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+
+ resp, err := healthCheckClient.Check(r.Context(), &grpc_health_v1.HealthCheckRequest{
+ Service: r.URL.Query().Get("service"),
+ })
+ if err != nil {
+ s.errorHandler(r.Context(), s, outboundMarshaler, w, r, err)
+ return
+ }
+
+ w.Header().Set("Content-Type", "application/json")
+
+ if resp.GetStatus() != grpc_health_v1.HealthCheckResponse_SERVING {
+ switch resp.GetStatus() {
+ case grpc_health_v1.HealthCheckResponse_NOT_SERVING, grpc_health_v1.HealthCheckResponse_UNKNOWN:
+ err = status.Error(codes.Unavailable, resp.String())
+ case grpc_health_v1.HealthCheckResponse_SERVICE_UNKNOWN:
+ err = status.Error(codes.NotFound, resp.String())
+ }
+
+ s.errorHandler(r.Context(), s, outboundMarshaler, w, r, err)
+ return
+ }
+
+ _ = outboundMarshaler.NewEncoder(w).Encode(resp)
+ })
+ }
+}
+
+// WithHealthzEndpoint returns a ServeMuxOption that will add a /healthz endpoint to the created ServeMux.
+//
+// See WithHealthEndpointAt for the general implementation.
+func WithHealthzEndpoint(healthCheckClient grpc_health_v1.HealthClient) ServeMuxOption {
+ return WithHealthEndpointAt(healthCheckClient, "/healthz")
+}
+
+// NewServeMux returns a new ServeMux whose internal mapping is empty.
+func NewServeMux(opts ...ServeMuxOption) *ServeMux {
+ serveMux := &ServeMux{
+ handlers: make(map[string][]handler),
+ forwardResponseOptions: make([]func(context.Context, http.ResponseWriter, proto.Message) error, 0),
+ forwardResponseRewriter: func(ctx context.Context, response proto.Message) (any, error) { return response, nil },
+ marshalers: makeMarshalerMIMERegistry(),
+ errorHandler: DefaultHTTPErrorHandler,
+ streamErrorHandler: DefaultStreamErrorHandler,
+ routingErrorHandler: DefaultRoutingErrorHandler,
+ unescapingMode: UnescapingModeDefault,
+ }
+
+ for _, opt := range opts {
+ opt(serveMux)
+ }
+
+ if serveMux.incomingHeaderMatcher == nil {
+ serveMux.incomingHeaderMatcher = DefaultHeaderMatcher
+ }
+ if serveMux.outgoingHeaderMatcher == nil {
+ serveMux.outgoingHeaderMatcher = defaultOutgoingHeaderMatcher
+ }
+ if serveMux.outgoingTrailerMatcher == nil {
+ serveMux.outgoingTrailerMatcher = defaultOutgoingTrailerMatcher
+ }
+
+ return serveMux
+}
+
+// Handle associates "h" to the pair of HTTP method and path pattern.
+func (s *ServeMux) Handle(meth string, pat Pattern, h HandlerFunc) {
+ if len(s.middlewares) > 0 {
+ h = chainMiddlewares(s.middlewares)(h)
+ }
+ s.handlers[meth] = append([]handler{{pat: pat, h: h}}, s.handlers[meth]...)
+}
+
+// HandlePath allows users to configure custom path handlers.
+// refer: https://grpc-ecosystem.github.io/grpc-gateway/docs/operations/inject_router/
+func (s *ServeMux) HandlePath(meth string, pathPattern string, h HandlerFunc) error {
+ compiler, err := httprule.Parse(pathPattern)
+ if err != nil {
+ return fmt.Errorf("parsing path pattern: %w", err)
+ }
+ tp := compiler.Compile()
+ pattern, err := NewPattern(tp.Version, tp.OpCodes, tp.Pool, tp.Verb)
+ if err != nil {
+ return fmt.Errorf("creating new pattern: %w", err)
+ }
+ s.Handle(meth, pattern, h)
+ return nil
+}
+
+// ServeHTTP dispatches the request to the first handler whose pattern matches to r.Method and r.URL.Path.
+func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+ ctx := r.Context()
+
+ path := r.URL.Path
+ if !strings.HasPrefix(path, "/") {
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+ s.routingErrorHandler(ctx, s, outboundMarshaler, w, r, http.StatusBadRequest)
+ return
+ }
+
+ // TODO(v3): remove UnescapingModeLegacy
+ if s.unescapingMode != UnescapingModeLegacy && r.URL.RawPath != "" {
+ path = r.URL.RawPath
+ }
+
+ if override := r.Header.Get("X-HTTP-Method-Override"); override != "" && s.isPathLengthFallback(r) {
+ if err := r.ParseForm(); err != nil {
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+ sterr := status.Error(codes.InvalidArgument, err.Error())
+ s.errorHandler(ctx, s, outboundMarshaler, w, r, sterr)
+ return
+ }
+ r.Method = strings.ToUpper(override)
+ }
+
+ var pathComponents []string
+ // since in UnescapeModeLegacy, the URL will already have been fully unescaped, if we also split on "%2F"
+ // in this escaping mode we would be double unescaping but in UnescapingModeAllCharacters, we still do as the
+ // path is the RawPath (i.e. unescaped). That does mean that the behavior of this function will change its default
+ // behavior when the UnescapingModeDefault gets changed from UnescapingModeLegacy to UnescapingModeAllExceptReserved
+ if s.unescapingMode == UnescapingModeAllCharacters {
+ pathComponents = encodedPathSplitter.Split(path[1:], -1)
+ } else {
+ pathComponents = strings.Split(path[1:], "/")
+ }
+
+ lastPathComponent := pathComponents[len(pathComponents)-1]
+
+ for _, h := range s.handlers[r.Method] {
+ // If the pattern has a verb, explicitly look for a suffix in the last
+ // component that matches a colon plus the verb. This allows us to
+ // handle some cases that otherwise can't be correctly handled by the
+ // former LastIndex case, such as when the verb literal itself contains
+ // a colon. This should work for all cases that have run through the
+ // parser because we know what verb we're looking for, however, there
+ // are still some cases that the parser itself cannot disambiguate. See
+ // the comment there if interested.
+
+ var verb string
+ patVerb := h.pat.Verb()
+
+ idx := -1
+ if patVerb != "" && strings.HasSuffix(lastPathComponent, ":"+patVerb) {
+ idx = len(lastPathComponent) - len(patVerb) - 1
+ }
+ if idx == 0 {
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+ s.routingErrorHandler(ctx, s, outboundMarshaler, w, r, http.StatusNotFound)
+ return
+ }
+
+ comps := make([]string, len(pathComponents))
+ copy(comps, pathComponents)
+
+ if idx > 0 {
+ comps[len(comps)-1], verb = lastPathComponent[:idx], lastPathComponent[idx+1:]
+ }
+
+ pathParams, err := h.pat.MatchAndEscape(comps, verb, s.unescapingMode)
+ if err != nil {
+ var mse MalformedSequenceError
+ if ok := errors.As(err, &mse); ok {
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+ s.errorHandler(ctx, s, outboundMarshaler, w, r, &HTTPStatusError{
+ HTTPStatus: http.StatusBadRequest,
+ Err: mse,
+ })
+ }
+ continue
+ }
+ s.handleHandler(h, w, r, pathParams)
+ return
+ }
+
+ // if no handler has found for the request, lookup for other methods
+ // to handle POST -> GET fallback if the request is subject to path
+ // length fallback.
+ // Note we are not eagerly checking the request here as we want to return the
+ // right HTTP status code, and we need to process the fallback candidates in
+ // order to do that.
+ for m, handlers := range s.handlers {
+ if m == r.Method {
+ continue
+ }
+ for _, h := range handlers {
+ var verb string
+ patVerb := h.pat.Verb()
+
+ idx := -1
+ if patVerb != "" && strings.HasSuffix(lastPathComponent, ":"+patVerb) {
+ idx = len(lastPathComponent) - len(patVerb) - 1
+ }
+
+ comps := make([]string, len(pathComponents))
+ copy(comps, pathComponents)
+
+ if idx > 0 {
+ comps[len(comps)-1], verb = lastPathComponent[:idx], lastPathComponent[idx+1:]
+ }
+
+ pathParams, err := h.pat.MatchAndEscape(comps, verb, s.unescapingMode)
+ if err != nil {
+ var mse MalformedSequenceError
+ if ok := errors.As(err, &mse); ok {
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+ s.errorHandler(ctx, s, outboundMarshaler, w, r, &HTTPStatusError{
+ HTTPStatus: http.StatusBadRequest,
+ Err: mse,
+ })
+ }
+ continue
+ }
+
+ // X-HTTP-Method-Override is optional. Always allow fallback to POST.
+ // Also, only consider POST -> GET fallbacks, and avoid falling back to
+ // potentially dangerous operations like DELETE.
+ if s.isPathLengthFallback(r) && m == http.MethodGet {
+ if err := r.ParseForm(); err != nil {
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+ sterr := status.Error(codes.InvalidArgument, err.Error())
+ s.errorHandler(ctx, s, outboundMarshaler, w, r, sterr)
+ return
+ }
+ s.handleHandler(h, w, r, pathParams)
+ return
+ }
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+ s.routingErrorHandler(ctx, s, outboundMarshaler, w, r, http.StatusMethodNotAllowed)
+ return
+ }
+ }
+
+ _, outboundMarshaler := MarshalerForRequest(s, r)
+ s.routingErrorHandler(ctx, s, outboundMarshaler, w, r, http.StatusNotFound)
+}
+
+// GetForwardResponseOptions returns the ForwardResponseOptions associated with this ServeMux.
+func (s *ServeMux) GetForwardResponseOptions() []func(context.Context, http.ResponseWriter, proto.Message) error {
+ return s.forwardResponseOptions
+}
+
+func (s *ServeMux) isPathLengthFallback(r *http.Request) bool {
+ return !s.disablePathLengthFallback && r.Method == "POST" && r.Header.Get("Content-Type") == "application/x-www-form-urlencoded"
+}
+
+type handler struct {
+ pat Pattern
+ h HandlerFunc
+}
+
+func (s *ServeMux) handleHandler(h handler, w http.ResponseWriter, r *http.Request, pathParams map[string]string) {
+ h.h(w, r.WithContext(withHTTPPattern(r.Context(), h.pat)), pathParams)
+}
+
+func chainMiddlewares(mws []Middleware) Middleware {
+ return func(next HandlerFunc) HandlerFunc {
+ for i := len(mws); i > 0; i-- {
+ next = mws[i-1](next)
+ }
+ return next
+ }
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/pattern.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/pattern.go
new file mode 100644
index 00000000..e5450714
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/pattern.go
@@ -0,0 +1,381 @@
+package runtime
+
+import (
+ "errors"
+ "fmt"
+ "strconv"
+ "strings"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc/grpclog"
+)
+
+var (
+ // ErrNotMatch indicates that the given HTTP request path does not match to the pattern.
+ ErrNotMatch = errors.New("not match to the path pattern")
+ // ErrInvalidPattern indicates that the given definition of Pattern is not valid.
+ ErrInvalidPattern = errors.New("invalid pattern")
+)
+
+type MalformedSequenceError string
+
+func (e MalformedSequenceError) Error() string {
+ return "malformed path escape " + strconv.Quote(string(e))
+}
+
+type op struct {
+ code utilities.OpCode
+ operand int
+}
+
+// Pattern is a template pattern of http request paths defined in
+// https://github.com/googleapis/googleapis/blob/master/google/api/http.proto
+type Pattern struct {
+ // ops is a list of operations
+ ops []op
+ // pool is a constant pool indexed by the operands or vars.
+ pool []string
+ // vars is a list of variables names to be bound by this pattern
+ vars []string
+ // stacksize is the max depth of the stack
+ stacksize int
+ // tailLen is the length of the fixed-size segments after a deep wildcard
+ tailLen int
+ // verb is the VERB part of the path pattern. It is empty if the pattern does not have VERB part.
+ verb string
+}
+
+// NewPattern returns a new Pattern from the given definition values.
+// "ops" is a sequence of op codes. "pool" is a constant pool.
+// "verb" is the verb part of the pattern. It is empty if the pattern does not have the part.
+// "version" must be 1 for now.
+// It returns an error if the given definition is invalid.
+func NewPattern(version int, ops []int, pool []string, verb string) (Pattern, error) {
+ if version != 1 {
+ grpclog.Errorf("unsupported version: %d", version)
+ return Pattern{}, ErrInvalidPattern
+ }
+
+ l := len(ops)
+ if l%2 != 0 {
+ grpclog.Errorf("odd number of ops codes: %d", l)
+ return Pattern{}, ErrInvalidPattern
+ }
+
+ var (
+ typedOps []op
+ stack, maxstack int
+ tailLen int
+ pushMSeen bool
+ vars []string
+ )
+ for i := 0; i < l; i += 2 {
+ op := op{code: utilities.OpCode(ops[i]), operand: ops[i+1]}
+ switch op.code {
+ case utilities.OpNop:
+ continue
+ case utilities.OpPush:
+ if pushMSeen {
+ tailLen++
+ }
+ stack++
+ case utilities.OpPushM:
+ if pushMSeen {
+ grpclog.Error("pushM appears twice")
+ return Pattern{}, ErrInvalidPattern
+ }
+ pushMSeen = true
+ stack++
+ case utilities.OpLitPush:
+ if op.operand < 0 || len(pool) <= op.operand {
+ grpclog.Errorf("negative literal index: %d", op.operand)
+ return Pattern{}, ErrInvalidPattern
+ }
+ if pushMSeen {
+ tailLen++
+ }
+ stack++
+ case utilities.OpConcatN:
+ if op.operand <= 0 {
+ grpclog.Errorf("negative concat size: %d", op.operand)
+ return Pattern{}, ErrInvalidPattern
+ }
+ stack -= op.operand
+ if stack < 0 {
+ grpclog.Error("stack underflow")
+ return Pattern{}, ErrInvalidPattern
+ }
+ stack++
+ case utilities.OpCapture:
+ if op.operand < 0 || len(pool) <= op.operand {
+ grpclog.Errorf("variable name index out of bound: %d", op.operand)
+ return Pattern{}, ErrInvalidPattern
+ }
+ v := pool[op.operand]
+ op.operand = len(vars)
+ vars = append(vars, v)
+ stack--
+ if stack < 0 {
+ grpclog.Error("stack underflow")
+ return Pattern{}, ErrInvalidPattern
+ }
+ default:
+ grpclog.Errorf("invalid opcode: %d", op.code)
+ return Pattern{}, ErrInvalidPattern
+ }
+
+ if maxstack < stack {
+ maxstack = stack
+ }
+ typedOps = append(typedOps, op)
+ }
+ return Pattern{
+ ops: typedOps,
+ pool: pool,
+ vars: vars,
+ stacksize: maxstack,
+ tailLen: tailLen,
+ verb: verb,
+ }, nil
+}
+
+// MustPattern is a helper function which makes it easier to call NewPattern in variable initialization.
+func MustPattern(p Pattern, err error) Pattern {
+ if err != nil {
+ grpclog.Fatalf("Pattern initialization failed: %v", err)
+ }
+ return p
+}
+
+// MatchAndEscape examines components to determine if they match to a Pattern.
+// MatchAndEscape will return an error if no Patterns matched or if a pattern
+// matched but contained malformed escape sequences. If successful, the function
+// returns a mapping from field paths to their captured values.
+func (p Pattern) MatchAndEscape(components []string, verb string, unescapingMode UnescapingMode) (map[string]string, error) {
+ if p.verb != verb {
+ if p.verb != "" {
+ return nil, ErrNotMatch
+ }
+ if len(components) == 0 {
+ components = []string{":" + verb}
+ } else {
+ components = append([]string{}, components...)
+ components[len(components)-1] += ":" + verb
+ }
+ }
+
+ var pos int
+ stack := make([]string, 0, p.stacksize)
+ captured := make([]string, len(p.vars))
+ l := len(components)
+ for _, op := range p.ops {
+ var err error
+
+ switch op.code {
+ case utilities.OpNop:
+ continue
+ case utilities.OpPush, utilities.OpLitPush:
+ if pos >= l {
+ return nil, ErrNotMatch
+ }
+ c := components[pos]
+ if op.code == utilities.OpLitPush {
+ if lit := p.pool[op.operand]; c != lit {
+ return nil, ErrNotMatch
+ }
+ } else if op.code == utilities.OpPush {
+ if c, err = unescape(c, unescapingMode, false); err != nil {
+ return nil, err
+ }
+ }
+ stack = append(stack, c)
+ pos++
+ case utilities.OpPushM:
+ end := len(components)
+ if end < pos+p.tailLen {
+ return nil, ErrNotMatch
+ }
+ end -= p.tailLen
+ c := strings.Join(components[pos:end], "/")
+ if c, err = unescape(c, unescapingMode, true); err != nil {
+ return nil, err
+ }
+ stack = append(stack, c)
+ pos = end
+ case utilities.OpConcatN:
+ n := op.operand
+ l := len(stack) - n
+ stack = append(stack[:l], strings.Join(stack[l:], "/"))
+ case utilities.OpCapture:
+ n := len(stack) - 1
+ captured[op.operand] = stack[n]
+ stack = stack[:n]
+ }
+ }
+ if pos < l {
+ return nil, ErrNotMatch
+ }
+ bindings := make(map[string]string)
+ for i, val := range captured {
+ bindings[p.vars[i]] = val
+ }
+ return bindings, nil
+}
+
+// MatchAndEscape examines components to determine if they match to a Pattern.
+// It will never perform per-component unescaping (see: UnescapingModeLegacy).
+// MatchAndEscape will return an error if no Patterns matched. If successful,
+// the function returns a mapping from field paths to their captured values.
+//
+// Deprecated: Use MatchAndEscape.
+func (p Pattern) Match(components []string, verb string) (map[string]string, error) {
+ return p.MatchAndEscape(components, verb, UnescapingModeDefault)
+}
+
+// Verb returns the verb part of the Pattern.
+func (p Pattern) Verb() string { return p.verb }
+
+func (p Pattern) String() string {
+ var stack []string
+ for _, op := range p.ops {
+ switch op.code {
+ case utilities.OpNop:
+ continue
+ case utilities.OpPush:
+ stack = append(stack, "*")
+ case utilities.OpLitPush:
+ stack = append(stack, p.pool[op.operand])
+ case utilities.OpPushM:
+ stack = append(stack, "**")
+ case utilities.OpConcatN:
+ n := op.operand
+ l := len(stack) - n
+ stack = append(stack[:l], strings.Join(stack[l:], "/"))
+ case utilities.OpCapture:
+ n := len(stack) - 1
+ stack[n] = fmt.Sprintf("{%s=%s}", p.vars[op.operand], stack[n])
+ }
+ }
+ segs := strings.Join(stack, "/")
+ if p.verb != "" {
+ return fmt.Sprintf("/%s:%s", segs, p.verb)
+ }
+ return "/" + segs
+}
+
+/*
+ * The following code is adopted and modified from Go's standard library
+ * and carries the attached license.
+ *
+ * Copyright 2009 The Go Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ */
+
+// ishex returns whether or not the given byte is a valid hex character
+func ishex(c byte) bool {
+ switch {
+ case '0' <= c && c <= '9':
+ return true
+ case 'a' <= c && c <= 'f':
+ return true
+ case 'A' <= c && c <= 'F':
+ return true
+ }
+ return false
+}
+
+func isRFC6570Reserved(c byte) bool {
+ switch c {
+ case '!', '#', '$', '&', '\'', '(', ')', '*',
+ '+', ',', '/', ':', ';', '=', '?', '@', '[', ']':
+ return true
+ default:
+ return false
+ }
+}
+
+// unhex converts a hex point to the bit representation
+func unhex(c byte) byte {
+ switch {
+ case '0' <= c && c <= '9':
+ return c - '0'
+ case 'a' <= c && c <= 'f':
+ return c - 'a' + 10
+ case 'A' <= c && c <= 'F':
+ return c - 'A' + 10
+ }
+ return 0
+}
+
+// shouldUnescapeWithMode returns true if the character is escapable with the
+// given mode
+func shouldUnescapeWithMode(c byte, mode UnescapingMode) bool {
+ switch mode {
+ case UnescapingModeAllExceptReserved:
+ if isRFC6570Reserved(c) {
+ return false
+ }
+ case UnescapingModeAllExceptSlash:
+ if c == '/' {
+ return false
+ }
+ case UnescapingModeAllCharacters:
+ return true
+ }
+ return true
+}
+
+// unescape unescapes a path string using the provided mode
+func unescape(s string, mode UnescapingMode, multisegment bool) (string, error) {
+ // TODO(v3): remove UnescapingModeLegacy
+ if mode == UnescapingModeLegacy {
+ return s, nil
+ }
+
+ if !multisegment {
+ mode = UnescapingModeAllCharacters
+ }
+
+ // Count %, check that they're well-formed.
+ n := 0
+ for i := 0; i < len(s); {
+ if s[i] == '%' {
+ n++
+ if i+2 >= len(s) || !ishex(s[i+1]) || !ishex(s[i+2]) {
+ s = s[i:]
+ if len(s) > 3 {
+ s = s[:3]
+ }
+
+ return "", MalformedSequenceError(s)
+ }
+ i += 3
+ } else {
+ i++
+ }
+ }
+
+ if n == 0 {
+ return s, nil
+ }
+
+ var t strings.Builder
+ t.Grow(len(s))
+ for i := 0; i < len(s); i++ {
+ switch s[i] {
+ case '%':
+ c := unhex(s[i+1])<<4 | unhex(s[i+2])
+ if shouldUnescapeWithMode(c, mode) {
+ t.WriteByte(c)
+ i += 2
+ continue
+ }
+ fallthrough
+ default:
+ t.WriteByte(s[i])
+ }
+ }
+
+ return t.String(), nil
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go
new file mode 100644
index 00000000..f710036b
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go
@@ -0,0 +1,80 @@
+package runtime
+
+import (
+ "google.golang.org/protobuf/proto"
+)
+
+// StringP returns a pointer to a string whose pointee is same as the given string value.
+func StringP(val string) (*string, error) {
+ return proto.String(val), nil
+}
+
+// BoolP parses the given string representation of a boolean value,
+// and returns a pointer to a bool whose value is same as the parsed value.
+func BoolP(val string) (*bool, error) {
+ b, err := Bool(val)
+ if err != nil {
+ return nil, err
+ }
+ return proto.Bool(b), nil
+}
+
+// Float64P parses the given string representation of a floating point number,
+// and returns a pointer to a float64 whose value is same as the parsed number.
+func Float64P(val string) (*float64, error) {
+ f, err := Float64(val)
+ if err != nil {
+ return nil, err
+ }
+ return proto.Float64(f), nil
+}
+
+// Float32P parses the given string representation of a floating point number,
+// and returns a pointer to a float32 whose value is same as the parsed number.
+func Float32P(val string) (*float32, error) {
+ f, err := Float32(val)
+ if err != nil {
+ return nil, err
+ }
+ return proto.Float32(f), nil
+}
+
+// Int64P parses the given string representation of an integer
+// and returns a pointer to an int64 whose value is same as the parsed integer.
+func Int64P(val string) (*int64, error) {
+ i, err := Int64(val)
+ if err != nil {
+ return nil, err
+ }
+ return proto.Int64(i), nil
+}
+
+// Int32P parses the given string representation of an integer
+// and returns a pointer to an int32 whose value is same as the parsed integer.
+func Int32P(val string) (*int32, error) {
+ i, err := Int32(val)
+ if err != nil {
+ return nil, err
+ }
+ return proto.Int32(i), err
+}
+
+// Uint64P parses the given string representation of an integer
+// and returns a pointer to a uint64 whose value is same as the parsed integer.
+func Uint64P(val string) (*uint64, error) {
+ i, err := Uint64(val)
+ if err != nil {
+ return nil, err
+ }
+ return proto.Uint64(i), err
+}
+
+// Uint32P parses the given string representation of an integer
+// and returns a pointer to a uint32 whose value is same as the parsed integer.
+func Uint32P(val string) (*uint32, error) {
+ i, err := Uint32(val)
+ if err != nil {
+ return nil, err
+ }
+ return proto.Uint32(i), err
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/query.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/query.go
new file mode 100644
index 00000000..0a1ca7e0
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/query.go
@@ -0,0 +1,376 @@
+package runtime
+
+import (
+ "errors"
+ "fmt"
+ "net/url"
+ "regexp"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/types/known/durationpb"
+ field_mask "google.golang.org/protobuf/types/known/fieldmaskpb"
+ "google.golang.org/protobuf/types/known/structpb"
+ "google.golang.org/protobuf/types/known/timestamppb"
+ "google.golang.org/protobuf/types/known/wrapperspb"
+)
+
+var valuesKeyRegexp = regexp.MustCompile(`^(.*)\[(.*)\]$`)
+
+var currentQueryParser QueryParameterParser = &DefaultQueryParser{}
+
+// QueryParameterParser defines interface for all query parameter parsers
+type QueryParameterParser interface {
+ Parse(msg proto.Message, values url.Values, filter *utilities.DoubleArray) error
+}
+
+// PopulateQueryParameters parses query parameters
+// into "msg" using current query parser
+func PopulateQueryParameters(msg proto.Message, values url.Values, filter *utilities.DoubleArray) error {
+ return currentQueryParser.Parse(msg, values, filter)
+}
+
+// DefaultQueryParser is a QueryParameterParser which implements the default
+// query parameters parsing behavior.
+//
+// See https://github.com/grpc-ecosystem/grpc-gateway/issues/2632 for more context.
+type DefaultQueryParser struct{}
+
+// Parse populates "values" into "msg".
+// A value is ignored if its key starts with one of the elements in "filter".
+func (*DefaultQueryParser) Parse(msg proto.Message, values url.Values, filter *utilities.DoubleArray) error {
+ for key, values := range values {
+ if match := valuesKeyRegexp.FindStringSubmatch(key); len(match) == 3 {
+ key = match[1]
+ values = append([]string{match[2]}, values...)
+ }
+
+ msgValue := msg.ProtoReflect()
+ fieldPath := normalizeFieldPath(msgValue, strings.Split(key, "."))
+ if filter.HasCommonPrefix(fieldPath) {
+ continue
+ }
+ if err := populateFieldValueFromPath(msgValue, fieldPath, values); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// PopulateFieldFromPath sets a value in a nested Protobuf structure.
+func PopulateFieldFromPath(msg proto.Message, fieldPathString string, value string) error {
+ fieldPath := strings.Split(fieldPathString, ".")
+ return populateFieldValueFromPath(msg.ProtoReflect(), fieldPath, []string{value})
+}
+
+func normalizeFieldPath(msgValue protoreflect.Message, fieldPath []string) []string {
+ newFieldPath := make([]string, 0, len(fieldPath))
+ for i, fieldName := range fieldPath {
+ fields := msgValue.Descriptor().Fields()
+ fieldDesc := fields.ByTextName(fieldName)
+ if fieldDesc == nil {
+ fieldDesc = fields.ByJSONName(fieldName)
+ }
+ if fieldDesc == nil {
+ // return initial field path values if no matching message field was found
+ return fieldPath
+ }
+
+ newFieldPath = append(newFieldPath, string(fieldDesc.Name()))
+
+ // If this is the last element, we're done
+ if i == len(fieldPath)-1 {
+ break
+ }
+
+ // Only singular message fields are allowed
+ if fieldDesc.Message() == nil || fieldDesc.Cardinality() == protoreflect.Repeated {
+ return fieldPath
+ }
+
+ // Get the nested message
+ msgValue = msgValue.Get(fieldDesc).Message()
+ }
+
+ return newFieldPath
+}
+
+func populateFieldValueFromPath(msgValue protoreflect.Message, fieldPath []string, values []string) error {
+ if len(fieldPath) < 1 {
+ return errors.New("no field path")
+ }
+ if len(values) < 1 {
+ return errors.New("no value provided")
+ }
+
+ var fieldDescriptor protoreflect.FieldDescriptor
+ for i, fieldName := range fieldPath {
+ fields := msgValue.Descriptor().Fields()
+
+ // Get field by name
+ fieldDescriptor = fields.ByName(protoreflect.Name(fieldName))
+ if fieldDescriptor == nil {
+ fieldDescriptor = fields.ByJSONName(fieldName)
+ if fieldDescriptor == nil {
+ // We're not returning an error here because this could just be
+ // an extra query parameter that isn't part of the request.
+ grpclog.Infof("field not found in %q: %q", msgValue.Descriptor().FullName(), strings.Join(fieldPath, "."))
+ return nil
+ }
+ }
+
+ // If this is the last element, we're done
+ if i == len(fieldPath)-1 {
+ break
+ }
+
+ // Only singular message fields are allowed
+ if fieldDescriptor.Message() == nil || fieldDescriptor.Cardinality() == protoreflect.Repeated {
+ return fmt.Errorf("invalid path: %q is not a message", fieldName)
+ }
+
+ // Get the nested message
+ msgValue = msgValue.Mutable(fieldDescriptor).Message()
+ }
+
+ // Check if oneof already set
+ if of := fieldDescriptor.ContainingOneof(); of != nil && !of.IsSynthetic() {
+ if f := msgValue.WhichOneof(of); f != nil {
+ return fmt.Errorf("field already set for oneof %q", of.FullName().Name())
+ }
+ }
+
+ switch {
+ case fieldDescriptor.IsList():
+ return populateRepeatedField(fieldDescriptor, msgValue.Mutable(fieldDescriptor).List(), values)
+ case fieldDescriptor.IsMap():
+ return populateMapField(fieldDescriptor, msgValue.Mutable(fieldDescriptor).Map(), values)
+ }
+
+ if len(values) > 1 {
+ return fmt.Errorf("too many values for field %q: %s", fieldDescriptor.FullName().Name(), strings.Join(values, ", "))
+ }
+
+ return populateField(fieldDescriptor, msgValue, values[0])
+}
+
+func populateField(fieldDescriptor protoreflect.FieldDescriptor, msgValue protoreflect.Message, value string) error {
+ v, err := parseField(fieldDescriptor, value)
+ if err != nil {
+ return fmt.Errorf("parsing field %q: %w", fieldDescriptor.FullName().Name(), err)
+ }
+
+ msgValue.Set(fieldDescriptor, v)
+ return nil
+}
+
+func populateRepeatedField(fieldDescriptor protoreflect.FieldDescriptor, list protoreflect.List, values []string) error {
+ for _, value := range values {
+ v, err := parseField(fieldDescriptor, value)
+ if err != nil {
+ return fmt.Errorf("parsing list %q: %w", fieldDescriptor.FullName().Name(), err)
+ }
+ list.Append(v)
+ }
+
+ return nil
+}
+
+func populateMapField(fieldDescriptor protoreflect.FieldDescriptor, mp protoreflect.Map, values []string) error {
+ if len(values) != 2 {
+ return fmt.Errorf("more than one value provided for key %q in map %q", values[0], fieldDescriptor.FullName())
+ }
+
+ key, err := parseField(fieldDescriptor.MapKey(), values[0])
+ if err != nil {
+ return fmt.Errorf("parsing map key %q: %w", fieldDescriptor.FullName().Name(), err)
+ }
+
+ value, err := parseField(fieldDescriptor.MapValue(), values[1])
+ if err != nil {
+ return fmt.Errorf("parsing map value %q: %w", fieldDescriptor.FullName().Name(), err)
+ }
+
+ mp.Set(key.MapKey(), value)
+
+ return nil
+}
+
+func parseField(fieldDescriptor protoreflect.FieldDescriptor, value string) (protoreflect.Value, error) {
+ switch fieldDescriptor.Kind() {
+ case protoreflect.BoolKind:
+ v, err := strconv.ParseBool(value)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ return protoreflect.ValueOfBool(v), nil
+ case protoreflect.EnumKind:
+ enum, err := protoregistry.GlobalTypes.FindEnumByName(fieldDescriptor.Enum().FullName())
+ if err != nil {
+ if errors.Is(err, protoregistry.NotFound) {
+ return protoreflect.Value{}, fmt.Errorf("enum %q is not registered", fieldDescriptor.Enum().FullName())
+ }
+ return protoreflect.Value{}, fmt.Errorf("failed to look up enum: %w", err)
+ }
+ // Look for enum by name
+ v := enum.Descriptor().Values().ByName(protoreflect.Name(value))
+ if v == nil {
+ i, err := strconv.Atoi(value)
+ if err != nil {
+ return protoreflect.Value{}, fmt.Errorf("%q is not a valid value", value)
+ }
+ // Look for enum by number
+ if v = enum.Descriptor().Values().ByNumber(protoreflect.EnumNumber(i)); v == nil {
+ return protoreflect.Value{}, fmt.Errorf("%q is not a valid value", value)
+ }
+ }
+ return protoreflect.ValueOfEnum(v.Number()), nil
+ case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:
+ v, err := strconv.ParseInt(value, 10, 32)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ return protoreflect.ValueOfInt32(int32(v)), nil
+ case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
+ v, err := strconv.ParseInt(value, 10, 64)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ return protoreflect.ValueOfInt64(v), nil
+ case protoreflect.Uint32Kind, protoreflect.Fixed32Kind:
+ v, err := strconv.ParseUint(value, 10, 32)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ return protoreflect.ValueOfUint32(uint32(v)), nil
+ case protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
+ v, err := strconv.ParseUint(value, 10, 64)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ return protoreflect.ValueOfUint64(v), nil
+ case protoreflect.FloatKind:
+ v, err := strconv.ParseFloat(value, 32)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ return protoreflect.ValueOfFloat32(float32(v)), nil
+ case protoreflect.DoubleKind:
+ v, err := strconv.ParseFloat(value, 64)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ return protoreflect.ValueOfFloat64(v), nil
+ case protoreflect.StringKind:
+ return protoreflect.ValueOfString(value), nil
+ case protoreflect.BytesKind:
+ v, err := Bytes(value)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ return protoreflect.ValueOfBytes(v), nil
+ case protoreflect.MessageKind, protoreflect.GroupKind:
+ return parseMessage(fieldDescriptor.Message(), value)
+ default:
+ panic(fmt.Sprintf("unknown field kind: %v", fieldDescriptor.Kind()))
+ }
+}
+
+func parseMessage(msgDescriptor protoreflect.MessageDescriptor, value string) (protoreflect.Value, error) {
+ var msg proto.Message
+ switch msgDescriptor.FullName() {
+ case "google.protobuf.Timestamp":
+ t, err := time.Parse(time.RFC3339Nano, value)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ timestamp := timestamppb.New(t)
+ if ok := timestamp.IsValid(); !ok {
+ return protoreflect.Value{}, fmt.Errorf("%s before 0001-01-01", value)
+ }
+ msg = timestamp
+ case "google.protobuf.Duration":
+ d, err := time.ParseDuration(value)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = durationpb.New(d)
+ case "google.protobuf.DoubleValue":
+ v, err := strconv.ParseFloat(value, 64)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = wrapperspb.Double(v)
+ case "google.protobuf.FloatValue":
+ v, err := strconv.ParseFloat(value, 32)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = wrapperspb.Float(float32(v))
+ case "google.protobuf.Int64Value":
+ v, err := strconv.ParseInt(value, 10, 64)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = wrapperspb.Int64(v)
+ case "google.protobuf.Int32Value":
+ v, err := strconv.ParseInt(value, 10, 32)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = wrapperspb.Int32(int32(v))
+ case "google.protobuf.UInt64Value":
+ v, err := strconv.ParseUint(value, 10, 64)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = wrapperspb.UInt64(v)
+ case "google.protobuf.UInt32Value":
+ v, err := strconv.ParseUint(value, 10, 32)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = wrapperspb.UInt32(uint32(v))
+ case "google.protobuf.BoolValue":
+ v, err := strconv.ParseBool(value)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = wrapperspb.Bool(v)
+ case "google.protobuf.StringValue":
+ msg = wrapperspb.String(value)
+ case "google.protobuf.BytesValue":
+ v, err := Bytes(value)
+ if err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = wrapperspb.Bytes(v)
+ case "google.protobuf.FieldMask":
+ fm := &field_mask.FieldMask{}
+ fm.Paths = append(fm.Paths, strings.Split(value, ",")...)
+ msg = fm
+ case "google.protobuf.Value":
+ var v structpb.Value
+ if err := protojson.Unmarshal([]byte(value), &v); err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = &v
+ case "google.protobuf.Struct":
+ var v structpb.Struct
+ if err := protojson.Unmarshal([]byte(value), &v); err != nil {
+ return protoreflect.Value{}, err
+ }
+ msg = &v
+ default:
+ return protoreflect.Value{}, fmt.Errorf("unsupported message type: %q", string(msgDescriptor.FullName()))
+ }
+
+ return protoreflect.ValueOfMessage(msg.ProtoReflect()), nil
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/BUILD.bazel b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/BUILD.bazel
new file mode 100644
index 00000000..b8940946
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/BUILD.bazel
@@ -0,0 +1,31 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+package(default_visibility = ["//visibility:public"])
+
+go_library(
+ name = "utilities",
+ srcs = [
+ "doc.go",
+ "pattern.go",
+ "readerfactory.go",
+ "string_array_flag.go",
+ "trie.go",
+ ],
+ importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/utilities",
+)
+
+go_test(
+ name = "utilities_test",
+ size = "small",
+ srcs = [
+ "string_array_flag_test.go",
+ "trie_test.go",
+ ],
+ deps = [":utilities"],
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":utilities",
+ visibility = ["//visibility:public"],
+)
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/doc.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/doc.go
new file mode 100644
index 00000000..cf79a4d5
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/doc.go
@@ -0,0 +1,2 @@
+// Package utilities provides members for internal use in grpc-gateway.
+package utilities
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go
new file mode 100644
index 00000000..38ca39cc
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go
@@ -0,0 +1,22 @@
+package utilities
+
+// OpCode is an opcode of compiled path patterns.
+type OpCode int
+
+// These constants are the valid values of OpCode.
+const (
+ // OpNop does nothing
+ OpNop = OpCode(iota)
+ // OpPush pushes a component to stack
+ OpPush
+ // OpLitPush pushes a component to stack if it matches to the literal
+ OpLitPush
+ // OpPushM concatenates the remaining components and pushes it to stack
+ OpPushM
+ // OpConcatN pops N items from stack, concatenates them and pushes it back to stack
+ OpConcatN
+ // OpCapture pops an item and binds it to the variable
+ OpCapture
+ // OpEnd is the least positive invalid opcode.
+ OpEnd
+)
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/readerfactory.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/readerfactory.go
new file mode 100644
index 00000000..01d26eda
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/readerfactory.go
@@ -0,0 +1,19 @@
+package utilities
+
+import (
+ "bytes"
+ "io"
+)
+
+// IOReaderFactory takes in an io.Reader and returns a function that will allow you to create a new reader that begins
+// at the start of the stream
+func IOReaderFactory(r io.Reader) (func() io.Reader, error) {
+ b, err := io.ReadAll(r)
+ if err != nil {
+ return nil, err
+ }
+
+ return func() io.Reader {
+ return bytes.NewReader(b)
+ }, nil
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go
new file mode 100644
index 00000000..66aa5f2d
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go
@@ -0,0 +1,33 @@
+package utilities
+
+import (
+ "flag"
+ "strings"
+)
+
+// flagInterface is a cut down interface to `flag`
+type flagInterface interface {
+ Var(value flag.Value, name string, usage string)
+}
+
+// StringArrayFlag defines a flag with the specified name and usage string.
+// The return value is the address of a `StringArrayFlags` variable that stores the repeated values of the flag.
+func StringArrayFlag(f flagInterface, name string, usage string) *StringArrayFlags {
+ value := &StringArrayFlags{}
+ f.Var(value, name, usage)
+ return value
+}
+
+// StringArrayFlags is a wrapper of `[]string` to provider an interface for `flag.Var`
+type StringArrayFlags []string
+
+// String returns a string representation of `StringArrayFlags`
+func (i *StringArrayFlags) String() string {
+ return strings.Join(*i, ",")
+}
+
+// Set appends a value to `StringArrayFlags`
+func (i *StringArrayFlags) Set(value string) error {
+ *i = append(*i, value)
+ return nil
+}
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/trie.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/trie.go
new file mode 100644
index 00000000..dd99b0ed
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/trie.go
@@ -0,0 +1,174 @@
+package utilities
+
+import (
+ "sort"
+)
+
+// DoubleArray is a Double Array implementation of trie on sequences of strings.
+type DoubleArray struct {
+ // Encoding keeps an encoding from string to int
+ Encoding map[string]int
+ // Base is the base array of Double Array
+ Base []int
+ // Check is the check array of Double Array
+ Check []int
+}
+
+// NewDoubleArray builds a DoubleArray from a set of sequences of strings.
+func NewDoubleArray(seqs [][]string) *DoubleArray {
+ da := &DoubleArray{Encoding: make(map[string]int)}
+ if len(seqs) == 0 {
+ return da
+ }
+
+ encoded := registerTokens(da, seqs)
+ sort.Sort(byLex(encoded))
+
+ root := node{row: -1, col: -1, left: 0, right: len(encoded)}
+ addSeqs(da, encoded, 0, root)
+
+ for i := len(da.Base); i > 0; i-- {
+ if da.Check[i-1] != 0 {
+ da.Base = da.Base[:i]
+ da.Check = da.Check[:i]
+ break
+ }
+ }
+ return da
+}
+
+func registerTokens(da *DoubleArray, seqs [][]string) [][]int {
+ var result [][]int
+ for _, seq := range seqs {
+ encoded := make([]int, 0, len(seq))
+ for _, token := range seq {
+ if _, ok := da.Encoding[token]; !ok {
+ da.Encoding[token] = len(da.Encoding)
+ }
+ encoded = append(encoded, da.Encoding[token])
+ }
+ result = append(result, encoded)
+ }
+ for i := range result {
+ result[i] = append(result[i], len(da.Encoding))
+ }
+ return result
+}
+
+type node struct {
+ row, col int
+ left, right int
+}
+
+func (n node) value(seqs [][]int) int {
+ return seqs[n.row][n.col]
+}
+
+func (n node) children(seqs [][]int) []*node {
+ var result []*node
+ lastVal := int(-1)
+ last := new(node)
+ for i := n.left; i < n.right; i++ {
+ if lastVal == seqs[i][n.col+1] {
+ continue
+ }
+ last.right = i
+ last = &node{
+ row: i,
+ col: n.col + 1,
+ left: i,
+ }
+ result = append(result, last)
+ }
+ last.right = n.right
+ return result
+}
+
+func addSeqs(da *DoubleArray, seqs [][]int, pos int, n node) {
+ ensureSize(da, pos)
+
+ children := n.children(seqs)
+ var i int
+ for i = 1; ; i++ {
+ ok := func() bool {
+ for _, child := range children {
+ code := child.value(seqs)
+ j := i + code
+ ensureSize(da, j)
+ if da.Check[j] != 0 {
+ return false
+ }
+ }
+ return true
+ }()
+ if ok {
+ break
+ }
+ }
+ da.Base[pos] = i
+ for _, child := range children {
+ code := child.value(seqs)
+ j := i + code
+ da.Check[j] = pos + 1
+ }
+ terminator := len(da.Encoding)
+ for _, child := range children {
+ code := child.value(seqs)
+ if code == terminator {
+ continue
+ }
+ j := i + code
+ addSeqs(da, seqs, j, *child)
+ }
+}
+
+func ensureSize(da *DoubleArray, i int) {
+ for i >= len(da.Base) {
+ da.Base = append(da.Base, make([]int, len(da.Base)+1)...)
+ da.Check = append(da.Check, make([]int, len(da.Check)+1)...)
+ }
+}
+
+type byLex [][]int
+
+func (l byLex) Len() int { return len(l) }
+func (l byLex) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
+func (l byLex) Less(i, j int) bool {
+ si := l[i]
+ sj := l[j]
+ var k int
+ for k = 0; k < len(si) && k < len(sj); k++ {
+ if si[k] < sj[k] {
+ return true
+ }
+ if si[k] > sj[k] {
+ return false
+ }
+ }
+ return k < len(sj)
+}
+
+// HasCommonPrefix determines if any sequence in the DoubleArray is a prefix of the given sequence.
+func (da *DoubleArray) HasCommonPrefix(seq []string) bool {
+ if len(da.Base) == 0 {
+ return false
+ }
+
+ var i int
+ for _, t := range seq {
+ code, ok := da.Encoding[t]
+ if !ok {
+ break
+ }
+ j := da.Base[i] + code
+ if len(da.Check) <= j || da.Check[j] != i+1 {
+ break
+ }
+ i = j
+ }
+ j := da.Base[i] + len(da.Encoding)
+ if len(da.Check) <= j || da.Check[j] != i+1 {
+ return false
+ }
+ return true
+}
diff --git a/vendor/github.com/jellydator/ttlcache/v3/LICENSE b/vendor/github.com/jellydator/ttlcache/v3/LICENSE
new file mode 100644
index 00000000..f36a3b96
--- /dev/null
+++ b/vendor/github.com/jellydator/ttlcache/v3/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Jellydator
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/jellydator/ttlcache/v3/README.md b/vendor/github.com/jellydator/ttlcache/v3/README.md
new file mode 100644
index 00000000..a17cb243
--- /dev/null
+++ b/vendor/github.com/jellydator/ttlcache/v3/README.md
@@ -0,0 +1,143 @@
+## TTLCache - an in-memory cache with item expiration and generics
+
+[](https://pkg.go.dev/github.com/jellydator/ttlcache/v3)
+[](https://github.com/jellydator/ttlcache/actions/workflows/go.yml)
+[](https://coveralls.io/github/jellydator/ttlcache?branch=master)
+[](https://goreportcard.com/report/github.com/jellydator/ttlcache/v3)
+
+## Features
+- Simple API
+- Type parameters
+- Item expiration and automatic deletion
+- Automatic expiration time extension on each `Get` call
+- `Loader` interface that may be used to load/lazily initialize missing cache
+- Thread Safe
+items
+- Event handlers (insertion and eviction)
+- Metrics
+
+## Installation
+```
+go get github.com/jellydator/ttlcache/v3
+```
+
+## Usage
+The main type of `ttlcache` is `Cache`. It represents a single
+in-memory data store.
+
+To create a new instance of `ttlcache.Cache`, the `ttlcache.New()` function
+should be called:
+```go
+func main() {
+ cache := ttlcache.New[string, string]()
+}
+```
+
+Note that by default, a new cache instance does not let any of its
+items to expire or be automatically deleted. However, this feature
+can be activated by passing a few additional options into the
+`ttlcache.New()` function and calling the `cache.Start()` method:
+```go
+func main() {
+ cache := ttlcache.New[string, string](
+ ttlcache.WithTTL[string, string](30 * time.Minute),
+ )
+
+ go cache.Start() // starts automatic expired item deletion
+}
+```
+
+Even though the `cache.Start()` method handles expired item deletion well,
+there may be times when the system that uses `ttlcache` needs to determine
+when to delete the expired items itself. For example, it may need to
+delete them only when the resource load is at its lowest (e.g., after
+midnight, when the number of users/HTTP requests drops). So, in situations
+like these, instead of calling `cache.Start()`, the system could
+periodically call `cache.DeleteExpired()`:
+```go
+func main() {
+ cache := ttlcache.New[string, string](
+ ttlcache.WithTTL[string, string](30 * time.Minute),
+ )
+
+ for {
+ time.Sleep(4 * time.Hour)
+ cache.DeleteExpired()
+ }
+}
+```
+
+The data stored in `ttlcache.Cache` can be retrieved, checked and updated with
+`Set`, `Get`, `Delete`, `Has` etc. methods:
+```go
+func main() {
+ cache := ttlcache.New[string, string](
+ ttlcache.WithTTL[string, string](30 * time.Minute),
+ )
+
+ // insert data
+ cache.Set("first", "value1", ttlcache.DefaultTTL)
+ cache.Set("second", "value2", ttlcache.NoTTL)
+ cache.Set("third", "value3", ttlcache.DefaultTTL)
+
+ // retrieve data
+ item := cache.Get("first")
+ fmt.Println(item.Value(), item.ExpiresAt())
+
+ // check key
+ ok := cache.Has("third")
+
+ // delete data
+ cache.Delete("second")
+ cache.DeleteExpired()
+ cache.DeleteAll()
+
+ // retrieve data if in cache otherwise insert data
+ item, retrieved := cache.GetOrSet("fourth", "value4", WithTTL[string, string](ttlcache.DefaultTTL))
+
+ // retrieve and delete data
+ item, present := cache.GetAndDelete("fourth")
+}
+```
+
+To subscribe to insertion and eviction events, `cache.OnInsertion()` and
+`cache.OnEviction()` methods should be used:
+```go
+func main() {
+ cache := ttlcache.New[string, string](
+ ttlcache.WithTTL[string, string](30 * time.Minute),
+ ttlcache.WithCapacity[string, string](300),
+ )
+
+ cache.OnInsertion(func(ctx context.Context, item *ttlcache.Item[string, string]) {
+ fmt.Println(item.Value(), item.ExpiresAt())
+ })
+ cache.OnEviction(func(ctx context.Context, reason ttlcache.EvictionReason, item *ttlcache.Item[string, string]) {
+ if reason == ttlcache.EvictionReasonCapacityReached {
+ fmt.Println(item.Key(), item.Value())
+ }
+ })
+
+ cache.Set("first", "value1", ttlcache.DefaultTTL)
+ cache.DeleteAll()
+}
+```
+
+To load data when the cache does not have it, a custom or
+existing implementation of `ttlcache.Loader` can be used:
+```go
+func main() {
+ loader := ttlcache.LoaderFunc[string, string](
+ func(c *ttlcache.Cache[string, string], key string) *ttlcache.Item[string, string] {
+ // load from file/make an HTTP request
+ item := c.Set("key from file", "value from file")
+ return item
+ },
+ )
+ cache := ttlcache.New[string, string](
+ ttlcache.WithLoader[string, string](loader),
+ )
+
+ item := cache.Get("key from file")
+}
+```
diff --git a/vendor/github.com/jellydator/ttlcache/v3/cache.go b/vendor/github.com/jellydator/ttlcache/v3/cache.go
new file mode 100644
index 00000000..1b9e72ef
--- /dev/null
+++ b/vendor/github.com/jellydator/ttlcache/v3/cache.go
@@ -0,0 +1,787 @@
+package ttlcache
+
+import (
+ "container/list"
+ "context"
+ "fmt"
+ "sync"
+ "time"
+
+ "golang.org/x/sync/singleflight"
+)
+
+// Available eviction reasons.
+const (
+ EvictionReasonDeleted EvictionReason = iota + 1
+ EvictionReasonCapacityReached
+ EvictionReasonExpired
+)
+
+// EvictionReason is used to specify why a certain item was
+// evicted/deleted.
+type EvictionReason int
+
+// Cache is a synchronised map of items that are automatically removed
+// when they expire or the capacity is reached.
+type Cache[K comparable, V any] struct {
+ items struct {
+ mu sync.RWMutex
+ values map[K]*list.Element
+
+ // a generic doubly linked list would be more convenient
+ // (and more performant?). It's possible that this
+ // will be introduced with/in go1.19+
+ lru *list.List
+ expQueue expirationQueue[K, V]
+
+ timerCh chan time.Duration
+ }
+
+ metricsMu sync.RWMutex
+ metrics Metrics
+
+ events struct {
+ insertion struct {
+ mu sync.RWMutex
+ nextID uint64
+ fns map[uint64]func(*Item[K, V])
+ }
+ eviction struct {
+ mu sync.RWMutex
+ nextID uint64
+ fns map[uint64]func(EvictionReason, *Item[K, V])
+ }
+ }
+
+ stopCh chan struct{}
+ options options[K, V]
+}
+
+// New creates a new instance of cache.
+func New[K comparable, V any](opts ...Option[K, V]) *Cache[K, V] {
+ c := &Cache[K, V]{
+ stopCh: make(chan struct{}),
+ }
+ c.items.values = make(map[K]*list.Element)
+ c.items.lru = list.New()
+ c.items.expQueue = newExpirationQueue[K, V]()
+ c.items.timerCh = make(chan time.Duration, 1) // buffer is important
+ c.events.insertion.fns = make(map[uint64]func(*Item[K, V]))
+ c.events.eviction.fns = make(map[uint64]func(EvictionReason, *Item[K, V]))
+
+ applyOptions(&c.options, opts...)
+
+ return c
+}
+
+// updateExpirations updates the expiration queue and notifies
+// the cache auto cleaner if needed.
+// Not safe for concurrent use by multiple goroutines without additional
+// locking.
+func (c *Cache[K, V]) updateExpirations(fresh bool, elem *list.Element) {
+ var oldExpiresAt time.Time
+
+ if !c.items.expQueue.isEmpty() {
+ oldExpiresAt = c.items.expQueue[0].Value.(*Item[K, V]).expiresAt
+ }
+
+ if fresh {
+ c.items.expQueue.push(elem)
+ } else {
+ c.items.expQueue.update(elem)
+ }
+
+ newExpiresAt := c.items.expQueue[0].Value.(*Item[K, V]).expiresAt
+
+ // check if the closest/soonest expiration timestamp changed
+ if newExpiresAt.IsZero() || (!oldExpiresAt.IsZero() && !newExpiresAt.Before(oldExpiresAt)) {
+ return
+ }
+
+ d := time.Until(newExpiresAt)
+
+ // It's possible that the auto cleaner isn't active or
+ // is busy, so we need to drain the channel before
+ // sending a new value.
+ // Also, since this method is called after locking the items' mutex,
+ // we can be sure that there is no other concurrent call of this
+ // method
+ if len(c.items.timerCh) > 0 {
+ // we need to drain this channel in a select with a default
+ // case because it's possible that the auto cleaner
+ // read this channel just after we entered this if
+ select {
+ case d1 := <-c.items.timerCh:
+ if d1 < d {
+ d = d1
+ }
+ default:
+ }
+ }
+
+ // since the channel has a size 1 buffer, we can be sure
+ // that the line below won't block (we can't overfill the buffer
+ // because we just drained it)
+ c.items.timerCh <- d
+}
+
+// set creates a new item, adds it to the cache and then returns it.
+// Not safe for concurrent use by multiple goroutines without additional
+// locking.
+func (c *Cache[K, V]) set(key K, value V, ttl time.Duration) *Item[K, V] {
+ if ttl == DefaultTTL {
+ ttl = c.options.ttl
+ }
+
+ elem := c.get(key, false, true)
+ if elem != nil {
+ // update/overwrite an existing item
+ item := elem.Value.(*Item[K, V])
+ item.update(value, ttl)
+ c.updateExpirations(false, elem)
+
+ return item
+ }
+
+ if c.options.capacity != 0 && uint64(len(c.items.values)) >= c.options.capacity {
+ // delete the oldest item
+ c.evict(EvictionReasonCapacityReached, c.items.lru.Back())
+ }
+
+ if ttl == PreviousOrDefaultTTL {
+ ttl = c.options.ttl
+ }
+
+ // create a new item
+ item := newItem(key, value, ttl, c.options.enableVersionTracking)
+ elem = c.items.lru.PushFront(item)
+ c.items.values[key] = elem
+ c.updateExpirations(true, elem)
+
+ c.metricsMu.Lock()
+ c.metrics.Insertions++
+ c.metricsMu.Unlock()
+
+ c.events.insertion.mu.RLock()
+ for _, fn := range c.events.insertion.fns {
+ fn(item)
+ }
+ c.events.insertion.mu.RUnlock()
+
+ return item
+}
+
+// get retrieves an item from the cache and extends its expiration
+// time if 'touch' is set to true.
+// It returns nil if the item is not found or is expired.
+// Not safe for concurrent use by multiple goroutines without additional
+// locking.
+func (c *Cache[K, V]) get(key K, touch bool, includeExpired bool) *list.Element {
+ elem := c.items.values[key]
+ if elem == nil {
+ return nil
+ }
+
+ item := elem.Value.(*Item[K, V])
+ if !includeExpired && item.isExpiredUnsafe() {
+ return nil
+ }
+
+ c.items.lru.MoveToFront(elem)
+
+ if touch && item.ttl > 0 {
+ item.touch()
+ c.updateExpirations(false, elem)
+ }
+
+ return elem
+}
+
+// getWithOpts wraps the get method, applies the given options, and updates
+// the metrics.
+// It returns nil if the item is not found or is expired.
+// If 'lockAndLoad' is set to true, the mutex is locked before calling the
+// get method and unlocked after it returns. It also indicates that the
+// loader should be used to load external data when the get method returns
+// a nil value and the mutex is unlocked.
+// If 'lockAndLoad' is set to false, neither the mutex nor the loader is
+// used.
+func (c *Cache[K, V]) getWithOpts(key K, lockAndLoad bool, opts ...Option[K, V]) *Item[K, V] {
+ getOpts := options[K, V]{
+ loader: c.options.loader,
+ disableTouchOnHit: c.options.disableTouchOnHit,
+ }
+
+ applyOptions(&getOpts, opts...)
+
+ if lockAndLoad {
+ c.items.mu.Lock()
+ }
+
+ elem := c.get(key, !getOpts.disableTouchOnHit, false)
+
+ if lockAndLoad {
+ c.items.mu.Unlock()
+ }
+
+ if elem == nil {
+ c.metricsMu.Lock()
+ c.metrics.Misses++
+ c.metricsMu.Unlock()
+
+ if lockAndLoad && getOpts.loader != nil {
+ return getOpts.loader.Load(c, key)
+ }
+
+ return nil
+ }
+
+ c.metricsMu.Lock()
+ c.metrics.Hits++
+ c.metricsMu.Unlock()
+
+ return elem.Value.(*Item[K, V])
+}
+
+// evict deletes items from the cache.
+// If no items are provided, all currently present cache items
+// are evicted.
+// Not safe for concurrent use by multiple goroutines without additional
+// locking.
+func (c *Cache[K, V]) evict(reason EvictionReason, elems ...*list.Element) {
+ if len(elems) > 0 {
+ c.metricsMu.Lock()
+ c.metrics.Evictions += uint64(len(elems))
+ c.metricsMu.Unlock()
+
+ c.events.eviction.mu.RLock()
+ for i := range elems {
+ item := elems[i].Value.(*Item[K, V])
+ delete(c.items.values, item.key)
+ c.items.lru.Remove(elems[i])
+ c.items.expQueue.remove(elems[i])
+
+ for _, fn := range c.events.eviction.fns {
+ fn(reason, item)
+ }
+ }
+ c.events.eviction.mu.RUnlock()
+
+ return
+ }
+
+ c.metricsMu.Lock()
+ c.metrics.Evictions += uint64(len(c.items.values))
+ c.metricsMu.Unlock()
+
+ c.events.eviction.mu.RLock()
+ for _, elem := range c.items.values {
+ item := elem.Value.(*Item[K, V])
+
+ for _, fn := range c.events.eviction.fns {
+ fn(reason, item)
+ }
+ }
+ c.events.eviction.mu.RUnlock()
+
+ c.items.values = make(map[K]*list.Element)
+ c.items.lru.Init()
+ c.items.expQueue = newExpirationQueue[K, V]()
+}
+
+// delete deletes an item by the provided key.
+// The method is no-op if the item is not found.
+// Not safe for concurrent use by multiple goroutines without additional
+// locking.
+func (c *Cache[K, V]) delete(key K) {
+ elem := c.items.values[key]
+ if elem == nil {
+ return
+ }
+
+ c.evict(EvictionReasonDeleted, elem)
+}
+
+// Set creates a new item from the provided key and value, adds
+// it to the cache and then returns it. If an item associated with the
+// provided key already exists, the new item overwrites the existing one.
+// NoTTL constant or -1 can be used to indicate that the item should never
+// expire.
+// DefaultTTL constant or 0 can be used to indicate that the item should use
+// the default/global TTL that was specified when the cache instance was
+// created.
+func (c *Cache[K, V]) Set(key K, value V, ttl time.Duration) *Item[K, V] {
+ c.items.mu.Lock()
+ defer c.items.mu.Unlock()
+
+ return c.set(key, value, ttl)
+}
+
+// Get retrieves an item from the cache by the provided key.
+// Unless this is disabled, it also extends/touches an item's
+// expiration timestamp on successful retrieval.
+// If the item is not found, a nil value is returned.
+func (c *Cache[K, V]) Get(key K, opts ...Option[K, V]) *Item[K, V] {
+ return c.getWithOpts(key, true, opts...)
+}
+
+// Delete deletes an item from the cache. If the item associated with
+// the key is not found, the method is no-op.
+func (c *Cache[K, V]) Delete(key K) {
+ c.items.mu.Lock()
+ defer c.items.mu.Unlock()
+
+ c.delete(key)
+}
+
+// Has checks whether the key exists in the cache.
+func (c *Cache[K, V]) Has(key K) bool {
+ c.items.mu.RLock()
+ defer c.items.mu.RUnlock()
+
+ elem, ok := c.items.values[key]
+ return ok && !elem.Value.(*Item[K, V]).isExpiredUnsafe()
+}
+
+// GetOrSet retrieves an item from the cache by the provided key.
+// If the item is not found, it is created with the provided options and
+// then returned.
+// The bool return value is true if the item was found, false if created
+// during the execution of the method.
+// If the loader is non-nil (i.e., used as an option or specified when
+// creating the cache instance), its execution is skipped.
+func (c *Cache[K, V]) GetOrSet(key K, value V, opts ...Option[K, V]) (*Item[K, V], bool) {
+ c.items.mu.Lock()
+ defer c.items.mu.Unlock()
+
+ elem := c.getWithOpts(key, false, opts...)
+ if elem != nil {
+ return elem, true
+ }
+
+ setOpts := options[K, V]{
+ ttl: c.options.ttl,
+ }
+ applyOptions(&setOpts, opts...) // used only to update the TTL
+
+ item := c.set(key, value, setOpts.ttl)
+
+ return item, false
+}
+
+// GetAndDelete retrieves an item from the cache by the provided key and
+// then deletes it.
+// The bool return value is true if the item was found before
+// its deletion, false if not.
+// If the loader is non-nil (i.e., used as an option or specified when
+// creating the cache instance), it is executed normaly, i.e., only when
+// the item is not found.
+func (c *Cache[K, V]) GetAndDelete(key K, opts ...Option[K, V]) (*Item[K, V], bool) {
+ c.items.mu.Lock()
+
+ elem := c.getWithOpts(key, false, opts...)
+ if elem == nil {
+ c.items.mu.Unlock()
+
+ getOpts := options[K, V]{
+ loader: c.options.loader,
+ }
+ applyOptions(&getOpts, opts...) // used only to update the loader
+
+ if getOpts.loader != nil {
+ item := getOpts.loader.Load(c, key)
+ return item, item != nil
+ }
+
+ return nil, false
+ }
+
+ c.delete(key)
+ c.items.mu.Unlock()
+
+ return elem, true
+}
+
+// DeleteAll deletes all items from the cache.
+func (c *Cache[K, V]) DeleteAll() {
+ c.items.mu.Lock()
+ c.evict(EvictionReasonDeleted)
+ c.items.mu.Unlock()
+}
+
+// DeleteExpired deletes all expired items from the cache.
+func (c *Cache[K, V]) DeleteExpired() {
+ c.items.mu.Lock()
+ defer c.items.mu.Unlock()
+
+ if c.items.expQueue.isEmpty() {
+ return
+ }
+
+ e := c.items.expQueue[0]
+ for e.Value.(*Item[K, V]).isExpiredUnsafe() {
+ c.evict(EvictionReasonExpired, e)
+
+ if c.items.expQueue.isEmpty() {
+ break
+ }
+
+ // expiration queue has a new root
+ e = c.items.expQueue[0]
+ }
+}
+
+// Touch simulates an item's retrieval without actually returning it.
+// Its main purpose is to extend an item's expiration timestamp.
+// If the item is not found, the method is no-op.
+func (c *Cache[K, V]) Touch(key K) {
+ c.items.mu.Lock()
+ c.get(key, true, false)
+ c.items.mu.Unlock()
+}
+
+// Len returns the number of unexpired items in the cache.
+func (c *Cache[K, V]) Len() int {
+ c.items.mu.RLock()
+ defer c.items.mu.RUnlock()
+
+ total := c.items.expQueue.Len()
+ if total == 0 {
+ return 0
+ }
+
+ // search the heap-based expQueue by BFS
+ countExpired := func() int {
+ var (
+ q []int
+ res int
+ )
+
+ item := c.items.expQueue[0].Value.(*Item[K, V])
+ if !item.isExpiredUnsafe() {
+ return res
+ }
+
+ q = append(q, 0)
+ for len(q) > 0 {
+ pop := q[0]
+ q = q[1:]
+ res++
+
+ for i := 1; i <= 2; i++ {
+ idx := 2*pop + i
+ if idx >= total {
+ break
+ }
+
+ item = c.items.expQueue[idx].Value.(*Item[K, V])
+ if item.isExpiredUnsafe() {
+ q = append(q, idx)
+ }
+ }
+ }
+ return res
+ }
+
+ return total - countExpired()
+}
+
+// Keys returns all unexpired keys in the cache.
+func (c *Cache[K, V]) Keys() []K {
+ c.items.mu.RLock()
+ defer c.items.mu.RUnlock()
+
+ res := make([]K, 0)
+ for k, elem := range c.items.values {
+ if !elem.Value.(*Item[K, V]).isExpiredUnsafe() {
+ res = append(res, k)
+ }
+ }
+
+ return res
+}
+
+// Items returns a copy of all items in the cache.
+// It does not update any expiration timestamps.
+func (c *Cache[K, V]) Items() map[K]*Item[K, V] {
+ c.items.mu.RLock()
+ defer c.items.mu.RUnlock()
+
+ items := make(map[K]*Item[K, V])
+ for k, elem := range c.items.values {
+ item := elem.Value.(*Item[K, V])
+ if item != nil && !item.isExpiredUnsafe() {
+ items[k] = item
+ }
+ }
+
+ return items
+}
+
+// Range calls fn for each unexpired item in the cache. If fn returns false,
+// Range stops the iteration.
+func (c *Cache[K, V]) Range(fn func(item *Item[K, V]) bool) {
+ c.items.mu.RLock()
+
+ // Check if cache is empty
+ if c.items.lru.Len() == 0 {
+ c.items.mu.RUnlock()
+ return
+ }
+
+ for item := c.items.lru.Front(); item != c.items.lru.Back().Next(); item = item.Next() {
+ i := item.Value.(*Item[K, V])
+ expired := i.isExpiredUnsafe()
+ c.items.mu.RUnlock()
+
+ if !expired && !fn(i) {
+ return
+ }
+
+ if item.Next() != nil {
+ c.items.mu.RLock()
+ }
+ }
+}
+
+// RangeBackwards calls fn for each unexpired item in the cache in reverse order.
+// If fn returns false, RangeBackwards stops the iteration.
+func (c *Cache[K, V]) RangeBackwards(fn func(item *Item[K, V]) bool) {
+ c.items.mu.RLock()
+
+ // Check if cache is empty
+ if c.items.lru.Len() == 0 {
+ c.items.mu.RUnlock()
+ return
+ }
+
+ for item := c.items.lru.Back(); item != c.items.lru.Front().Prev(); item = item.Prev() {
+ i := item.Value.(*Item[K, V])
+ expired := i.isExpiredUnsafe()
+ c.items.mu.RUnlock()
+
+ if !expired && !fn(i) {
+ return
+ }
+
+ if item.Prev() != nil {
+ c.items.mu.RLock()
+ }
+ }
+}
+
+// Metrics returns the metrics of the cache.
+func (c *Cache[K, V]) Metrics() Metrics {
+ c.metricsMu.RLock()
+ defer c.metricsMu.RUnlock()
+
+ return c.metrics
+}
+
+// Start starts an automatic cleanup process that periodically deletes
+// expired items.
+// It blocks until Stop is called.
+func (c *Cache[K, V]) Start() {
+ waitDur := func() time.Duration {
+ c.items.mu.RLock()
+ defer c.items.mu.RUnlock()
+
+ if !c.items.expQueue.isEmpty() &&
+ !c.items.expQueue[0].Value.(*Item[K, V]).expiresAt.IsZero() {
+ d := time.Until(c.items.expQueue[0].Value.(*Item[K, V]).expiresAt)
+ if d <= 0 {
+ // execute immediately
+ return time.Microsecond
+ }
+
+ return d
+ }
+
+ if c.options.ttl > 0 {
+ return c.options.ttl
+ }
+
+ return time.Hour
+ }
+
+ timer := time.NewTimer(waitDur())
+ stop := func() {
+ if !timer.Stop() {
+ // drain the timer chan
+ select {
+ case <-timer.C:
+ default:
+ }
+ }
+ }
+
+ defer stop()
+
+ for {
+ select {
+ case <-c.stopCh:
+ return
+ case d := <-c.items.timerCh:
+ stop()
+ timer.Reset(d)
+ case <-timer.C:
+ c.DeleteExpired()
+ stop()
+ timer.Reset(waitDur())
+ }
+ }
+}
+
+// Stop stops the automatic cleanup process.
+// It blocks until the cleanup process exits.
+func (c *Cache[K, V]) Stop() {
+ c.stopCh <- struct{}{}
+}
+
+// OnInsertion adds the provided function to be executed when
+// a new item is inserted into the cache. The function is executed
+// on a separate goroutine and does not block the flow of the cache
+// manager.
+// The returned function may be called to delete the subscription function
+// from the list of insertion subscribers.
+// When the returned function is called, it blocks until all instances of
+// the same subscription function return. A context is used to notify the
+// subscription function when the returned/deletion function is called.
+func (c *Cache[K, V]) OnInsertion(fn func(context.Context, *Item[K, V])) func() {
+ var (
+ wg sync.WaitGroup
+ ctx, cancel = context.WithCancel(context.Background())
+ )
+
+ c.events.insertion.mu.Lock()
+ id := c.events.insertion.nextID
+ c.events.insertion.fns[id] = func(item *Item[K, V]) {
+ wg.Add(1)
+ go func() {
+ fn(ctx, item)
+ wg.Done()
+ }()
+ }
+ c.events.insertion.nextID++
+ c.events.insertion.mu.Unlock()
+
+ return func() {
+ cancel()
+
+ c.events.insertion.mu.Lock()
+ delete(c.events.insertion.fns, id)
+ c.events.insertion.mu.Unlock()
+
+ wg.Wait()
+ }
+}
+
+// OnEviction adds the provided function to be executed when
+// an item is evicted/deleted from the cache. The function is executed
+// on a separate goroutine and does not block the flow of the cache
+// manager.
+// The returned function may be called to delete the subscription function
+// from the list of eviction subscribers.
+// When the returned function is called, it blocks until all instances of
+// the same subscription function return. A context is used to notify the
+// subscription function when the returned/deletion function is called.
+func (c *Cache[K, V]) OnEviction(fn func(context.Context, EvictionReason, *Item[K, V])) func() {
+ var (
+ wg sync.WaitGroup
+ ctx, cancel = context.WithCancel(context.Background())
+ )
+
+ c.events.eviction.mu.Lock()
+ id := c.events.eviction.nextID
+ c.events.eviction.fns[id] = func(r EvictionReason, item *Item[K, V]) {
+ wg.Add(1)
+ go func() {
+ fn(ctx, r, item)
+ wg.Done()
+ }()
+ }
+ c.events.eviction.nextID++
+ c.events.eviction.mu.Unlock()
+
+ return func() {
+ cancel()
+
+ c.events.eviction.mu.Lock()
+ delete(c.events.eviction.fns, id)
+ c.events.eviction.mu.Unlock()
+
+ wg.Wait()
+ }
+}
+
+// Loader is an interface that handles missing data loading.
+type Loader[K comparable, V any] interface {
+ // Load should execute a custom item retrieval logic and
+ // return the item that is associated with the key.
+ // It should return nil if the item is not found/valid.
+ // The method is allowed to fetch data from the cache instance
+ // or update it for future use.
+ Load(c *Cache[K, V], key K) *Item[K, V]
+}
+
+// LoaderFunc type is an adapter that allows the use of ordinary
+// functions as data loaders.
+type LoaderFunc[K comparable, V any] func(*Cache[K, V], K) *Item[K, V]
+
+// Load executes a custom item retrieval logic and returns the item that
+// is associated with the key.
+// It returns nil if the item is not found/valid.
+func (l LoaderFunc[K, V]) Load(c *Cache[K, V], key K) *Item[K, V] {
+ return l(c, key)
+}
+
+// SuppressedLoader wraps another Loader and suppresses duplicate
+// calls to its Load method.
+type SuppressedLoader[K comparable, V any] struct {
+ loader Loader[K, V]
+ group *singleflight.Group
+}
+
+// NewSuppressedLoader creates a new instance of suppressed loader.
+// If the group parameter is nil, a newly created instance of
+// *singleflight.Group is used.
+func NewSuppressedLoader[K comparable, V any](loader Loader[K, V], group *singleflight.Group) *SuppressedLoader[K, V] {
+ if group == nil {
+ group = &singleflight.Group{}
+ }
+
+ return &SuppressedLoader[K, V]{
+ loader: loader,
+ group: group,
+ }
+}
+
+// Load executes a custom item retrieval logic and returns the item that
+// is associated with the key.
+// It returns nil if the item is not found/valid.
+// It also ensures that only one execution of the wrapped Loader's Load
+// method is in-flight for a given key at a time.
+func (l *SuppressedLoader[K, V]) Load(c *Cache[K, V], key K) *Item[K, V] {
+ // there should be a better/generic way to create a
+ // singleflight Group's key. It's possible that a generic
+ // singleflight.Group will be introduced with/in go1.19+
+ strKey := fmt.Sprint(key)
+
+ // the error can be discarded since the singleflight.Group
+ // itself does not return any of its errors, it returns
+ // the error that we return ourselves in the func below, which
+ // is also nil
+ res, _, _ := l.group.Do(strKey, func() (interface{}, error) {
+ item := l.loader.Load(c, key)
+ if item == nil {
+ return nil, nil
+ }
+
+ return item, nil
+ })
+ if res == nil {
+ return nil
+ }
+
+ return res.(*Item[K, V])
+}
diff --git a/vendor/github.com/jellydator/ttlcache/v3/expiration_queue.go b/vendor/github.com/jellydator/ttlcache/v3/expiration_queue.go
new file mode 100644
index 00000000..0f104588
--- /dev/null
+++ b/vendor/github.com/jellydator/ttlcache/v3/expiration_queue.go
@@ -0,0 +1,85 @@
+package ttlcache
+
+import (
+ "container/heap"
+ "container/list"
+)
+
+// expirationQueue stores items that are ordered by their expiration
+// timestamps. The 0th item is closest to its expiration.
+type expirationQueue[K comparable, V any] []*list.Element
+
+// newExpirationQueue creates and initializes a new expiration queue.
+func newExpirationQueue[K comparable, V any]() expirationQueue[K, V] {
+ q := make(expirationQueue[K, V], 0)
+ heap.Init(&q)
+ return q
+}
+
+// isEmpty checks if the queue is empty.
+func (q expirationQueue[K, V]) isEmpty() bool {
+ return q.Len() == 0
+}
+
+// update updates an existing item's value and position in the queue.
+func (q *expirationQueue[K, V]) update(elem *list.Element) {
+ heap.Fix(q, elem.Value.(*Item[K, V]).queueIndex)
+}
+
+// push pushes a new item into the queue and updates the order of its
+// elements.
+func (q *expirationQueue[K, V]) push(elem *list.Element) {
+ heap.Push(q, elem)
+}
+
+// remove removes an item from the queue and updates the order of its
+// elements.
+func (q *expirationQueue[K, V]) remove(elem *list.Element) {
+ heap.Remove(q, elem.Value.(*Item[K, V]).queueIndex)
+}
+
+// Len returns the total number of items in the queue.
+func (q expirationQueue[K, V]) Len() int {
+ return len(q)
+}
+
+// Less checks if the item at the i position expires sooner than
+// the one at the j position.
+func (q expirationQueue[K, V]) Less(i, j int) bool {
+ item1, item2 := q[i].Value.(*Item[K, V]), q[j].Value.(*Item[K, V])
+ if item1.expiresAt.IsZero() {
+ return false
+ }
+
+ if item2.expiresAt.IsZero() {
+ return true
+ }
+
+ return item1.expiresAt.Before(item2.expiresAt)
+}
+
+// Swap switches the places of two queue items.
+func (q expirationQueue[K, V]) Swap(i, j int) {
+ q[i], q[j] = q[j], q[i]
+ q[i].Value.(*Item[K, V]).queueIndex = i
+ q[j].Value.(*Item[K, V]).queueIndex = j
+}
+
+// Push appends a new item to the item slice.
+func (q *expirationQueue[K, V]) Push(x interface{}) {
+ elem := x.(*list.Element)
+ elem.Value.(*Item[K, V]).queueIndex = len(*q)
+ *q = append(*q, elem)
+}
+
+// Pop removes and returns the last item.
+func (q *expirationQueue[K, V]) Pop() interface{} {
+ old := *q
+ i := len(old) - 1
+ elem := old[i]
+ elem.Value.(*Item[K, V]).queueIndex = -1
+ old[i] = nil // avoid memory leak
+ *q = old[:i]
+
+ return elem
+}
diff --git a/vendor/github.com/jellydator/ttlcache/v3/item.go b/vendor/github.com/jellydator/ttlcache/v3/item.go
new file mode 100644
index 00000000..c3c26cf6
--- /dev/null
+++ b/vendor/github.com/jellydator/ttlcache/v3/item.go
@@ -0,0 +1,161 @@
+package ttlcache
+
+import (
+ "sync"
+ "time"
+)
+
+const (
+ // NoTTL indicates that an item should never expire.
+ NoTTL time.Duration = -1
+
+ // PreviousOrDefaultTTL indicates that existing TTL of item should be used
+ // default TTL will be used as fallback if item doesn't exist
+ PreviousOrDefaultTTL time.Duration = -2
+
+ // DefaultTTL indicates that the default TTL value of the cache
+ // instance should be used.
+ DefaultTTL time.Duration = 0
+)
+
+// Item holds all the information that is associated with a single
+// cache value.
+type Item[K comparable, V any] struct {
+ // the mutex needs to be locked only when:
+ // - data fields are being read inside accessor methods
+ // - data fields are being updated
+ // when data fields are being read in one of the cache's
+ // methods, we can be sure that these fields are not modified
+ // concurrently since the item list is locked by its own mutex as
+ // well, so locking this mutex would be redundant.
+ // In other words, this mutex is only useful when these fields
+ // are being read from the outside (e.g. in event functions).
+ mu sync.RWMutex
+ key K
+ value V
+ ttl time.Duration
+ expiresAt time.Time
+ queueIndex int
+ version int64
+}
+
+// newItem creates a new cache item.
+func newItem[K comparable, V any](key K, value V, ttl time.Duration, enableVersionTracking bool) *Item[K, V] {
+ item := &Item[K, V]{
+ key: key,
+ value: value,
+ ttl: ttl,
+ }
+
+ if !enableVersionTracking {
+ item.version = -1
+ }
+
+ item.touch()
+
+ return item
+}
+
+// update modifies the item's value, TTL, and version.
+func (item *Item[K, V]) update(value V, ttl time.Duration) {
+ item.mu.Lock()
+ defer item.mu.Unlock()
+
+ item.value = value
+
+ // update version if enabled
+ if item.version > -1 {
+ item.version++
+ }
+
+ // no need to update ttl or expiry in this case
+ if ttl == PreviousOrDefaultTTL {
+ return
+ }
+
+ item.ttl = ttl
+
+ // reset expiration timestamp because the new TTL may be
+ // 0 or below
+ item.expiresAt = time.Time{}
+ item.touchUnsafe()
+}
+
+// touch updates the item's expiration timestamp.
+func (item *Item[K, V]) touch() {
+ item.mu.Lock()
+ defer item.mu.Unlock()
+
+ item.touchUnsafe()
+}
+
+// touchUnsafe updates the item's expiration timestamp without
+// locking the mutex.
+func (item *Item[K, V]) touchUnsafe() {
+ if item.ttl <= 0 {
+ return
+ }
+
+ item.expiresAt = time.Now().Add(item.ttl)
+}
+
+// IsExpired returns a bool value that indicates whether the item
+// is expired.
+func (item *Item[K, V]) IsExpired() bool {
+ item.mu.RLock()
+ defer item.mu.RUnlock()
+
+ return item.isExpiredUnsafe()
+}
+
+// isExpiredUnsafe returns a bool value that indicates whether the
+// the item is expired without locking the mutex
+func (item *Item[K, V]) isExpiredUnsafe() bool {
+ if item.ttl <= 0 {
+ return false
+ }
+
+ return item.expiresAt.Before(time.Now())
+}
+
+// Key returns the key of the item.
+func (item *Item[K, V]) Key() K {
+ item.mu.RLock()
+ defer item.mu.RUnlock()
+
+ return item.key
+}
+
+// Value returns the value of the item.
+func (item *Item[K, V]) Value() V {
+ item.mu.RLock()
+ defer item.mu.RUnlock()
+
+ return item.value
+}
+
+// TTL returns the TTL value of the item.
+func (item *Item[K, V]) TTL() time.Duration {
+ item.mu.RLock()
+ defer item.mu.RUnlock()
+
+ return item.ttl
+}
+
+// ExpiresAt returns the expiration timestamp of the item.
+func (item *Item[K, V]) ExpiresAt() time.Time {
+ item.mu.RLock()
+ defer item.mu.RUnlock()
+
+ return item.expiresAt
+}
+
+// Version returns the version of the item. It shows the total number of
+// changes made to the item.
+// If version tracking is disabled, the return value is always -1.
+func (item *Item[K, V]) Version() int64 {
+ item.mu.RLock()
+ defer item.mu.RUnlock()
+
+ return item.version
+}
diff --git a/vendor/github.com/jellydator/ttlcache/v3/metrics.go b/vendor/github.com/jellydator/ttlcache/v3/metrics.go
new file mode 100644
index 00000000..8e7595a0
--- /dev/null
+++ b/vendor/github.com/jellydator/ttlcache/v3/metrics.go
@@ -0,0 +1,22 @@
+package ttlcache
+
+// Metrics contains common cache metrics calculated over the course
+// of the cache's lifetime.
+type Metrics struct {
+ // Insertions specifies how many items were inserted.
+ Insertions uint64
+
+ // Hits specifies how many items were successfully retrieved
+ // from the cache.
+ // Retrievals made with a loader function are not tracked.
+ Hits uint64
+
+ // Misses specifies how many items were not found in the cache.
+ // Retrievals made with a loader function are considered misses as
+ // well.
+ Misses uint64
+
+ // Evictions specifies how many items were removed from the
+ // cache.
+ Evictions uint64
+}
diff --git a/vendor/github.com/jellydator/ttlcache/v3/options.go b/vendor/github.com/jellydator/ttlcache/v3/options.go
new file mode 100644
index 00000000..8a6088c0
--- /dev/null
+++ b/vendor/github.com/jellydator/ttlcache/v3/options.go
@@ -0,0 +1,77 @@
+package ttlcache
+
+import "time"
+
+// Option sets a specific cache option.
+type Option[K comparable, V any] interface {
+ apply(opts *options[K, V])
+}
+
+// optionFunc wraps a function and implements the Option interface.
+type optionFunc[K comparable, V any] func(*options[K, V])
+
+// apply calls the wrapped function.
+func (fn optionFunc[K, V]) apply(opts *options[K, V]) {
+ fn(opts)
+}
+
+// options holds all available cache configuration options.
+type options[K comparable, V any] struct {
+ capacity uint64
+ ttl time.Duration
+ loader Loader[K, V]
+ disableTouchOnHit bool
+ enableVersionTracking bool
+}
+
+// applyOptions applies the provided option values to the option struct.
+func applyOptions[K comparable, V any](v *options[K, V], opts ...Option[K, V]) {
+ for i := range opts {
+ opts[i].apply(v)
+ }
+}
+
+// WithCapacity sets the maximum capacity of the cache.
+// It has no effect when used with Get().
+func WithCapacity[K comparable, V any](c uint64) Option[K, V] {
+ return optionFunc[K, V](func(opts *options[K, V]) {
+ opts.capacity = c
+ })
+}
+
+// WithTTL sets the TTL of the cache.
+// It has no effect when used with Get().
+func WithTTL[K comparable, V any](ttl time.Duration) Option[K, V] {
+ return optionFunc[K, V](func(opts *options[K, V]) {
+ opts.ttl = ttl
+ })
+}
+
+// WithVersion activates item version tracking.
+// If version tracking is disabled, the version is always -1.
+// It has no effect when used with Get().
+func WithVersion[K comparable, V any](enable bool) Option[K, V] {
+ return optionFunc[K, V](func(opts *options[K, V]) {
+ opts.enableVersionTracking = enable
+ })
+}
+
+// WithLoader sets the loader of the cache.
+// When passing into Get(), it sets an ephemeral loader that
+// is used instead of the cache's default one.
+func WithLoader[K comparable, V any](l Loader[K, V]) Option[K, V] {
+ return optionFunc[K, V](func(opts *options[K, V]) {
+ opts.loader = l
+ })
+}
+
+// WithDisableTouchOnHit prevents the cache instance from
+// extending/touching an item's expiration timestamp when it is being
+// retrieved.
+// When used with Get(), it overrides the default value of the
+// cache.
+func WithDisableTouchOnHit[K comparable, V any]() Option[K, V] {
+ return optionFunc[K, V](func(opts *options[K, V]) {
+ opts.disableTouchOnHit = true
+ })
+}
diff --git a/vendor/github.com/pquerna/xjwt/.travis.yml b/vendor/github.com/pquerna/xjwt/.travis.yml
index 671cb298..d689f293 100644
--- a/vendor/github.com/pquerna/xjwt/.travis.yml
+++ b/vendor/github.com/pquerna/xjwt/.travis.yml
@@ -1,4 +1,4 @@
language: go
go:
- - "1.16"
+ - "1.23"
diff --git a/vendor/github.com/pquerna/xjwt/go.work b/vendor/github.com/pquerna/xjwt/go.work
index 072ddb64..6458fef6 100644
--- a/vendor/github.com/pquerna/xjwt/go.work
+++ b/vendor/github.com/pquerna/xjwt/go.work
@@ -1,4 +1,4 @@
-go 1.20
+go 1.23
use (
.
diff --git a/vendor/github.com/pquerna/xjwt/go.work.sum b/vendor/github.com/pquerna/xjwt/go.work.sum
index 42dc9afb..e32a15a2 100644
--- a/vendor/github.com/pquerna/xjwt/go.work.sum
+++ b/vendor/github.com/pquerna/xjwt/go.work.sum
@@ -1 +1,25 @@
-golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
+github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
+github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
+golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
+golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
+golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
+golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
+golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
+golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
+golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
+golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
+golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
+golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
+golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
+golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
diff --git a/vendor/github.com/pquerna/xjwt/key.go b/vendor/github.com/pquerna/xjwt/key.go
index 016a5408..5d4843ce 100644
--- a/vendor/github.com/pquerna/xjwt/key.go
+++ b/vendor/github.com/pquerna/xjwt/key.go
@@ -7,7 +7,7 @@ import (
"encoding/hex"
"fmt"
- jose "github.com/go-jose/go-jose/v3"
+ jose "github.com/go-jose/go-jose/v4"
)
// ParsePrivateKey converts a private key from a PEM encoding to a *jose.JSONWebKey.
diff --git a/vendor/github.com/pquerna/xjwt/rand.go b/vendor/github.com/pquerna/xjwt/rand.go
index e285271c..f9355b96 100644
--- a/vendor/github.com/pquerna/xjwt/rand.go
+++ b/vendor/github.com/pquerna/xjwt/rand.go
@@ -4,7 +4,7 @@ import (
"crypto/rand"
"encoding/hex"
- jose "github.com/go-jose/go-jose/v3"
+ jose "github.com/go-jose/go-jose/v4"
)
// RandomNonce provides a basic, random value, conforming to the jose.NonceSource interface.
diff --git a/vendor/github.com/pquerna/xjwt/verify.go b/vendor/github.com/pquerna/xjwt/verify.go
index 74838ba9..83aa0cda 100644
--- a/vendor/github.com/pquerna/xjwt/verify.go
+++ b/vendor/github.com/pquerna/xjwt/verify.go
@@ -6,7 +6,7 @@ import (
"fmt"
- jose "github.com/go-jose/go-jose/v3"
+ jose "github.com/go-jose/go-jose/v4"
)
// VerifyReasons expresses why a JWT was not valid.
@@ -79,11 +79,15 @@ type VerifyConfig struct {
MaxExpirationFromNow time.Duration
// KeySet is a set of JWKs that are trusted by the verifier, and used to validate the JWT.
KeySet *jose.JSONWebKeySet
- // ExpectSymmetrical validates asymmetrical keys are used, if true symmetrical keys are expected.
+
+ // ExpectSymmetrical validates asymmetrical keys are used, if true symmetrical keys are expected. Unused if ExpectSSignatureAlgorithms is set.
ExpectSymmetrical bool
+
+ // ExpectSSignatureAlgorithms is a list of allowed signature algorithms for the JWT. If unset, DefaultSignatureAlgorithms is used. If ExpectSymmetrical is true, DefaultSymmetricalSignatureAlgorithm is used.
+ ExpectSSignatureAlgorithms []jose.SignatureAlgorithm
}
-var validSignatureAlgorithm = []jose.SignatureAlgorithm{
+var DefaultSignatureAlgorithms = []jose.SignatureAlgorithm{
jose.RS256, // RSASSA-PKCS-v1.5 using SHA-256
jose.RS384, // RSASSA-PKCS-v1.5 using SHA-384
jose.RS512, // RSASSA-PKCS-v1.5 using SHA-512
@@ -96,25 +100,12 @@ var validSignatureAlgorithm = []jose.SignatureAlgorithm{
jose.EdDSA, // EdDSA using Ed25519
}
-var validSymmetricalSignatureAlgorithm = []jose.SignatureAlgorithm{
+var DefaultSymmetricalSignatureAlgorithm = []jose.SignatureAlgorithm{
jose.HS256, // HMAC using SHA-256
jose.HS384, // HMAC using SHA-384
jose.HS512, // HMAC using SHA-512
}
-func isAllowedAlgo(in jose.SignatureAlgorithm, vc VerifyConfig) bool {
- validSigAlgo := validSignatureAlgorithm
- if vc.ExpectSymmetrical {
- validSigAlgo = validSymmetricalSignatureAlgorithm
- }
- for _, validAlgo := range validSigAlgo {
- if in == validAlgo {
- return true
- }
- }
- return false
-}
-
// Verify verifies a JWT, and returns a map containing the payload claims
//
// It is paranoid. It has default settings for "real world" JWT usage as an HTTP Header.
@@ -151,7 +142,19 @@ func VerifyRaw(input []byte, vc VerifyConfig) ([]byte, error) {
now = vc.Now()
}
- object, err := jose.ParseSigned(string(input))
+ expectedSigAlgos := vc.ExpectSSignatureAlgorithms
+ if len(expectedSigAlgos) == 0 {
+ if vc.ExpectSymmetrical {
+ expectedSigAlgos = DefaultSymmetricalSignatureAlgorithm
+ } else {
+ expectedSigAlgos = DefaultSignatureAlgorithms
+ }
+ }
+
+ object, err := jose.ParseSignedCompact(
+ string(input),
+ expectedSigAlgos,
+ )
if err != nil {
return nil, err
}
@@ -172,15 +175,6 @@ func VerifyRaw(input []byte, vc VerifyConfig) ([]byte, error) {
signature := object.Signatures[0]
- algo := jose.SignatureAlgorithm(signature.Header.Algorithm)
-
- if !isAllowedAlgo(algo, vc) {
- return nil, &VerifyErr{
- msg: "xjwt: signature uses unsupported algorithm",
- reason: JWT_INVALID_SIGNATURE,
- }
- }
-
var keys []jose.JSONWebKey
if signature.Header.KeyID == "" {
keys = vc.KeySet.Keys
diff --git a/vendor/github.com/sagikazarmark/locafero/flake.lock b/vendor/github.com/sagikazarmark/locafero/flake.lock
index 4bea8154..df2a8cce 100644
--- a/vendor/github.com/sagikazarmark/locafero/flake.lock
+++ b/vendor/github.com/sagikazarmark/locafero/flake.lock
@@ -39,11 +39,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
- "lastModified": 1717245169,
- "narHash": "sha256-+mW3rTBjGU8p1THJN0lX/Dd/8FbnF+3dB+mJuSaxewE=",
+ "lastModified": 1725907707,
+ "narHash": "sha256-s3pbtzZmVPHzc86WQjK7MGZMNvvw6hWnFMljEkllAfM=",
"owner": "cachix",
"repo": "devenv",
- "rev": "c3f9f053c077c6f88a3de5276d9178c62baa3fc3",
+ "rev": "2bbbbc468fc02257265a79652a8350651cca495a",
"type": "github"
},
"original": {
@@ -120,11 +120,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
- "lastModified": 1717285511,
- "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
+ "lastModified": 1725234343,
+ "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
+ "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6",
"type": "github"
},
"original": {
@@ -286,14 +286,14 @@
},
"nixpkgs-lib": {
"locked": {
- "lastModified": 1717284937,
- "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
+ "lastModified": 1725233747,
+ "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=",
"type": "tarball",
- "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
+ "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
},
"original": {
"type": "tarball",
- "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
+ "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
}
},
"nixpkgs-regression": {
@@ -362,11 +362,11 @@
},
"nixpkgs_3": {
"locked": {
- "lastModified": 1717112898,
- "narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=",
+ "lastModified": 1725910328,
+ "narHash": "sha256-n9pCtzGZ0httmTwMuEbi5E78UQ4ZbQMr1pzi5N0LAG8=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "6132b0f6e344ce2fe34fc051b72fb46e34f668e0",
+ "rev": "5775c2583f1801df7b790bf7f7d710a19bac66f4",
"type": "github"
},
"original": {
diff --git a/vendor/github.com/sagikazarmark/locafero/flake.nix b/vendor/github.com/sagikazarmark/locafero/flake.nix
index cddf1d40..312f1ec8 100644
--- a/vendor/github.com/sagikazarmark/locafero/flake.nix
+++ b/vendor/github.com/sagikazarmark/locafero/flake.nix
@@ -20,6 +20,7 @@
default = {
languages = {
go.enable = true;
+ go.package = pkgs.lib.mkDefault pkgs.go_1_23;
};
packages = with pkgs; [
@@ -41,6 +42,22 @@
go.package = pkgs.go_1_21;
};
};
+
+ ci_1_22 = {
+ imports = [ devenv.shells.ci ];
+
+ languages = {
+ go.package = pkgs.go_1_22;
+ };
+ };
+
+ ci_1_23 = {
+ imports = [ devenv.shells.ci ];
+
+ languages = {
+ go.package = pkgs.go_1_23;
+ };
+ };
};
};
};
diff --git a/vendor/github.com/spf13/afero/.editorconfig b/vendor/github.com/spf13/afero/.editorconfig
new file mode 100644
index 00000000..4492e9f9
--- /dev/null
+++ b/vendor/github.com/spf13/afero/.editorconfig
@@ -0,0 +1,12 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+indent_size = 4
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.go]
+indent_style = tab
diff --git a/vendor/github.com/spf13/afero/.golangci.yaml b/vendor/github.com/spf13/afero/.golangci.yaml
new file mode 100644
index 00000000..806289a2
--- /dev/null
+++ b/vendor/github.com/spf13/afero/.golangci.yaml
@@ -0,0 +1,18 @@
+linters-settings:
+ gci:
+ sections:
+ - standard
+ - default
+ - prefix(github.com/spf13/afero)
+
+linters:
+ disable-all: true
+ enable:
+ - gci
+ - gofmt
+ - gofumpt
+ - staticcheck
+
+issues:
+ exclude-dirs:
+ - gcsfs/internal/stiface
diff --git a/vendor/github.com/spf13/afero/README.md b/vendor/github.com/spf13/afero/README.md
index 3bafbfdf..619af574 100644
--- a/vendor/github.com/spf13/afero/README.md
+++ b/vendor/github.com/spf13/afero/README.md
@@ -12,7 +12,7 @@ types and methods. Afero has an exceptionally clean interface and simple design
without needless constructors or initialization methods.
Afero is also a library providing a base set of interoperable backend
-filesystems that make it easy to work with afero while retaining all the power
+filesystems that make it easy to work with, while retaining all the power
and benefit of the os and ioutil packages.
Afero provides significant improvements over using the os package alone, most
diff --git a/vendor/github.com/spf13/afero/iofs.go b/vendor/github.com/spf13/afero/iofs.go
index 938b9316..b13155ca 100644
--- a/vendor/github.com/spf13/afero/iofs.go
+++ b/vendor/github.com/spf13/afero/iofs.go
@@ -255,7 +255,6 @@ func (f fromIOFSFile) Readdir(count int) ([]os.FileInfo, error) {
ret := make([]os.FileInfo, len(entries))
for i := range entries {
ret[i], err = entries[i].Info()
-
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/spf13/afero/memmap.go b/vendor/github.com/spf13/afero/memmap.go
index d6c744e8..ed92f564 100644
--- a/vendor/github.com/spf13/afero/memmap.go
+++ b/vendor/github.com/spf13/afero/memmap.go
@@ -16,11 +16,9 @@ package afero
import (
"fmt"
"io"
-
"log"
"os"
"path/filepath"
-
"sort"
"strings"
"sync"
diff --git a/vendor/github.com/spf13/pflag/.editorconfig b/vendor/github.com/spf13/pflag/.editorconfig
new file mode 100644
index 00000000..4492e9f9
--- /dev/null
+++ b/vendor/github.com/spf13/pflag/.editorconfig
@@ -0,0 +1,12 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+indent_size = 4
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.go]
+indent_style = tab
diff --git a/vendor/github.com/spf13/pflag/.golangci.yaml b/vendor/github.com/spf13/pflag/.golangci.yaml
new file mode 100644
index 00000000..b274f248
--- /dev/null
+++ b/vendor/github.com/spf13/pflag/.golangci.yaml
@@ -0,0 +1,4 @@
+linters:
+ disable-all: true
+ enable:
+ - nolintlint
diff --git a/vendor/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go
index 24a5036e..7c058de3 100644
--- a/vendor/github.com/spf13/pflag/flag.go
+++ b/vendor/github.com/spf13/pflag/flag.go
@@ -160,7 +160,7 @@ type FlagSet struct {
args []string // arguments after flags
argsLenAtDash int // len(args) when a '--' was located when parsing, or -1 if no --
errorHandling ErrorHandling
- output io.Writer // nil means stderr; use out() accessor
+ output io.Writer // nil means stderr; use Output() accessor
interspersed bool // allow interspersed option/non-option args
normalizeNameFunc func(f *FlagSet, name string) NormalizedName
@@ -255,13 +255,20 @@ func (f *FlagSet) normalizeFlagName(name string) NormalizedName {
return n(f, name)
}
-func (f *FlagSet) out() io.Writer {
+// Output returns the destination for usage and error messages. os.Stderr is returned if
+// output was not set or was set to nil.
+func (f *FlagSet) Output() io.Writer {
if f.output == nil {
return os.Stderr
}
return f.output
}
+// Name returns the name of the flag set.
+func (f *FlagSet) Name() string {
+ return f.name
+}
+
// SetOutput sets the destination for usage and error messages.
// If output is nil, os.Stderr is used.
func (f *FlagSet) SetOutput(output io.Writer) {
@@ -358,7 +365,7 @@ func (f *FlagSet) ShorthandLookup(name string) *Flag {
}
if len(name) > 1 {
msg := fmt.Sprintf("can not look up shorthand which is more than one ASCII character: %q", name)
- fmt.Fprintf(f.out(), msg)
+ fmt.Fprintf(f.Output(), msg)
panic(msg)
}
c := name[0]
@@ -482,7 +489,7 @@ func (f *FlagSet) Set(name, value string) error {
}
if flag.Deprecated != "" {
- fmt.Fprintf(f.out(), "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated)
+ fmt.Fprintf(f.Output(), "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated)
}
return nil
}
@@ -523,7 +530,7 @@ func Set(name, value string) error {
// otherwise, the default values of all defined flags in the set.
func (f *FlagSet) PrintDefaults() {
usages := f.FlagUsages()
- fmt.Fprint(f.out(), usages)
+ fmt.Fprint(f.Output(), usages)
}
// defaultIsZeroValue returns true if the default value for this flag represents
@@ -758,7 +765,7 @@ func PrintDefaults() {
// defaultUsage is the default function to print a usage message.
func defaultUsage(f *FlagSet) {
- fmt.Fprintf(f.out(), "Usage of %s:\n", f.name)
+ fmt.Fprintf(f.Output(), "Usage of %s:\n", f.name)
f.PrintDefaults()
}
@@ -844,7 +851,7 @@ func (f *FlagSet) AddFlag(flag *Flag) {
_, alreadyThere := f.formal[normalizedFlagName]
if alreadyThere {
msg := fmt.Sprintf("%s flag redefined: %s", f.name, flag.Name)
- fmt.Fprintln(f.out(), msg)
+ fmt.Fprintln(f.Output(), msg)
panic(msg) // Happens only if flags are declared with identical names
}
if f.formal == nil {
@@ -860,7 +867,7 @@ func (f *FlagSet) AddFlag(flag *Flag) {
}
if len(flag.Shorthand) > 1 {
msg := fmt.Sprintf("%q shorthand is more than one ASCII character", flag.Shorthand)
- fmt.Fprintf(f.out(), msg)
+ fmt.Fprintf(f.Output(), msg)
panic(msg)
}
if f.shorthands == nil {
@@ -870,7 +877,7 @@ func (f *FlagSet) AddFlag(flag *Flag) {
used, alreadyThere := f.shorthands[c]
if alreadyThere {
msg := fmt.Sprintf("unable to redefine %q shorthand in %q flagset: it's already used for %q flag", c, f.name, used.Name)
- fmt.Fprintf(f.out(), msg)
+ fmt.Fprintf(f.Output(), msg)
panic(msg)
}
f.shorthands[c] = flag
@@ -909,7 +916,7 @@ func VarP(value Value, name, shorthand, usage string) {
func (f *FlagSet) failf(format string, a ...interface{}) error {
err := fmt.Errorf(format, a...)
if f.errorHandling != ContinueOnError {
- fmt.Fprintln(f.out(), err)
+ fmt.Fprintln(f.Output(), err)
f.usage()
}
return err
@@ -1060,7 +1067,7 @@ func (f *FlagSet) parseSingleShortArg(shorthands string, args []string, fn parse
}
if flag.ShorthandDeprecated != "" {
- fmt.Fprintf(f.out(), "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated)
+ fmt.Fprintf(f.Output(), "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated)
}
err = fn(flag, value)
diff --git a/vendor/github.com/spf13/pflag/ip.go b/vendor/github.com/spf13/pflag/ip.go
index 3d414ba6..06b8bcb5 100644
--- a/vendor/github.com/spf13/pflag/ip.go
+++ b/vendor/github.com/spf13/pflag/ip.go
@@ -16,6 +16,9 @@ func newIPValue(val net.IP, p *net.IP) *ipValue {
func (i *ipValue) String() string { return net.IP(*i).String() }
func (i *ipValue) Set(s string) error {
+ if s == "" {
+ return nil
+ }
ip := net.ParseIP(strings.TrimSpace(s))
if ip == nil {
return fmt.Errorf("failed to parse IP: %q", s)
diff --git a/vendor/github.com/spf13/pflag/ipnet_slice.go b/vendor/github.com/spf13/pflag/ipnet_slice.go
new file mode 100644
index 00000000..6b541aa8
--- /dev/null
+++ b/vendor/github.com/spf13/pflag/ipnet_slice.go
@@ -0,0 +1,147 @@
+package pflag
+
+import (
+ "fmt"
+ "io"
+ "net"
+ "strings"
+)
+
+// -- ipNetSlice Value
+type ipNetSliceValue struct {
+ value *[]net.IPNet
+ changed bool
+}
+
+func newIPNetSliceValue(val []net.IPNet, p *[]net.IPNet) *ipNetSliceValue {
+ ipnsv := new(ipNetSliceValue)
+ ipnsv.value = p
+ *ipnsv.value = val
+ return ipnsv
+}
+
+// Set converts, and assigns, the comma-separated IPNet argument string representation as the []net.IPNet value of this flag.
+// If Set is called on a flag that already has a []net.IPNet assigned, the newly converted values will be appended.
+func (s *ipNetSliceValue) Set(val string) error {
+
+ // remove all quote characters
+ rmQuote := strings.NewReplacer(`"`, "", `'`, "", "`", "")
+
+ // read flag arguments with CSV parser
+ ipNetStrSlice, err := readAsCSV(rmQuote.Replace(val))
+ if err != nil && err != io.EOF {
+ return err
+ }
+
+ // parse ip values into slice
+ out := make([]net.IPNet, 0, len(ipNetStrSlice))
+ for _, ipNetStr := range ipNetStrSlice {
+ _, n, err := net.ParseCIDR(strings.TrimSpace(ipNetStr))
+ if err != nil {
+ return fmt.Errorf("invalid string being converted to CIDR: %s", ipNetStr)
+ }
+ out = append(out, *n)
+ }
+
+ if !s.changed {
+ *s.value = out
+ } else {
+ *s.value = append(*s.value, out...)
+ }
+
+ s.changed = true
+
+ return nil
+}
+
+// Type returns a string that uniquely represents this flag's type.
+func (s *ipNetSliceValue) Type() string {
+ return "ipNetSlice"
+}
+
+// String defines a "native" format for this net.IPNet slice flag value.
+func (s *ipNetSliceValue) String() string {
+
+ ipNetStrSlice := make([]string, len(*s.value))
+ for i, n := range *s.value {
+ ipNetStrSlice[i] = n.String()
+ }
+
+ out, _ := writeAsCSV(ipNetStrSlice)
+ return "[" + out + "]"
+}
+
+func ipNetSliceConv(val string) (interface{}, error) {
+ val = strings.Trim(val, "[]")
+ // Emtpy string would cause a slice with one (empty) entry
+ if len(val) == 0 {
+ return []net.IPNet{}, nil
+ }
+ ss := strings.Split(val, ",")
+ out := make([]net.IPNet, len(ss))
+ for i, sval := range ss {
+ _, n, err := net.ParseCIDR(strings.TrimSpace(sval))
+ if err != nil {
+ return nil, fmt.Errorf("invalid string being converted to CIDR: %s", sval)
+ }
+ out[i] = *n
+ }
+ return out, nil
+}
+
+// GetIPNetSlice returns the []net.IPNet value of a flag with the given name
+func (f *FlagSet) GetIPNetSlice(name string) ([]net.IPNet, error) {
+ val, err := f.getFlagType(name, "ipNetSlice", ipNetSliceConv)
+ if err != nil {
+ return []net.IPNet{}, err
+ }
+ return val.([]net.IPNet), nil
+}
+
+// IPNetSliceVar defines a ipNetSlice flag with specified name, default value, and usage string.
+// The argument p points to a []net.IPNet variable in which to store the value of the flag.
+func (f *FlagSet) IPNetSliceVar(p *[]net.IPNet, name string, value []net.IPNet, usage string) {
+ f.VarP(newIPNetSliceValue(value, p), name, "", usage)
+}
+
+// IPNetSliceVarP is like IPNetSliceVar, but accepts a shorthand letter that can be used after a single dash.
+func (f *FlagSet) IPNetSliceVarP(p *[]net.IPNet, name, shorthand string, value []net.IPNet, usage string) {
+ f.VarP(newIPNetSliceValue(value, p), name, shorthand, usage)
+}
+
+// IPNetSliceVar defines a []net.IPNet flag with specified name, default value, and usage string.
+// The argument p points to a []net.IPNet variable in which to store the value of the flag.
+func IPNetSliceVar(p *[]net.IPNet, name string, value []net.IPNet, usage string) {
+ CommandLine.VarP(newIPNetSliceValue(value, p), name, "", usage)
+}
+
+// IPNetSliceVarP is like IPNetSliceVar, but accepts a shorthand letter that can be used after a single dash.
+func IPNetSliceVarP(p *[]net.IPNet, name, shorthand string, value []net.IPNet, usage string) {
+ CommandLine.VarP(newIPNetSliceValue(value, p), name, shorthand, usage)
+}
+
+// IPNetSlice defines a []net.IPNet flag with specified name, default value, and usage string.
+// The return value is the address of a []net.IPNet variable that stores the value of that flag.
+func (f *FlagSet) IPNetSlice(name string, value []net.IPNet, usage string) *[]net.IPNet {
+ p := []net.IPNet{}
+ f.IPNetSliceVarP(&p, name, "", value, usage)
+ return &p
+}
+
+// IPNetSliceP is like IPNetSlice, but accepts a shorthand letter that can be used after a single dash.
+func (f *FlagSet) IPNetSliceP(name, shorthand string, value []net.IPNet, usage string) *[]net.IPNet {
+ p := []net.IPNet{}
+ f.IPNetSliceVarP(&p, name, shorthand, value, usage)
+ return &p
+}
+
+// IPNetSlice defines a []net.IPNet flag with specified name, default value, and usage string.
+// The return value is the address of a []net.IP variable that stores the value of the flag.
+func IPNetSlice(name string, value []net.IPNet, usage string) *[]net.IPNet {
+ return CommandLine.IPNetSliceP(name, "", value, usage)
+}
+
+// IPNetSliceP is like IPNetSlice, but accepts a shorthand letter that can be used after a single dash.
+func IPNetSliceP(name, shorthand string, value []net.IPNet, usage string) *[]net.IPNet {
+ return CommandLine.IPNetSliceP(name, shorthand, value, usage)
+}
diff --git a/vendor/github.com/spf13/pflag/string_array.go b/vendor/github.com/spf13/pflag/string_array.go
index 4894af81..d1ff0a96 100644
--- a/vendor/github.com/spf13/pflag/string_array.go
+++ b/vendor/github.com/spf13/pflag/string_array.go
@@ -31,11 +31,7 @@ func (s *stringArrayValue) Append(val string) error {
func (s *stringArrayValue) Replace(val []string) error {
out := make([]string, len(val))
for i, d := range val {
- var err error
out[i] = d
- if err != nil {
- return err
- }
}
*s.value = out
return nil
diff --git a/vendor/go.opentelemetry.io/auto/sdk/CONTRIBUTING.md b/vendor/go.opentelemetry.io/auto/sdk/CONTRIBUTING.md
new file mode 100644
index 00000000..773c9b64
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/CONTRIBUTING.md
@@ -0,0 +1,27 @@
+# Contributing to go.opentelemetry.io/auto/sdk
+
+The `go.opentelemetry.io/auto/sdk` module is a purpose built OpenTelemetry SDK.
+It is designed to be:
+
+0. An OpenTelemetry compliant SDK
+1. Instrumented by auto-instrumentation (serializable into OTLP JSON)
+2. Lightweight
+3. User-friendly
+
+These design choices are listed in the order of their importance.
+
+The primary design goal of this module is to be an OpenTelemetry SDK.
+This means that it needs to implement the Go APIs found in `go.opentelemetry.io/otel`.
+
+Having met the requirement of SDK compliance, this module needs to provide code that the `go.opentelemetry.io/auto` module can instrument.
+The chosen approach to meet this goal is to ensure the telemetry from the SDK is serializable into JSON encoded OTLP.
+This ensures then that the serialized form is compatible with other OpenTelemetry systems, and the auto-instrumentation can use these systems to deserialize any telemetry it is sent.
+
+Outside of these first two goals, the intended use becomes relevant.
+This package is intended to be used in the `go.opentelemetry.io/otel` global API as a default when the auto-instrumentation is running.
+Because of this, this package needs to not add unnecessary dependencies to that API.
+Ideally, it adds none.
+It also needs to operate efficiently.
+
+Finally, this module is designed to be user-friendly to Go development.
+It hides complexity in order to provide simpler APIs when the previous goals can all still be met.
diff --git a/vendor/go.opentelemetry.io/auto/sdk/LICENSE b/vendor/go.opentelemetry.io/auto/sdk/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/go.opentelemetry.io/auto/sdk/VERSIONING.md b/vendor/go.opentelemetry.io/auto/sdk/VERSIONING.md
new file mode 100644
index 00000000..088d19a6
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/VERSIONING.md
@@ -0,0 +1,15 @@
+# Versioning
+
+This document describes the versioning policy for this module.
+This policy is designed so the following goals can be achieved.
+
+**Users are provided a codebase of value that is stable and secure.**
+
+## Policy
+
+* Versioning of this module will be idiomatic of a Go project using [Go modules](https://github.com/golang/go/wiki/Modules).
+ * [Semantic import versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) will be used.
+ * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html).
+ * Any `v2` or higher version of this module will be included as a `/vN` at the end of the module path used in `go.mod` files and in the package import path.
+
+* GitHub releases will be made for all releases.
diff --git a/vendor/go.opentelemetry.io/auto/sdk/doc.go b/vendor/go.opentelemetry.io/auto/sdk/doc.go
new file mode 100644
index 00000000..ad73d8cb
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/doc.go
@@ -0,0 +1,14 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package sdk provides an auto-instrumentable OpenTelemetry SDK.
+
+An [go.opentelemetry.io/auto.Instrumentation] can be configured to target the
+process running this SDK. In that case, all telemetry the SDK produces will be
+processed and handled by that [go.opentelemetry.io/auto.Instrumentation].
+
+By default, if there is no [go.opentelemetry.io/auto.Instrumentation] set to
+auto-instrument the SDK, the SDK will not generate any telemetry.
+*/
+package sdk
diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/attr.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/attr.go
new file mode 100644
index 00000000..af6ef171
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/attr.go
@@ -0,0 +1,58 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package telemetry
+
+// Attr is a key-value pair.
+type Attr struct {
+ Key string `json:"key,omitempty"`
+ Value Value `json:"value,omitempty"`
+}
+
+// String returns an Attr for a string value.
+func String(key, value string) Attr {
+ return Attr{key, StringValue(value)}
+}
+
+// Int64 returns an Attr for an int64 value.
+func Int64(key string, value int64) Attr {
+ return Attr{key, Int64Value(value)}
+}
+
+// Int returns an Attr for an int value.
+func Int(key string, value int) Attr {
+ return Int64(key, int64(value))
+}
+
+// Float64 returns an Attr for a float64 value.
+func Float64(key string, value float64) Attr {
+ return Attr{key, Float64Value(value)}
+}
+
+// Bool returns an Attr for a bool value.
+func Bool(key string, value bool) Attr {
+ return Attr{key, BoolValue(value)}
+}
+
+// Bytes returns an Attr for a []byte value.
+// The passed slice must not be changed after it is passed.
+func Bytes(key string, value []byte) Attr {
+ return Attr{key, BytesValue(value)}
+}
+
+// Slice returns an Attr for a []Value value.
+// The passed slice must not be changed after it is passed.
+func Slice(key string, value ...Value) Attr {
+ return Attr{key, SliceValue(value...)}
+}
+
+// Map returns an Attr for a map value.
+// The passed slice must not be changed after it is passed.
+func Map(key string, value ...Attr) Attr {
+ return Attr{key, MapValue(value...)}
+}
+
+// Equal returns if a is equal to b.
+func (a Attr) Equal(b Attr) bool {
+ return a.Key == b.Key && a.Value.Equal(b.Value)
+}
diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/doc.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/doc.go
new file mode 100644
index 00000000..949e2165
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/doc.go
@@ -0,0 +1,8 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package telemetry provides a lightweight representations of OpenTelemetry
+telemetry that is compatible with the OTLP JSON protobuf encoding.
+*/
+package telemetry
diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/id.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/id.go
new file mode 100644
index 00000000..e854d7e8
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/id.go
@@ -0,0 +1,103 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package telemetry
+
+import (
+ "encoding/hex"
+ "errors"
+ "fmt"
+)
+
+const (
+ traceIDSize = 16
+ spanIDSize = 8
+)
+
+// TraceID is a custom data type that is used for all trace IDs.
+type TraceID [traceIDSize]byte
+
+// String returns the hex string representation form of a TraceID.
+func (tid TraceID) String() string {
+ return hex.EncodeToString(tid[:])
+}
+
+// IsEmpty returns false if id contains at least one non-zero byte.
+func (tid TraceID) IsEmpty() bool {
+ return tid == [traceIDSize]byte{}
+}
+
+// MarshalJSON converts the trace ID into a hex string enclosed in quotes.
+func (tid TraceID) MarshalJSON() ([]byte, error) {
+ if tid.IsEmpty() {
+ return []byte(`""`), nil
+ }
+ return marshalJSON(tid[:])
+}
+
+// UnmarshalJSON inflates the trace ID from hex string, possibly enclosed in
+// quotes.
+func (tid *TraceID) UnmarshalJSON(data []byte) error {
+ *tid = [traceIDSize]byte{}
+ return unmarshalJSON(tid[:], data)
+}
+
+// SpanID is a custom data type that is used for all span IDs.
+type SpanID [spanIDSize]byte
+
+// String returns the hex string representation form of a SpanID.
+func (sid SpanID) String() string {
+ return hex.EncodeToString(sid[:])
+}
+
+// IsEmpty returns true if the span ID contains at least one non-zero byte.
+func (sid SpanID) IsEmpty() bool {
+ return sid == [spanIDSize]byte{}
+}
+
+// MarshalJSON converts span ID into a hex string enclosed in quotes.
+func (sid SpanID) MarshalJSON() ([]byte, error) {
+ if sid.IsEmpty() {
+ return []byte(`""`), nil
+ }
+ return marshalJSON(sid[:])
+}
+
+// UnmarshalJSON decodes span ID from hex string, possibly enclosed in quotes.
+func (sid *SpanID) UnmarshalJSON(data []byte) error {
+ *sid = [spanIDSize]byte{}
+ return unmarshalJSON(sid[:], data)
+}
+
+// marshalJSON converts id into a hex string enclosed in quotes.
+func marshalJSON(id []byte) ([]byte, error) {
+ // Plus 2 quote chars at the start and end.
+ hexLen := hex.EncodedLen(len(id)) + 2
+
+ b := make([]byte, hexLen)
+ hex.Encode(b[1:hexLen-1], id)
+ b[0], b[hexLen-1] = '"', '"'
+
+ return b, nil
+}
+
+// unmarshalJSON inflates trace id from hex string, possibly enclosed in quotes.
+func unmarshalJSON(dst []byte, src []byte) error {
+ if l := len(src); l >= 2 && src[0] == '"' && src[l-1] == '"' {
+ src = src[1 : l-1]
+ }
+ nLen := len(src)
+ if nLen == 0 {
+ return nil
+ }
+
+ if len(dst) != hex.DecodedLen(nLen) {
+ return errors.New("invalid length for ID")
+ }
+
+ _, err := hex.Decode(dst, src)
+ if err != nil {
+ return fmt.Errorf("cannot unmarshal ID from string '%s': %w", string(src), err)
+ }
+ return nil
+}
diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/number.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/number.go
new file mode 100644
index 00000000..29e629d6
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/number.go
@@ -0,0 +1,67 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package telemetry
+
+import (
+ "encoding/json"
+ "strconv"
+)
+
+// protoInt64 represents the protobuf encoding of integers which can be either
+// strings or integers.
+type protoInt64 int64
+
+// Int64 returns the protoInt64 as an int64.
+func (i *protoInt64) Int64() int64 { return int64(*i) }
+
+// UnmarshalJSON decodes both strings and integers.
+func (i *protoInt64) UnmarshalJSON(data []byte) error {
+ if data[0] == '"' {
+ var str string
+ if err := json.Unmarshal(data, &str); err != nil {
+ return err
+ }
+ parsedInt, err := strconv.ParseInt(str, 10, 64)
+ if err != nil {
+ return err
+ }
+ *i = protoInt64(parsedInt)
+ } else {
+ var parsedInt int64
+ if err := json.Unmarshal(data, &parsedInt); err != nil {
+ return err
+ }
+ *i = protoInt64(parsedInt)
+ }
+ return nil
+}
+
+// protoUint64 represents the protobuf encoding of integers which can be either
+// strings or integers.
+type protoUint64 uint64
+
+// Int64 returns the protoUint64 as a uint64.
+func (i *protoUint64) Uint64() uint64 { return uint64(*i) }
+
+// UnmarshalJSON decodes both strings and integers.
+func (i *protoUint64) UnmarshalJSON(data []byte) error {
+ if data[0] == '"' {
+ var str string
+ if err := json.Unmarshal(data, &str); err != nil {
+ return err
+ }
+ parsedUint, err := strconv.ParseUint(str, 10, 64)
+ if err != nil {
+ return err
+ }
+ *i = protoUint64(parsedUint)
+ } else {
+ var parsedUint uint64
+ if err := json.Unmarshal(data, &parsedUint); err != nil {
+ return err
+ }
+ *i = protoUint64(parsedUint)
+ }
+ return nil
+}
diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/resource.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/resource.go
new file mode 100644
index 00000000..cecad8ba
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/resource.go
@@ -0,0 +1,66 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package telemetry
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+)
+
+// Resource information.
+type Resource struct {
+ // Attrs are the set of attributes that describe the resource. Attribute
+ // keys MUST be unique (it is not allowed to have more than one attribute
+ // with the same key).
+ Attrs []Attr `json:"attributes,omitempty"`
+ // DroppedAttrs is the number of dropped attributes. If the value
+ // is 0, then no attributes were dropped.
+ DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"`
+}
+
+// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r.
+func (r *Resource) UnmarshalJSON(data []byte) error {
+ decoder := json.NewDecoder(bytes.NewReader(data))
+
+ t, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if t != json.Delim('{') {
+ return errors.New("invalid Resource type")
+ }
+
+ for decoder.More() {
+ keyIface, err := decoder.Token()
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ // Empty.
+ return nil
+ }
+ return err
+ }
+
+ key, ok := keyIface.(string)
+ if !ok {
+ return fmt.Errorf("invalid Resource field: %#v", keyIface)
+ }
+
+ switch key {
+ case "attributes":
+ err = decoder.Decode(&r.Attrs)
+ case "droppedAttributesCount", "dropped_attributes_count":
+ err = decoder.Decode(&r.DroppedAttrs)
+ default:
+ // Skip unknown.
+ }
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/scope.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/scope.go
new file mode 100644
index 00000000..b6f2e28d
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/scope.go
@@ -0,0 +1,67 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package telemetry
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+)
+
+// Scope is the identifying values of the instrumentation scope.
+type Scope struct {
+ Name string `json:"name,omitempty"`
+ Version string `json:"version,omitempty"`
+ Attrs []Attr `json:"attributes,omitempty"`
+ DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"`
+}
+
+// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r.
+func (s *Scope) UnmarshalJSON(data []byte) error {
+ decoder := json.NewDecoder(bytes.NewReader(data))
+
+ t, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if t != json.Delim('{') {
+ return errors.New("invalid Scope type")
+ }
+
+ for decoder.More() {
+ keyIface, err := decoder.Token()
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ // Empty.
+ return nil
+ }
+ return err
+ }
+
+ key, ok := keyIface.(string)
+ if !ok {
+ return fmt.Errorf("invalid Scope field: %#v", keyIface)
+ }
+
+ switch key {
+ case "name":
+ err = decoder.Decode(&s.Name)
+ case "version":
+ err = decoder.Decode(&s.Version)
+ case "attributes":
+ err = decoder.Decode(&s.Attrs)
+ case "droppedAttributesCount", "dropped_attributes_count":
+ err = decoder.Decode(&s.DroppedAttrs)
+ default:
+ // Skip unknown.
+ }
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/span.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/span.go
new file mode 100644
index 00000000..a13a6b73
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/span.go
@@ -0,0 +1,456 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package telemetry
+
+import (
+ "bytes"
+ "encoding/hex"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "time"
+)
+
+// A Span represents a single operation performed by a single component of the
+// system.
+type Span struct {
+ // A unique identifier for a trace. All spans from the same trace share
+ // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ // of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ // is zero-length and thus is also invalid).
+ //
+ // This field is required.
+ TraceID TraceID `json:"traceId,omitempty"`
+ // A unique identifier for a span within a trace, assigned when the span
+ // is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ // other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ // is zero-length and thus is also invalid).
+ //
+ // This field is required.
+ SpanID SpanID `json:"spanId,omitempty"`
+ // trace_state conveys information about request position in multiple distributed tracing graphs.
+ // It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
+ // See also https://github.com/w3c/distributed-tracing for more details about this field.
+ TraceState string `json:"traceState,omitempty"`
+ // The `span_id` of this span's parent span. If this is a root span, then this
+ // field must be empty. The ID is an 8-byte array.
+ ParentSpanID SpanID `json:"parentSpanId,omitempty"`
+ // Flags, a bit field.
+ //
+ // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace
+ // Context specification. To read the 8-bit W3C trace flag, use
+ // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.
+ //
+ // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
+ //
+ // Bits 8 and 9 represent the 3 states of whether a span's parent
+ // is remote. The states are (unknown, is not remote, is remote).
+ // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.
+ // To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.
+ //
+ // When creating span messages, if the message is logically forwarded from another source
+ // with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD
+ // be copied as-is. If creating from a source that does not have an equivalent flags field
+ // (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST
+ // be set to zero.
+ // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.
+ //
+ // [Optional].
+ Flags uint32 `json:"flags,omitempty"`
+ // A description of the span's operation.
+ //
+ // For example, the name can be a qualified method name or a file name
+ // and a line number where the operation is called. A best practice is to use
+ // the same display name at the same call point in an application.
+ // This makes it easier to correlate spans in different traces.
+ //
+ // This field is semantically required to be set to non-empty string.
+ // Empty value is equivalent to an unknown span name.
+ //
+ // This field is required.
+ Name string `json:"name"`
+ // Distinguishes between spans generated in a particular context. For example,
+ // two spans with the same name may be distinguished using `CLIENT` (caller)
+ // and `SERVER` (callee) to identify queueing latency associated with the span.
+ Kind SpanKind `json:"kind,omitempty"`
+ // start_time_unix_nano is the start time of the span. On the client side, this is the time
+ // kept by the local machine where the span execution starts. On the server side, this
+ // is the time when the server's application handler starts running.
+ // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ //
+ // This field is semantically required and it is expected that end_time >= start_time.
+ StartTime time.Time `json:"startTimeUnixNano,omitempty"`
+ // end_time_unix_nano is the end time of the span. On the client side, this is the time
+ // kept by the local machine where the span execution ends. On the server side, this
+ // is the time when the server application handler stops running.
+ // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ //
+ // This field is semantically required and it is expected that end_time >= start_time.
+ EndTime time.Time `json:"endTimeUnixNano,omitempty"`
+ // attributes is a collection of key/value pairs. Note, global attributes
+ // like server name can be set using the resource API. Examples of attributes:
+ //
+ // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
+ // "/http/server_latency": 300
+ // "example.com/myattribute": true
+ // "example.com/score": 10.239
+ //
+ // The OpenTelemetry API specification further restricts the allowed value types:
+ // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
+ // Attribute keys MUST be unique (it is not allowed to have more than one
+ // attribute with the same key).
+ Attrs []Attr `json:"attributes,omitempty"`
+ // dropped_attributes_count is the number of attributes that were discarded. Attributes
+ // can be discarded because their keys are too long or because there are too many
+ // attributes. If this value is 0, then no attributes were dropped.
+ DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"`
+ // events is a collection of Event items.
+ Events []*SpanEvent `json:"events,omitempty"`
+ // dropped_events_count is the number of dropped events. If the value is 0, then no
+ // events were dropped.
+ DroppedEvents uint32 `json:"droppedEventsCount,omitempty"`
+ // links is a collection of Links, which are references from this span to a span
+ // in the same or different trace.
+ Links []*SpanLink `json:"links,omitempty"`
+ // dropped_links_count is the number of dropped links after the maximum size was
+ // enforced. If this value is 0, then no links were dropped.
+ DroppedLinks uint32 `json:"droppedLinksCount,omitempty"`
+ // An optional final status for this span. Semantically when Status isn't set, it means
+ // span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
+ Status *Status `json:"status,omitempty"`
+}
+
+// MarshalJSON encodes s into OTLP formatted JSON.
+func (s Span) MarshalJSON() ([]byte, error) {
+ startT := s.StartTime.UnixNano()
+ if s.StartTime.IsZero() || startT < 0 {
+ startT = 0
+ }
+
+ endT := s.EndTime.UnixNano()
+ if s.EndTime.IsZero() || endT < 0 {
+ endT = 0
+ }
+
+ // Override non-empty default SpanID marshal and omitempty.
+ var parentSpanId string
+ if !s.ParentSpanID.IsEmpty() {
+ b := make([]byte, hex.EncodedLen(spanIDSize))
+ hex.Encode(b, s.ParentSpanID[:])
+ parentSpanId = string(b)
+ }
+
+ type Alias Span
+ return json.Marshal(struct {
+ Alias
+ ParentSpanID string `json:"parentSpanId,omitempty"`
+ StartTime uint64 `json:"startTimeUnixNano,omitempty"`
+ EndTime uint64 `json:"endTimeUnixNano,omitempty"`
+ }{
+ Alias: Alias(s),
+ ParentSpanID: parentSpanId,
+ StartTime: uint64(startT),
+ EndTime: uint64(endT),
+ })
+}
+
+// UnmarshalJSON decodes the OTLP formatted JSON contained in data into s.
+func (s *Span) UnmarshalJSON(data []byte) error {
+ decoder := json.NewDecoder(bytes.NewReader(data))
+
+ t, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if t != json.Delim('{') {
+ return errors.New("invalid Span type")
+ }
+
+ for decoder.More() {
+ keyIface, err := decoder.Token()
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ // Empty.
+ return nil
+ }
+ return err
+ }
+
+ key, ok := keyIface.(string)
+ if !ok {
+ return fmt.Errorf("invalid Span field: %#v", keyIface)
+ }
+
+ switch key {
+ case "traceId", "trace_id":
+ err = decoder.Decode(&s.TraceID)
+ case "spanId", "span_id":
+ err = decoder.Decode(&s.SpanID)
+ case "traceState", "trace_state":
+ err = decoder.Decode(&s.TraceState)
+ case "parentSpanId", "parent_span_id":
+ err = decoder.Decode(&s.ParentSpanID)
+ case "flags":
+ err = decoder.Decode(&s.Flags)
+ case "name":
+ err = decoder.Decode(&s.Name)
+ case "kind":
+ err = decoder.Decode(&s.Kind)
+ case "startTimeUnixNano", "start_time_unix_nano":
+ var val protoUint64
+ err = decoder.Decode(&val)
+ s.StartTime = time.Unix(0, int64(val.Uint64()))
+ case "endTimeUnixNano", "end_time_unix_nano":
+ var val protoUint64
+ err = decoder.Decode(&val)
+ s.EndTime = time.Unix(0, int64(val.Uint64()))
+ case "attributes":
+ err = decoder.Decode(&s.Attrs)
+ case "droppedAttributesCount", "dropped_attributes_count":
+ err = decoder.Decode(&s.DroppedAttrs)
+ case "events":
+ err = decoder.Decode(&s.Events)
+ case "droppedEventsCount", "dropped_events_count":
+ err = decoder.Decode(&s.DroppedEvents)
+ case "links":
+ err = decoder.Decode(&s.Links)
+ case "droppedLinksCount", "dropped_links_count":
+ err = decoder.Decode(&s.DroppedLinks)
+ case "status":
+ err = decoder.Decode(&s.Status)
+ default:
+ // Skip unknown.
+ }
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// SpanFlags represents constants used to interpret the
+// Span.flags field, which is protobuf 'fixed32' type and is to
+// be used as bit-fields. Each non-zero value defined in this enum is
+// a bit-mask. To extract the bit-field, for example, use an
+// expression like:
+//
+// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK)
+//
+// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
+//
+// Note that Span flags were introduced in version 1.1 of the
+// OpenTelemetry protocol. Older Span producers do not set this
+// field, consequently consumers should not rely on the absence of a
+// particular flag bit to indicate the presence of a particular feature.
+type SpanFlags int32
+
+const (
+ // Bits 0-7 are used for trace flags.
+ SpanFlagsTraceFlagsMask SpanFlags = 255
+ // Bits 8 and 9 are used to indicate that the parent span or link span is remote.
+ // Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known.
+ // Bit 9 (`IS_REMOTE`) indicates whether the span or link is remote.
+ SpanFlagsContextHasIsRemoteMask SpanFlags = 256
+ // SpanFlagsContextHasIsRemoteMask indicates the Span is remote.
+ SpanFlagsContextIsRemoteMask SpanFlags = 512
+)
+
+// SpanKind is the type of span. Can be used to specify additional relationships between spans
+// in addition to a parent/child relationship.
+type SpanKind int32
+
+const (
+ // Indicates that the span represents an internal operation within an application,
+ // as opposed to an operation happening at the boundaries. Default value.
+ SpanKindInternal SpanKind = 1
+ // Indicates that the span covers server-side handling of an RPC or other
+ // remote network request.
+ SpanKindServer SpanKind = 2
+ // Indicates that the span describes a request to some remote service.
+ SpanKindClient SpanKind = 3
+ // Indicates that the span describes a producer sending a message to a broker.
+ // Unlike CLIENT and SERVER, there is often no direct critical path latency relationship
+ // between producer and consumer spans. A PRODUCER span ends when the message was accepted
+ // by the broker while the logical processing of the message might span a much longer time.
+ SpanKindProducer SpanKind = 4
+ // Indicates that the span describes consumer receiving a message from a broker.
+ // Like the PRODUCER kind, there is often no direct critical path latency relationship
+ // between producer and consumer spans.
+ SpanKindConsumer SpanKind = 5
+)
+
+// Event is a time-stamped annotation of the span, consisting of user-supplied
+// text description and key-value pairs.
+type SpanEvent struct {
+ // time_unix_nano is the time the event occurred.
+ Time time.Time `json:"timeUnixNano,omitempty"`
+ // name of the event.
+ // This field is semantically required to be set to non-empty string.
+ Name string `json:"name,omitempty"`
+ // attributes is a collection of attribute key/value pairs on the event.
+ // Attribute keys MUST be unique (it is not allowed to have more than one
+ // attribute with the same key).
+ Attrs []Attr `json:"attributes,omitempty"`
+ // dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ // then no attributes were dropped.
+ DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"`
+}
+
+// MarshalJSON encodes e into OTLP formatted JSON.
+func (e SpanEvent) MarshalJSON() ([]byte, error) {
+ t := e.Time.UnixNano()
+ if e.Time.IsZero() || t < 0 {
+ t = 0
+ }
+
+ type Alias SpanEvent
+ return json.Marshal(struct {
+ Alias
+ Time uint64 `json:"timeUnixNano,omitempty"`
+ }{
+ Alias: Alias(e),
+ Time: uint64(t),
+ })
+}
+
+// UnmarshalJSON decodes the OTLP formatted JSON contained in data into se.
+func (se *SpanEvent) UnmarshalJSON(data []byte) error {
+ decoder := json.NewDecoder(bytes.NewReader(data))
+
+ t, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if t != json.Delim('{') {
+ return errors.New("invalid SpanEvent type")
+ }
+
+ for decoder.More() {
+ keyIface, err := decoder.Token()
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ // Empty.
+ return nil
+ }
+ return err
+ }
+
+ key, ok := keyIface.(string)
+ if !ok {
+ return fmt.Errorf("invalid SpanEvent field: %#v", keyIface)
+ }
+
+ switch key {
+ case "timeUnixNano", "time_unix_nano":
+ var val protoUint64
+ err = decoder.Decode(&val)
+ se.Time = time.Unix(0, int64(val.Uint64()))
+ case "name":
+ err = decoder.Decode(&se.Name)
+ case "attributes":
+ err = decoder.Decode(&se.Attrs)
+ case "droppedAttributesCount", "dropped_attributes_count":
+ err = decoder.Decode(&se.DroppedAttrs)
+ default:
+ // Skip unknown.
+ }
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// A pointer from the current span to another span in the same trace or in a
+// different trace. For example, this can be used in batching operations,
+// where a single batch handler processes multiple requests from different
+// traces or when the handler receives a request from a different project.
+type SpanLink struct {
+ // A unique identifier of a trace that this linked span is part of. The ID is a
+ // 16-byte array.
+ TraceID TraceID `json:"traceId,omitempty"`
+ // A unique identifier for the linked span. The ID is an 8-byte array.
+ SpanID SpanID `json:"spanId,omitempty"`
+ // The trace_state associated with the link.
+ TraceState string `json:"traceState,omitempty"`
+ // attributes is a collection of attribute key/value pairs on the link.
+ // Attribute keys MUST be unique (it is not allowed to have more than one
+ // attribute with the same key).
+ Attrs []Attr `json:"attributes,omitempty"`
+ // dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ // then no attributes were dropped.
+ DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"`
+ // Flags, a bit field.
+ //
+ // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace
+ // Context specification. To read the 8-bit W3C trace flag, use
+ // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.
+ //
+ // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
+ //
+ // Bits 8 and 9 represent the 3 states of whether the link is remote.
+ // The states are (unknown, is not remote, is remote).
+ // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.
+ // To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.
+ //
+ // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.
+ // When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero.
+ //
+ // [Optional].
+ Flags uint32 `json:"flags,omitempty"`
+}
+
+// UnmarshalJSON decodes the OTLP formatted JSON contained in data into sl.
+func (sl *SpanLink) UnmarshalJSON(data []byte) error {
+ decoder := json.NewDecoder(bytes.NewReader(data))
+
+ t, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if t != json.Delim('{') {
+ return errors.New("invalid SpanLink type")
+ }
+
+ for decoder.More() {
+ keyIface, err := decoder.Token()
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ // Empty.
+ return nil
+ }
+ return err
+ }
+
+ key, ok := keyIface.(string)
+ if !ok {
+ return fmt.Errorf("invalid SpanLink field: %#v", keyIface)
+ }
+
+ switch key {
+ case "traceId", "trace_id":
+ err = decoder.Decode(&sl.TraceID)
+ case "spanId", "span_id":
+ err = decoder.Decode(&sl.SpanID)
+ case "traceState", "trace_state":
+ err = decoder.Decode(&sl.TraceState)
+ case "attributes":
+ err = decoder.Decode(&sl.Attrs)
+ case "droppedAttributesCount", "dropped_attributes_count":
+ err = decoder.Decode(&sl.DroppedAttrs)
+ case "flags":
+ err = decoder.Decode(&sl.Flags)
+ default:
+ // Skip unknown.
+ }
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/status.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/status.go
new file mode 100644
index 00000000..1217776e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/status.go
@@ -0,0 +1,40 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package telemetry
+
+// For the semantics of status codes see
+// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status
+type StatusCode int32
+
+const (
+ // The default status.
+ StatusCodeUnset StatusCode = 0
+ // The Span has been validated by an Application developer or Operator to
+ // have completed successfully.
+ StatusCodeOK StatusCode = 1
+ // The Span contains an error.
+ StatusCodeError StatusCode = 2
+)
+
+var statusCodeStrings = []string{
+ "Unset",
+ "OK",
+ "Error",
+}
+
+func (s StatusCode) String() string {
+ if s >= 0 && int(s) < len(statusCodeStrings) {
+ return statusCodeStrings[s]
+ }
+ return ""
+}
+
+// The Status type defines a logical error model that is suitable for different
+// programming environments, including REST APIs and RPC APIs.
+type Status struct {
+ // A developer-facing human readable error message.
+ Message string `json:"message,omitempty"`
+ // The status code.
+ Code StatusCode `json:"code,omitempty"`
+}
diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/traces.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/traces.go
new file mode 100644
index 00000000..69a348f0
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/traces.go
@@ -0,0 +1,189 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package telemetry
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+)
+
+// Traces represents the traces data that can be stored in a persistent storage,
+// OR can be embedded by other protocols that transfer OTLP traces data but do
+// not implement the OTLP protocol.
+//
+// The main difference between this message and collector protocol is that
+// in this message there will not be any "control" or "metadata" specific to
+// OTLP protocol.
+//
+// When new fields are added into this message, the OTLP request MUST be updated
+// as well.
+type Traces struct {
+ // An array of ResourceSpans.
+ // For data coming from a single resource this array will typically contain
+ // one element. Intermediary nodes that receive data from multiple origins
+ // typically batch the data before forwarding further and in that case this
+ // array will contain multiple elements.
+ ResourceSpans []*ResourceSpans `json:"resourceSpans,omitempty"`
+}
+
+// UnmarshalJSON decodes the OTLP formatted JSON contained in data into td.
+func (td *Traces) UnmarshalJSON(data []byte) error {
+ decoder := json.NewDecoder(bytes.NewReader(data))
+
+ t, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if t != json.Delim('{') {
+ return errors.New("invalid TracesData type")
+ }
+
+ for decoder.More() {
+ keyIface, err := decoder.Token()
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ // Empty.
+ return nil
+ }
+ return err
+ }
+
+ key, ok := keyIface.(string)
+ if !ok {
+ return fmt.Errorf("invalid TracesData field: %#v", keyIface)
+ }
+
+ switch key {
+ case "resourceSpans", "resource_spans":
+ err = decoder.Decode(&td.ResourceSpans)
+ default:
+ // Skip unknown.
+ }
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// A collection of ScopeSpans from a Resource.
+type ResourceSpans struct {
+ // The resource for the spans in this message.
+ // If this field is not set then no resource info is known.
+ Resource Resource `json:"resource"`
+ // A list of ScopeSpans that originate from a resource.
+ ScopeSpans []*ScopeSpans `json:"scopeSpans,omitempty"`
+ // This schema_url applies to the data in the "resource" field. It does not apply
+ // to the data in the "scope_spans" field which have their own schema_url field.
+ SchemaURL string `json:"schemaUrl,omitempty"`
+}
+
+// UnmarshalJSON decodes the OTLP formatted JSON contained in data into rs.
+func (rs *ResourceSpans) UnmarshalJSON(data []byte) error {
+ decoder := json.NewDecoder(bytes.NewReader(data))
+
+ t, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if t != json.Delim('{') {
+ return errors.New("invalid ResourceSpans type")
+ }
+
+ for decoder.More() {
+ keyIface, err := decoder.Token()
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ // Empty.
+ return nil
+ }
+ return err
+ }
+
+ key, ok := keyIface.(string)
+ if !ok {
+ return fmt.Errorf("invalid ResourceSpans field: %#v", keyIface)
+ }
+
+ switch key {
+ case "resource":
+ err = decoder.Decode(&rs.Resource)
+ case "scopeSpans", "scope_spans":
+ err = decoder.Decode(&rs.ScopeSpans)
+ case "schemaUrl", "schema_url":
+ err = decoder.Decode(&rs.SchemaURL)
+ default:
+ // Skip unknown.
+ }
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// A collection of Spans produced by an InstrumentationScope.
+type ScopeSpans struct {
+ // The instrumentation scope information for the spans in this message.
+ // Semantically when InstrumentationScope isn't set, it is equivalent with
+ // an empty instrumentation scope name (unknown).
+ Scope *Scope `json:"scope"`
+ // A list of Spans that originate from an instrumentation scope.
+ Spans []*Span `json:"spans,omitempty"`
+ // The Schema URL, if known. This is the identifier of the Schema that the span data
+ // is recorded in. To learn more about Schema URL see
+ // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
+ // This schema_url applies to all spans and span events in the "spans" field.
+ SchemaURL string `json:"schemaUrl,omitempty"`
+}
+
+// UnmarshalJSON decodes the OTLP formatted JSON contained in data into ss.
+func (ss *ScopeSpans) UnmarshalJSON(data []byte) error {
+ decoder := json.NewDecoder(bytes.NewReader(data))
+
+ t, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if t != json.Delim('{') {
+ return errors.New("invalid ScopeSpans type")
+ }
+
+ for decoder.More() {
+ keyIface, err := decoder.Token()
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ // Empty.
+ return nil
+ }
+ return err
+ }
+
+ key, ok := keyIface.(string)
+ if !ok {
+ return fmt.Errorf("invalid ScopeSpans field: %#v", keyIface)
+ }
+
+ switch key {
+ case "scope":
+ err = decoder.Decode(&ss.Scope)
+ case "spans":
+ err = decoder.Decode(&ss.Spans)
+ case "schemaUrl", "schema_url":
+ err = decoder.Decode(&ss.SchemaURL)
+ default:
+ // Skip unknown.
+ }
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/value.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/value.go
new file mode 100644
index 00000000..0dd01b06
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/value.go
@@ -0,0 +1,452 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+//go:generate stringer -type=ValueKind -trimprefix=ValueKind
+
+package telemetry
+
+import (
+ "bytes"
+ "cmp"
+ "encoding/base64"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "math"
+ "slices"
+ "strconv"
+ "unsafe"
+)
+
+// A Value represents a structured value.
+// A zero value is valid and represents an empty value.
+type Value struct {
+ // Ensure forward compatibility by explicitly making this not comparable.
+ noCmp [0]func() //nolint: unused // This is indeed used.
+
+ // num holds the value for Int64, Float64, and Bool. It holds the length
+ // for String, Bytes, Slice, Map.
+ num uint64
+ // any holds either the KindBool, KindInt64, KindFloat64, stringptr,
+ // bytesptr, sliceptr, or mapptr. If KindBool, KindInt64, or KindFloat64
+ // then the value of Value is in num as described above. Otherwise, it
+ // contains the value wrapped in the appropriate type.
+ any any
+}
+
+type (
+ // sliceptr represents a value in Value.any for KindString Values.
+ stringptr *byte
+ // bytesptr represents a value in Value.any for KindBytes Values.
+ bytesptr *byte
+ // sliceptr represents a value in Value.any for KindSlice Values.
+ sliceptr *Value
+ // mapptr represents a value in Value.any for KindMap Values.
+ mapptr *Attr
+)
+
+// ValueKind is the kind of a [Value].
+type ValueKind int
+
+// ValueKind values.
+const (
+ ValueKindEmpty ValueKind = iota
+ ValueKindBool
+ ValueKindFloat64
+ ValueKindInt64
+ ValueKindString
+ ValueKindBytes
+ ValueKindSlice
+ ValueKindMap
+)
+
+var valueKindStrings = []string{
+ "Empty",
+ "Bool",
+ "Float64",
+ "Int64",
+ "String",
+ "Bytes",
+ "Slice",
+ "Map",
+}
+
+func (k ValueKind) String() string {
+ if k >= 0 && int(k) < len(valueKindStrings) {
+ return valueKindStrings[k]
+ }
+ return ""
+}
+
+// StringValue returns a new [Value] for a string.
+func StringValue(v string) Value {
+ return Value{
+ num: uint64(len(v)),
+ any: stringptr(unsafe.StringData(v)),
+ }
+}
+
+// IntValue returns a [Value] for an int.
+func IntValue(v int) Value { return Int64Value(int64(v)) }
+
+// Int64Value returns a [Value] for an int64.
+func Int64Value(v int64) Value {
+ return Value{num: uint64(v), any: ValueKindInt64}
+}
+
+// Float64Value returns a [Value] for a float64.
+func Float64Value(v float64) Value {
+ return Value{num: math.Float64bits(v), any: ValueKindFloat64}
+}
+
+// BoolValue returns a [Value] for a bool.
+func BoolValue(v bool) Value { //nolint:revive // Not a control flag.
+ var n uint64
+ if v {
+ n = 1
+ }
+ return Value{num: n, any: ValueKindBool}
+}
+
+// BytesValue returns a [Value] for a byte slice. The passed slice must not be
+// changed after it is passed.
+func BytesValue(v []byte) Value {
+ return Value{
+ num: uint64(len(v)),
+ any: bytesptr(unsafe.SliceData(v)),
+ }
+}
+
+// SliceValue returns a [Value] for a slice of [Value]. The passed slice must
+// not be changed after it is passed.
+func SliceValue(vs ...Value) Value {
+ return Value{
+ num: uint64(len(vs)),
+ any: sliceptr(unsafe.SliceData(vs)),
+ }
+}
+
+// MapValue returns a new [Value] for a slice of key-value pairs. The passed
+// slice must not be changed after it is passed.
+func MapValue(kvs ...Attr) Value {
+ return Value{
+ num: uint64(len(kvs)),
+ any: mapptr(unsafe.SliceData(kvs)),
+ }
+}
+
+// AsString returns the value held by v as a string.
+func (v Value) AsString() string {
+ if sp, ok := v.any.(stringptr); ok {
+ return unsafe.String(sp, v.num)
+ }
+ // TODO: error handle
+ return ""
+}
+
+// asString returns the value held by v as a string. It will panic if the Value
+// is not KindString.
+func (v Value) asString() string {
+ return unsafe.String(v.any.(stringptr), v.num)
+}
+
+// AsInt64 returns the value held by v as an int64.
+func (v Value) AsInt64() int64 {
+ if v.Kind() != ValueKindInt64 {
+ // TODO: error handle
+ return 0
+ }
+ return v.asInt64()
+}
+
+// asInt64 returns the value held by v as an int64. If v is not of KindInt64,
+// this will return garbage.
+func (v Value) asInt64() int64 {
+ // Assumes v.num was a valid int64 (overflow not checked).
+ return int64(v.num) // nolint: gosec
+}
+
+// AsBool returns the value held by v as a bool.
+func (v Value) AsBool() bool {
+ if v.Kind() != ValueKindBool {
+ // TODO: error handle
+ return false
+ }
+ return v.asBool()
+}
+
+// asBool returns the value held by v as a bool. If v is not of KindBool, this
+// will return garbage.
+func (v Value) asBool() bool { return v.num == 1 }
+
+// AsFloat64 returns the value held by v as a float64.
+func (v Value) AsFloat64() float64 {
+ if v.Kind() != ValueKindFloat64 {
+ // TODO: error handle
+ return 0
+ }
+ return v.asFloat64()
+}
+
+// asFloat64 returns the value held by v as a float64. If v is not of
+// KindFloat64, this will return garbage.
+func (v Value) asFloat64() float64 { return math.Float64frombits(v.num) }
+
+// AsBytes returns the value held by v as a []byte.
+func (v Value) AsBytes() []byte {
+ if sp, ok := v.any.(bytesptr); ok {
+ return unsafe.Slice((*byte)(sp), v.num)
+ }
+ // TODO: error handle
+ return nil
+}
+
+// asBytes returns the value held by v as a []byte. It will panic if the Value
+// is not KindBytes.
+func (v Value) asBytes() []byte {
+ return unsafe.Slice((*byte)(v.any.(bytesptr)), v.num)
+}
+
+// AsSlice returns the value held by v as a []Value.
+func (v Value) AsSlice() []Value {
+ if sp, ok := v.any.(sliceptr); ok {
+ return unsafe.Slice((*Value)(sp), v.num)
+ }
+ // TODO: error handle
+ return nil
+}
+
+// asSlice returns the value held by v as a []Value. It will panic if the Value
+// is not KindSlice.
+func (v Value) asSlice() []Value {
+ return unsafe.Slice((*Value)(v.any.(sliceptr)), v.num)
+}
+
+// AsMap returns the value held by v as a []Attr.
+func (v Value) AsMap() []Attr {
+ if sp, ok := v.any.(mapptr); ok {
+ return unsafe.Slice((*Attr)(sp), v.num)
+ }
+ // TODO: error handle
+ return nil
+}
+
+// asMap returns the value held by v as a []Attr. It will panic if the
+// Value is not KindMap.
+func (v Value) asMap() []Attr {
+ return unsafe.Slice((*Attr)(v.any.(mapptr)), v.num)
+}
+
+// Kind returns the Kind of v.
+func (v Value) Kind() ValueKind {
+ switch x := v.any.(type) {
+ case ValueKind:
+ return x
+ case stringptr:
+ return ValueKindString
+ case bytesptr:
+ return ValueKindBytes
+ case sliceptr:
+ return ValueKindSlice
+ case mapptr:
+ return ValueKindMap
+ default:
+ return ValueKindEmpty
+ }
+}
+
+// Empty returns if v does not hold any value.
+func (v Value) Empty() bool { return v.Kind() == ValueKindEmpty }
+
+// Equal returns if v is equal to w.
+func (v Value) Equal(w Value) bool {
+ k1 := v.Kind()
+ k2 := w.Kind()
+ if k1 != k2 {
+ return false
+ }
+ switch k1 {
+ case ValueKindInt64, ValueKindBool:
+ return v.num == w.num
+ case ValueKindString:
+ return v.asString() == w.asString()
+ case ValueKindFloat64:
+ return v.asFloat64() == w.asFloat64()
+ case ValueKindSlice:
+ return slices.EqualFunc(v.asSlice(), w.asSlice(), Value.Equal)
+ case ValueKindMap:
+ sv := sortMap(v.asMap())
+ sw := sortMap(w.asMap())
+ return slices.EqualFunc(sv, sw, Attr.Equal)
+ case ValueKindBytes:
+ return bytes.Equal(v.asBytes(), w.asBytes())
+ case ValueKindEmpty:
+ return true
+ default:
+ // TODO: error handle
+ return false
+ }
+}
+
+func sortMap(m []Attr) []Attr {
+ sm := make([]Attr, len(m))
+ copy(sm, m)
+ slices.SortFunc(sm, func(a, b Attr) int {
+ return cmp.Compare(a.Key, b.Key)
+ })
+
+ return sm
+}
+
+// String returns Value's value as a string, formatted like [fmt.Sprint].
+//
+// The returned string is meant for debugging;
+// the string representation is not stable.
+func (v Value) String() string {
+ switch v.Kind() {
+ case ValueKindString:
+ return v.asString()
+ case ValueKindInt64:
+ // Assumes v.num was a valid int64 (overflow not checked).
+ return strconv.FormatInt(int64(v.num), 10) // nolint: gosec
+ case ValueKindFloat64:
+ return strconv.FormatFloat(v.asFloat64(), 'g', -1, 64)
+ case ValueKindBool:
+ return strconv.FormatBool(v.asBool())
+ case ValueKindBytes:
+ return fmt.Sprint(v.asBytes())
+ case ValueKindMap:
+ return fmt.Sprint(v.asMap())
+ case ValueKindSlice:
+ return fmt.Sprint(v.asSlice())
+ case ValueKindEmpty:
+ return ""
+ default:
+ // Try to handle this as gracefully as possible.
+ //
+ // Don't panic here. The goal here is to have developers find this
+ // first if a slog.Kind is is not handled. It is
+ // preferable to have user's open issue asking why their attributes
+ // have a "unhandled: " prefix than say that their code is panicking.
+ return fmt.Sprintf("", v.Kind())
+ }
+}
+
+// MarshalJSON encodes v into OTLP formatted JSON.
+func (v *Value) MarshalJSON() ([]byte, error) {
+ switch v.Kind() {
+ case ValueKindString:
+ return json.Marshal(struct {
+ Value string `json:"stringValue"`
+ }{v.asString()})
+ case ValueKindInt64:
+ return json.Marshal(struct {
+ Value string `json:"intValue"`
+ }{strconv.FormatInt(int64(v.num), 10)})
+ case ValueKindFloat64:
+ return json.Marshal(struct {
+ Value float64 `json:"doubleValue"`
+ }{v.asFloat64()})
+ case ValueKindBool:
+ return json.Marshal(struct {
+ Value bool `json:"boolValue"`
+ }{v.asBool()})
+ case ValueKindBytes:
+ return json.Marshal(struct {
+ Value []byte `json:"bytesValue"`
+ }{v.asBytes()})
+ case ValueKindMap:
+ return json.Marshal(struct {
+ Value struct {
+ Values []Attr `json:"values"`
+ } `json:"kvlistValue"`
+ }{struct {
+ Values []Attr `json:"values"`
+ }{v.asMap()}})
+ case ValueKindSlice:
+ return json.Marshal(struct {
+ Value struct {
+ Values []Value `json:"values"`
+ } `json:"arrayValue"`
+ }{struct {
+ Values []Value `json:"values"`
+ }{v.asSlice()}})
+ case ValueKindEmpty:
+ return nil, nil
+ default:
+ return nil, fmt.Errorf("unknown Value kind: %s", v.Kind().String())
+ }
+}
+
+// UnmarshalJSON decodes the OTLP formatted JSON contained in data into v.
+func (v *Value) UnmarshalJSON(data []byte) error {
+ decoder := json.NewDecoder(bytes.NewReader(data))
+
+ t, err := decoder.Token()
+ if err != nil {
+ return err
+ }
+ if t != json.Delim('{') {
+ return errors.New("invalid Value type")
+ }
+
+ for decoder.More() {
+ keyIface, err := decoder.Token()
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ // Empty.
+ return nil
+ }
+ return err
+ }
+
+ key, ok := keyIface.(string)
+ if !ok {
+ return fmt.Errorf("invalid Value key: %#v", keyIface)
+ }
+
+ switch key {
+ case "stringValue", "string_value":
+ var val string
+ err = decoder.Decode(&val)
+ *v = StringValue(val)
+ case "boolValue", "bool_value":
+ var val bool
+ err = decoder.Decode(&val)
+ *v = BoolValue(val)
+ case "intValue", "int_value":
+ var val protoInt64
+ err = decoder.Decode(&val)
+ *v = Int64Value(val.Int64())
+ case "doubleValue", "double_value":
+ var val float64
+ err = decoder.Decode(&val)
+ *v = Float64Value(val)
+ case "bytesValue", "bytes_value":
+ var val64 string
+ if err := decoder.Decode(&val64); err != nil {
+ return err
+ }
+ var val []byte
+ val, err = base64.StdEncoding.DecodeString(val64)
+ *v = BytesValue(val)
+ case "arrayValue", "array_value":
+ var val struct{ Values []Value }
+ err = decoder.Decode(&val)
+ *v = SliceValue(val.Values...)
+ case "kvlistValue", "kvlist_value":
+ var val struct{ Values []Attr }
+ err = decoder.Decode(&val)
+ *v = MapValue(val.Values...)
+ default:
+ // Skip unknown.
+ continue
+ }
+ // Use first valid. Ignore the rest.
+ return err
+ }
+
+ // Only unknown fields. Return nil without unmarshaling any value.
+ return nil
+}
diff --git a/vendor/go.opentelemetry.io/auto/sdk/limit.go b/vendor/go.opentelemetry.io/auto/sdk/limit.go
new file mode 100644
index 00000000..86babf1a
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/limit.go
@@ -0,0 +1,94 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package sdk
+
+import (
+ "log/slog"
+ "os"
+ "strconv"
+)
+
+// maxSpan are the span limits resolved during startup.
+var maxSpan = newSpanLimits()
+
+type spanLimits struct {
+ // Attrs is the number of allowed attributes for a span.
+ //
+ // This is resolved from the environment variable value for the
+ // OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT key if it exists. Otherwise, the
+ // environment variable value for OTEL_ATTRIBUTE_COUNT_LIMIT, or 128 if
+ // that is not set, is used.
+ Attrs int
+ // AttrValueLen is the maximum attribute value length allowed for a span.
+ //
+ // This is resolved from the environment variable value for the
+ // OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT key if it exists. Otherwise, the
+ // environment variable value for OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, or -1
+ // if that is not set, is used.
+ AttrValueLen int
+ // Events is the number of allowed events for a span.
+ //
+ // This is resolved from the environment variable value for the
+ // OTEL_SPAN_EVENT_COUNT_LIMIT key, or 128 is used if that is not set.
+ Events int
+ // EventAttrs is the number of allowed attributes for a span event.
+ //
+ // The is resolved from the environment variable value for the
+ // OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT key, or 128 is used if that is not set.
+ EventAttrs int
+ // Links is the number of allowed Links for a span.
+ //
+ // This is resolved from the environment variable value for the
+ // OTEL_SPAN_LINK_COUNT_LIMIT, or 128 is used if that is not set.
+ Links int
+ // LinkAttrs is the number of allowed attributes for a span link.
+ //
+ // This is resolved from the environment variable value for the
+ // OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, or 128 is used if that is not set.
+ LinkAttrs int
+}
+
+func newSpanLimits() spanLimits {
+ return spanLimits{
+ Attrs: firstEnv(
+ 128,
+ "OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT",
+ "OTEL_ATTRIBUTE_COUNT_LIMIT",
+ ),
+ AttrValueLen: firstEnv(
+ -1, // Unlimited.
+ "OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT",
+ "OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT",
+ ),
+ Events: firstEnv(128, "OTEL_SPAN_EVENT_COUNT_LIMIT"),
+ EventAttrs: firstEnv(128, "OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT"),
+ Links: firstEnv(128, "OTEL_SPAN_LINK_COUNT_LIMIT"),
+ LinkAttrs: firstEnv(128, "OTEL_LINK_ATTRIBUTE_COUNT_LIMIT"),
+ }
+}
+
+// firstEnv returns the parsed integer value of the first matching environment
+// variable from keys. The defaultVal is returned if the value is not an
+// integer or no match is found.
+func firstEnv(defaultVal int, keys ...string) int {
+ for _, key := range keys {
+ strV := os.Getenv(key)
+ if strV == "" {
+ continue
+ }
+
+ v, err := strconv.Atoi(strV)
+ if err == nil {
+ return v
+ }
+ slog.Warn(
+ "invalid limit environment variable",
+ "error", err,
+ "key", key,
+ "value", strV,
+ )
+ }
+
+ return defaultVal
+}
diff --git a/vendor/go.opentelemetry.io/auto/sdk/span.go b/vendor/go.opentelemetry.io/auto/sdk/span.go
new file mode 100644
index 00000000..6ebea12a
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/span.go
@@ -0,0 +1,432 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package sdk
+
+import (
+ "encoding/json"
+ "fmt"
+ "reflect"
+ "runtime"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "time"
+ "unicode/utf8"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/codes"
+ semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+ "go.opentelemetry.io/otel/trace"
+ "go.opentelemetry.io/otel/trace/noop"
+
+ "go.opentelemetry.io/auto/sdk/internal/telemetry"
+)
+
+type span struct {
+ noop.Span
+
+ spanContext trace.SpanContext
+ sampled atomic.Bool
+
+ mu sync.Mutex
+ traces *telemetry.Traces
+ span *telemetry.Span
+}
+
+func (s *span) SpanContext() trace.SpanContext {
+ if s == nil {
+ return trace.SpanContext{}
+ }
+ // s.spanContext is immutable, do not acquire lock s.mu.
+ return s.spanContext
+}
+
+func (s *span) IsRecording() bool {
+ if s == nil {
+ return false
+ }
+
+ return s.sampled.Load()
+}
+
+func (s *span) SetStatus(c codes.Code, msg string) {
+ if s == nil || !s.sampled.Load() {
+ return
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ if s.span.Status == nil {
+ s.span.Status = new(telemetry.Status)
+ }
+
+ s.span.Status.Message = msg
+
+ switch c {
+ case codes.Unset:
+ s.span.Status.Code = telemetry.StatusCodeUnset
+ case codes.Error:
+ s.span.Status.Code = telemetry.StatusCodeError
+ case codes.Ok:
+ s.span.Status.Code = telemetry.StatusCodeOK
+ }
+}
+
+func (s *span) SetAttributes(attrs ...attribute.KeyValue) {
+ if s == nil || !s.sampled.Load() {
+ return
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ limit := maxSpan.Attrs
+ if limit == 0 {
+ // No attributes allowed.
+ s.span.DroppedAttrs += uint32(len(attrs))
+ return
+ }
+
+ m := make(map[string]int)
+ for i, a := range s.span.Attrs {
+ m[a.Key] = i
+ }
+
+ for _, a := range attrs {
+ val := convAttrValue(a.Value)
+ if val.Empty() {
+ s.span.DroppedAttrs++
+ continue
+ }
+
+ if idx, ok := m[string(a.Key)]; ok {
+ s.span.Attrs[idx] = telemetry.Attr{
+ Key: string(a.Key),
+ Value: val,
+ }
+ } else if limit < 0 || len(s.span.Attrs) < limit {
+ s.span.Attrs = append(s.span.Attrs, telemetry.Attr{
+ Key: string(a.Key),
+ Value: val,
+ })
+ m[string(a.Key)] = len(s.span.Attrs) - 1
+ } else {
+ s.span.DroppedAttrs++
+ }
+ }
+}
+
+// convCappedAttrs converts up to limit attrs into a []telemetry.Attr. The
+// number of dropped attributes is also returned.
+func convCappedAttrs(limit int, attrs []attribute.KeyValue) ([]telemetry.Attr, uint32) {
+ if limit == 0 {
+ return nil, uint32(len(attrs))
+ }
+
+ if limit < 0 {
+ // Unlimited.
+ return convAttrs(attrs), 0
+ }
+
+ limit = min(len(attrs), limit)
+ return convAttrs(attrs[:limit]), uint32(len(attrs) - limit)
+}
+
+func convAttrs(attrs []attribute.KeyValue) []telemetry.Attr {
+ if len(attrs) == 0 {
+ // Avoid allocations if not necessary.
+ return nil
+ }
+
+ out := make([]telemetry.Attr, 0, len(attrs))
+ for _, attr := range attrs {
+ key := string(attr.Key)
+ val := convAttrValue(attr.Value)
+ if val.Empty() {
+ continue
+ }
+ out = append(out, telemetry.Attr{Key: key, Value: val})
+ }
+ return out
+}
+
+func convAttrValue(value attribute.Value) telemetry.Value {
+ switch value.Type() {
+ case attribute.BOOL:
+ return telemetry.BoolValue(value.AsBool())
+ case attribute.INT64:
+ return telemetry.Int64Value(value.AsInt64())
+ case attribute.FLOAT64:
+ return telemetry.Float64Value(value.AsFloat64())
+ case attribute.STRING:
+ v := truncate(maxSpan.AttrValueLen, value.AsString())
+ return telemetry.StringValue(v)
+ case attribute.BOOLSLICE:
+ slice := value.AsBoolSlice()
+ out := make([]telemetry.Value, 0, len(slice))
+ for _, v := range slice {
+ out = append(out, telemetry.BoolValue(v))
+ }
+ return telemetry.SliceValue(out...)
+ case attribute.INT64SLICE:
+ slice := value.AsInt64Slice()
+ out := make([]telemetry.Value, 0, len(slice))
+ for _, v := range slice {
+ out = append(out, telemetry.Int64Value(v))
+ }
+ return telemetry.SliceValue(out...)
+ case attribute.FLOAT64SLICE:
+ slice := value.AsFloat64Slice()
+ out := make([]telemetry.Value, 0, len(slice))
+ for _, v := range slice {
+ out = append(out, telemetry.Float64Value(v))
+ }
+ return telemetry.SliceValue(out...)
+ case attribute.STRINGSLICE:
+ slice := value.AsStringSlice()
+ out := make([]telemetry.Value, 0, len(slice))
+ for _, v := range slice {
+ v = truncate(maxSpan.AttrValueLen, v)
+ out = append(out, telemetry.StringValue(v))
+ }
+ return telemetry.SliceValue(out...)
+ }
+ return telemetry.Value{}
+}
+
+// truncate returns a truncated version of s such that it contains less than
+// the limit number of characters. Truncation is applied by returning the limit
+// number of valid characters contained in s.
+//
+// If limit is negative, it returns the original string.
+//
+// UTF-8 is supported. When truncating, all invalid characters are dropped
+// before applying truncation.
+//
+// If s already contains less than the limit number of bytes, it is returned
+// unchanged. No invalid characters are removed.
+func truncate(limit int, s string) string {
+ // This prioritize performance in the following order based on the most
+ // common expected use-cases.
+ //
+ // - Short values less than the default limit (128).
+ // - Strings with valid encodings that exceed the limit.
+ // - No limit.
+ // - Strings with invalid encodings that exceed the limit.
+ if limit < 0 || len(s) <= limit {
+ return s
+ }
+
+ // Optimistically, assume all valid UTF-8.
+ var b strings.Builder
+ count := 0
+ for i, c := range s {
+ if c != utf8.RuneError {
+ count++
+ if count > limit {
+ return s[:i]
+ }
+ continue
+ }
+
+ _, size := utf8.DecodeRuneInString(s[i:])
+ if size == 1 {
+ // Invalid encoding.
+ b.Grow(len(s) - 1)
+ _, _ = b.WriteString(s[:i])
+ s = s[i:]
+ break
+ }
+ }
+
+ // Fast-path, no invalid input.
+ if b.Cap() == 0 {
+ return s
+ }
+
+ // Truncate while validating UTF-8.
+ for i := 0; i < len(s) && count < limit; {
+ c := s[i]
+ if c < utf8.RuneSelf {
+ // Optimization for single byte runes (common case).
+ _ = b.WriteByte(c)
+ i++
+ count++
+ continue
+ }
+
+ _, size := utf8.DecodeRuneInString(s[i:])
+ if size == 1 {
+ // We checked for all 1-byte runes above, this is a RuneError.
+ i++
+ continue
+ }
+
+ _, _ = b.WriteString(s[i : i+size])
+ i += size
+ count++
+ }
+
+ return b.String()
+}
+
+func (s *span) End(opts ...trace.SpanEndOption) {
+ if s == nil || !s.sampled.Swap(false) {
+ return
+ }
+
+ // s.end exists so the lock (s.mu) is not held while s.ended is called.
+ s.ended(s.end(opts))
+}
+
+func (s *span) end(opts []trace.SpanEndOption) []byte {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ cfg := trace.NewSpanEndConfig(opts...)
+ if t := cfg.Timestamp(); !t.IsZero() {
+ s.span.EndTime = cfg.Timestamp()
+ } else {
+ s.span.EndTime = time.Now()
+ }
+
+ b, _ := json.Marshal(s.traces) // TODO: do not ignore this error.
+ return b
+}
+
+// Expected to be implemented in eBPF.
+//
+//go:noinline
+func (*span) ended(buf []byte) { ended(buf) }
+
+// ended is used for testing.
+var ended = func([]byte) {}
+
+func (s *span) RecordError(err error, opts ...trace.EventOption) {
+ if s == nil || err == nil || !s.sampled.Load() {
+ return
+ }
+
+ cfg := trace.NewEventConfig(opts...)
+
+ attrs := cfg.Attributes()
+ attrs = append(attrs,
+ semconv.ExceptionType(typeStr(err)),
+ semconv.ExceptionMessage(err.Error()),
+ )
+ if cfg.StackTrace() {
+ buf := make([]byte, 2048)
+ n := runtime.Stack(buf, false)
+ attrs = append(attrs, semconv.ExceptionStacktrace(string(buf[0:n])))
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ s.addEvent(semconv.ExceptionEventName, cfg.Timestamp(), attrs)
+}
+
+func typeStr(i any) string {
+ t := reflect.TypeOf(i)
+ if t.PkgPath() == "" && t.Name() == "" {
+ // Likely a builtin type.
+ return t.String()
+ }
+ return fmt.Sprintf("%s.%s", t.PkgPath(), t.Name())
+}
+
+func (s *span) AddEvent(name string, opts ...trace.EventOption) {
+ if s == nil || !s.sampled.Load() {
+ return
+ }
+
+ cfg := trace.NewEventConfig(opts...)
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ s.addEvent(name, cfg.Timestamp(), cfg.Attributes())
+}
+
+// addEvent adds an event with name and attrs at tStamp to the span. The span
+// lock (s.mu) needs to be held by the caller.
+func (s *span) addEvent(name string, tStamp time.Time, attrs []attribute.KeyValue) {
+ limit := maxSpan.Events
+
+ if limit == 0 {
+ s.span.DroppedEvents++
+ return
+ }
+
+ if limit > 0 && len(s.span.Events) == limit {
+ // Drop head while avoiding allocation of more capacity.
+ copy(s.span.Events[:limit-1], s.span.Events[1:])
+ s.span.Events = s.span.Events[:limit-1]
+ s.span.DroppedEvents++
+ }
+
+ e := &telemetry.SpanEvent{Time: tStamp, Name: name}
+ e.Attrs, e.DroppedAttrs = convCappedAttrs(maxSpan.EventAttrs, attrs)
+
+ s.span.Events = append(s.span.Events, e)
+}
+
+func (s *span) AddLink(link trace.Link) {
+ if s == nil || !s.sampled.Load() {
+ return
+ }
+
+ l := maxSpan.Links
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ if l == 0 {
+ s.span.DroppedLinks++
+ return
+ }
+
+ if l > 0 && len(s.span.Links) == l {
+ // Drop head while avoiding allocation of more capacity.
+ copy(s.span.Links[:l-1], s.span.Links[1:])
+ s.span.Links = s.span.Links[:l-1]
+ s.span.DroppedLinks++
+ }
+
+ s.span.Links = append(s.span.Links, convLink(link))
+}
+
+func convLinks(links []trace.Link) []*telemetry.SpanLink {
+ out := make([]*telemetry.SpanLink, 0, len(links))
+ for _, link := range links {
+ out = append(out, convLink(link))
+ }
+ return out
+}
+
+func convLink(link trace.Link) *telemetry.SpanLink {
+ l := &telemetry.SpanLink{
+ TraceID: telemetry.TraceID(link.SpanContext.TraceID()),
+ SpanID: telemetry.SpanID(link.SpanContext.SpanID()),
+ TraceState: link.SpanContext.TraceState().String(),
+ Flags: uint32(link.SpanContext.TraceFlags()),
+ }
+ l.Attrs, l.DroppedAttrs = convCappedAttrs(maxSpan.LinkAttrs, link.Attributes)
+
+ return l
+}
+
+func (s *span) SetName(name string) {
+ if s == nil || !s.sampled.Load() {
+ return
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ s.span.Name = name
+}
+
+func (*span) TracerProvider() trace.TracerProvider { return TracerProvider() }
diff --git a/vendor/go.opentelemetry.io/auto/sdk/tracer.go b/vendor/go.opentelemetry.io/auto/sdk/tracer.go
new file mode 100644
index 00000000..cbcfabde
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/tracer.go
@@ -0,0 +1,124 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package sdk
+
+import (
+ "context"
+ "time"
+
+ "go.opentelemetry.io/otel/trace"
+ "go.opentelemetry.io/otel/trace/noop"
+
+ "go.opentelemetry.io/auto/sdk/internal/telemetry"
+)
+
+type tracer struct {
+ noop.Tracer
+
+ name, schemaURL, version string
+}
+
+var _ trace.Tracer = tracer{}
+
+func (t tracer) Start(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span) {
+ var psc trace.SpanContext
+ sampled := true
+ span := new(span)
+
+ // Ask eBPF for sampling decision and span context info.
+ t.start(ctx, span, &psc, &sampled, &span.spanContext)
+
+ span.sampled.Store(sampled)
+
+ ctx = trace.ContextWithSpan(ctx, span)
+
+ if sampled {
+ // Only build traces if sampled.
+ cfg := trace.NewSpanStartConfig(opts...)
+ span.traces, span.span = t.traces(name, cfg, span.spanContext, psc)
+ }
+
+ return ctx, span
+}
+
+// Expected to be implemented in eBPF.
+//
+//go:noinline
+func (t *tracer) start(
+ ctx context.Context,
+ spanPtr *span,
+ psc *trace.SpanContext,
+ sampled *bool,
+ sc *trace.SpanContext,
+) {
+ start(ctx, spanPtr, psc, sampled, sc)
+}
+
+// start is used for testing.
+var start = func(context.Context, *span, *trace.SpanContext, *bool, *trace.SpanContext) {}
+
+func (t tracer) traces(name string, cfg trace.SpanConfig, sc, psc trace.SpanContext) (*telemetry.Traces, *telemetry.Span) {
+ span := &telemetry.Span{
+ TraceID: telemetry.TraceID(sc.TraceID()),
+ SpanID: telemetry.SpanID(sc.SpanID()),
+ Flags: uint32(sc.TraceFlags()),
+ TraceState: sc.TraceState().String(),
+ ParentSpanID: telemetry.SpanID(psc.SpanID()),
+ Name: name,
+ Kind: spanKind(cfg.SpanKind()),
+ }
+
+ span.Attrs, span.DroppedAttrs = convCappedAttrs(maxSpan.Attrs, cfg.Attributes())
+
+ links := cfg.Links()
+ if limit := maxSpan.Links; limit == 0 {
+ span.DroppedLinks = uint32(len(links))
+ } else {
+ if limit > 0 {
+ n := max(len(links)-limit, 0)
+ span.DroppedLinks = uint32(n)
+ links = links[n:]
+ }
+ span.Links = convLinks(links)
+ }
+
+ if t := cfg.Timestamp(); !t.IsZero() {
+ span.StartTime = cfg.Timestamp()
+ } else {
+ span.StartTime = time.Now()
+ }
+
+ return &telemetry.Traces{
+ ResourceSpans: []*telemetry.ResourceSpans{
+ {
+ ScopeSpans: []*telemetry.ScopeSpans{
+ {
+ Scope: &telemetry.Scope{
+ Name: t.name,
+ Version: t.version,
+ },
+ Spans: []*telemetry.Span{span},
+ SchemaURL: t.schemaURL,
+ },
+ },
+ },
+ },
+ }, span
+}
+
+func spanKind(kind trace.SpanKind) telemetry.SpanKind {
+ switch kind {
+ case trace.SpanKindInternal:
+ return telemetry.SpanKindInternal
+ case trace.SpanKindServer:
+ return telemetry.SpanKindServer
+ case trace.SpanKindClient:
+ return telemetry.SpanKindClient
+ case trace.SpanKindProducer:
+ return telemetry.SpanKindProducer
+ case trace.SpanKindConsumer:
+ return telemetry.SpanKindConsumer
+ }
+ return telemetry.SpanKind(0) // undefined.
+}
diff --git a/vendor/go.opentelemetry.io/auto/sdk/tracer_provider.go b/vendor/go.opentelemetry.io/auto/sdk/tracer_provider.go
new file mode 100644
index 00000000..dbc477a5
--- /dev/null
+++ b/vendor/go.opentelemetry.io/auto/sdk/tracer_provider.go
@@ -0,0 +1,33 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package sdk
+
+import (
+ "go.opentelemetry.io/otel/trace"
+ "go.opentelemetry.io/otel/trace/noop"
+)
+
+// TracerProvider returns an auto-instrumentable [trace.TracerProvider].
+//
+// If an [go.opentelemetry.io/auto.Instrumentation] is configured to instrument
+// the process using the returned TracerProvider, all of the telemetry it
+// produces will be processed and handled by that Instrumentation. By default,
+// if no Instrumentation instruments the TracerProvider it will not generate
+// any trace telemetry.
+func TracerProvider() trace.TracerProvider { return tracerProviderInstance }
+
+var tracerProviderInstance = new(tracerProvider)
+
+type tracerProvider struct{ noop.TracerProvider }
+
+var _ trace.TracerProvider = tracerProvider{}
+
+func (p tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer {
+ cfg := trace.NewTracerConfig(opts...)
+ return tracer{
+ name: name,
+ version: cfg.InstrumentationVersion(),
+ schemaURL: cfg.SchemaURL(),
+ }
+}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/LICENSE b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go
new file mode 100644
index 00000000..9e87fb4b
--- /dev/null
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go
@@ -0,0 +1,305 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+
+import (
+ "google.golang.org/grpc/stats"
+
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/metric"
+ "go.opentelemetry.io/otel/metric/noop"
+ "go.opentelemetry.io/otel/propagation"
+ semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
+ "go.opentelemetry.io/otel/trace"
+)
+
+const (
+ // ScopeName is the instrumentation scope name.
+ ScopeName = "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+ // GRPCStatusCodeKey is convention for numeric status code of a gRPC request.
+ GRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
+)
+
+// InterceptorFilter is a predicate used to determine whether a given request in
+// interceptor info should be instrumented. A InterceptorFilter must return true if
+// the request should be traced.
+//
+// Deprecated: Use stats handlers instead.
+type InterceptorFilter func(*InterceptorInfo) bool
+
+// Filter is a predicate used to determine whether a given request in
+// should be instrumented by the attached RPC tag info.
+// A Filter must return true if the request should be instrumented.
+type Filter func(*stats.RPCTagInfo) bool
+
+// config is a group of options for this instrumentation.
+type config struct {
+ Filter Filter
+ InterceptorFilter InterceptorFilter
+ Propagators propagation.TextMapPropagator
+ TracerProvider trace.TracerProvider
+ MeterProvider metric.MeterProvider
+ SpanStartOptions []trace.SpanStartOption
+ SpanAttributes []attribute.KeyValue
+ MetricAttributes []attribute.KeyValue
+
+ ReceivedEvent bool
+ SentEvent bool
+
+ tracer trace.Tracer
+ meter metric.Meter
+
+ rpcDuration metric.Float64Histogram
+ rpcInBytes metric.Int64Histogram
+ rpcOutBytes metric.Int64Histogram
+ rpcInMessages metric.Int64Histogram
+ rpcOutMessages metric.Int64Histogram
+}
+
+// Option applies an option value for a config.
+type Option interface {
+ apply(*config)
+}
+
+// newConfig returns a config configured with all the passed Options.
+func newConfig(opts []Option, role string) *config {
+ c := &config{
+ Propagators: otel.GetTextMapPropagator(),
+ TracerProvider: otel.GetTracerProvider(),
+ MeterProvider: otel.GetMeterProvider(),
+ }
+ for _, o := range opts {
+ o.apply(c)
+ }
+
+ c.tracer = c.TracerProvider.Tracer(
+ ScopeName,
+ trace.WithInstrumentationVersion(SemVersion()),
+ )
+
+ c.meter = c.MeterProvider.Meter(
+ ScopeName,
+ metric.WithInstrumentationVersion(Version()),
+ metric.WithSchemaURL(semconv.SchemaURL),
+ )
+
+ var err error
+ c.rpcDuration, err = c.meter.Float64Histogram("rpc."+role+".duration",
+ metric.WithDescription("Measures the duration of inbound RPC."),
+ metric.WithUnit("ms"))
+ if err != nil {
+ otel.Handle(err)
+ if c.rpcDuration == nil {
+ c.rpcDuration = noop.Float64Histogram{}
+ }
+ }
+
+ rpcRequestSize, err := c.meter.Int64Histogram("rpc."+role+".request.size",
+ metric.WithDescription("Measures size of RPC request messages (uncompressed)."),
+ metric.WithUnit("By"))
+ if err != nil {
+ otel.Handle(err)
+ if rpcRequestSize == nil {
+ rpcRequestSize = noop.Int64Histogram{}
+ }
+ }
+
+ rpcResponseSize, err := c.meter.Int64Histogram("rpc."+role+".response.size",
+ metric.WithDescription("Measures size of RPC response messages (uncompressed)."),
+ metric.WithUnit("By"))
+ if err != nil {
+ otel.Handle(err)
+ if rpcResponseSize == nil {
+ rpcResponseSize = noop.Int64Histogram{}
+ }
+ }
+
+ rpcRequestsPerRPC, err := c.meter.Int64Histogram("rpc."+role+".requests_per_rpc",
+ metric.WithDescription("Measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs."),
+ metric.WithUnit("{count}"))
+ if err != nil {
+ otel.Handle(err)
+ if rpcRequestsPerRPC == nil {
+ rpcRequestsPerRPC = noop.Int64Histogram{}
+ }
+ }
+
+ rpcResponsesPerRPC, err := c.meter.Int64Histogram("rpc."+role+".responses_per_rpc",
+ metric.WithDescription("Measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs."),
+ metric.WithUnit("{count}"))
+ if err != nil {
+ otel.Handle(err)
+ if rpcResponsesPerRPC == nil {
+ rpcResponsesPerRPC = noop.Int64Histogram{}
+ }
+ }
+
+ switch role {
+ case "client":
+ c.rpcInBytes = rpcResponseSize
+ c.rpcInMessages = rpcResponsesPerRPC
+ c.rpcOutBytes = rpcRequestSize
+ c.rpcOutMessages = rpcRequestsPerRPC
+ case "server":
+ c.rpcInBytes = rpcRequestSize
+ c.rpcInMessages = rpcRequestsPerRPC
+ c.rpcOutBytes = rpcResponseSize
+ c.rpcOutMessages = rpcResponsesPerRPC
+ default:
+ c.rpcInBytes = noop.Int64Histogram{}
+ c.rpcInMessages = noop.Int64Histogram{}
+ c.rpcOutBytes = noop.Int64Histogram{}
+ c.rpcOutMessages = noop.Int64Histogram{}
+ }
+
+ return c
+}
+
+type propagatorsOption struct{ p propagation.TextMapPropagator }
+
+func (o propagatorsOption) apply(c *config) {
+ if o.p != nil {
+ c.Propagators = o.p
+ }
+}
+
+// WithPropagators returns an Option to use the Propagators when extracting
+// and injecting trace context from requests.
+func WithPropagators(p propagation.TextMapPropagator) Option {
+ return propagatorsOption{p: p}
+}
+
+type tracerProviderOption struct{ tp trace.TracerProvider }
+
+func (o tracerProviderOption) apply(c *config) {
+ if o.tp != nil {
+ c.TracerProvider = o.tp
+ }
+}
+
+// WithInterceptorFilter returns an Option to use the request filter.
+//
+// Deprecated: Use stats handlers instead.
+func WithInterceptorFilter(f InterceptorFilter) Option {
+ return interceptorFilterOption{f: f}
+}
+
+type interceptorFilterOption struct {
+ f InterceptorFilter
+}
+
+func (o interceptorFilterOption) apply(c *config) {
+ if o.f != nil {
+ c.InterceptorFilter = o.f
+ }
+}
+
+// WithFilter returns an Option to use the request filter.
+func WithFilter(f Filter) Option {
+ return filterOption{f: f}
+}
+
+type filterOption struct {
+ f Filter
+}
+
+func (o filterOption) apply(c *config) {
+ if o.f != nil {
+ c.Filter = o.f
+ }
+}
+
+// WithTracerProvider returns an Option to use the TracerProvider when
+// creating a Tracer.
+func WithTracerProvider(tp trace.TracerProvider) Option {
+ return tracerProviderOption{tp: tp}
+}
+
+type meterProviderOption struct{ mp metric.MeterProvider }
+
+func (o meterProviderOption) apply(c *config) {
+ if o.mp != nil {
+ c.MeterProvider = o.mp
+ }
+}
+
+// WithMeterProvider returns an Option to use the MeterProvider when
+// creating a Meter. If this option is not provide the global MeterProvider will be used.
+func WithMeterProvider(mp metric.MeterProvider) Option {
+ return meterProviderOption{mp: mp}
+}
+
+// Event type that can be recorded, see WithMessageEvents.
+type Event int
+
+// Different types of events that can be recorded, see WithMessageEvents.
+const (
+ ReceivedEvents Event = iota
+ SentEvents
+)
+
+type messageEventsProviderOption struct {
+ events []Event
+}
+
+func (m messageEventsProviderOption) apply(c *config) {
+ for _, e := range m.events {
+ switch e {
+ case ReceivedEvents:
+ c.ReceivedEvent = true
+ case SentEvents:
+ c.SentEvent = true
+ }
+ }
+}
+
+// WithMessageEvents configures the Handler to record the specified events
+// (span.AddEvent) on spans. By default only summary attributes are added at the
+// end of the request.
+//
+// Valid events are:
+// - ReceivedEvents: Record the number of bytes read after every gRPC read operation.
+// - SentEvents: Record the number of bytes written after every gRPC write operation.
+func WithMessageEvents(events ...Event) Option {
+ return messageEventsProviderOption{events: events}
+}
+
+type spanStartOption struct{ opts []trace.SpanStartOption }
+
+func (o spanStartOption) apply(c *config) {
+ c.SpanStartOptions = append(c.SpanStartOptions, o.opts...)
+}
+
+// WithSpanOptions configures an additional set of
+// trace.SpanOptions, which are applied to each new span.
+func WithSpanOptions(opts ...trace.SpanStartOption) Option {
+ return spanStartOption{opts}
+}
+
+type spanAttributesOption struct{ a []attribute.KeyValue }
+
+func (o spanAttributesOption) apply(c *config) {
+ if o.a != nil {
+ c.SpanAttributes = o.a
+ }
+}
+
+// WithSpanAttributes returns an Option to add custom attributes to the spans.
+func WithSpanAttributes(a ...attribute.KeyValue) Option {
+ return spanAttributesOption{a: a}
+}
+
+type metricAttributesOption struct{ a []attribute.KeyValue }
+
+func (o metricAttributesOption) apply(c *config) {
+ if o.a != nil {
+ c.MetricAttributes = o.a
+ }
+}
+
+// WithMetricAttributes returns an Option to add custom attributes to the metrics.
+func WithMetricAttributes(a ...attribute.KeyValue) Option {
+ return metricAttributesOption{a: a}
+}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/doc.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/doc.go
new file mode 100644
index 00000000..b8b836b0
--- /dev/null
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/doc.go
@@ -0,0 +1,11 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package otelgrpc is the instrumentation library for [google.golang.org/grpc].
+
+Use [NewClientHandler] with [grpc.WithStatsHandler] to instrument a gRPC client.
+
+Use [NewServerHandler] with [grpc.StatsHandler] to instrument a gRPC server.
+*/
+package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
new file mode 100644
index 00000000..7d5ed058
--- /dev/null
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
@@ -0,0 +1,530 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+
+// gRPC tracing middleware
+// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/rpc.md
+import (
+ "context"
+ "errors"
+ "io"
+ "net"
+ "strconv"
+ "time"
+
+ "google.golang.org/grpc"
+ grpc_codes "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/peer"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+
+ "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal"
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/codes"
+ "go.opentelemetry.io/otel/metric"
+ semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
+ "go.opentelemetry.io/otel/trace"
+)
+
+type messageType attribute.KeyValue
+
+// Event adds an event of the messageType to the span associated with the
+// passed context with a message id.
+func (m messageType) Event(ctx context.Context, id int, _ interface{}) {
+ span := trace.SpanFromContext(ctx)
+ if !span.IsRecording() {
+ return
+ }
+ span.AddEvent("message", trace.WithAttributes(
+ attribute.KeyValue(m),
+ RPCMessageIDKey.Int(id),
+ ))
+}
+
+var (
+ messageSent = messageType(RPCMessageTypeSent)
+ messageReceived = messageType(RPCMessageTypeReceived)
+)
+
+// UnaryClientInterceptor returns a grpc.UnaryClientInterceptor suitable
+// for use in a grpc.NewClient call.
+//
+// Deprecated: Use [NewClientHandler] instead.
+func UnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor {
+ cfg := newConfig(opts, "client")
+ tracer := cfg.TracerProvider.Tracer(
+ ScopeName,
+ trace.WithInstrumentationVersion(Version()),
+ )
+
+ return func(
+ ctx context.Context,
+ method string,
+ req, reply interface{},
+ cc *grpc.ClientConn,
+ invoker grpc.UnaryInvoker,
+ callOpts ...grpc.CallOption,
+ ) error {
+ i := &InterceptorInfo{
+ Method: method,
+ Type: UnaryClient,
+ }
+ if cfg.InterceptorFilter != nil && !cfg.InterceptorFilter(i) {
+ return invoker(ctx, method, req, reply, cc, callOpts...)
+ }
+
+ name, attr, _ := telemetryAttributes(method, cc.Target())
+
+ startOpts := append([]trace.SpanStartOption{
+ trace.WithSpanKind(trace.SpanKindClient),
+ trace.WithAttributes(attr...),
+ },
+ cfg.SpanStartOptions...,
+ )
+
+ ctx, span := tracer.Start(
+ ctx,
+ name,
+ startOpts...,
+ )
+ defer span.End()
+
+ ctx = inject(ctx, cfg.Propagators)
+
+ if cfg.SentEvent {
+ messageSent.Event(ctx, 1, req)
+ }
+
+ err := invoker(ctx, method, req, reply, cc, callOpts...)
+
+ if cfg.ReceivedEvent {
+ messageReceived.Event(ctx, 1, reply)
+ }
+
+ if err != nil {
+ s, _ := status.FromError(err)
+ span.SetStatus(codes.Error, s.Message())
+ span.SetAttributes(statusCodeAttr(s.Code()))
+ } else {
+ span.SetAttributes(statusCodeAttr(grpc_codes.OK))
+ }
+
+ return err
+ }
+}
+
+// clientStream wraps around the embedded grpc.ClientStream, and intercepts the RecvMsg and
+// SendMsg method call.
+type clientStream struct {
+ grpc.ClientStream
+ desc *grpc.StreamDesc
+
+ span trace.Span
+
+ receivedEvent bool
+ sentEvent bool
+
+ receivedMessageID int
+ sentMessageID int
+}
+
+var _ = proto.Marshal
+
+func (w *clientStream) RecvMsg(m interface{}) error {
+ err := w.ClientStream.RecvMsg(m)
+
+ if err == nil && !w.desc.ServerStreams {
+ w.endSpan(nil)
+ } else if errors.Is(err, io.EOF) {
+ w.endSpan(nil)
+ } else if err != nil {
+ w.endSpan(err)
+ } else {
+ w.receivedMessageID++
+
+ if w.receivedEvent {
+ messageReceived.Event(w.Context(), w.receivedMessageID, m)
+ }
+ }
+
+ return err
+}
+
+func (w *clientStream) SendMsg(m interface{}) error {
+ err := w.ClientStream.SendMsg(m)
+
+ w.sentMessageID++
+
+ if w.sentEvent {
+ messageSent.Event(w.Context(), w.sentMessageID, m)
+ }
+
+ if err != nil {
+ w.endSpan(err)
+ }
+
+ return err
+}
+
+func (w *clientStream) Header() (metadata.MD, error) {
+ md, err := w.ClientStream.Header()
+ if err != nil {
+ w.endSpan(err)
+ }
+
+ return md, err
+}
+
+func (w *clientStream) CloseSend() error {
+ err := w.ClientStream.CloseSend()
+ if err != nil {
+ w.endSpan(err)
+ }
+
+ return err
+}
+
+func wrapClientStream(s grpc.ClientStream, desc *grpc.StreamDesc, span trace.Span, cfg *config) *clientStream {
+ return &clientStream{
+ ClientStream: s,
+ span: span,
+ desc: desc,
+ receivedEvent: cfg.ReceivedEvent,
+ sentEvent: cfg.SentEvent,
+ }
+}
+
+func (w *clientStream) endSpan(err error) {
+ if err != nil {
+ s, _ := status.FromError(err)
+ w.span.SetStatus(codes.Error, s.Message())
+ w.span.SetAttributes(statusCodeAttr(s.Code()))
+ } else {
+ w.span.SetAttributes(statusCodeAttr(grpc_codes.OK))
+ }
+
+ w.span.End()
+}
+
+// StreamClientInterceptor returns a grpc.StreamClientInterceptor suitable
+// for use in a grpc.NewClient call.
+//
+// Deprecated: Use [NewClientHandler] instead.
+func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor {
+ cfg := newConfig(opts, "client")
+ tracer := cfg.TracerProvider.Tracer(
+ ScopeName,
+ trace.WithInstrumentationVersion(Version()),
+ )
+
+ return func(
+ ctx context.Context,
+ desc *grpc.StreamDesc,
+ cc *grpc.ClientConn,
+ method string,
+ streamer grpc.Streamer,
+ callOpts ...grpc.CallOption,
+ ) (grpc.ClientStream, error) {
+ i := &InterceptorInfo{
+ Method: method,
+ Type: StreamClient,
+ }
+ if cfg.InterceptorFilter != nil && !cfg.InterceptorFilter(i) {
+ return streamer(ctx, desc, cc, method, callOpts...)
+ }
+
+ name, attr, _ := telemetryAttributes(method, cc.Target())
+
+ startOpts := append([]trace.SpanStartOption{
+ trace.WithSpanKind(trace.SpanKindClient),
+ trace.WithAttributes(attr...),
+ },
+ cfg.SpanStartOptions...,
+ )
+
+ ctx, span := tracer.Start(
+ ctx,
+ name,
+ startOpts...,
+ )
+
+ ctx = inject(ctx, cfg.Propagators)
+
+ s, err := streamer(ctx, desc, cc, method, callOpts...)
+ if err != nil {
+ grpcStatus, _ := status.FromError(err)
+ span.SetStatus(codes.Error, grpcStatus.Message())
+ span.SetAttributes(statusCodeAttr(grpcStatus.Code()))
+ span.End()
+ return s, err
+ }
+ stream := wrapClientStream(s, desc, span, cfg)
+ return stream, nil
+ }
+}
+
+// UnaryServerInterceptor returns a grpc.UnaryServerInterceptor suitable
+// for use in a grpc.NewServer call.
+//
+// Deprecated: Use [NewServerHandler] instead.
+func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor {
+ cfg := newConfig(opts, "server")
+ tracer := cfg.TracerProvider.Tracer(
+ ScopeName,
+ trace.WithInstrumentationVersion(Version()),
+ )
+
+ return func(
+ ctx context.Context,
+ req interface{},
+ info *grpc.UnaryServerInfo,
+ handler grpc.UnaryHandler,
+ ) (interface{}, error) {
+ i := &InterceptorInfo{
+ UnaryServerInfo: info,
+ Type: UnaryServer,
+ }
+ if cfg.InterceptorFilter != nil && !cfg.InterceptorFilter(i) {
+ return handler(ctx, req)
+ }
+
+ ctx = extract(ctx, cfg.Propagators)
+ name, attr, metricAttrs := telemetryAttributes(info.FullMethod, peerFromCtx(ctx))
+
+ startOpts := append([]trace.SpanStartOption{
+ trace.WithSpanKind(trace.SpanKindServer),
+ trace.WithAttributes(attr...),
+ },
+ cfg.SpanStartOptions...,
+ )
+
+ ctx, span := tracer.Start(
+ trace.ContextWithRemoteSpanContext(ctx, trace.SpanContextFromContext(ctx)),
+ name,
+ startOpts...,
+ )
+ defer span.End()
+
+ if cfg.ReceivedEvent {
+ messageReceived.Event(ctx, 1, req)
+ }
+
+ before := time.Now()
+
+ resp, err := handler(ctx, req)
+
+ s, _ := status.FromError(err)
+ if err != nil {
+ statusCode, msg := serverStatus(s)
+ span.SetStatus(statusCode, msg)
+ if cfg.SentEvent {
+ messageSent.Event(ctx, 1, s.Proto())
+ }
+ } else {
+ if cfg.SentEvent {
+ messageSent.Event(ctx, 1, resp)
+ }
+ }
+ grpcStatusCodeAttr := statusCodeAttr(s.Code())
+ span.SetAttributes(grpcStatusCodeAttr)
+
+ // Use floating point division here for higher precision (instead of Millisecond method).
+ elapsedTime := float64(time.Since(before)) / float64(time.Millisecond)
+
+ metricAttrs = append(metricAttrs, grpcStatusCodeAttr)
+ cfg.rpcDuration.Record(ctx, elapsedTime, metric.WithAttributeSet(attribute.NewSet(metricAttrs...)))
+
+ return resp, err
+ }
+}
+
+// serverStream wraps around the embedded grpc.ServerStream, and intercepts the RecvMsg and
+// SendMsg method call.
+type serverStream struct {
+ grpc.ServerStream
+ ctx context.Context
+
+ receivedMessageID int
+ sentMessageID int
+
+ receivedEvent bool
+ sentEvent bool
+}
+
+func (w *serverStream) Context() context.Context {
+ return w.ctx
+}
+
+func (w *serverStream) RecvMsg(m interface{}) error {
+ err := w.ServerStream.RecvMsg(m)
+
+ if err == nil {
+ w.receivedMessageID++
+ if w.receivedEvent {
+ messageReceived.Event(w.Context(), w.receivedMessageID, m)
+ }
+ }
+
+ return err
+}
+
+func (w *serverStream) SendMsg(m interface{}) error {
+ err := w.ServerStream.SendMsg(m)
+
+ w.sentMessageID++
+ if w.sentEvent {
+ messageSent.Event(w.Context(), w.sentMessageID, m)
+ }
+
+ return err
+}
+
+func wrapServerStream(ctx context.Context, ss grpc.ServerStream, cfg *config) *serverStream {
+ return &serverStream{
+ ServerStream: ss,
+ ctx: ctx,
+ receivedEvent: cfg.ReceivedEvent,
+ sentEvent: cfg.SentEvent,
+ }
+}
+
+// StreamServerInterceptor returns a grpc.StreamServerInterceptor suitable
+// for use in a grpc.NewServer call.
+//
+// Deprecated: Use [NewServerHandler] instead.
+func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor {
+ cfg := newConfig(opts, "server")
+ tracer := cfg.TracerProvider.Tracer(
+ ScopeName,
+ trace.WithInstrumentationVersion(Version()),
+ )
+
+ return func(
+ srv interface{},
+ ss grpc.ServerStream,
+ info *grpc.StreamServerInfo,
+ handler grpc.StreamHandler,
+ ) error {
+ ctx := ss.Context()
+ i := &InterceptorInfo{
+ StreamServerInfo: info,
+ Type: StreamServer,
+ }
+ if cfg.InterceptorFilter != nil && !cfg.InterceptorFilter(i) {
+ return handler(srv, wrapServerStream(ctx, ss, cfg))
+ }
+
+ ctx = extract(ctx, cfg.Propagators)
+ name, attr, _ := telemetryAttributes(info.FullMethod, peerFromCtx(ctx))
+
+ startOpts := append([]trace.SpanStartOption{
+ trace.WithSpanKind(trace.SpanKindServer),
+ trace.WithAttributes(attr...),
+ },
+ cfg.SpanStartOptions...,
+ )
+
+ ctx, span := tracer.Start(
+ trace.ContextWithRemoteSpanContext(ctx, trace.SpanContextFromContext(ctx)),
+ name,
+ startOpts...,
+ )
+ defer span.End()
+
+ err := handler(srv, wrapServerStream(ctx, ss, cfg))
+ if err != nil {
+ s, _ := status.FromError(err)
+ statusCode, msg := serverStatus(s)
+ span.SetStatus(statusCode, msg)
+ span.SetAttributes(statusCodeAttr(s.Code()))
+ } else {
+ span.SetAttributes(statusCodeAttr(grpc_codes.OK))
+ }
+
+ return err
+ }
+}
+
+// telemetryAttributes returns a span name and span and metric attributes from
+// the gRPC method and peer address.
+func telemetryAttributes(fullMethod, peerAddress string) (string, []attribute.KeyValue, []attribute.KeyValue) {
+ name, methodAttrs := internal.ParseFullMethod(fullMethod)
+ peerAttrs := peerAttr(peerAddress)
+
+ attrs := make([]attribute.KeyValue, 0, 1+len(methodAttrs)+len(peerAttrs))
+ attrs = append(attrs, RPCSystemGRPC)
+ attrs = append(attrs, methodAttrs...)
+ metricAttrs := attrs[:1+len(methodAttrs)]
+ attrs = append(attrs, peerAttrs...)
+ return name, attrs, metricAttrs
+}
+
+// peerAttr returns attributes about the peer address.
+func peerAttr(addr string) []attribute.KeyValue {
+ host, p, err := net.SplitHostPort(addr)
+ if err != nil {
+ return nil
+ }
+
+ if host == "" {
+ host = "127.0.0.1"
+ }
+ port, err := strconv.Atoi(p)
+ if err != nil {
+ return nil
+ }
+
+ var attr []attribute.KeyValue
+ if ip := net.ParseIP(host); ip != nil {
+ attr = []attribute.KeyValue{
+ semconv.NetSockPeerAddr(host),
+ semconv.NetSockPeerPort(port),
+ }
+ } else {
+ attr = []attribute.KeyValue{
+ semconv.NetPeerName(host),
+ semconv.NetPeerPort(port),
+ }
+ }
+
+ return attr
+}
+
+// peerFromCtx returns a peer address from a context, if one exists.
+func peerFromCtx(ctx context.Context) string {
+ p, ok := peer.FromContext(ctx)
+ if !ok {
+ return ""
+ }
+ return p.Addr.String()
+}
+
+// statusCodeAttr returns status code attribute based on given gRPC code.
+func statusCodeAttr(c grpc_codes.Code) attribute.KeyValue {
+ return GRPCStatusCodeKey.Int64(int64(c))
+}
+
+// serverStatus returns a span status code and message for a given gRPC
+// status code. It maps specific gRPC status codes to a corresponding span
+// status code and message. This function is intended for use on the server
+// side of a gRPC connection.
+//
+// If the gRPC status code is Unknown, DeadlineExceeded, Unimplemented,
+// Internal, Unavailable, or DataLoss, it returns a span status code of Error
+// and the message from the gRPC status. Otherwise, it returns a span status
+// code of Unset and an empty message.
+func serverStatus(grpcStatus *status.Status) (codes.Code, string) {
+ switch grpcStatus.Code() {
+ case grpc_codes.Unknown,
+ grpc_codes.DeadlineExceeded,
+ grpc_codes.Unimplemented,
+ grpc_codes.Internal,
+ grpc_codes.Unavailable,
+ grpc_codes.DataLoss:
+ return codes.Error, grpcStatus.Message()
+ default:
+ return codes.Unset, ""
+ }
+}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptorinfo.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptorinfo.go
new file mode 100644
index 00000000..b62f7cd7
--- /dev/null
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptorinfo.go
@@ -0,0 +1,39 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+
+import (
+ "google.golang.org/grpc"
+)
+
+// InterceptorType is the flag to define which gRPC interceptor
+// the InterceptorInfo object is.
+type InterceptorType uint8
+
+const (
+ // UndefinedInterceptor is the type for the interceptor information that is not
+ // well initialized or categorized to other types.
+ UndefinedInterceptor InterceptorType = iota
+ // UnaryClient is the type for grpc.UnaryClient interceptor.
+ UnaryClient
+ // StreamClient is the type for grpc.StreamClient interceptor.
+ StreamClient
+ // UnaryServer is the type for grpc.UnaryServer interceptor.
+ UnaryServer
+ // StreamServer is the type for grpc.StreamServer interceptor.
+ StreamServer
+)
+
+// InterceptorInfo is the union of some arguments to four types of
+// gRPC interceptors.
+type InterceptorInfo struct {
+ // Method is method name registered to UnaryClient and StreamClient
+ Method string
+ // UnaryServerInfo is the metadata for UnaryServer
+ UnaryServerInfo *grpc.UnaryServerInfo
+ // StreamServerInfo if the metadata for StreamServer
+ StreamServerInfo *grpc.StreamServerInfo
+ // Type is the type for interceptor
+ Type InterceptorType
+}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go
new file mode 100644
index 00000000..bef07b7a
--- /dev/null
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go
@@ -0,0 +1,40 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package internal // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal"
+
+import (
+ "strings"
+
+ "go.opentelemetry.io/otel/attribute"
+ semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
+)
+
+// ParseFullMethod returns a span name following the OpenTelemetry semantic
+// conventions as well as all applicable span attribute.KeyValue attributes based
+// on a gRPC's FullMethod.
+//
+// Parsing is consistent with grpc-go implementation:
+// https://github.com/grpc/grpc-go/blob/v1.57.0/internal/grpcutil/method.go#L26-L39
+func ParseFullMethod(fullMethod string) (string, []attribute.KeyValue) {
+ if !strings.HasPrefix(fullMethod, "/") {
+ // Invalid format, does not follow `/package.service/method`.
+ return fullMethod, nil
+ }
+ name := fullMethod[1:]
+ pos := strings.LastIndex(name, "/")
+ if pos < 0 {
+ // Invalid format, does not follow `/package.service/method`.
+ return name, nil
+ }
+ service, method := name[:pos], name[pos+1:]
+
+ var attrs []attribute.KeyValue
+ if service != "" {
+ attrs = append(attrs, semconv.RPCService(service))
+ }
+ if method != "" {
+ attrs = append(attrs, semconv.RPCMethod(method))
+ }
+ return name, attrs
+}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go
new file mode 100644
index 00000000..3aa37915
--- /dev/null
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/metadata_supplier.go
@@ -0,0 +1,87 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+
+import (
+ "context"
+
+ "google.golang.org/grpc/metadata"
+
+ "go.opentelemetry.io/otel/baggage"
+ "go.opentelemetry.io/otel/propagation"
+ "go.opentelemetry.io/otel/trace"
+)
+
+type metadataSupplier struct {
+ metadata *metadata.MD
+}
+
+// assert that metadataSupplier implements the TextMapCarrier interface.
+var _ propagation.TextMapCarrier = &metadataSupplier{}
+
+func (s *metadataSupplier) Get(key string) string {
+ values := s.metadata.Get(key)
+ if len(values) == 0 {
+ return ""
+ }
+ return values[0]
+}
+
+func (s *metadataSupplier) Set(key string, value string) {
+ s.metadata.Set(key, value)
+}
+
+func (s *metadataSupplier) Keys() []string {
+ out := make([]string, 0, len(*s.metadata))
+ for key := range *s.metadata {
+ out = append(out, key)
+ }
+ return out
+}
+
+// Inject injects correlation context and span context into the gRPC
+// metadata object. This function is meant to be used on outgoing
+// requests.
+// Deprecated: Unnecessary public func.
+func Inject(ctx context.Context, md *metadata.MD, opts ...Option) {
+ c := newConfig(opts, "")
+ c.Propagators.Inject(ctx, &metadataSupplier{
+ metadata: md,
+ })
+}
+
+func inject(ctx context.Context, propagators propagation.TextMapPropagator) context.Context {
+ md, ok := metadata.FromOutgoingContext(ctx)
+ if !ok {
+ md = metadata.MD{}
+ }
+ propagators.Inject(ctx, &metadataSupplier{
+ metadata: &md,
+ })
+ return metadata.NewOutgoingContext(ctx, md)
+}
+
+// Extract returns the correlation context and span context that
+// another service encoded in the gRPC metadata object with Inject.
+// This function is meant to be used on incoming requests.
+// Deprecated: Unnecessary public func.
+func Extract(ctx context.Context, md *metadata.MD, opts ...Option) (baggage.Baggage, trace.SpanContext) {
+ c := newConfig(opts, "")
+ ctx = c.Propagators.Extract(ctx, &metadataSupplier{
+ metadata: md,
+ })
+
+ return baggage.FromContext(ctx), trace.SpanContextFromContext(ctx)
+}
+
+func extract(ctx context.Context, propagators propagation.TextMapPropagator) context.Context {
+ md, ok := metadata.FromIncomingContext(ctx)
+ if !ok {
+ md = metadata.MD{}
+ }
+
+ return propagators.Extract(ctx, &metadataSupplier{
+ metadata: &md,
+ })
+}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/semconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/semconv.go
new file mode 100644
index 00000000..409c621b
--- /dev/null
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/semconv.go
@@ -0,0 +1,41 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+
+import (
+ "go.opentelemetry.io/otel/attribute"
+ semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
+)
+
+// Semantic conventions for attribute keys for gRPC.
+const (
+ // Name of message transmitted or received.
+ RPCNameKey = attribute.Key("name")
+
+ // Type of message transmitted or received.
+ RPCMessageTypeKey = attribute.Key("message.type")
+
+ // Identifier of message transmitted or received.
+ RPCMessageIDKey = attribute.Key("message.id")
+
+ // The compressed size of the message transmitted or received in bytes.
+ RPCMessageCompressedSizeKey = attribute.Key("message.compressed_size")
+
+ // The uncompressed size of the message transmitted or received in
+ // bytes.
+ RPCMessageUncompressedSizeKey = attribute.Key("message.uncompressed_size")
+)
+
+// Semantic conventions for common RPC attributes.
+var (
+ // Semantic convention for gRPC as the remoting system.
+ RPCSystemGRPC = semconv.RPCSystemGRPC
+
+ // Semantic convention for a message named message.
+ RPCNameMessage = RPCNameKey.String("message")
+
+ // Semantic conventions for RPC message types.
+ RPCMessageTypeSent = RPCMessageTypeKey.String("SENT")
+ RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED")
+)
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
new file mode 100644
index 00000000..c01cb897
--- /dev/null
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
@@ -0,0 +1,223 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+
+import (
+ "context"
+ "sync/atomic"
+ "time"
+
+ grpc_codes "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/peer"
+ "google.golang.org/grpc/stats"
+ "google.golang.org/grpc/status"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/codes"
+ "go.opentelemetry.io/otel/metric"
+ semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
+ "go.opentelemetry.io/otel/trace"
+
+ "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal"
+)
+
+type gRPCContextKey struct{}
+
+type gRPCContext struct {
+ inMessages int64
+ outMessages int64
+ metricAttrs []attribute.KeyValue
+ record bool
+}
+
+type serverHandler struct {
+ *config
+}
+
+// NewServerHandler creates a stats.Handler for a gRPC server.
+func NewServerHandler(opts ...Option) stats.Handler {
+ h := &serverHandler{
+ config: newConfig(opts, "server"),
+ }
+
+ return h
+}
+
+// TagConn can attach some information to the given context.
+func (h *serverHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context {
+ return ctx
+}
+
+// HandleConn processes the Conn stats.
+func (h *serverHandler) HandleConn(ctx context.Context, info stats.ConnStats) {
+}
+
+// TagRPC can attach some information to the given context.
+func (h *serverHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context {
+ ctx = extract(ctx, h.config.Propagators)
+
+ name, attrs := internal.ParseFullMethod(info.FullMethodName)
+ attrs = append(attrs, RPCSystemGRPC)
+ ctx, _ = h.tracer.Start(
+ trace.ContextWithRemoteSpanContext(ctx, trace.SpanContextFromContext(ctx)),
+ name,
+ trace.WithSpanKind(trace.SpanKindServer),
+ trace.WithAttributes(append(attrs, h.config.SpanAttributes...)...),
+ )
+
+ gctx := gRPCContext{
+ metricAttrs: append(attrs, h.config.MetricAttributes...),
+ record: true,
+ }
+ if h.config.Filter != nil {
+ gctx.record = h.config.Filter(info)
+ }
+ return context.WithValue(ctx, gRPCContextKey{}, &gctx)
+}
+
+// HandleRPC processes the RPC stats.
+func (h *serverHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) {
+ isServer := true
+ h.handleRPC(ctx, rs, isServer)
+}
+
+type clientHandler struct {
+ *config
+}
+
+// NewClientHandler creates a stats.Handler for a gRPC client.
+func NewClientHandler(opts ...Option) stats.Handler {
+ h := &clientHandler{
+ config: newConfig(opts, "client"),
+ }
+
+ return h
+}
+
+// TagRPC can attach some information to the given context.
+func (h *clientHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context {
+ name, attrs := internal.ParseFullMethod(info.FullMethodName)
+ attrs = append(attrs, RPCSystemGRPC)
+ ctx, _ = h.tracer.Start(
+ ctx,
+ name,
+ trace.WithSpanKind(trace.SpanKindClient),
+ trace.WithAttributes(append(attrs, h.config.SpanAttributes...)...),
+ )
+
+ gctx := gRPCContext{
+ metricAttrs: append(attrs, h.config.MetricAttributes...),
+ record: true,
+ }
+ if h.config.Filter != nil {
+ gctx.record = h.config.Filter(info)
+ }
+
+ return inject(context.WithValue(ctx, gRPCContextKey{}, &gctx), h.config.Propagators)
+}
+
+// HandleRPC processes the RPC stats.
+func (h *clientHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) {
+ isServer := false
+ h.handleRPC(ctx, rs, isServer)
+}
+
+// TagConn can attach some information to the given context.
+func (h *clientHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context {
+ return ctx
+}
+
+// HandleConn processes the Conn stats.
+func (h *clientHandler) HandleConn(context.Context, stats.ConnStats) {
+ // no-op
+}
+
+func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool) { // nolint: revive // isServer is not a control flag.
+ span := trace.SpanFromContext(ctx)
+ var metricAttrs []attribute.KeyValue
+ var messageId int64
+
+ gctx, _ := ctx.Value(gRPCContextKey{}).(*gRPCContext)
+ if gctx != nil {
+ if !gctx.record {
+ return
+ }
+ metricAttrs = make([]attribute.KeyValue, 0, len(gctx.metricAttrs)+1)
+ metricAttrs = append(metricAttrs, gctx.metricAttrs...)
+ }
+
+ switch rs := rs.(type) {
+ case *stats.Begin:
+ case *stats.InPayload:
+ if gctx != nil {
+ messageId = atomic.AddInt64(&gctx.inMessages, 1)
+ c.rpcInBytes.Record(ctx, int64(rs.Length), metric.WithAttributeSet(attribute.NewSet(metricAttrs...)))
+ }
+
+ if c.ReceivedEvent {
+ span.AddEvent("message",
+ trace.WithAttributes(
+ semconv.MessageTypeReceived,
+ semconv.MessageIDKey.Int64(messageId),
+ semconv.MessageCompressedSizeKey.Int(rs.CompressedLength),
+ semconv.MessageUncompressedSizeKey.Int(rs.Length),
+ ),
+ )
+ }
+ case *stats.OutPayload:
+ if gctx != nil {
+ messageId = atomic.AddInt64(&gctx.outMessages, 1)
+ c.rpcOutBytes.Record(ctx, int64(rs.Length), metric.WithAttributeSet(attribute.NewSet(metricAttrs...)))
+ }
+
+ if c.SentEvent {
+ span.AddEvent("message",
+ trace.WithAttributes(
+ semconv.MessageTypeSent,
+ semconv.MessageIDKey.Int64(messageId),
+ semconv.MessageCompressedSizeKey.Int(rs.CompressedLength),
+ semconv.MessageUncompressedSizeKey.Int(rs.Length),
+ ),
+ )
+ }
+ case *stats.OutTrailer:
+ case *stats.OutHeader:
+ if p, ok := peer.FromContext(ctx); ok {
+ span.SetAttributes(peerAttr(p.Addr.String())...)
+ }
+ case *stats.End:
+ var rpcStatusAttr attribute.KeyValue
+
+ if rs.Error != nil {
+ s, _ := status.FromError(rs.Error)
+ if isServer {
+ statusCode, msg := serverStatus(s)
+ span.SetStatus(statusCode, msg)
+ } else {
+ span.SetStatus(codes.Error, s.Message())
+ }
+ rpcStatusAttr = semconv.RPCGRPCStatusCodeKey.Int(int(s.Code()))
+ } else {
+ rpcStatusAttr = semconv.RPCGRPCStatusCodeKey.Int(int(grpc_codes.OK))
+ }
+ span.SetAttributes(rpcStatusAttr)
+ span.End()
+
+ metricAttrs = append(metricAttrs, rpcStatusAttr)
+ // Allocate vararg slice once.
+ recordOpts := []metric.RecordOption{metric.WithAttributeSet(attribute.NewSet(metricAttrs...))}
+
+ // Use floating point division here for higher precision (instead of Millisecond method).
+ // Measure right before calling Record() to capture as much elapsed time as possible.
+ elapsedTime := float64(rs.EndTime.Sub(rs.BeginTime)) / float64(time.Millisecond)
+
+ c.rpcDuration.Record(ctx, elapsedTime, recordOpts...)
+ if gctx != nil {
+ c.rpcInMessages.Record(ctx, atomic.LoadInt64(&gctx.inMessages), recordOpts...)
+ c.rpcOutMessages.Record(ctx, atomic.LoadInt64(&gctx.outMessages), recordOpts...)
+ }
+ default:
+ return
+ }
+}
diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go
new file mode 100644
index 00000000..80e5f2f6
--- /dev/null
+++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go
@@ -0,0 +1,17 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
+
+// Version is the current release version of the gRPC instrumentation.
+func Version() string {
+ return "0.59.0"
+ // This string is updated by the pre_release.sh script during release
+}
+
+// SemVersion is the semantic version to be supplied to tracer/meter creation.
+//
+// Deprecated: Use [Version] instead.
+func SemVersion() string {
+ return Version()
+}
diff --git a/vendor/go.opentelemetry.io/otel/.codespellignore b/vendor/go.opentelemetry.io/otel/.codespellignore
new file mode 100644
index 00000000..6bf3abc4
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/.codespellignore
@@ -0,0 +1,9 @@
+ot
+fo
+te
+collison
+consequentially
+ans
+nam
+valu
+thirdparty
diff --git a/vendor/go.opentelemetry.io/otel/.codespellrc b/vendor/go.opentelemetry.io/otel/.codespellrc
new file mode 100644
index 00000000..e2cb3ea9
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/.codespellrc
@@ -0,0 +1,10 @@
+# https://github.com/codespell-project/codespell
+[codespell]
+builtin = clear,rare,informal
+check-filenames =
+check-hidden =
+ignore-words = .codespellignore
+interactive = 1
+skip = .git,go.mod,go.sum,go.work,go.work.sum,semconv,venv,.tools
+uri-ignore-words-list = *
+write =
diff --git a/vendor/go.opentelemetry.io/otel/.gitattributes b/vendor/go.opentelemetry.io/otel/.gitattributes
new file mode 100644
index 00000000..314766e9
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/.gitattributes
@@ -0,0 +1,3 @@
+* text=auto eol=lf
+*.{cmd,[cC][mM][dD]} text eol=crlf
+*.{bat,[bB][aA][tT]} text eol=crlf
diff --git a/vendor/go.opentelemetry.io/otel/.gitignore b/vendor/go.opentelemetry.io/otel/.gitignore
new file mode 100644
index 00000000..ae8577ef
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/.gitignore
@@ -0,0 +1,14 @@
+.DS_Store
+Thumbs.db
+
+.tools/
+venv/
+.idea/
+.vscode/
+*.iml
+*.so
+coverage.*
+go.work
+go.work.sum
+
+gen/
diff --git a/vendor/go.opentelemetry.io/otel/.golangci.yml b/vendor/go.opentelemetry.io/otel/.golangci.yml
new file mode 100644
index 00000000..ce3f40b6
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/.golangci.yml
@@ -0,0 +1,325 @@
+# See https://github.com/golangci/golangci-lint#config-file
+run:
+ issues-exit-code: 1 #Default
+ tests: true #Default
+
+linters:
+ # Disable everything by default so upgrades to not include new "default
+ # enabled" linters.
+ disable-all: true
+ # Specifically enable linters we want to use.
+ enable:
+ - asasalint
+ - bodyclose
+ - depguard
+ - errcheck
+ - errorlint
+ - godot
+ - gofumpt
+ - goimports
+ - gosec
+ - gosimple
+ - govet
+ - ineffassign
+ - misspell
+ - perfsprint
+ - revive
+ - staticcheck
+ - tenv
+ - testifylint
+ - typecheck
+ - unconvert
+ - unused
+ - unparam
+ - usestdlibvars
+
+issues:
+ # Maximum issues count per one linter.
+ # Set to 0 to disable.
+ # Default: 50
+ # Setting to unlimited so the linter only is run once to debug all issues.
+ max-issues-per-linter: 0
+ # Maximum count of issues with the same text.
+ # Set to 0 to disable.
+ # Default: 3
+ # Setting to unlimited so the linter only is run once to debug all issues.
+ max-same-issues: 0
+ # Excluding configuration per-path, per-linter, per-text and per-source.
+ exclude-rules:
+ # TODO: Having appropriate comments for exported objects helps development,
+ # even for objects in internal packages. Appropriate comments for all
+ # exported objects should be added and this exclusion removed.
+ - path: '.*internal/.*'
+ text: "exported (method|function|type|const) (.+) should have comment or be unexported"
+ linters:
+ - revive
+ # Yes, they are, but it's okay in a test.
+ - path: _test\.go
+ text: "exported func.*returns unexported type.*which can be annoying to use"
+ linters:
+ - revive
+ # Example test functions should be treated like main.
+ - path: example.*_test\.go
+ text: "calls to (.+) only in main[(][)] or init[(][)] functions"
+ linters:
+ - revive
+ # It's okay to not run gosec and perfsprint in a test.
+ - path: _test\.go
+ linters:
+ - gosec
+ - perfsprint
+ # Ignoring gosec G404: Use of weak random number generator (math/rand instead of crypto/rand)
+ # as we commonly use it in tests and examples.
+ - text: "G404:"
+ linters:
+ - gosec
+ # Ignoring gosec G402: TLS MinVersion too low
+ # as the https://pkg.go.dev/crypto/tls#Config handles MinVersion default well.
+ - text: "G402: TLS MinVersion too low."
+ linters:
+ - gosec
+ include:
+ # revive exported should have comment or be unexported.
+ - EXC0012
+ # revive package comment should be of the form ...
+ - EXC0013
+
+linters-settings:
+ depguard:
+ rules:
+ non-tests:
+ files:
+ - "!$test"
+ - "!**/*test/*.go"
+ - "!**/internal/matchers/*.go"
+ deny:
+ - pkg: "testing"
+ - pkg: "github.com/stretchr/testify"
+ - pkg: "crypto/md5"
+ - pkg: "crypto/sha1"
+ - pkg: "crypto/**/pkix"
+ auto/sdk:
+ files:
+ - "!internal/global/trace.go"
+ - "~internal/global/trace_test.go"
+ deny:
+ - pkg: "go.opentelemetry.io/auto/sdk"
+ desc: Do not use SDK from automatic instrumentation.
+ otlp-internal:
+ files:
+ - "!**/exporters/otlp/internal/**/*.go"
+ deny:
+ - pkg: "go.opentelemetry.io/otel/exporters/otlp/internal"
+ desc: Do not use cross-module internal packages.
+ otlptrace-internal:
+ files:
+ - "!**/exporters/otlp/otlptrace/*.go"
+ - "!**/exporters/otlp/otlptrace/internal/**.go"
+ deny:
+ - pkg: "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal"
+ desc: Do not use cross-module internal packages.
+ otlpmetric-internal:
+ files:
+ - "!**/exporters/otlp/otlpmetric/internal/*.go"
+ - "!**/exporters/otlp/otlpmetric/internal/**/*.go"
+ deny:
+ - pkg: "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal"
+ desc: Do not use cross-module internal packages.
+ otel-internal:
+ files:
+ - "**/sdk/*.go"
+ - "**/sdk/**/*.go"
+ - "**/exporters/*.go"
+ - "**/exporters/**/*.go"
+ - "**/schema/*.go"
+ - "**/schema/**/*.go"
+ - "**/metric/*.go"
+ - "**/metric/**/*.go"
+ - "**/bridge/*.go"
+ - "**/bridge/**/*.go"
+ - "**/trace/*.go"
+ - "**/trace/**/*.go"
+ - "**/log/*.go"
+ - "**/log/**/*.go"
+ deny:
+ - pkg: "go.opentelemetry.io/otel/internal$"
+ desc: Do not use cross-module internal packages.
+ - pkg: "go.opentelemetry.io/otel/internal/attribute"
+ desc: Do not use cross-module internal packages.
+ - pkg: "go.opentelemetry.io/otel/internal/internaltest"
+ desc: Do not use cross-module internal packages.
+ - pkg: "go.opentelemetry.io/otel/internal/matchers"
+ desc: Do not use cross-module internal packages.
+ godot:
+ exclude:
+ # Exclude links.
+ - '^ *\[[^]]+\]:'
+ # Exclude sentence fragments for lists.
+ - '^[ ]*[-•]'
+ # Exclude sentences prefixing a list.
+ - ':$'
+ goimports:
+ local-prefixes: go.opentelemetry.io
+ misspell:
+ locale: US
+ ignore-words:
+ - cancelled
+ perfsprint:
+ err-error: true
+ errorf: true
+ int-conversion: true
+ sprintf1: true
+ strconcat: true
+ revive:
+ # Sets the default failure confidence.
+ # This means that linting errors with less than 0.8 confidence will be ignored.
+ # Default: 0.8
+ confidence: 0.01
+ rules:
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports
+ - name: blank-imports
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr
+ - name: bool-literal-in-expr
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr
+ - name: constant-logical-expr
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument
+ # TODO (#3372) re-enable linter when it is compatible. https://github.com/golangci/golangci-lint/issues/3280
+ - name: context-as-argument
+ disabled: true
+ arguments:
+ allowTypesBefore: "*testing.T"
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type
+ - name: context-keys-type
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit
+ - name: deep-exit
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer
+ - name: defer
+ disabled: false
+ arguments:
+ - ["call-chain", "loop"]
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports
+ - name: dot-imports
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports
+ - name: duplicated-imports
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return
+ - name: early-return
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block
+ - name: empty-block
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines
+ - name: empty-lines
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming
+ - name: error-naming
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return
+ - name: error-return
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings
+ - name: error-strings
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf
+ - name: errorf
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported
+ - name: exported
+ disabled: false
+ arguments:
+ - "sayRepetitiveInsteadOfStutters"
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter
+ - name: flag-parameter
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches
+ - name: identical-branches
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return
+ - name: if-return
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement
+ - name: increment-decrement
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow
+ - name: indent-error-flow
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing
+ - name: import-shadowing
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments
+ - name: package-comments
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range
+ - name: range
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure
+ - name: range-val-in-closure
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address
+ - name: range-val-address
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id
+ - name: redefines-builtin-id
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format
+ - name: string-format
+ disabled: false
+ arguments:
+ - - panic
+ - '/^[^\n]*$/'
+ - must not contain line breaks
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag
+ - name: struct-tag
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else
+ - name: superfluous-else
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal
+ - name: time-equal
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming
+ - name: var-naming
+ disabled: false
+ arguments:
+ - ["ID"] # AllowList
+ - ["Otel", "Aws", "Gcp"] # DenyList
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration
+ - name: var-declaration
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion
+ - name: unconditional-recursion
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return
+ - name: unexported-return
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error
+ - name: unhandled-error
+ disabled: false
+ arguments:
+ - "fmt.Fprint"
+ - "fmt.Fprintf"
+ - "fmt.Fprintln"
+ - "fmt.Print"
+ - "fmt.Printf"
+ - "fmt.Println"
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt
+ - name: unnecessary-stmt
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break
+ - name: useless-break
+ disabled: false
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value
+ - name: waitgroup-by-value
+ disabled: false
+ testifylint:
+ enable-all: true
+ disable:
+ - float-compare
+ - go-require
+ - require-error
diff --git a/vendor/go.opentelemetry.io/otel/.lycheeignore b/vendor/go.opentelemetry.io/otel/.lycheeignore
new file mode 100644
index 00000000..40d62fa2
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/.lycheeignore
@@ -0,0 +1,6 @@
+http://localhost
+http://jaeger-collector
+https://github.com/open-telemetry/opentelemetry-go/milestone/
+https://github.com/open-telemetry/opentelemetry-go/projects
+file:///home/runner/work/opentelemetry-go/opentelemetry-go/libraries
+file:///home/runner/work/opentelemetry-go/opentelemetry-go/manual
diff --git a/vendor/go.opentelemetry.io/otel/.markdownlint.yaml b/vendor/go.opentelemetry.io/otel/.markdownlint.yaml
new file mode 100644
index 00000000..3202496c
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/.markdownlint.yaml
@@ -0,0 +1,29 @@
+# Default state for all rules
+default: true
+
+# ul-style
+MD004: false
+
+# hard-tabs
+MD010: false
+
+# line-length
+MD013: false
+
+# no-duplicate-header
+MD024:
+ siblings_only: true
+
+#single-title
+MD025: false
+
+# ol-prefix
+MD029:
+ style: ordered
+
+# no-inline-html
+MD033: false
+
+# fenced-code-language
+MD040: false
+
diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md
new file mode 100644
index 00000000..599d59cd
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/CHANGELOG.md
@@ -0,0 +1,3302 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
+
+This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+
+
+
+## [1.34.0/0.56.0/0.10.0] 2025-01-17
+
+### Changed
+
+- Remove the notices from `Logger` to make the whole Logs API user-facing in `go.opentelemetry.io/otel/log`. (#6167)
+
+### Fixed
+
+- Relax minimum Go version to 1.22.0 in various modules. (#6073)
+- The `Type` name logged for the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` client is corrected from `otlphttpgrpc` to `otlptracegrpc`. (#6143)
+- The `Type` name logged for the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlphttpgrpc` client is corrected from `otlphttphttp` to `otlptracehttp`. (#6143)
+
+## [1.33.0/0.55.0/0.9.0/0.0.12] 2024-12-12
+
+### Added
+
+- Add `Reset` method to `SpanRecorder` in `go.opentelemetry.io/otel/sdk/trace/tracetest`. (#5994)
+- Add `EnabledInstrument` interface in `go.opentelemetry.io/otel/sdk/metric/internal/x`.
+ This is an experimental interface that is implemented by synchronous instruments provided by `go.opentelemetry.io/otel/sdk/metric`.
+ Users can use it to avoid performing computationally expensive operations when recording measurements.
+ It does not fall within the scope of the OpenTelemetry Go versioning and stability [policy](./VERSIONING.md) and it may be changed in backwards incompatible ways or removed in feature releases. (#6016)
+
+### Changed
+
+- The default global API now supports full auto-instrumentation from the `go.opentelemetry.io/auto` package.
+ See that package for more information. (#5920)
+- Propagate non-retryable error messages to client in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5929)
+- Propagate non-retryable error messages to client in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5929)
+- Propagate non-retryable error messages to client in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5929)
+- Performance improvements for attribute value `AsStringSlice`, `AsFloat64Slice`, `AsInt64Slice`, `AsBoolSlice`. (#6011)
+- Change `EnabledParameters` to have a `Severity` field instead of a getter and setter in `go.opentelemetry.io/otel/log`. (#6009)
+
+### Fixed
+
+- Fix inconsistent request body closing in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5954)
+- Fix inconsistent request body closing in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5954)
+- Fix inconsistent request body closing in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5954)
+- Fix invalid exemplar keys in `go.opentelemetry.io/otel/exporters/prometheus`. (#5995)
+- Fix attribute value truncation in `go.opentelemetry.io/otel/sdk/trace`. (#5997)
+- Fix attribute value truncation in `go.opentelemetry.io/otel/sdk/log`. (#6032)
+
+## [1.32.0/0.54.0/0.8.0/0.0.11] 2024-11-08
+
+### Added
+
+- Add `go.opentelemetry.io/otel/sdk/metric/exemplar.AlwaysOffFilter`, which can be used to disable exemplar recording. (#5850)
+- Add `go.opentelemetry.io/otel/sdk/metric.WithExemplarFilter`, which can be used to configure the exemplar filter used by the metrics SDK. (#5850)
+- Add `ExemplarReservoirProviderSelector` and `DefaultExemplarReservoirProviderSelector` to `go.opentelemetry.io/otel/sdk/metric`, which defines the exemplar reservoir to use based on the aggregation of the metric. (#5861)
+- Add `ExemplarReservoirProviderSelector` to `go.opentelemetry.io/otel/sdk/metric.Stream` to allow using views to configure the exemplar reservoir to use for a metric. (#5861)
+- Add `ReservoirProvider`, `HistogramReservoirProvider` and `FixedSizeReservoirProvider` to `go.opentelemetry.io/otel/sdk/metric/exemplar` to make it convenient to use providers of Reservoirs. (#5861)
+- The `go.opentelemetry.io/otel/semconv/v1.27.0` package.
+ The package contains semantic conventions from the `v1.27.0` version of the OpenTelemetry Semantic Conventions. (#5894)
+- Add `Attributes attribute.Set` field to `Scope` in `go.opentelemetry.io/otel/sdk/instrumentation`. (#5903)
+- Add `Attributes attribute.Set` field to `ScopeRecords` in `go.opentelemetry.io/otel/log/logtest`. (#5927)
+- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` adds instrumentation scope attributes. (#5934)
+- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` adds instrumentation scope attributes. (#5934)
+- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` adds instrumentation scope attributes. (#5935)
+- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` adds instrumentation scope attributes. (#5935)
+- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` adds instrumentation scope attributes. (#5933)
+- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` adds instrumentation scope attributes. (#5933)
+- `go.opentelemetry.io/otel/exporters/prometheus` adds instrumentation scope attributes in `otel_scope_info` metric as labels. (#5932)
+
+### Changed
+
+- Support scope attributes and make them as identifying for `Tracer` in `go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/trace`. (#5924)
+- Support scope attributes and make them as identifying for `Meter` in `go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/metric`. (#5926)
+- Support scope attributes and make them as identifying for `Logger` in `go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/log`. (#5925)
+- Make schema URL and scope attributes as identifying for `Tracer` in `go.opentelemetry.io/otel/bridge/opentracing`. (#5931)
+- Clear unneeded slice elements to allow GC to collect the objects in `go.opentelemetry.io/otel/sdk/metric` and `go.opentelemetry.io/otel/sdk/trace`. (#5804)
+
+### Fixed
+
+- Global MeterProvider registration unwraps global instrument Observers, the undocumented Unwrap() methods are now private. (#5881)
+- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` now keeps the metadata already present in the context when `WithHeaders` is used. (#5892)
+- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` now keeps the metadata already present in the context when `WithHeaders` is used. (#5911)
+- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` now keeps the metadata already present in the context when `WithHeaders` is used. (#5915)
+- Fix `go.opentelemetry.io/otel/exporters/prometheus` trying to add exemplars to Gauge metrics, which is unsupported. (#5912)
+- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#5944)
+- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5944)
+- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#5944)
+- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5944)
+- Fix incorrect metrics generated from callbacks when multiple readers are used in `go.opentelemetry.io/otel/sdk/metric`. (#5900)
+
+### Removed
+
+- Remove all examples under `go.opentelemetry.io/otel/example` as they are moved to [Contrib repository](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples). (#5930)
+
+## [1.31.0/0.53.0/0.7.0/0.0.10] 2024-10-11
+
+### Added
+
+- Add `go.opentelemetry.io/otel/sdk/metric/exemplar` package which includes `Exemplar`, `Filter`, `TraceBasedFilter`, `AlwaysOnFilter`, `HistogramReservoir`, `FixedSizeReservoir`, `Reservoir`, `Value` and `ValueType` types. These will be used for configuring the exemplar reservoir for the metrics sdk. (#5747, #5862)
+- Add `WithExportBufferSize` option to log batch processor.(#5877)
+
+### Changed
+
+- Enable exemplars by default in `go.opentelemetry.io/otel/sdk/metric`. Exemplars can be disabled by setting `OTEL_METRICS_EXEMPLAR_FILTER=always_off` (#5778)
+- `Logger.Enabled` in `go.opentelemetry.io/otel/log` now accepts a newly introduced `EnabledParameters` type instead of `Record`. (#5791)
+- `FilterProcessor.Enabled` in `go.opentelemetry.io/otel/sdk/log/internal/x` now accepts `EnabledParameters` instead of `Record`. (#5791)
+- The `Record` type in `go.opentelemetry.io/otel/log` is no longer comparable. (#5847)
+- Performance improvements for the trace SDK `SetAttributes` method in `Span`. (#5864)
+- Reduce memory allocations for the `Event` and `Link` lists in `Span`. (#5858)
+- Performance improvements for the trace SDK `AddEvent`, `AddLink`, `RecordError` and `End` methods in `Span`. (#5874)
+
+### Deprecated
+
+- Deprecate all examples under `go.opentelemetry.io/otel/example` as they are moved to [Contrib repository](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples). (#5854)
+
+### Fixed
+
+- The race condition for multiple `FixedSize` exemplar reservoirs identified in #5814 is resolved. (#5819)
+- Fix log records duplication in case of heterogeneous resource attributes by correctly mapping each log record to it's resource and scope. (#5803)
+- Fix timer channel drain to avoid hanging on Go 1.23. (#5868)
+- Fix delegation for global meter providers, and panic when calling otel.SetMeterProvider. (#5827)
+- Change the `reflect.TypeOf` to use a nil pointer to not allocate on the heap unless necessary. (#5827)
+
+## [1.30.0/0.52.0/0.6.0/0.0.9] 2024-09-09
+
+### Added
+
+- Support `OTEL_EXPORTER_OTLP_LOGS_INSECURE` and `OTEL_EXPORTER_OTLP_INSECURE` environments in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#5739)
+- The `WithResource` option for `NewMeterProvider` now merges the provided resources with the ones from environment variables. (#5773)
+- The `WithResource` option for `NewLoggerProvider` now merges the provided resources with the ones from environment variables. (#5773)
+- Add UTF-8 support to `go.opentelemetry.io/otel/exporters/prometheus`. (#5755)
+
+### Fixed
+
+- Fix memory leak in the global `MeterProvider` when identical instruments are repeatedly created. (#5754)
+- Fix panic on instruments creation when setting meter provider. (#5758)
+- Fix an issue where `SetMeterProvider` in `go.opentelemetry.io/otel` might miss the delegation for instruments and registries. (#5780)
+
+### Removed
+
+- Drop support for [Go 1.21]. (#5736, #5740, #5800)
+
+## [1.29.0/0.51.0/0.5.0] 2024-08-23
+
+This release is the last to support [Go 1.21].
+The next release will require at least [Go 1.22].
+
+### Added
+
+- Add MacOS ARM64 platform to the compatibility testing suite. (#5577)
+- Add `InstrumentationScope` field to `SpanStub` in `go.opentelemetry.io/otel/sdk/trace/tracetest`, as a replacement for the deprecated `InstrumentationLibrary`. (#5627)
+- Make the initial release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`.
+ This new module contains an OTLP exporter that transmits log telemetry using gRPC.
+ This module is unstable and breaking changes may be introduced.
+ See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5629)
+- Add `Walk` function to `TraceState` in `go.opentelemetry.io/otel/trace` to iterate all the key-value pairs. (#5651)
+- Bridge the trace state in `go.opentelemetry.io/otel/bridge/opencensus`. (#5651)
+- Zero value of `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log` no longer panics. (#5665)
+- The `FilterProcessor` interface type is added in `go.opentelemetry.io/otel/sdk/log/internal/x`.
+ This is an optional and experimental interface that log `Processor`s can implement to instruct the `Logger` if a `Record` will be processed or not.
+ It replaces the existing `Enabled` method that is removed from the `Processor` interface itself.
+ It does not fall within the scope of the OpenTelemetry Go versioning and stability [policy](./VERSIONING.md) and it may be changed in backwards incompatible ways or removed in feature releases. (#5692)
+- Support [Go 1.23]. (#5720)
+
+### Changed
+
+- `NewMemberRaw`, `NewKeyProperty` and `NewKeyValuePropertyRaw` in `go.opentelemetry.io/otel/baggage` allow UTF-8 string in key. (#5132)
+- `Processor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` now accepts a pointer to `Record` instead of a value so that the record modifications done in a processor are propagated to subsequent registered processors. (#5636)
+- `SimpleProcessor.Enabled` in `go.opentelemetry.io/otel/sdk/log` now returns `false` if the exporter is `nil`. (#5665)
+- Update the concurrency requirements of `Exporter` in `go.opentelemetry.io/otel/sdk/log`. (#5666)
+- `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log` synchronizes `OnEmit` calls. (#5666)
+- The `Processor` interface in `go.opentelemetry.io/otel/sdk/log` no longer includes the `Enabled` method.
+ See the `FilterProcessor` interface type added in `go.opentelemetry.io/otel/sdk/log/internal/x` to continue providing this functionality. (#5692)
+- The `SimpleProcessor` type in `go.opentelemetry.io/otel/sdk/log` is no longer comparable. (#5693)
+- The `BatchProcessor` type in `go.opentelemetry.io/otel/sdk/log` is no longer comparable. (#5693)
+
+### Fixed
+
+- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5584)
+- Pass the underlying error rather than a generic retry-able failure in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`, `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5541)
+- Correct the `Tracer`, `Meter`, and `Logger` names used in `go.opentelemetry.io/otel/example/dice`. (#5612)
+- Correct the `Tracer` names used in `go.opentelemetry.io/otel/example/namedtracer`. (#5612)
+- Correct the `Tracer` name used in `go.opentelemetry.io/otel/example/opencensus`. (#5612)
+- Correct the `Tracer` and `Meter` names used in `go.opentelemetry.io/otel/example/otel-collector`. (#5612)
+- Correct the `Tracer` names used in `go.opentelemetry.io/otel/example/passthrough`. (#5612)
+- Correct the `Meter` name used in `go.opentelemetry.io/otel/example/prometheus`. (#5612)
+- Correct the `Tracer` names used in `go.opentelemetry.io/otel/example/zipkin`. (#5612)
+- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5641)
+- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5650)
+- Stop percent encoding header environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` (#5705)
+- Remove invalid environment variable header keys in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` (#5705)
+
+### Removed
+
+- The `Enabled` method of the `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log` is removed. (#5692)
+- The `Enabled` method of the `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` is removed. (#5692)
+
+## [1.28.0/0.50.0/0.4.0] 2024-07-02
+
+### Added
+
+- The `IsEmpty` method is added to the `Instrument` type in `go.opentelemetry.io/otel/sdk/metric`.
+ This method is used to check if an `Instrument` instance is a zero-value. (#5431)
+- Store and provide the emitted `context.Context` in `ScopeRecords` of `go.opentelemetry.io/otel/sdk/log/logtest`. (#5468)
+- The `go.opentelemetry.io/otel/semconv/v1.26.0` package.
+ The package contains semantic conventions from the `v1.26.0` version of the OpenTelemetry Semantic Conventions. (#5476)
+- The `AssertRecordEqual` method to `go.opentelemetry.io/otel/log/logtest` to allow comparison of two log records in tests. (#5499)
+- The `WithHeaders` option to `go.opentelemetry.io/otel/exporters/zipkin` to allow configuring custom http headers while exporting spans. (#5530)
+
+### Changed
+
+- `Tracer.Start` in `go.opentelemetry.io/otel/trace/noop` no longer allocates a span for empty span context. (#5457)
+- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/otel-collector`. (#5490)
+- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/zipkin`. (#5490)
+- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/exporters/zipkin`. (#5490)
+ - The exporter no longer exports the deprecated "otel.library.name" or "otel.library.version" attributes.
+- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/resource`. (#5490)
+- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/trace`. (#5490)
+- `SimpleProcessor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` no longer allocates a slice which makes it possible to have a zero-allocation log processing using `SimpleProcessor`. (#5493)
+- Use non-generic functions in the `Start` method of `"go.opentelemetry.io/otel/sdk/trace".Trace` to reduce memory allocation. (#5497)
+- `service.instance.id` is populated for a `Resource` created with `"go.opentelemetry.io/otel/sdk/resource".Default` with a default value when `OTEL_GO_X_RESOURCE` is set. (#5520)
+- Improve performance of metric instruments in `go.opentelemetry.io/otel/sdk/metric` by removing unnecessary calls to `time.Now`. (#5545)
+
+### Fixed
+
+- Log a warning to the OpenTelemetry internal logger when a `Record` in `go.opentelemetry.io/otel/sdk/log` drops an attribute due to a limit being reached. (#5376)
+- Identify the `Tracer` returned from the global `TracerProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426)
+- Identify the `Meter` returned from the global `MeterProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426)
+- Log a warning to the OpenTelemetry internal logger when a `Span` in `go.opentelemetry.io/otel/sdk/trace` drops an attribute, event, or link due to a limit being reached. (#5434)
+- Document instrument name requirements in `go.opentelemetry.io/otel/metric`. (#5435)
+- Prevent random number generation data-race for experimental rand exemplars in `go.opentelemetry.io/otel/sdk/metric`. (#5456)
+- Fix counting number of dropped attributes of `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5464)
+- Fix panic in baggage creation when a member contains `0x80` char in key or value. (#5494)
+- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#5508)
+- Retry trace and span ID generation if it generated an invalid one in `go.opentelemetry.io/otel/sdk/trace`. (#5514)
+- Fix stale timestamps reported by the last-value aggregation. (#5517)
+- Indicate the `Exporter` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` must be created by the `New` method. (#5521)
+- Improved performance in all `{Bool,Int64,Float64,String}SliceValue` functions of `go.opentelemetry.io/attributes` by reducing the number of allocations. (#5549)
+- Replace invalid percent-encoded octet sequences with replacement char in `go.opentelemetry.io/otel/baggage`. (#5528)
+
+## [1.27.0/0.49.0/0.3.0] 2024-05-21
+
+### Added
+
+- Add example for `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5242)
+- Add `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest` to facilitate testing exporter and processor implementations. (#5258)
+- Add `RecordFactory` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing bridge implementations. (#5263)
+- The count of dropped records from the `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` is logged. (#5276)
+- Add metrics in the `otel-collector` example. (#5283)
+- Add the synchronous gauge instrument to `go.opentelemetry.io/otel/metric`. (#5304)
+ - An `int64` or `float64` synchronous gauge instrument can now be created from a `Meter`.
+ - All implementations of the API (`go.opentelemetry.io/otel/metric/noop`, `go.opentelemetry.io/otel/sdk/metric`) are updated to support this instrument.
+- Add logs to `go.opentelemetry.io/otel/example/dice`. (#5349)
+
+### Changed
+
+- The `Shutdown` method of `Exporter` in `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` ignores the context cancellation and always returns `nil`. (#5189)
+- The `ForceFlush` and `Shutdown` methods of the exporter returned by `New` in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` ignore the context cancellation and always return `nil`. (#5189)
+- Apply the value length limits to `Record` attributes in `go.opentelemetry.io/otel/sdk/log`. (#5230)
+- De-duplicate map attributes added to a `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5230)
+- `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` won't print timestamps when `WithoutTimestamps` option is set. (#5241)
+- The `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` exporter won't print `AttributeValueLengthLimit` and `AttributeCountLimit` fields now, instead it prints the `DroppedAttributes` field. (#5272)
+- Improved performance in the `Stringer` implementation of `go.opentelemetry.io/otel/baggage.Member` by reducing the number of allocations. (#5286)
+- Set the start time for last-value aggregates in `go.opentelemetry.io/otel/sdk/metric`. (#5305)
+- The `Span` in `go.opentelemetry.io/otel/sdk/trace` will record links without span context if either non-empty `TraceState` or attributes are provided. (#5315)
+- Upgrade all dependencies of `go.opentelemetry.io/otel/semconv/v1.24.0` to `go.opentelemetry.io/otel/semconv/v1.25.0`. (#5374)
+
+### Fixed
+
+- Comparison of unordered maps for `go.opentelemetry.io/otel/log.KeyValue` and `go.opentelemetry.io/otel/log.Value`. (#5306)
+- Fix the empty output of `go.opentelemetry.io/otel/log.Value` in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5311)
+- Split the behavior of `Recorder` in `go.opentelemetry.io/otel/log/logtest` so it behaves as a `LoggerProvider` only. (#5365)
+- Fix wrong package name of the error message when parsing endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5371)
+- Identify the `Logger` returned from the global `LoggerProvider` in `go.opentelemetry.io/otel/log/global` with its schema URL. (#5375)
+
+## [1.26.0/0.48.0/0.2.0-alpha] 2024-04-24
+
+### Added
+
+- Add `Recorder` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing the log bridge implementations. (#5134)
+- Add span flags to OTLP spans and links exported by `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. (#5194)
+- Make the initial alpha release of `go.opentelemetry.io/otel/sdk/log`.
+ This new module contains the Go implementation of the OpenTelemetry Logs SDK.
+ This module is unstable and breaking changes may be introduced.
+ See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240)
+- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`.
+ This new module contains an OTLP exporter that transmits log telemetry using HTTP.
+ This module is unstable and breaking changes may be introduced.
+ See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240)
+- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`.
+ This new module contains an exporter prints log records to STDOUT.
+ This module is unstable and breaking changes may be introduced.
+ See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240)
+- The `go.opentelemetry.io/otel/semconv/v1.25.0` package.
+ The package contains semantic conventions from the `v1.25.0` version of the OpenTelemetry Semantic Conventions. (#5254)
+
+### Changed
+
+- Update `go.opentelemetry.io/proto/otlp` from v1.1.0 to v1.2.0. (#5177)
+- Improve performance of baggage member character validation in `go.opentelemetry.io/otel/baggage`. (#5214)
+- The `otel-collector` example now uses docker compose to bring up services instead of kubernetes. (#5244)
+
+### Fixed
+
+- Slice attribute values in `go.opentelemetry.io/otel/attribute` are now emitted as their JSON representation. (#5159)
+
+## [1.25.0/0.47.0/0.0.8/0.1.0-alpha] 2024-04-05
+
+### Added
+
+- Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4906)
+- Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp`. (#4906)
+- Add `AddLink` method to the `Span` interface in `go.opentelemetry.io/otel/trace`. (#5032)
+- The `Enabled` method is added to the `Logger` interface in `go.opentelemetry.io/otel/log`.
+ This method is used to notify users if a log record will be emitted or not. (#5071)
+- Add `SeverityUndefined` `const` to `go.opentelemetry.io/otel/log`.
+ This value represents an unset severity level. (#5072)
+- Add `Empty` function in `go.opentelemetry.io/otel/log` to return a `KeyValue` for an empty value. (#5076)
+- Add `go.opentelemetry.io/otel/log/global` to manage the global `LoggerProvider`.
+ This package is provided with the anticipation that all functionality will be migrate to `go.opentelemetry.io/otel` when `go.opentelemetry.io/otel/log` stabilizes.
+ At which point, users will be required to migrage their code, and this package will be deprecated then removed. (#5085)
+- Add support for `Summary` metrics in the `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` exporters. (#5100)
+- Add `otel.scope.name` and `otel.scope.version` tags to spans exported by `go.opentelemetry.io/otel/exporters/zipkin`. (#5108)
+- Add support for `AddLink` to `go.opentelemetry.io/otel/bridge/opencensus`. (#5116)
+- Add `String` method to `Value` and `KeyValue` in `go.opentelemetry.io/otel/log`. (#5117)
+- Add Exemplar support to `go.opentelemetry.io/otel/exporters/prometheus`. (#5111)
+- Add metric semantic conventions to `go.opentelemetry.io/otel/semconv/v1.24.0`. Future `semconv` packages will include metric semantic conventions as well. (#4528)
+
+### Changed
+
+- `SpanFromContext` and `SpanContextFromContext` in `go.opentelemetry.io/otel/trace` no longer make a heap allocation when the passed context has no span. (#5049)
+- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` now create a gRPC client in idle mode and with "dns" as the default resolver using [`grpc.NewClient`](https://pkg.go.dev/google.golang.org/grpc#NewClient). (#5151)
+ Because of that `WithDialOption` ignores [`grpc.WithBlock`](https://pkg.go.dev/google.golang.org/grpc#WithBlock), [`grpc.WithTimeout`](https://pkg.go.dev/google.golang.org/grpc#WithTimeout), and [`grpc.WithReturnConnectionError`](https://pkg.go.dev/google.golang.org/grpc#WithReturnConnectionError).
+ Notice that [`grpc.DialContext`](https://pkg.go.dev/google.golang.org/grpc#DialContext) which was used before is now deprecated.
+
+### Fixed
+
+- Clarify the documentation about equivalence guarantees for the `Set` and `Distinct` types in `go.opentelemetry.io/otel/attribute`. (#5027)
+- Prevent default `ErrorHandler` self-delegation. (#5137)
+- Update all dependencies to address [GO-2024-2687]. (#5139)
+
+### Removed
+
+- Drop support for [Go 1.20]. (#4967)
+
+### Deprecated
+
+- Deprecate `go.opentelemetry.io/otel/attribute.Sortable` type. (#4734)
+- Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortable` function. (#4734)
+- Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortableFiltered` function. (#4734)
+
+## [1.24.0/0.46.0/0.0.1-alpha] 2024-02-23
+
+This release is the last to support [Go 1.20].
+The next release will require at least [Go 1.21].
+
+### Added
+
+- Support [Go 1.22]. (#4890)
+- Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4900)
+- Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4900)
+- The `go.opentelemetry.io/otel/log` module is added.
+ This module includes OpenTelemetry Go's implementation of the Logs Bridge API.
+ This module is in an alpha state, it is subject to breaking changes.
+ See our [versioning policy](./VERSIONING.md) for more info. (#4961)
+- Add ARM64 platform to the compatibility testing suite. (#4994)
+
+### Fixed
+
+- Fix registration of multiple callbacks when using the global meter provider from `go.opentelemetry.io/otel`. (#4945)
+- Fix negative buckets in output of exponential histograms. (#4956)
+
+## [1.23.1] 2024-02-07
+
+### Fixed
+
+- Register all callbacks passed during observable instrument creation instead of just the last one multiple times in `go.opentelemetry.io/otel/sdk/metric`. (#4888)
+
+## [1.23.0] 2024-02-06
+
+This release contains the first stable, `v1`, release of the following modules:
+
+- `go.opentelemetry.io/otel/bridge/opencensus`
+- `go.opentelemetry.io/otel/bridge/opencensus/test`
+- `go.opentelemetry.io/otel/example/opencensus`
+- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`
+- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`
+- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`
+
+See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
+
+### Added
+
+- Add `WithEndpointURL` option to the `exporters/otlp/otlpmetric/otlpmetricgrpc`, `exporters/otlp/otlpmetric/otlpmetrichttp`, `exporters/otlp/otlptrace/otlptracegrpc` and `exporters/otlp/otlptrace/otlptracehttp` packages. (#4808)
+- Experimental exemplar exporting is added to the metric SDK.
+ See [metric documentation](./sdk/metric/internal/x/README.md#exemplars) for more information about this feature and how to enable it. (#4871)
+- `ErrSchemaURLConflict` is added to `go.opentelemetry.io/otel/sdk/resource`.
+ This error is returned when a merge of two `Resource`s with different (non-empty) schema URL is attempted. (#4876)
+
+### Changed
+
+- The `Merge` and `New` functions in `go.opentelemetry.io/otel/sdk/resource` now returns a partial result if there is a schema URL merge conflict.
+ Instead of returning `nil` when two `Resource`s with different (non-empty) schema URLs are merged the merged `Resource`, along with the new `ErrSchemaURLConflict` error, is returned.
+ It is up to the user to decide if they want to use the returned `Resource` or not.
+ It may have desired attributes overwritten or include stale semantic conventions. (#4876)
+
+### Fixed
+
+- Fix `ContainerID` resource detection on systemd when cgroup path has a colon. (#4449)
+- Fix `go.opentelemetry.io/otel/sdk/metric` to cache instruments to avoid leaking memory when the same instrument is created multiple times. (#4820)
+- Fix missing `Mix` and `Max` values for `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` by introducing `MarshalText` and `MarshalJSON` for the `Extrema` type in `go.opentelemetry.io/sdk/metric/metricdata`. (#4827)
+
+## [1.23.0-rc.1] 2024-01-18
+
+This is a release candidate for the v1.23.0 release.
+That release is expected to include the `v1` release of the following modules:
+
+- `go.opentelemetry.io/otel/bridge/opencensus`
+- `go.opentelemetry.io/otel/bridge/opencensus/test`
+- `go.opentelemetry.io/otel/example/opencensus`
+- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`
+- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`
+- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`
+
+See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
+
+## [1.22.0/0.45.0] 2024-01-17
+
+### Added
+
+- The `go.opentelemetry.io/otel/semconv/v1.22.0` package.
+ The package contains semantic conventions from the `v1.22.0` version of the OpenTelemetry Semantic Conventions. (#4735)
+- The `go.opentelemetry.io/otel/semconv/v1.23.0` package.
+ The package contains semantic conventions from the `v1.23.0` version of the OpenTelemetry Semantic Conventions. (#4746)
+- The `go.opentelemetry.io/otel/semconv/v1.23.1` package.
+ The package contains semantic conventions from the `v1.23.1` version of the OpenTelemetry Semantic Conventions. (#4749)
+- The `go.opentelemetry.io/otel/semconv/v1.24.0` package.
+ The package contains semantic conventions from the `v1.24.0` version of the OpenTelemetry Semantic Conventions. (#4770)
+- Add `WithResourceAsConstantLabels` option to apply resource attributes for every metric emitted by the Prometheus exporter. (#4733)
+- Experimental cardinality limiting is added to the metric SDK.
+ See [metric documentation](./sdk/metric/internal/x/README.md#cardinality-limit) for more information about this feature and how to enable it. (#4457)
+- Add `NewMemberRaw` and `NewKeyValuePropertyRaw` in `go.opentelemetry.io/otel/baggage`. (#4804)
+
+### Changed
+
+- Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.24.0`. (#4754)
+- Update transformations in `go.opentelemetry.io/otel/exporters/zipkin` to follow `v1.24.0` version of the OpenTelemetry specification. (#4754)
+- Record synchronous measurements when the passed context is canceled instead of dropping in `go.opentelemetry.io/otel/sdk/metric`.
+ If you do not want to make a measurement when the context is cancelled, you need to handle it yourself (e.g `if ctx.Err() != nil`). (#4671)
+- Improve `go.opentelemetry.io/otel/trace.TraceState`'s performance. (#4722)
+- Improve `go.opentelemetry.io/otel/propagation.TraceContext`'s performance. (#4721)
+- Improve `go.opentelemetry.io/otel/baggage` performance. (#4743)
+- Improve performance of the `(*Set).Filter` method in `go.opentelemetry.io/otel/attribute` when the passed filter does not filter out any attributes from the set. (#4774)
+- `Member.String` in `go.opentelemetry.io/otel/baggage` percent-encodes only when necessary. (#4775)
+- Improve `go.opentelemetry.io/otel/trace.Span`'s performance when adding multiple attributes. (#4818)
+- `Property.Value` in `go.opentelemetry.io/otel/baggage` now returns a raw string instead of a percent-encoded value. (#4804)
+
+### Fixed
+
+- Fix `Parse` in `go.opentelemetry.io/otel/baggage` to validate member value before percent-decoding. (#4755)
+- Fix whitespace encoding of `Member.String` in `go.opentelemetry.io/otel/baggage`. (#4756)
+- Fix observable not registered error when the asynchronous instrument has a drop aggregation in `go.opentelemetry.io/otel/sdk/metric`. (#4772)
+- Fix baggage item key so that it is not canonicalized in `go.opentelemetry.io/otel/bridge/opentracing`. (#4776)
+- Fix `go.opentelemetry.io/otel/bridge/opentracing` to properly handle baggage values that requires escaping during propagation. (#4804)
+- Fix a bug where using multiple readers resulted in incorrect asynchronous counter values in `go.opentelemetry.io/otel/sdk/metric`. (#4742)
+
+## [1.21.0/0.44.0] 2023-11-16
+
+### Removed
+
+- Remove the deprecated `go.opentelemetry.io/otel/bridge/opencensus.NewTracer`. (#4706)
+- Remove the deprecated `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` module. (#4707)
+- Remove the deprecated `go.opentelemetry.io/otel/example/view` module. (#4708)
+- Remove the deprecated `go.opentelemetry.io/otel/example/fib` module. (#4723)
+
+### Fixed
+
+- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4719)
+- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4719)
+
+## [1.20.0/0.43.0] 2023-11-10
+
+This release brings a breaking change for custom trace API implementations. Some interfaces (`TracerProvider`, `Tracer`, `Span`) now embed the `go.opentelemetry.io/otel/trace/embedded` types. Implementers need to update their implementations based on what they want the default behavior to be. See the "API Implementations" section of the [trace API] package documentation for more information about how to accomplish this.
+
+### Added
+
+- Add `go.opentelemetry.io/otel/bridge/opencensus.InstallTraceBridge`, which installs the OpenCensus trace bridge, and replaces `opencensus.NewTracer`. (#4567)
+- Add scope version to trace and metric bridges in `go.opentelemetry.io/otel/bridge/opencensus`. (#4584)
+- Add the `go.opentelemetry.io/otel/trace/embedded` package to be embedded in the exported trace API interfaces. (#4620)
+- Add the `go.opentelemetry.io/otel/trace/noop` package as a default no-op implementation of the trace API. (#4620)
+- Add context propagation in `go.opentelemetry.io/otel/example/dice`. (#4644)
+- Add view configuration to `go.opentelemetry.io/otel/example/prometheus`. (#4649)
+- Add `go.opentelemetry.io/otel/metric.WithExplicitBucketBoundaries`, which allows defining default explicit bucket boundaries when creating histogram instruments. (#4603)
+- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4660)
+- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4660)
+- Add Summary, SummaryDataPoint, and QuantileValue to `go.opentelemetry.io/sdk/metric/metricdata`. (#4622)
+- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` now supports exemplars from OpenCensus. (#4585)
+- Add support for `WithExplicitBucketBoundaries` in `go.opentelemetry.io/otel/sdk/metric`. (#4605)
+- Add support for Summary metrics in `go.opentelemetry.io/otel/bridge/opencensus`. (#4668)
+
+### Deprecated
+
+- Deprecate `go.opentelemetry.io/otel/bridge/opencensus.NewTracer` in favor of `opencensus.InstallTraceBridge`. (#4567)
+- Deprecate `go.opentelemetry.io/otel/example/fib` package is in favor of `go.opentelemetry.io/otel/example/dice`. (#4618)
+- Deprecate `go.opentelemetry.io/otel/trace.NewNoopTracerProvider`.
+ Use the added `NewTracerProvider` function in `go.opentelemetry.io/otel/trace/noop` instead. (#4620)
+- Deprecate `go.opentelemetry.io/otel/example/view` package in favor of `go.opentelemetry.io/otel/example/prometheus`. (#4649)
+- Deprecate `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4693)
+
+### Changed
+
+- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` returns a `*MetricProducer` struct instead of the metric.Producer interface. (#4583)
+- The `TracerProvider` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.TracerProvider` type.
+ This extends the `TracerProvider` interface and is is a breaking change for any existing implementation.
+ Implementers need to update their implementations based on what they want the default behavior of the interface to be.
+ See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)
+- The `Tracer` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Tracer` type.
+ This extends the `Tracer` interface and is is a breaking change for any existing implementation.
+ Implementers need to update their implementations based on what they want the default behavior of the interface to be.
+ See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)
+- The `Span` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Span` type.
+ This extends the `Span` interface and is is a breaking change for any existing implementation.
+ Implementers need to update their implementations based on what they want the default behavior of the interface to be.
+ See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620)
+- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660)
+- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660)
+- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4670)
+- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4670)
+- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4669)
+- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4669)
+- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4679)
+- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4679)
+
+### Fixed
+
+- Fix improper parsing of characters such us `+`, `/` by `Parse` in `go.opentelemetry.io/otel/baggage` as they were rendered as a whitespace. (#4667)
+- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_RESOURCE_ATTRIBUTES` in `go.opentelemetry.io/otel/sdk/resource` as they were rendered as a whitespace. (#4699)
+- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` as they were rendered as a whitespace. (#4699)
+- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` as they were rendered as a whitespace. (#4699)
+- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracegrpc` as they were rendered as a whitespace. (#4699)
+- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp` as they were rendered as a whitespace. (#4699)
+- In `go.opentelemetry.op/otel/exporters/prometheus`, the exporter no longer `Collect`s metrics after `Shutdown` is invoked. (#4648)
+- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4695)
+- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4695)
+
+## [1.19.0/0.42.0/0.0.7] 2023-09-28
+
+This release contains the first stable release of the OpenTelemetry Go [metric SDK].
+Our project stability guarantees now apply to the `go.opentelemetry.io/otel/sdk/metric` package.
+See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
+
+### Added
+
+- Add the "Roll the dice" getting started application example in `go.opentelemetry.io/otel/example/dice`. (#4539)
+- The `WithWriter` and `WithPrettyPrint` options to `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` to set a custom `io.Writer`, and allow displaying the output in human-readable JSON. (#4507)
+
+### Changed
+
+- Allow '/' characters in metric instrument names. (#4501)
+- The exporter in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` does not prettify its output by default anymore. (#4507)
+- Upgrade `gopkg.io/yaml` from `v2` to `v3` in `go.opentelemetry.io/otel/schema`. (#4535)
+
+### Fixed
+
+- In `go.opentelemetry.op/otel/exporters/prometheus`, don't try to create the Prometheus metric on every `Collect` if we know the scope is invalid. (#4499)
+
+### Removed
+
+- Remove `"go.opentelemetry.io/otel/bridge/opencensus".NewMetricExporter`, which is replaced by `NewMetricProducer`. (#4566)
+
+## [1.19.0-rc.1/0.42.0-rc.1] 2023-09-14
+
+This is a release candidate for the v1.19.0/v0.42.0 release.
+That release is expected to include the `v1` release of the OpenTelemetry Go metric SDK and will provide stability guarantees of that SDK.
+See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
+
+### Changed
+
+- Allow '/' characters in metric instrument names. (#4501)
+
+### Fixed
+
+- In `go.opentelemetry.op/otel/exporters/prometheus`, don't try to create the prometheus metric on every `Collect` if we know the scope is invalid. (#4499)
+
+## [1.18.0/0.41.0/0.0.6] 2023-09-12
+
+This release drops the compatibility guarantee of [Go 1.19].
+
+### Added
+
+- Add `WithProducer` option in `go.opentelemetry.op/otel/exporters/prometheus` to restore the ability to register producers on the prometheus exporter's manual reader. (#4473)
+- Add `IgnoreValue` option in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest` to allow ignoring values when comparing metrics. (#4447)
+
+### Changed
+
+- Use a `TestingT` interface instead of `*testing.T` struct in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest`. (#4483)
+
+### Deprecated
+
+- The `NewMetricExporter` in `go.opentelemetry.io/otel/bridge/opencensus` was deprecated in `v0.35.0` (#3541).
+ The deprecation notice format for the function has been corrected to trigger Go documentation and build tooling. (#4470)
+
+### Removed
+
+- Removed the deprecated `go.opentelemetry.io/otel/exporters/jaeger` package. (#4467)
+- Removed the deprecated `go.opentelemetry.io/otel/example/jaeger` package. (#4467)
+- Removed the deprecated `go.opentelemetry.io/otel/sdk/metric/aggregation` package. (#4468)
+- Removed the deprecated internal packages in `go.opentelemetry.io/otel/exporters/otlp` and its sub-packages. (#4469)
+- Dropped guaranteed support for versions of Go less than 1.20. (#4481)
+
+## [1.17.0/0.40.0/0.0.5] 2023-08-28
+
+### Added
+
+- Export the `ManualReader` struct in `go.opentelemetry.io/otel/sdk/metric`. (#4244)
+- Export the `PeriodicReader` struct in `go.opentelemetry.io/otel/sdk/metric`. (#4244)
+- Add support for exponential histogram aggregations.
+ A histogram can be configured as an exponential histogram using a view with `"go.opentelemetry.io/otel/sdk/metric".ExponentialHistogram` as the aggregation. (#4245)
+- Export the `Exporter` struct in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4272)
+- Export the `Exporter` struct in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4272)
+- The exporters in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` now support the `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` environment variable. (#4287)
+- Add `WithoutCounterSuffixes` option in `go.opentelemetry.io/otel/exporters/prometheus` to disable addition of `_total` suffixes. (#4306)
+- Add info and debug logging to the metric SDK in `go.opentelemetry.io/otel/sdk/metric`. (#4315)
+- The `go.opentelemetry.io/otel/semconv/v1.21.0` package.
+ The package contains semantic conventions from the `v1.21.0` version of the OpenTelemetry Semantic Conventions. (#4362)
+- Accept 201 to 299 HTTP status as success in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4365)
+- Document the `Temporality` and `Aggregation` methods of the `"go.opentelemetry.io/otel/sdk/metric".Exporter"` need to be concurrent safe. (#4381)
+- Expand the set of units supported by the Prometheus exporter, and don't add unit suffixes if they are already present in `go.opentelemetry.op/otel/exporters/prometheus` (#4374)
+- Move the `Aggregation` interface and its implementations from `go.opentelemetry.io/otel/sdk/metric/aggregation` to `go.opentelemetry.io/otel/sdk/metric`. (#4435)
+- The exporters in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` now support the `OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION` environment variable. (#4437)
+- Add the `NewAllowKeysFilter` and `NewDenyKeysFilter` functions to `go.opentelemetry.io/otel/attribute` to allow convenient creation of allow-keys and deny-keys filters. (#4444)
+- Support Go 1.21. (#4463)
+
+### Changed
+
+- Starting from `v1.21.0` of semantic conventions, `go.opentelemetry.io/otel/semconv/{version}/httpconv` and `go.opentelemetry.io/otel/semconv/{version}/netconv` packages will no longer be published. (#4145)
+- Log duplicate instrument conflict at a warning level instead of info in `go.opentelemetry.io/otel/sdk/metric`. (#4202)
+- Return an error on the creation of new instruments in `go.opentelemetry.io/otel/sdk/metric` if their name doesn't pass regexp validation. (#4210)
+- `NewManualReader` in `go.opentelemetry.io/otel/sdk/metric` returns `*ManualReader` instead of `Reader`. (#4244)
+- `NewPeriodicReader` in `go.opentelemetry.io/otel/sdk/metric` returns `*PeriodicReader` instead of `Reader`. (#4244)
+- Count the Collect time in the `PeriodicReader` timeout in `go.opentelemetry.io/otel/sdk/metric`. (#4221)
+- The function `New` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` returns `*Exporter` instead of `"go.opentelemetry.io/otel/sdk/metric".Exporter`. (#4272)
+- The function `New` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` returns `*Exporter` instead of `"go.opentelemetry.io/otel/sdk/metric".Exporter`. (#4272)
+- If an attribute set is omitted from an async callback, the previous value will no longer be exported in `go.opentelemetry.io/otel/sdk/metric`. (#4290)
+- If an attribute set is observed multiple times in an async callback in `go.opentelemetry.io/otel/sdk/metric`, the values will be summed instead of the last observation winning. (#4289)
+- Allow the explicit bucket histogram aggregation to be used for the up-down counter, observable counter, observable up-down counter, and observable gauge in the `go.opentelemetry.io/otel/sdk/metric` package. (#4332)
+- Restrict `Meter`s in `go.opentelemetry.io/otel/sdk/metric` to only register and collect instruments it created. (#4333)
+- `PeriodicReader.Shutdown` and `PeriodicReader.ForceFlush` in `go.opentelemetry.io/otel/sdk/metric` now apply the periodic reader's timeout to the operation if the user provided context does not contain a deadline. (#4356, #4377)
+- Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.21.0`. (#4408)
+- Increase instrument name maximum length from 63 to 255 characters in `go.opentelemetry.io/otel/sdk/metric`. (#4434)
+- Add `go.opentelemetry.op/otel/sdk/metric.WithProducer` as an `Option` for `"go.opentelemetry.io/otel/sdk/metric".NewManualReader` and `"go.opentelemetry.io/otel/sdk/metric".NewPeriodicReader`. (#4346)
+
+### Removed
+
+- Remove `Reader.RegisterProducer` in `go.opentelemetry.io/otel/metric`.
+ Use the added `WithProducer` option instead. (#4346)
+- Remove `Reader.ForceFlush` in `go.opentelemetry.io/otel/metric`.
+ Notice that `PeriodicReader.ForceFlush` is still available. (#4375)
+
+### Fixed
+
+- Correctly format log messages from the `go.opentelemetry.io/otel/exporters/zipkin` exporter. (#4143)
+- Log an error for calls to `NewView` in `go.opentelemetry.io/otel/sdk/metric` that have empty criteria. (#4307)
+- Fix `"go.opentelemetry.io/otel/sdk/resource".WithHostID()` to not set an empty `host.id`. (#4317)
+- Use the instrument identifying fields to cache aggregators and determine duplicate instrument registrations in `go.opentelemetry.io/otel/sdk/metric`. (#4337)
+- Detect duplicate instruments for case-insensitive names in `go.opentelemetry.io/otel/sdk/metric`. (#4338)
+- The `ManualReader` will not panic if `AggregationSelector` returns `nil` in `go.opentelemetry.io/otel/sdk/metric`. (#4350)
+- If a `Reader`'s `AggregationSelector` returns `nil` or `DefaultAggregation` the pipeline will use the default aggregation. (#4350)
+- Log a suggested view that fixes instrument conflicts in `go.opentelemetry.io/otel/sdk/metric`. (#4349)
+- Fix possible panic, deadlock and race condition in batch span processor in `go.opentelemetry.io/otel/sdk/trace`. (#4353)
+- Improve context cancellation handling in batch span processor's `ForceFlush` in `go.opentelemetry.io/otel/sdk/trace`. (#4369)
+- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` using gotmpl. (#4397, #3846)
+- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` using gotmpl. (#4404, #3846)
+- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` using gotmpl. (#4407, #3846)
+- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` using gotmpl. (#4400, #3846)
+- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` using gotmpl. (#4401, #3846)
+- Do not block the metric SDK when OTLP metric exports are blocked in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#3925, #4395)
+- Do not append `_total` if the counter already has that suffix for the Prometheus exproter in `go.opentelemetry.io/otel/exporter/prometheus`. (#4373)
+- Fix resource detection data race in `go.opentelemetry.io/otel/sdk/resource`. (#4409)
+- Use the first-seen instrument name during instrument name conflicts in `go.opentelemetry.io/otel/sdk/metric`. (#4428)
+
+### Deprecated
+
+- The `go.opentelemetry.io/otel/exporters/jaeger` package is deprecated.
+ OpenTelemetry dropped support for Jaeger exporter in July 2023.
+ Use `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`
+ or `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` instead. (#4423)
+- The `go.opentelemetry.io/otel/example/jaeger` package is deprecated. (#4423)
+- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` package is deprecated. (#4420)
+- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/oconf` package is deprecated. (#4420)
+- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otest` package is deprecated. (#4420)
+- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/transform` package is deprecated. (#4420)
+- The `go.opentelemetry.io/otel/exporters/otlp/internal` package is deprecated. (#4421)
+- The `go.opentelemetry.io/otel/exporters/otlp/internal/envconfig` package is deprecated. (#4421)
+- The `go.opentelemetry.io/otel/exporters/otlp/internal/retry` package is deprecated. (#4421)
+- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` package is deprecated. (#4425)
+- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/envconfig` package is deprecated. (#4425)
+- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig` package is deprecated. (#4425)
+- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest` package is deprecated. (#4425)
+- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/retry` package is deprecated. (#4425)
+- The `go.opentelemetry.io/otel/sdk/metric/aggregation` package is deprecated.
+ Use the aggregation types added to `go.opentelemetry.io/otel/sdk/metric` instead. (#4435)
+
+## [1.16.0/0.39.0] 2023-05-18
+
+This release contains the first stable release of the OpenTelemetry Go [metric API].
+Our project stability guarantees now apply to the `go.opentelemetry.io/otel/metric` package.
+See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
+
+### Added
+
+- The `go.opentelemetry.io/otel/semconv/v1.19.0` package.
+ The package contains semantic conventions from the `v1.19.0` version of the OpenTelemetry specification. (#3848)
+- The `go.opentelemetry.io/otel/semconv/v1.20.0` package.
+ The package contains semantic conventions from the `v1.20.0` version of the OpenTelemetry specification. (#4078)
+- The Exponential Histogram data types in `go.opentelemetry.io/otel/sdk/metric/metricdata`. (#4165)
+- OTLP metrics exporter now supports the Exponential Histogram Data Type. (#4222)
+- Fix serialization of `time.Time` zero values in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` packages. (#4271)
+
+### Changed
+
+- Use `strings.Cut()` instead of `string.SplitN()` for better readability and memory use. (#4049)
+- `MeterProvider` returns noop meters once it has been shutdown. (#4154)
+
+### Removed
+
+- The deprecated `go.opentelemetry.io/otel/metric/instrument` package is removed.
+ Use `go.opentelemetry.io/otel/metric` instead. (#4055)
+
+### Fixed
+
+- Fix build for BSD based systems in `go.opentelemetry.io/otel/sdk/resource`. (#4077)
+
+## [1.16.0-rc.1/0.39.0-rc.1] 2023-05-03
+
+This is a release candidate for the v1.16.0/v0.39.0 release.
+That release is expected to include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API.
+See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
+
+### Added
+
+- Support global `MeterProvider` in `go.opentelemetry.io/otel`. (#4039)
+ - Use `Meter` for a `metric.Meter` from the global `metric.MeterProvider`.
+ - Use `GetMeterProivder` for a global `metric.MeterProvider`.
+ - Use `SetMeterProivder` to set the global `metric.MeterProvider`.
+
+### Changed
+
+- Move the `go.opentelemetry.io/otel/metric` module to the `stable-v1` module set.
+ This stages the metric API to be released as a stable module. (#4038)
+
+### Removed
+
+- The `go.opentelemetry.io/otel/metric/global` package is removed.
+ Use `go.opentelemetry.io/otel` instead. (#4039)
+
+## [1.15.1/0.38.1] 2023-05-02
+
+### Fixed
+
+- Remove unused imports from `sdk/resource/host_id_bsd.go` which caused build failures. (#4040, #4041)
+
+## [1.15.0/0.38.0] 2023-04-27
+
+### Added
+
+- The `go.opentelemetry.io/otel/metric/embedded` package. (#3916)
+- The `Version` function to `go.opentelemetry.io/otel/sdk` to return the SDK version. (#3949)
+- Add a `WithNamespace` option to `go.opentelemetry.io/otel/exporters/prometheus` to allow users to prefix metrics with a namespace. (#3970)
+- The following configuration types were added to `go.opentelemetry.io/otel/metric/instrument` to be used in the configuration of measurement methods. (#3971)
+ - The `AddConfig` used to hold configuration for addition measurements
+ - `NewAddConfig` used to create a new `AddConfig`
+ - `AddOption` used to configure an `AddConfig`
+ - The `RecordConfig` used to hold configuration for recorded measurements
+ - `NewRecordConfig` used to create a new `RecordConfig`
+ - `RecordOption` used to configure a `RecordConfig`
+ - The `ObserveConfig` used to hold configuration for observed measurements
+ - `NewObserveConfig` used to create a new `ObserveConfig`
+ - `ObserveOption` used to configure an `ObserveConfig`
+- `WithAttributeSet` and `WithAttributes` are added to `go.opentelemetry.io/otel/metric/instrument`.
+ They return an option used during a measurement that defines the attribute Set associated with the measurement. (#3971)
+- The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` to return the OTLP metrics client version. (#3956)
+- The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlptrace` to return the OTLP trace client version. (#3956)
+
+### Changed
+
+- The `Extrema` in `go.opentelemetry.io/otel/sdk/metric/metricdata` is redefined with a generic argument of `[N int64 | float64]`. (#3870)
+- Update all exported interfaces from `go.opentelemetry.io/otel/metric` to embed their corresponding interface from `go.opentelemetry.io/otel/metric/embedded`.
+ This adds an implementation requirement to set the interface default behavior for unimplemented methods. (#3916)
+- Move No-Op implementation from `go.opentelemetry.io/otel/metric` into its own package `go.opentelemetry.io/otel/metric/noop`. (#3941)
+ - `metric.NewNoopMeterProvider` is replaced with `noop.NewMeterProvider`
+- Add all the methods from `"go.opentelemetry.io/otel/trace".SpanContext` to `bridgeSpanContext` by embedding `otel.SpanContext` in `bridgeSpanContext`. (#3966)
+- Wrap `UploadMetrics` error in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/` to improve error message when encountering generic grpc errors. (#3974)
+- The measurement methods for all instruments in `go.opentelemetry.io/otel/metric/instrument` accept an option instead of the variadic `"go.opentelemetry.io/otel/attribute".KeyValue`. (#3971)
+ - The `Int64Counter.Add` method now accepts `...AddOption`
+ - The `Float64Counter.Add` method now accepts `...AddOption`
+ - The `Int64UpDownCounter.Add` method now accepts `...AddOption`
+ - The `Float64UpDownCounter.Add` method now accepts `...AddOption`
+ - The `Int64Histogram.Record` method now accepts `...RecordOption`
+ - The `Float64Histogram.Record` method now accepts `...RecordOption`
+ - The `Int64Observer.Observe` method now accepts `...ObserveOption`
+ - The `Float64Observer.Observe` method now accepts `...ObserveOption`
+- The `Observer` methods in `go.opentelemetry.io/otel/metric` accept an option instead of the variadic `"go.opentelemetry.io/otel/attribute".KeyValue`. (#3971)
+ - The `Observer.ObserveInt64` method now accepts `...ObserveOption`
+ - The `Observer.ObserveFloat64` method now accepts `...ObserveOption`
+- Move global metric back to `go.opentelemetry.io/otel/metric/global` from `go.opentelemetry.io/otel`. (#3986)
+
+### Fixed
+
+- `TracerProvider` allows calling `Tracer()` while it's shutting down.
+ It used to deadlock. (#3924)
+- Use the SDK version for the Telemetry SDK resource detector in `go.opentelemetry.io/otel/sdk/resource`. (#3949)
+- Fix a data race in `SpanProcessor` returned by `NewSimpleSpanProcessor` in `go.opentelemetry.io/otel/sdk/trace`. (#3951)
+- Automatically figure out the default aggregation with `aggregation.Default`. (#3967)
+
+### Deprecated
+
+- The `go.opentelemetry.io/otel/metric/instrument` package is deprecated.
+ Use the equivalent types added to `go.opentelemetry.io/otel/metric` instead. (#4018)
+
+## [1.15.0-rc.2/0.38.0-rc.2] 2023-03-23
+
+This is a release candidate for the v1.15.0/v0.38.0 release.
+That release will include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API.
+See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
+
+### Added
+
+- The `WithHostID` option to `go.opentelemetry.io/otel/sdk/resource`. (#3812)
+- The `WithoutTimestamps` option to `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` to sets all timestamps to zero. (#3828)
+- The new `Exemplar` type is added to `go.opentelemetry.io/otel/sdk/metric/metricdata`.
+ Both the `DataPoint` and `HistogramDataPoint` types from that package have a new field of `Exemplars` containing the sampled exemplars for their timeseries. (#3849)
+- Configuration for each metric instrument in `go.opentelemetry.io/otel/sdk/metric/instrument`. (#3895)
+- The internal logging introduces a warning level verbosity equal to `V(1)`. (#3900)
+- Added a log message warning about usage of `SimpleSpanProcessor` in production environments. (#3854)
+
+### Changed
+
+- Optimize memory allocation when creation a new `Set` using `NewSet` or `NewSetWithFiltered` in `go.opentelemetry.io/otel/attribute`. (#3832)
+- Optimize memory allocation when creation new metric instruments in `go.opentelemetry.io/otel/sdk/metric`. (#3832)
+- Avoid creating new objects on all calls to `WithDeferredSetup` and `SkipContextSetup` in OpenTracing bridge. (#3833)
+- The `New` and `Detect` functions from `go.opentelemetry.io/otel/sdk/resource` return errors that wrap underlying errors instead of just containing the underlying error strings. (#3844)
+- Both the `Histogram` and `HistogramDataPoint` are redefined with a generic argument of `[N int64 | float64]` in `go.opentelemetry.io/otel/sdk/metric/metricdata`. (#3849)
+- The metric `Export` interface from `go.opentelemetry.io/otel/sdk/metric` accepts a `*ResourceMetrics` instead of `ResourceMetrics`. (#3853)
+- Rename `Asynchronous` to `Observable` in `go.opentelemetry.io/otel/metric/instrument`. (#3892)
+- Rename `Int64ObserverOption` to `Int64ObservableOption` in `go.opentelemetry.io/otel/metric/instrument`. (#3895)
+- Rename `Float64ObserverOption` to `Float64ObservableOption` in `go.opentelemetry.io/otel/metric/instrument`. (#3895)
+- The internal logging changes the verbosity level of info to `V(4)`, the verbosity level of debug to `V(8)`. (#3900)
+
+### Fixed
+
+- `TracerProvider` consistently doesn't allow to register a `SpanProcessor` after shutdown. (#3845)
+
+### Removed
+
+- The deprecated `go.opentelemetry.io/otel/metric/global` package is removed. (#3829)
+- The unneeded `Synchronous` interface in `go.opentelemetry.io/otel/metric/instrument` was removed. (#3892)
+- The `Float64ObserverConfig` and `NewFloat64ObserverConfig` in `go.opentelemetry.io/otel/sdk/metric/instrument`.
+ Use the added `float64` instrument configuration instead. (#3895)
+- The `Int64ObserverConfig` and `NewInt64ObserverConfig` in `go.opentelemetry.io/otel/sdk/metric/instrument`.
+ Use the added `int64` instrument configuration instead. (#3895)
+- The `NewNoopMeter` function in `go.opentelemetry.io/otel/metric`, use `NewMeterProvider().Meter("")` instead. (#3893)
+
+## [1.15.0-rc.1/0.38.0-rc.1] 2023-03-01
+
+This is a release candidate for the v1.15.0/v0.38.0 release.
+That release will include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API.
+See our [versioning policy](VERSIONING.md) for more information about these stability guarantees.
+
+This release drops the compatibility guarantee of [Go 1.18].
+
+### Added
+
+- Support global `MeterProvider` in `go.opentelemetry.io/otel`. (#3818)
+ - Use `Meter` for a `metric.Meter` from the global `metric.MeterProvider`.
+ - Use `GetMeterProivder` for a global `metric.MeterProvider`.
+ - Use `SetMeterProivder` to set the global `metric.MeterProvider`.
+
+### Changed
+
+- Dropped compatibility testing for [Go 1.18].
+ The project no longer guarantees support for this version of Go. (#3813)
+
+### Fixed
+
+- Handle empty environment variable as it they were not set. (#3764)
+- Clarify the `httpconv` and `netconv` packages in `go.opentelemetry.io/otel/semconv/*` provide tracing semantic conventions. (#3823)
+- Fix race conditions in `go.opentelemetry.io/otel/exporters/metric/prometheus` that could cause a panic. (#3899)
+- Fix sending nil `scopeInfo` to metrics channel in `go.opentelemetry.io/otel/exporters/metric/prometheus` that could cause a panic in `github.com/prometheus/client_golang/prometheus`. (#3899)
+
+### Deprecated
+
+- The `go.opentelemetry.io/otel/metric/global` package is deprecated.
+ Use `go.opentelemetry.io/otel` instead. (#3818)
+
+### Removed
+
+- The deprecated `go.opentelemetry.io/otel/metric/unit` package is removed. (#3814)
+
+## [1.14.0/0.37.0/0.0.4] 2023-02-27
+
+This release is the last to support [Go 1.18].
+The next release will require at least [Go 1.19].
+
+### Added
+
+- The `event` type semantic conventions are added to `go.opentelemetry.io/otel/semconv/v1.17.0`. (#3697)
+- Support [Go 1.20]. (#3693)
+- The `go.opentelemetry.io/otel/semconv/v1.18.0` package.
+ The package contains semantic conventions from the `v1.18.0` version of the OpenTelemetry specification. (#3719)
+ - The following `const` renames from `go.opentelemetry.io/otel/semconv/v1.17.0` are included:
+ - `OtelScopeNameKey` -> `OTelScopeNameKey`
+ - `OtelScopeVersionKey` -> `OTelScopeVersionKey`
+ - `OtelLibraryNameKey` -> `OTelLibraryNameKey`
+ - `OtelLibraryVersionKey` -> `OTelLibraryVersionKey`
+ - `OtelStatusCodeKey` -> `OTelStatusCodeKey`
+ - `OtelStatusDescriptionKey` -> `OTelStatusDescriptionKey`
+ - `OtelStatusCodeOk` -> `OTelStatusCodeOk`
+ - `OtelStatusCodeError` -> `OTelStatusCodeError`
+ - The following `func` renames from `go.opentelemetry.io/otel/semconv/v1.17.0` are included:
+ - `OtelScopeName` -> `OTelScopeName`
+ - `OtelScopeVersion` -> `OTelScopeVersion`
+ - `OtelLibraryName` -> `OTelLibraryName`
+ - `OtelLibraryVersion` -> `OTelLibraryVersion`
+ - `OtelStatusDescription` -> `OTelStatusDescription`
+- A `IsSampled` method is added to the `SpanContext` implementation in `go.opentelemetry.io/otel/bridge/opentracing` to expose the span sampled state.
+ See the [README](./bridge/opentracing/README.md) for more information. (#3570)
+- The `WithInstrumentationAttributes` option to `go.opentelemetry.io/otel/metric`. (#3738)
+- The `WithInstrumentationAttributes` option to `go.opentelemetry.io/otel/trace`. (#3739)
+- The following environment variables are supported by the periodic `Reader` in `go.opentelemetry.io/otel/sdk/metric`. (#3763)
+ - `OTEL_METRIC_EXPORT_INTERVAL` sets the time between collections and exports.
+ - `OTEL_METRIC_EXPORT_TIMEOUT` sets the timeout an export is attempted.
+
+### Changed
+
+- Fall-back to `TextMapCarrier` when it's not `HttpHeader`s in `go.opentelemetry.io/otel/bridge/opentracing`. (#3679)
+- The `Collect` method of the `"go.opentelemetry.io/otel/sdk/metric".Reader` interface is updated to accept the `metricdata.ResourceMetrics` value the collection will be made into.
+ This change is made to enable memory reuse by SDK users. (#3732)
+- The `WithUnit` option in `go.opentelemetry.io/otel/sdk/metric/instrument` is updated to accept a `string` for the unit value. (#3776)
+
+### Fixed
+
+- Ensure `go.opentelemetry.io/otel` does not use generics. (#3723, #3725)
+- Multi-reader `MeterProvider`s now export metrics for all readers, instead of just the first reader. (#3720, #3724)
+- Remove use of deprecated `"math/rand".Seed` in `go.opentelemetry.io/otel/example/prometheus`. (#3733)
+- Do not silently drop unknown schema data with `Parse` in `go.opentelemetry.io/otel/schema/v1.1`. (#3743)
+- Data race issue in OTLP exporter retry mechanism. (#3755, #3756)
+- Wrapping empty errors when exporting in `go.opentelemetry.io/otel/sdk/metric`. (#3698, #3772)
+- Incorrect "all" and "resource" definition for schema files in `go.opentelemetry.io/otel/schema/v1.1`. (#3777)
+
+### Deprecated
+
+- The `go.opentelemetry.io/otel/metric/unit` package is deprecated.
+ Use the equivalent unit string instead. (#3776)
+ - Use `"1"` instead of `unit.Dimensionless`
+ - Use `"By"` instead of `unit.Bytes`
+ - Use `"ms"` instead of `unit.Milliseconds`
+
+## [1.13.0/0.36.0] 2023-02-07
+
+### Added
+
+- Attribute `KeyValue` creations functions to `go.opentelemetry.io/otel/semconv/v1.17.0` for all non-enum semantic conventions.
+ These functions ensure semantic convention type correctness. (#3675)
+
+### Fixed
+
+- Removed the `http.target` attribute from being added by `ServerRequest` in the following packages. (#3687)
+ - `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`
+ - `go.opentelemetry.io/otel/semconv/v1.14.0/httpconv`
+ - `go.opentelemetry.io/otel/semconv/v1.15.0/httpconv`
+ - `go.opentelemetry.io/otel/semconv/v1.16.0/httpconv`
+ - `go.opentelemetry.io/otel/semconv/v1.17.0/httpconv`
+
+### Removed
+
+- The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncfloat64` package is removed. (#3631)
+- The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncint64` package is removed. (#3631)
+- The deprecated `go.opentelemetry.io/otel/metric/instrument/syncfloat64` package is removed. (#3631)
+- The deprecated `go.opentelemetry.io/otel/metric/instrument/syncint64` package is removed. (#3631)
+
+## [1.12.0/0.35.0] 2023-01-28
+
+### Added
+
+- The `WithInt64Callback` option to `go.opentelemetry.io/otel/metric/instrument`.
+ This options is used to configure `int64` Observer callbacks during their creation. (#3507)
+- The `WithFloat64Callback` option to `go.opentelemetry.io/otel/metric/instrument`.
+ This options is used to configure `float64` Observer callbacks during their creation. (#3507)
+- The `Producer` interface and `Reader.RegisterProducer(Producer)` to `go.opentelemetry.io/otel/sdk/metric`.
+ These additions are used to enable external metric Producers. (#3524)
+- The `Callback` function type to `go.opentelemetry.io/otel/metric`.
+ This new named function type is registered with a `Meter`. (#3564)
+- The `go.opentelemetry.io/otel/semconv/v1.13.0` package.
+ The package contains semantic conventions from the `v1.13.0` version of the OpenTelemetry specification. (#3499)
+ - The `EndUserAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is merged into `ClientRequest` and `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.
+ - The `HTTPAttributesFromHTTPStatusCode` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is merged into `ClientResponse` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.
+ - The `HTTPClientAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ClientRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.
+ - The `HTTPServerAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.
+ - The `HTTPServerMetricAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.
+ - The `NetAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is split into `Transport` in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` and `ClientRequest` or `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.
+ - The `SpanStatusFromHTTPStatusCode` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ClientStatus` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.
+ - The `SpanStatusFromHTTPStatusCodeAndSpanKind` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is split into `ClientStatus` and `ServerStatus` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`.
+ - The `Client` function is included in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` to generate attributes for a `net.Conn`.
+ - The `Server` function is included in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` to generate attributes for a `net.Listener`.
+- The `go.opentelemetry.io/otel/semconv/v1.14.0` package.
+ The package contains semantic conventions from the `v1.14.0` version of the OpenTelemetry specification. (#3566)
+- The `go.opentelemetry.io/otel/semconv/v1.15.0` package.
+ The package contains semantic conventions from the `v1.15.0` version of the OpenTelemetry specification. (#3578)
+- The `go.opentelemetry.io/otel/semconv/v1.16.0` package.
+ The package contains semantic conventions from the `v1.16.0` version of the OpenTelemetry specification. (#3579)
+- Metric instruments to `go.opentelemetry.io/otel/metric/instrument`.
+ These instruments are use as replacements of the deprecated `go.opentelemetry.io/otel/metric/instrument/{asyncfloat64,asyncint64,syncfloat64,syncint64}` packages.(#3575, #3586)
+ - `Float64ObservableCounter` replaces the `asyncfloat64.Counter`
+ - `Float64ObservableUpDownCounter` replaces the `asyncfloat64.UpDownCounter`
+ - `Float64ObservableGauge` replaces the `asyncfloat64.Gauge`
+ - `Int64ObservableCounter` replaces the `asyncint64.Counter`
+ - `Int64ObservableUpDownCounter` replaces the `asyncint64.UpDownCounter`
+ - `Int64ObservableGauge` replaces the `asyncint64.Gauge`
+ - `Float64Counter` replaces the `syncfloat64.Counter`
+ - `Float64UpDownCounter` replaces the `syncfloat64.UpDownCounter`
+ - `Float64Histogram` replaces the `syncfloat64.Histogram`
+ - `Int64Counter` replaces the `syncint64.Counter`
+ - `Int64UpDownCounter` replaces the `syncint64.UpDownCounter`
+ - `Int64Histogram` replaces the `syncint64.Histogram`
+- `NewTracerProvider` to `go.opentelemetry.io/otel/bridge/opentracing`.
+ This is used to create `WrapperTracer` instances from a `TracerProvider`. (#3116)
+- The `Extrema` type to `go.opentelemetry.io/otel/sdk/metric/metricdata`.
+ This type is used to represent min/max values and still be able to distinguish unset and zero values. (#3487)
+- The `go.opentelemetry.io/otel/semconv/v1.17.0` package.
+ The package contains semantic conventions from the `v1.17.0` version of the OpenTelemetry specification. (#3599)
+
+### Changed
+
+- Jaeger and Zipkin exporter use `github.com/go-logr/logr` as the logging interface, and add the `WithLogr` option. (#3497, #3500)
+- Instrument configuration in `go.opentelemetry.io/otel/metric/instrument` is split into specific options and configuration based on the instrument type. (#3507)
+ - Use the added `Int64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncint64`.
+ - Use the added `Float64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncfloat64`.
+ - Use the added `Int64ObserverOption` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/asyncint64`.
+ - Use the added `Float64ObserverOption` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/asyncfloat64`.
+- Return a `Registration` from the `RegisterCallback` method of a `Meter` in the `go.opentelemetry.io/otel/metric` package.
+ This `Registration` can be used to unregister callbacks. (#3522)
+- Global error handler uses an atomic value instead of a mutex. (#3543)
+- Add `NewMetricProducer` to `go.opentelemetry.io/otel/bridge/opencensus`, which can be used to pass OpenCensus metrics to an OpenTelemetry Reader. (#3541)
+- Global logger uses an atomic value instead of a mutex. (#3545)
+- The `Shutdown` method of the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` releases all computational resources when called the first time. (#3551)
+- The `Sampler` returned from `TraceIDRatioBased` `go.opentelemetry.io/otel/sdk/trace` now uses the rightmost bits for sampling decisions.
+ This fixes random sampling when using ID generators like `xray.IDGenerator` and increasing parity with other language implementations. (#3557)
+- Errors from `go.opentelemetry.io/otel/exporters/otlp/otlptrace` exporters are wrapped in errors identifying their signal name.
+ Existing users of the exporters attempting to identify specific errors will need to use `errors.Unwrap()` to get the underlying error. (#3516)
+- Exporters from `go.opentelemetry.io/otel/exporters/otlp` will print the final retryable error message when attempts to retry time out. (#3514)
+- The instrument kind names in `go.opentelemetry.io/otel/sdk/metric` are updated to match the API. (#3562)
+ - `InstrumentKindSyncCounter` is renamed to `InstrumentKindCounter`
+ - `InstrumentKindSyncUpDownCounter` is renamed to `InstrumentKindUpDownCounter`
+ - `InstrumentKindSyncHistogram` is renamed to `InstrumentKindHistogram`
+ - `InstrumentKindAsyncCounter` is renamed to `InstrumentKindObservableCounter`
+ - `InstrumentKindAsyncUpDownCounter` is renamed to `InstrumentKindObservableUpDownCounter`
+ - `InstrumentKindAsyncGauge` is renamed to `InstrumentKindObservableGauge`
+- The `RegisterCallback` method of the `Meter` in `go.opentelemetry.io/otel/metric` changed.
+ - The named `Callback` replaces the inline function parameter. (#3564)
+ - `Callback` is required to return an error. (#3576)
+ - `Callback` accepts the added `Observer` parameter added.
+ This new parameter is used by `Callback` implementations to observe values for asynchronous instruments instead of calling the `Observe` method of the instrument directly. (#3584)
+ - The slice of `instrument.Asynchronous` is now passed as a variadic argument. (#3587)
+- The exporter from `go.opentelemetry.io/otel/exporters/zipkin` is updated to use the `v1.16.0` version of semantic conventions.
+ This means it no longer uses the removed `net.peer.ip` or `http.host` attributes to determine the remote endpoint.
+ Instead it uses the `net.sock.peer` attributes. (#3581)
+- The `Min` and `Max` fields of the `HistogramDataPoint` in `go.opentelemetry.io/otel/sdk/metric/metricdata` are now defined with the added `Extrema` type instead of a `*float64`. (#3487)
+
+### Fixed
+
+- Asynchronous instruments that use sum aggregators and attribute filters correctly add values from equivalent attribute sets that have been filtered. (#3439, #3549)
+- The `RegisterCallback` method of the `Meter` from `go.opentelemetry.io/otel/sdk/metric` only registers a callback for instruments created by that meter.
+ Trying to register a callback with instruments from a different meter will result in an error being returned. (#3584)
+
+### Deprecated
+
+- The `NewMetricExporter` in `go.opentelemetry.io/otel/bridge/opencensus` is deprecated.
+ Use `NewMetricProducer` instead. (#3541)
+- The `go.opentelemetry.io/otel/metric/instrument/asyncfloat64` package is deprecated.
+ Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575)
+- The `go.opentelemetry.io/otel/metric/instrument/asyncint64` package is deprecated.
+ Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575)
+- The `go.opentelemetry.io/otel/metric/instrument/syncfloat64` package is deprecated.
+ Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575)
+- The `go.opentelemetry.io/otel/metric/instrument/syncint64` package is deprecated.
+ Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575)
+- The `NewWrappedTracerProvider` in `go.opentelemetry.io/otel/bridge/opentracing` is now deprecated.
+ Use `NewTracerProvider` instead. (#3116)
+
+### Removed
+
+- The deprecated `go.opentelemetry.io/otel/sdk/metric/view` package is removed. (#3520)
+- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/asyncint64` is removed.
+ Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530)
+ - The `Counter` method is replaced by `Meter.Int64ObservableCounter`
+ - The `UpDownCounter` method is replaced by `Meter.Int64ObservableUpDownCounter`
+ - The `Gauge` method is replaced by `Meter.Int64ObservableGauge`
+- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/asyncfloat64` is removed.
+ Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530)
+ - The `Counter` method is replaced by `Meter.Float64ObservableCounter`
+ - The `UpDownCounter` method is replaced by `Meter.Float64ObservableUpDownCounter`
+ - The `Gauge` method is replaced by `Meter.Float64ObservableGauge`
+- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/syncint64` is removed.
+ Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530)
+ - The `Counter` method is replaced by `Meter.Int64Counter`
+ - The `UpDownCounter` method is replaced by `Meter.Int64UpDownCounter`
+ - The `Histogram` method is replaced by `Meter.Int64Histogram`
+- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/syncfloat64` is removed.
+ Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530)
+ - The `Counter` method is replaced by `Meter.Float64Counter`
+ - The `UpDownCounter` method is replaced by `Meter.Float64UpDownCounter`
+ - The `Histogram` method is replaced by `Meter.Float64Histogram`
+
+## [1.11.2/0.34.0] 2022-12-05
+
+### Added
+
+- The `WithView` `Option` is added to the `go.opentelemetry.io/otel/sdk/metric` package.
+ This option is used to configure the view(s) a `MeterProvider` will use for all `Reader`s that are registered with it. (#3387)
+- Add Instrumentation Scope and Version as info metric and label in Prometheus exporter.
+ This can be disabled using the `WithoutScopeInfo()` option added to that package.(#3273, #3357)
+- OTLP exporters now recognize: (#3363)
+ - `OTEL_EXPORTER_OTLP_INSECURE`
+ - `OTEL_EXPORTER_OTLP_TRACES_INSECURE`
+ - `OTEL_EXPORTER_OTLP_METRICS_INSECURE`
+ - `OTEL_EXPORTER_OTLP_CLIENT_KEY`
+ - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY`
+ - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY`
+ - `OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE`
+ - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE`
+ - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE`
+- The `View` type and related `NewView` function to create a view according to the OpenTelemetry specification are added to `go.opentelemetry.io/otel/sdk/metric`.
+ These additions are replacements for the `View` type and `New` function from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459)
+- The `Instrument` and `InstrumentKind` type are added to `go.opentelemetry.io/otel/sdk/metric`.
+ These additions are replacements for the `Instrument` and `InstrumentKind` types from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459)
+- The `Stream` type is added to `go.opentelemetry.io/otel/sdk/metric` to define a metric data stream a view will produce. (#3459)
+- The `AssertHasAttributes` allows instrument authors to test that datapoints returned have appropriate attributes. (#3487)
+
+### Changed
+
+- The `"go.opentelemetry.io/otel/sdk/metric".WithReader` option no longer accepts views to associate with the `Reader`.
+ Instead, views are now registered directly with the `MeterProvider` via the new `WithView` option.
+ The views registered with the `MeterProvider` apply to all `Reader`s. (#3387)
+- The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `"go.opentelemetry.io/otel/sdk/metric".Exporter` interface. (#3260)
+- The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `"go.opentelemetry.io/otel/exporters/otlp/otlpmetric".Client` interface. (#3260)
+- The `WithTemporalitySelector` and `WithAggregationSelector` `ReaderOption`s have been changed to `ManualReaderOption`s in the `go.opentelemetry.io/otel/sdk/metric` package. (#3260)
+- The periodic reader in the `go.opentelemetry.io/otel/sdk/metric` package now uses the temporality and aggregation selectors from its configured exporter instead of accepting them as options. (#3260)
+
+### Fixed
+
+- The `go.opentelemetry.io/otel/exporters/prometheus` exporter fixes duplicated `_total` suffixes. (#3369)
+- Remove comparable requirement for `Reader`s. (#3387)
+- Cumulative metrics from the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) are defined as monotonic sums, instead of non-monotonic. (#3389)
+- Asynchronous counters (`Counter` and `UpDownCounter`) from the metric SDK now produce delta sums when configured with delta temporality. (#3398)
+- Exported `Status` codes in the `go.opentelemetry.io/otel/exporters/zipkin` exporter are now exported as all upper case values. (#3340)
+- `Aggregation`s from `go.opentelemetry.io/otel/sdk/metric` with no data are not exported. (#3394, #3436)
+- Re-enabled Attribute Filters in the Metric SDK. (#3396)
+- Asynchronous callbacks are only called if they are registered with at least one instrument that does not use drop aggregation. (#3408)
+- Do not report empty partial-success responses in the `go.opentelemetry.io/otel/exporters/otlp` exporters. (#3438, #3432)
+- Handle partial success responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` exporters. (#3162, #3440)
+- Prevent duplicate Prometheus description, unit, and type. (#3469)
+- Prevents panic when using incorrect `attribute.Value.As[Type]Slice()`. (#3489)
+
+### Removed
+
+- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.Client` interface is removed. (#3486)
+- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.New` function is removed. Use the `otlpmetric[http|grpc].New` directly. (#3486)
+
+### Deprecated
+
+- The `go.opentelemetry.io/otel/sdk/metric/view` package is deprecated.
+ Use `Instrument`, `InstrumentKind`, `View`, and `NewView` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3476)
+
+## [1.11.1/0.33.0] 2022-10-19
+
+### Added
+
+- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` registers with a Prometheus registerer on creation.
+ By default, it will register with the default Prometheus registerer.
+ A non-default registerer can be used by passing the `WithRegisterer` option. (#3239)
+- Added the `WithAggregationSelector` option to the `go.opentelemetry.io/otel/exporters/prometheus` package to change the default `AggregationSelector` used. (#3341)
+- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` converts the `Resource` associated with metric exports into a `target_info` metric. (#3285)
+
+### Changed
+
+- The `"go.opentelemetry.io/otel/exporters/prometheus".New` function is updated to return an error.
+ It will return an error if the exporter fails to register with Prometheus. (#3239)
+
+### Fixed
+
+- The URL-encoded values from the `OTEL_RESOURCE_ATTRIBUTES` environment variable are decoded. (#2963)
+- The `baggage.NewMember` function decodes the `value` parameter instead of directly using it.
+ This fixes the implementation to be compliant with the W3C specification. (#3226)
+- Slice attributes of the `attribute` package are now comparable based on their value, not instance. (#3108 #3252)
+- The `Shutdown` and `ForceFlush` methods of the `"go.opentelemetry.io/otel/sdk/trace".TraceProvider` no longer return an error when no processor is registered. (#3268)
+- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` cumulatively sums histogram buckets. (#3281)
+- The sum of each histogram data point is now uniquely exported by the `go.opentelemetry.io/otel/exporters/otlpmetric` exporters. (#3284, #3293)
+- Recorded values for asynchronous counters (`Counter` and `UpDownCounter`) are interpreted as exact, not incremental, sum values by the metric SDK. (#3350, #3278)
+- `UpDownCounters` are now correctly output as Prometheus gauges in the `go.opentelemetry.io/otel/exporters/prometheus` exporter. (#3358)
+- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` no longer describes the metrics it will send to Prometheus on startup.
+ Instead the exporter is defined as an "unchecked" collector for Prometheus.
+ This fixes the `reader is not registered` warning currently emitted on startup. (#3291 #3342)
+- The `go.opentelemetry.io/otel/exporters/prometheus` exporter now correctly adds `_total` suffixes to counter metrics. (#3360)
+- The `go.opentelemetry.io/otel/exporters/prometheus` exporter now adds a unit suffix to metric names.
+ This can be disabled using the `WithoutUnits()` option added to that package. (#3352)
+
+## [1.11.0/0.32.3] 2022-10-12
+
+### Added
+
+- Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlptrace/otlptracehttp`). (#3261)
+
+### Changed
+
+- `span.SetStatus` has been updated such that calls that lower the status are now no-ops. (#3214)
+- Upgrade `golang.org/x/sys/unix` from `v0.0.0-20210423185535-09eb48e85fd7` to `v0.0.0-20220919091848-fb04ddd9f9c8`.
+ This addresses [GO-2022-0493](https://pkg.go.dev/vuln/GO-2022-0493). (#3235)
+
+## [0.32.2] Metric SDK (Alpha) - 2022-10-11
+
+### Added
+
+- Added an example of using metric views to customize instruments. (#3177)
+- Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetrichttp`). (#3261)
+
+### Changed
+
+- Flush pending measurements with the `PeriodicReader` in the `go.opentelemetry.io/otel/sdk/metric` when `ForceFlush` or `Shutdown` are called. (#3220)
+- Update histogram default bounds to match the requirements of the latest specification. (#3222)
+- Encode the HTTP status code in the OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`) as an integer. (#3265)
+
+### Fixed
+
+- Use default view if instrument does not match any registered view of a reader. (#3224, #3237)
+- Return the same instrument every time a user makes the exact same instrument creation call. (#3229, #3251)
+- Return the existing instrument when a view transforms a creation call to match an existing instrument. (#3240, #3251)
+- Log a warning when a conflicting instrument (e.g. description, unit, data-type) is created instead of returning an error. (#3251)
+- The OpenCensus bridge no longer sends empty batches of metrics. (#3263)
+
+## [0.32.1] Metric SDK (Alpha) - 2022-09-22
+
+### Changed
+
+- The Prometheus exporter sanitizes OpenTelemetry instrument names when exporting.
+ Invalid characters are replaced with `_`. (#3212)
+
+### Added
+
+- The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been reintroduced. (#3192)
+- The OpenCensus bridge example (`go.opentelemetry.io/otel/example/opencensus`) has been reintroduced. (#3206)
+
+### Fixed
+
+- Updated go.mods to point to valid versions of the sdk. (#3216)
+- Set the `MeterProvider` resource on all exported metric data. (#3218)
+
+## [0.32.0] Revised Metric SDK (Alpha) - 2022-09-18
+
+### Changed
+
+- The metric SDK in `go.opentelemetry.io/otel/sdk/metric` is completely refactored to comply with the OpenTelemetry specification.
+ Please see the package documentation for how the new SDK is initialized and configured. (#3175)
+- Update the minimum supported go version to go1.18. Removes support for go1.17 (#3179)
+
+### Removed
+
+- The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been removed.
+ A new bridge compliant with the revised metric SDK will be added back in a future release. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/aggregator/histogram` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/aggregator/sum` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/aggregator` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/controller/basic` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/controller/controllertest` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/controller/time` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/export/aggregation` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/export` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/metrictest` package is removed.
+ A replacement package that supports the new metric SDK will be added back in a future release. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/number` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/processor/basic` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/processor/processortest` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/processor/reducer` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/registry` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/sdkapi` package is removed, see the new metric SDK. (#3175)
+- The `go.opentelemetry.io/otel/sdk/metric/selector/simple` package is removed, see the new metric SDK. (#3175)
+- The `"go.opentelemetry.io/otel/sdk/metric".ErrUninitializedInstrument` variable was removed. (#3175)
+- The `"go.opentelemetry.io/otel/sdk/metric".ErrBadInstrument` variable was removed. (#3175)
+- The `"go.opentelemetry.io/otel/sdk/metric".Accumulator` type was removed, see the `MeterProvider`in the new metric SDK. (#3175)
+- The `"go.opentelemetry.io/otel/sdk/metric".NewAccumulator` function was removed, see `NewMeterProvider`in the new metric SDK. (#3175)
+- The deprecated `"go.opentelemetry.io/otel/sdk/metric".AtomicFieldOffsets` function was removed. (#3175)
+
+## [1.10.0] - 2022-09-09
+
+### Added
+
+- Support Go 1.19. (#3077)
+ Include compatibility testing and document support. (#3077)
+- Support the OTLP ExportTracePartialSuccess response; these are passed to the registered error handler. (#3106)
+- Upgrade go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)
+
+### Changed
+
+- Fix misidentification of OpenTelemetry `SpanKind` in OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`). (#3096)
+- Attempting to start a span with a nil `context` will no longer cause a panic. (#3110)
+- All exporters will be shutdown even if one reports an error (#3091)
+- Ensure valid UTF-8 when truncating over-length attribute values. (#3156)
+
+## [1.9.0/0.0.3] - 2022-08-01
+
+### Added
+
+- Add support for Schema Files format 1.1.x (metric "split" transform) with the new `go.opentelemetry.io/otel/schema/v1.1` package. (#2999)
+- Add the `go.opentelemetry.io/otel/semconv/v1.11.0` package.
+ The package contains semantic conventions from the `v1.11.0` version of the OpenTelemetry specification. (#3009)
+- Add the `go.opentelemetry.io/otel/semconv/v1.12.0` package.
+ The package contains semantic conventions from the `v1.12.0` version of the OpenTelemetry specification. (#3010)
+- Add the `http.method` attribute to HTTP server metric from all `go.opentelemetry.io/otel/semconv/*` packages. (#3018)
+
+### Fixed
+
+- Invalid warning for context setup being deferred in `go.opentelemetry.io/otel/bridge/opentracing` package. (#3029)
+
+## [1.8.0/0.31.0] - 2022-07-08
+
+### Added
+
+- Add support for `opentracing.TextMap` format in the `Inject` and `Extract` methods
+of the `"go.opentelemetry.io/otel/bridge/opentracing".BridgeTracer` type. (#2911)
+
+### Changed
+
+- The `crosslink` make target has been updated to use the `go.opentelemetry.io/build-tools/crosslink` package. (#2886)
+- In the `go.opentelemetry.io/otel/sdk/instrumentation` package rename `Library` to `Scope` and alias `Library` as `Scope` (#2976)
+- Move metric no-op implementation form `nonrecording` to `metric` package. (#2866)
+
+### Removed
+
+- Support for go1.16. Support is now only for go1.17 and go1.18 (#2917)
+
+### Deprecated
+
+- The `Library` struct in the `go.opentelemetry.io/otel/sdk/instrumentation` package is deprecated.
+ Use the equivalent `Scope` struct instead. (#2977)
+- The `ReadOnlySpan.InstrumentationLibrary` method from the `go.opentelemetry.io/otel/sdk/trace` package is deprecated.
+ Use the equivalent `ReadOnlySpan.InstrumentationScope` method instead. (#2977)
+
+## [1.7.0/0.30.0] - 2022-04-28
+
+### Added
+
+- Add the `go.opentelemetry.io/otel/semconv/v1.8.0` package.
+ The package contains semantic conventions from the `v1.8.0` version of the OpenTelemetry specification. (#2763)
+- Add the `go.opentelemetry.io/otel/semconv/v1.9.0` package.
+ The package contains semantic conventions from the `v1.9.0` version of the OpenTelemetry specification. (#2792)
+- Add the `go.opentelemetry.io/otel/semconv/v1.10.0` package.
+ The package contains semantic conventions from the `v1.10.0` version of the OpenTelemetry specification. (#2842)
+- Added an in-memory exporter to metrictest to aid testing with a full SDK. (#2776)
+
+### Fixed
+
+- Globally delegated instruments are unwrapped before delegating asynchronous callbacks. (#2784)
+- Remove import of `testing` package in non-tests builds of the `go.opentelemetry.io/otel` package. (#2786)
+
+### Changed
+
+- The `WithLabelEncoder` option from the `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` package is renamed to `WithAttributeEncoder`. (#2790)
+- The `LabelFilterSelector` interface from `go.opentelemetry.io/otel/sdk/metric/processor/reducer` is renamed to `AttributeFilterSelector`.
+ The method included in the renamed interface also changed from `LabelFilterFor` to `AttributeFilterFor`. (#2790)
+- The `Metadata.Labels` method from the `go.opentelemetry.io/otel/sdk/metric/export` package is renamed to `Metadata.Attributes`.
+ Consequentially, the `Record` type from the same package also has had the embedded method renamed. (#2790)
+
+### Deprecated
+
+- The `Iterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated.
+ Use the equivalent `Iterator.Attribute` method instead. (#2790)
+- The `Iterator.IndexedLabel` method in the `go.opentelemetry.io/otel/attribute` package is deprecated.
+ Use the equivalent `Iterator.IndexedAttribute` method instead. (#2790)
+- The `MergeIterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated.
+ Use the equivalent `MergeIterator.Attribute` method instead. (#2790)
+
+### Removed
+
+- Removed the `Batch` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864)
+- Removed the `Measurement` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864)
+
+## [0.29.0] - 2022-04-11
+
+### Added
+
+- The metrics global package was added back into several test files. (#2764)
+- The `Meter` function is added back to the `go.opentelemetry.io/otel/metric/global` package.
+ This function is a convenience function equivalent to calling `global.MeterProvider().Meter(...)`. (#2750)
+
+### Removed
+
+- Removed module the `go.opentelemetry.io/otel/sdk/export/metric`.
+ Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2720)
+
+### Changed
+
+- Don't panic anymore when setting a global MeterProvider to itself. (#2749)
+- Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` from `v0.12.1` to `v0.15.0`.
+ This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibraryMetrics` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeMetrics`. (#2748)
+
+## [1.6.3] - 2022-04-07
+
+### Fixed
+
+- Allow non-comparable global `MeterProvider`, `TracerProvider`, and `TextMapPropagator` types to be set. (#2772, #2773)
+
+## [1.6.2] - 2022-04-06
+
+### Changed
+
+- Don't panic anymore when setting a global TracerProvider or TextMapPropagator to itself. (#2749)
+- Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from `v0.12.1` to `v0.15.0`.
+ This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibrarySpans` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeSpans`. (#2748)
+
+## [1.6.1] - 2022-03-28
+
+### Fixed
+
+- The `go.opentelemetry.io/otel/schema/*` packages now use the correct schema URL for their `SchemaURL` constant.
+ Instead of using `"https://opentelemetry.io/schemas/v"` they now use the correct URL without a `v` prefix, `"https://opentelemetry.io/schemas/"`. (#2743, #2744)
+
+### Security
+
+- Upgrade `go.opentelemetry.io/proto/otlp` from `v0.12.0` to `v0.12.1`.
+ This includes an indirect upgrade of `github.com/grpc-ecosystem/grpc-gateway` which resolves [a vulnerability](https://nvd.nist.gov/vuln/detail/CVE-2019-11254) from `gopkg.in/yaml.v2` in version `v2.2.3`. (#2724, #2728)
+
+## [1.6.0/0.28.0] - 2022-03-23
+
+### âš ï¸ Notice âš ï¸
+
+This update is a breaking change of the unstable Metrics API.
+Code instrumented with the `go.opentelemetry.io/otel/metric` will need to be modified.
+
+### Added
+
+- Add metrics exponential histogram support.
+ New mapping functions have been made available in `sdk/metric/aggregator/exponential/mapping` for other OpenTelemetry projects to take dependencies on. (#2502)
+- Add Go 1.18 to our compatibility tests. (#2679)
+- Allow configuring the Sampler with the `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG` environment variables. (#2305, #2517)
+- Add the `metric/global` for obtaining and setting the global `MeterProvider`. (#2660)
+
+### Changed
+
+- The metrics API has been significantly changed to match the revised OpenTelemetry specification.
+ High-level changes include:
+
+ - Synchronous and asynchronous instruments are now handled by independent `InstrumentProvider`s.
+ These `InstrumentProvider`s are managed with a `Meter`.
+ - Synchronous and asynchronous instruments are grouped into their own packages based on value types.
+ - Asynchronous callbacks can now be registered with a `Meter`.
+
+ Be sure to check out the metric module documentation for more information on how to use the revised API. (#2587, #2660)
+
+### Fixed
+
+- Fallback to general attribute limits when span specific ones are not set in the environment. (#2675, #2677)
+
+## [1.5.0] - 2022-03-16
+
+### Added
+
+- Log the Exporters configuration in the TracerProviders message. (#2578)
+- Added support to configure the span limits with environment variables.
+ The following environment variables are supported. (#2606, #2637)
+ - `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT`
+ - `OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT`
+ - `OTEL_SPAN_EVENT_COUNT_LIMIT`
+ - `OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT`
+ - `OTEL_SPAN_LINK_COUNT_LIMIT`
+ - `OTEL_LINK_ATTRIBUTE_COUNT_LIMIT`
+
+ If the provided environment variables are invalid (negative), the default values would be used.
+- Rename the `gc` runtime name to `go` (#2560)
+- Add resource container ID detection. (#2418)
+- Add span attribute value length limit.
+ The new `AttributeValueLengthLimit` field is added to the `"go.opentelemetry.io/otel/sdk/trace".SpanLimits` type to configure this limit for a `TracerProvider`.
+ The default limit for this resource is "unlimited". (#2637)
+- Add the `WithRawSpanLimits` option to `go.opentelemetry.io/otel/sdk/trace`.
+ This option replaces the `WithSpanLimits` option.
+ Zero or negative values will not be changed to the default value like `WithSpanLimits` does.
+ Setting a limit to zero will effectively disable the related resource it limits and setting to a negative value will mean that resource is unlimited.
+ Consequentially, limits should be constructed using `NewSpanLimits` and updated accordingly. (#2637)
+
+### Changed
+
+- Drop oldest tracestate `Member` when capacity is reached. (#2592)
+- Add event and link drop counts to the exported data from the `oltptrace` exporter. (#2601)
+- Unify path cleaning functionally in the `otlpmetric` and `otlptrace` configuration. (#2639)
+- Change the debug message from the `sdk/trace.BatchSpanProcessor` to reflect the count is cumulative. (#2640)
+- Introduce new internal `envconfig` package for OTLP exporters. (#2608)
+- If `http.Request.Host` is empty, fall back to use `URL.Host` when populating `http.host` in the `semconv` packages. (#2661)
+
+### Fixed
+
+- Remove the OTLP trace exporter limit of SpanEvents when exporting. (#2616)
+- Default to port `4318` instead of `4317` for the `otlpmetrichttp` and `otlptracehttp` client. (#2614, #2625)
+- Unlimited span limits are now supported (negative values). (#2636, #2637)
+
+### Deprecated
+
+- Deprecated `"go.opentelemetry.io/otel/sdk/trace".WithSpanLimits`.
+ Use `WithRawSpanLimits` instead.
+ That option allows setting unlimited and zero limits, this option does not.
+ This option will be kept until the next major version incremented release. (#2637)
+
+## [1.4.1] - 2022-02-16
+
+### Fixed
+
+- Fix race condition in reading the dropped spans number for the `BatchSpanProcessor`. (#2615)
+
+## [1.4.0] - 2022-02-11
+
+### Added
+
+- Use `OTEL_EXPORTER_ZIPKIN_ENDPOINT` environment variable to specify zipkin collector endpoint. (#2490)
+- Log the configuration of `TracerProvider`s, and `Tracer`s for debugging.
+ To enable use a logger with Verbosity (V level) `>=1`. (#2500)
+- Added support to configure the batch span-processor with environment variables.
+ The following environment variables are used. (#2515)
+ - `OTEL_BSP_SCHEDULE_DELAY`
+ - `OTEL_BSP_EXPORT_TIMEOUT`
+ - `OTEL_BSP_MAX_QUEUE_SIZE`.
+ - `OTEL_BSP_MAX_EXPORT_BATCH_SIZE`
+
+### Changed
+
+- Zipkin exporter exports `Resource` attributes in the `Tags` field. (#2589)
+
+### Deprecated
+
+- Deprecate module the `go.opentelemetry.io/otel/sdk/export/metric`.
+ Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2382)
+- Deprecate `"go.opentelemetry.io/otel/sdk/metric".AtomicFieldOffsets`. (#2445)
+
+### Fixed
+
+- Fixed the instrument kind for noop async instruments to correctly report an implementation. (#2461)
+- Fix UDP packets overflowing with Jaeger payloads. (#2489, #2512)
+- Change the `otlpmetric.Client` interface's `UploadMetrics` method to accept a single `ResourceMetrics` instead of a slice of them. (#2491)
+- Specify explicit buckets in Prometheus example, fixing issue where example only has `+inf` bucket. (#2419, #2493)
+- W3C baggage will now decode urlescaped values. (#2529)
+- Baggage members are now only validated once, when calling `NewMember` and not also when adding it to the baggage itself. (#2522)
+- The order attributes are dropped from spans in the `go.opentelemetry.io/otel/sdk/trace` package when capacity is reached is fixed to be in compliance with the OpenTelemetry specification.
+ Instead of dropping the least-recently-used attribute, the last added attribute is dropped.
+ This drop order still only applies to attributes with unique keys not already contained in the span.
+ If an attribute is added with a key already contained in the span, that attribute is updated to the new value being added. (#2576)
+
+### Removed
+
+- Updated `go.opentelemetry.io/proto/otlp` from `v0.11.0` to `v0.12.0`. This version removes a number of deprecated methods. (#2546)
+ - [`Metric.GetIntGauge()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntGauge)
+ - [`Metric.GetIntHistogram()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntHistogram)
+ - [`Metric.GetIntSum()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntSum)
+
+## [1.3.0] - 2021-12-10
+
+### âš ï¸ Notice âš ï¸
+
+We have updated the project minimum supported Go version to 1.16
+
+### Added
+
+- Added an internal Logger.
+ This can be used by the SDK and API to provide users with feedback of the internal state.
+ To enable verbose logs configure the logger which will print V(1) logs. For debugging information configure to print V(5) logs. (#2343)
+- Add the `WithRetry` `Option` and the `RetryConfig` type to the `go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp` package to specify retry behavior consistently. (#2425)
+- Add `SpanStatusFromHTTPStatusCodeAndSpanKind` to all `semconv` packages to return a span status code similar to `SpanStatusFromHTTPStatusCode`, but exclude `4XX` HTTP errors as span errors if the span is of server kind. (#2296)
+
+### Changed
+
+- The `"go.opentelemetry.io/otel/exporter/otel/otlptrace/otlptracegrpc".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2329)
+- The `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2425)
+- The `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc".RetrySettings` type is renamed to `RetryConfig`. (#2425)
+- The `go.opentelemetry.io/otel/exporter/otel/*` gRPC exporters now default to using the host's root CA set if none are provided by the user and `WithInsecure` is not specified. (#2432)
+- Change `resource.Default` to be evaluated the first time it is called, rather than on import. This allows the caller the option to update `OTEL_RESOURCE_ATTRIBUTES` first, such as with `os.Setenv`. (#2371)
+
+### Fixed
+
+- The `go.opentelemetry.io/otel/exporter/otel/*` exporters are updated to handle per-signal and universal endpoints according to the OpenTelemetry specification.
+ Any per-signal endpoint set via an `OTEL_EXPORTER_OTLP__ENDPOINT` environment variable is now used without modification of the path.
+ When `OTEL_EXPORTER_OTLP_ENDPOINT` is set, if it contains a path, that path is used as a base path which per-signal paths are appended to. (#2433)
+- Basic metric controller updated to use sync.Map to avoid blocking calls (#2381)
+- The `go.opentelemetry.io/otel/exporter/jaeger` correctly sets the `otel.status_code` value to be a string of `ERROR` or `OK` instead of an integer code. (#2439, #2440)
+
+### Deprecated
+
+- Deprecated the `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp".WithMaxAttempts` `Option`, use the new `WithRetry` `Option` instead. (#2425)
+- Deprecated the `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp".WithBackoff` `Option`, use the new `WithRetry` `Option` instead. (#2425)
+
+### Removed
+
+- Remove the metric Processor's ability to convert cumulative to delta aggregation temporality. (#2350)
+- Remove the metric Bound Instruments interface and implementations. (#2399)
+- Remove the metric MinMaxSumCount kind aggregation and the corresponding OTLP export path. (#2423)
+- Metric SDK removes the "exact" aggregator for histogram instruments, as it performed a non-standard aggregation for OTLP export (creating repeated Gauge points) and worked its way into a number of confusing examples. (#2348)
+
+## [1.2.0] - 2021-11-12
+
+### Changed
+
+- Metric SDK `export.ExportKind`, `export.ExportKindSelector` types have been renamed to `aggregation.Temporality` and `aggregation.TemporalitySelector` respectively to keep in line with current specification and protocol along with built-in selectors (e.g., `aggregation.CumulativeTemporalitySelector`, ...). (#2274)
+- The Metric `Exporter` interface now requires a `TemporalitySelector` method instead of an `ExportKindSelector`. (#2274)
+- Metrics API cleanup. The `metric/sdkapi` package has been created to relocate the API-to-SDK interface:
+ - The following interface types simply moved from `metric` to `metric/sdkapi`: `Descriptor`, `MeterImpl`, `InstrumentImpl`, `SyncImpl`, `BoundSyncImpl`, `AsyncImpl`, `AsyncRunner`, `AsyncSingleRunner`, and `AsyncBatchRunner`
+ - The following struct types moved and are replaced with type aliases, since they are exposed to the user: `Observation`, `Measurement`.
+ - The No-op implementations of sync and async instruments are no longer exported, new functions `sdkapi.NewNoopAsyncInstrument()` and `sdkapi.NewNoopSyncInstrument()` are provided instead. (#2271)
+- Update the SDK `BatchSpanProcessor` to export all queued spans when `ForceFlush` is called. (#2080, #2335)
+
+### Added
+
+- Add the `"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002)
+- Added a new `schema` module to help parse Schema Files in OTEP 0152 format. (#2267)
+- Added a new `MapCarrier` to the `go.opentelemetry.io/otel/propagation` package to hold propagated cross-cutting concerns as a `map[string]string` held in memory. (#2334)
+
+## [1.1.0] - 2021-10-27
+
+### Added
+
+- Add the `"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002)
+- Add the `go.opentelemetry.io/otel/semconv/v1.7.0` package.
+ The package contains semantic conventions from the `v1.7.0` version of the OpenTelemetry specification. (#2320)
+- Add the `go.opentelemetry.io/otel/semconv/v1.6.1` package.
+ The package contains semantic conventions from the `v1.6.1` version of the OpenTelemetry specification. (#2321)
+- Add the `go.opentelemetry.io/otel/semconv/v1.5.0` package.
+ The package contains semantic conventions from the `v1.5.0` version of the OpenTelemetry specification. (#2322)
+ - When upgrading from the `semconv/v1.4.0` package note the following name changes:
+ - `K8SReplicasetUIDKey` -> `K8SReplicaSetUIDKey`
+ - `K8SReplicasetNameKey` -> `K8SReplicaSetNameKey`
+ - `K8SStatefulsetUIDKey` -> `K8SStatefulSetUIDKey`
+ - `k8SStatefulsetNameKey` -> `K8SStatefulSetNameKey`
+ - `K8SDaemonsetUIDKey` -> `K8SDaemonSetUIDKey`
+ - `K8SDaemonsetNameKey` -> `K8SDaemonSetNameKey`
+
+### Changed
+
+- Links added to a span will be dropped by the SDK if they contain an invalid span context (#2275).
+
+### Fixed
+
+- The `"go.opentelemetry.io/otel/semconv/v1.4.0".HTTPServerAttributesFromHTTPRequest` now correctly only sets the HTTP client IP attribute even if the connection was routed with proxies and there are multiple addresses in the `X-Forwarded-For` header. (#2282, #2284)
+- The `"go.opentelemetry.io/otel/semconv/v1.4.0".NetAttributesFromHTTPRequest` function correctly handles IPv6 addresses as IP addresses and sets the correct net peer IP instead of the net peer hostname attribute. (#2283, #2285)
+- The simple span processor shutdown method deterministically returns the exporter error status if it simultaneously finishes when the deadline is reached. (#2290, #2289)
+
+## [1.0.1] - 2021-10-01
+
+### Fixed
+
+- json stdout exporter no longer crashes due to concurrency bug. (#2265)
+
+## [Metrics 0.24.0] - 2021-10-01
+
+### Changed
+
+- NoopMeterProvider is now private and NewNoopMeterProvider must be used to obtain a noopMeterProvider. (#2237)
+- The Metric SDK `Export()` function takes a new two-level reader interface for iterating over results one instrumentation library at a time. (#2197)
+ - The former `"go.opentelemetry.io/otel/sdk/export/metric".CheckpointSet` is renamed `Reader`.
+ - The new interface is named `"go.opentelemetry.io/otel/sdk/export/metric".InstrumentationLibraryReader`.
+
+## [1.0.0] - 2021-09-20
+
+This is the first stable release for the project.
+This release includes an API and SDK for the tracing signal that will comply with the stability guarantees defined by the projects [versioning policy](./VERSIONING.md).
+
+### Added
+
+- OTLP trace exporter now sets the `SchemaURL` field in the exported telemetry if the Tracer has `WithSchemaURL` option. (#2242)
+
+### Fixed
+
+- Slice-valued attributes can correctly be used as map keys. (#2223)
+
+### Removed
+
+- Removed the `"go.opentelemetry.io/otel/exporters/zipkin".WithSDKOptions` function. (#2248)
+- Removed the deprecated package `go.opentelemetry.io/otel/oteltest`. (#2234)
+- Removed the deprecated package `go.opentelemetry.io/otel/bridge/opencensus/utils`. (#2233)
+- Removed deprecated functions, types, and methods from `go.opentelemetry.io/otel/attribute` package.
+ Use the typed functions and methods added to the package instead. (#2235)
+ - The `Key.Array` method is removed.
+ - The `Array` function is removed.
+ - The `Any` function is removed.
+ - The `ArrayValue` function is removed.
+ - The `AsArray` function is removed.
+
+## [1.0.0-RC3] - 2021-09-02
+
+### Added
+
+- Added `ErrorHandlerFunc` to use a function as an `"go.opentelemetry.io/otel".ErrorHandler`. (#2149)
+- Added `"go.opentelemetry.io/otel/trace".WithStackTrace` option to add a stack trace when using `span.RecordError` or when panic is handled in `span.End`. (#2163)
+- Added typed slice attribute types and functionality to the `go.opentelemetry.io/otel/attribute` package to replace the existing array type and functions. (#2162)
+ - `BoolSlice`, `IntSlice`, `Int64Slice`, `Float64Slice`, and `StringSlice` replace the use of the `Array` function in the package.
+- Added the `go.opentelemetry.io/otel/example/fib` example package.
+ Included is an example application that computes Fibonacci numbers. (#2203)
+
+### Changed
+
+- Metric instruments have been renamed to match the (feature-frozen) metric API specification:
+ - ValueRecorder becomes Histogram
+ - ValueObserver becomes Gauge
+ - SumObserver becomes CounterObserver
+ - UpDownSumObserver becomes UpDownCounterObserver
+ The API exported from this project is still considered experimental. (#2202)
+- Metric SDK/API implementation type `InstrumentKind` moves into `sdkapi` sub-package. (#2091)
+- The Metrics SDK export record no longer contains a Resource pointer, the SDK `"go.opentelemetry.io/otel/sdk/trace/export/metric".Exporter.Export()` function for push-based exporters now takes a single Resource argument, pull-based exporters use `"go.opentelemetry.io/otel/sdk/metric/controller/basic".Controller.Resource()`. (#2120)
+- The JSON output of the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` is harmonized now such that the output is "plain" JSON objects after each other of the form `{ ... } { ... } { ... }`. Earlier the JSON objects describing a span were wrapped in a slice for each `Exporter.ExportSpans` call, like `[ { ... } ][ { ... } { ... } ]`. Outputting JSON object directly after each other is consistent with JSON loggers, and a bit easier to parse and read. (#2196)
+- Update the `NewTracerConfig`, `NewSpanStartConfig`, `NewSpanEndConfig`, and `NewEventConfig` function in the `go.opentelemetry.io/otel/trace` package to return their respective configurations as structs instead of pointers to the struct. (#2212)
+
+### Deprecated
+
+- The `go.opentelemetry.io/otel/bridge/opencensus/utils` package is deprecated.
+ All functionality from this package now exists in the `go.opentelemetry.io/otel/bridge/opencensus` package.
+ The functions from that package should be used instead. (#2166)
+- The `"go.opentelemetry.io/otel/attribute".Array` function and the related `ARRAY` value type is deprecated.
+ Use the typed `*Slice` functions and types added to the package instead. (#2162)
+- The `"go.opentelemetry.io/otel/attribute".Any` function is deprecated.
+ Use the typed functions instead. (#2181)
+- The `go.opentelemetry.io/otel/oteltest` package is deprecated.
+ The `"go.opentelemetry.io/otel/sdk/trace/tracetest".SpanRecorder` can be registered with the default SDK (`go.opentelemetry.io/otel/sdk/trace`) as a `SpanProcessor` and used as a replacement for this deprecated package. (#2188)
+
+### Removed
+
+- Removed metrics test package `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#2105)
+
+### Fixed
+
+- The `fromEnv` detector no longer throws an error when `OTEL_RESOURCE_ATTRIBUTES` environment variable is not set or empty. (#2138)
+- Setting the global `ErrorHandler` with `"go.opentelemetry.io/otel".SetErrorHandler` multiple times is now supported. (#2160, #2140)
+- The `"go.opentelemetry.io/otel/attribute".Any` function now supports `int32` values. (#2169)
+- Multiple calls to `"go.opentelemetry.io/otel/sdk/metric/controller/basic".WithResource()` are handled correctly, and when no resources are provided `"go.opentelemetry.io/otel/sdk/resource".Default()` is used. (#2120)
+- The `WithoutTimestamps` option for the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter causes the exporter to correctly omit timestamps. (#2195)
+- Fixed typos in resources.go. (#2201)
+
+## [1.0.0-RC2] - 2021-07-26
+
+### Added
+
+- Added `WithOSDescription` resource configuration option to set OS (Operating System) description resource attribute (`os.description`). (#1840)
+- Added `WithOS` resource configuration option to set all OS (Operating System) resource attributes at once. (#1840)
+- Added the `WithRetry` option to the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package.
+ This option is a replacement for the removed `WithMaxAttempts` and `WithBackoff` options. (#2095)
+- Added API `LinkFromContext` to return Link which encapsulates SpanContext from provided context and also encapsulates attributes. (#2115)
+- Added a new `Link` type under the SDK `otel/sdk/trace` package that counts the number of attributes that were dropped for surpassing the `AttributePerLinkCountLimit` configured in the Span's `SpanLimits`.
+ This new type replaces the equal-named API `Link` type found in the `otel/trace` package for most usages within the SDK.
+ For example, instances of this type are now returned by the `Links()` function of `ReadOnlySpan`s provided in places like the `OnEnd` function of `SpanProcessor` implementations. (#2118)
+- Added the `SpanRecorder` type to the `go.opentelemetry.io/otel/skd/trace/tracetest` package.
+ This type can be used with the default SDK as a `SpanProcessor` during testing. (#2132)
+
+### Changed
+
+- The `SpanModels` function is now exported from the `go.opentelemetry.io/otel/exporters/zipkin` package to convert OpenTelemetry spans into Zipkin model spans. (#2027)
+- Rename the `"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc".RetrySettings` to `RetryConfig`. (#2095)
+
+### Deprecated
+
+- The `TextMapCarrier` and `TextMapPropagator` from the `go.opentelemetry.io/otel/oteltest` package and their associated creation functions (`TextMapCarrier`, `NewTextMapPropagator`) are deprecated. (#2114)
+- The `Harness` type from the `go.opentelemetry.io/otel/oteltest` package and its associated creation function, `NewHarness` are deprecated and will be removed in the next release. (#2123)
+- The `TraceStateFromKeyValues` function from the `go.opentelemetry.io/otel/oteltest` package is deprecated.
+ Use the `trace.ParseTraceState` function instead. (#2122)
+
+### Removed
+
+- Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/jaeger`. (#2020)
+- Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/zipkin`. (#2020)
+- Removed the `"go.opentelemetry.io/otel/sdk/resource".WithBuiltinDetectors` function.
+ The explicit `With*` options for every built-in detector should be used instead. (#2026 #2097)
+- Removed the `WithMaxAttempts` and `WithBackoff` options from the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package.
+ The retry logic of the package has been updated to match the `otlptracegrpc` package and accordingly a `WithRetry` option is added that should be used instead. (#2095)
+- Removed `DroppedAttributeCount` field from `otel/trace.Link` struct. (#2118)
+
+### Fixed
+
+- When using WithNewRoot, don't use the parent context for making sampling decisions. (#2032)
+- `oteltest.Tracer` now creates a valid `SpanContext` when using `WithNewRoot`. (#2073)
+- OS type detector now sets the correct `dragonflybsd` value for DragonFly BSD. (#2092)
+- The OTel span status is correctly transformed into the OTLP status in the `go.opentelemetry.io/otel/exporters/otlp/otlptrace` package.
+ This fix will by default set the status to `Unset` if it is not explicitly set to `Ok` or `Error`. (#2099 #2102)
+- The `Inject` method for the `"go.opentelemetry.io/otel/propagation".TraceContext` type no longer injects empty `tracestate` values. (#2108)
+- Use `6831` as default Jaeger agent port instead of `6832`. (#2131)
+
+## [Experimental Metrics v0.22.0] - 2021-07-19
+
+### Added
+
+- Adds HTTP support for OTLP metrics exporter. (#2022)
+
+### Removed
+
+- Removed the deprecated package `go.opentelemetry.io/otel/exporters/metric/prometheus`. (#2020)
+
+## [1.0.0-RC1] / 0.21.0 - 2021-06-18
+
+With this release we are introducing a split in module versions. The tracing API and SDK are entering the `v1.0.0` Release Candidate phase with `v1.0.0-RC1`
+while the experimental metrics API and SDK continue with `v0.x` releases at `v0.21.0`. Modules at major version 1 or greater will not depend on modules
+with major version 0.
+
+### Added
+
+- Adds `otlpgrpc.WithRetry`option for configuring the retry policy for transient errors on the otlp/gRPC exporter. (#1832)
+ - The following status codes are defined as transient errors:
+ | gRPC Status Code | Description |
+ | ---------------- | ----------- |
+ | 1 | Cancelled |
+ | 4 | Deadline Exceeded |
+ | 8 | Resource Exhausted |
+ | 10 | Aborted |
+ | 10 | Out of Range |
+ | 14 | Unavailable |
+ | 15 | Data Loss |
+- Added `Status` type to the `go.opentelemetry.io/otel/sdk/trace` package to represent the status of a span. (#1874)
+- Added `SpanStub` type and its associated functions to the `go.opentelemetry.io/otel/sdk/trace/tracetest` package.
+ This type can be used as a testing replacement for the `SpanSnapshot` that was removed from the `go.opentelemetry.io/otel/sdk/trace` package. (#1873)
+- Adds support for scheme in `OTEL_EXPORTER_OTLP_ENDPOINT` according to the spec. (#1886)
+- Adds `trace.WithSchemaURL` option for configuring the tracer with a Schema URL. (#1889)
+- Added an example of using OpenTelemetry Go as a trace context forwarder. (#1912)
+- `ParseTraceState` is added to the `go.opentelemetry.io/otel/trace` package.
+ It can be used to decode a `TraceState` from a `tracestate` header string value. (#1937)
+- Added `Len` method to the `TraceState` type in the `go.opentelemetry.io/otel/trace` package.
+ This method returns the number of list-members the `TraceState` holds. (#1937)
+- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace` that defines a trace exporter that uses a `otlptrace.Client` to send data.
+ Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` implementing a gRPC `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing .(#1922)
+- Added `Baggage`, `Member`, and `Property` types to the `go.opentelemetry.io/otel/baggage` package along with their related functions. (#1967)
+- Added `ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext` functions to the `go.opentelemetry.io/otel/baggage` package.
+ These functions replace the `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions from that package and directly work with the new `Baggage` type. (#1967)
+- The `OTEL_SERVICE_NAME` environment variable is the preferred source for `service.name`, used by the environment resource detector if a service name is present both there and in `OTEL_RESOURCE_ATTRIBUTES`. (#1969)
+- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` implementing an HTTP `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing. (#1963)
+- Changes `go.opentelemetry.io/otel/sdk/resource.NewWithAttributes` to require a schema URL. The old function is still available as `resource.NewSchemaless`. This is a breaking change. (#1938)
+- Several builtin resource detectors now correctly populate the schema URL. (#1938)
+- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` that defines a metrics exporter that uses a `otlpmetric.Client` to send data.
+- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` implementing a gRPC `otlpmetric.Client` and offers convenience functions, `New` and `NewUnstarted`, to create an `otlpmetric.Exporter`.(#1991)
+- Added `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter. (#2005)
+- Added `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` exporter. (#2005)
+- Added a `TracerProvider()` method to the `"go.opentelemetry.io/otel/trace".Span` interface. This can be used to obtain a `TracerProvider` from a given span that utilizes the same trace processing pipeline. (#2009)
+
+### Changed
+
+- Make `NewSplitDriver` from `go.opentelemetry.io/otel/exporters/otlp` take variadic arguments instead of a `SplitConfig` item.
+ `NewSplitDriver` now automatically implements an internal `noopDriver` for `SplitConfig` fields that are not initialized. (#1798)
+- `resource.New()` now creates a Resource without builtin detectors. Previous behavior is now achieved by using `WithBuiltinDetectors` Option. (#1810)
+- Move the `Event` type from the `go.opentelemetry.io/otel` package to the `go.opentelemetry.io/otel/sdk/trace` package. (#1846)
+- CI builds validate against last two versions of Go, dropping 1.14 and adding 1.16. (#1865)
+- BatchSpanProcessor now report export failures when calling `ForceFlush()` method. (#1860)
+- `Set.Encoded(Encoder)` no longer caches the result of an encoding. (#1855)
+- Renamed `CloudZoneKey` to `CloudAvailabilityZoneKey` in Resource semantic conventions according to spec. (#1871)
+- The `StatusCode` and `StatusMessage` methods of the `ReadOnlySpan` interface and the `Span` produced by the `go.opentelemetry.io/otel/sdk/trace` package have been replaced with a single `Status` method.
+ This method returns the status of a span using the new `Status` type. (#1874)
+- Updated `ExportSpans` method of the`SpanExporter` interface type to accept `ReadOnlySpan`s instead of the removed `SpanSnapshot`.
+ This brings the export interface into compliance with the specification in that it now accepts an explicitly immutable type instead of just an implied one. (#1873)
+- Unembed `SpanContext` in `Link`. (#1877)
+- Generate Semantic conventions from the specification YAML. (#1891)
+- Spans created by the global `Tracer` obtained from `go.opentelemetry.io/otel`, prior to a functioning `TracerProvider` being set, now propagate the span context from their parent if one exists. (#1901)
+- The `"go.opentelemetry.io/otel".Tracer` function now accepts tracer options. (#1902)
+- Move the `go.opentelemetry.io/otel/unit` package to `go.opentelemetry.io/otel/metric/unit`. (#1903)
+- Changed `go.opentelemetry.io/otel/trace.TracerConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config.) (#1921)
+- Changed `go.opentelemetry.io/otel/trace.SpanConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921)
+- Changed `span.End()` now only accepts Options that are allowed at `End()`. (#1921)
+- Changed `go.opentelemetry.io/otel/metric.InstrumentConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921)
+- Changed `go.opentelemetry.io/otel/metric.MeterConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921)
+- Refactored option types according to the contribution style guide. (#1882)
+- Move the `go.opentelemetry.io/otel/trace.TraceStateFromKeyValues` function to the `go.opentelemetry.io/otel/oteltest` package.
+ This function is preserved for testing purposes where it may be useful to create a `TraceState` from `attribute.KeyValue`s, but it is not intended for production use.
+ The new `ParseTraceState` function should be used to create a `TraceState`. (#1931)
+- Updated `MarshalJSON` method of the `go.opentelemetry.io/otel/trace.TraceState` type to marshal the type into the string representation of the `TraceState`. (#1931)
+- The `TraceState.Delete` method from the `go.opentelemetry.io/otel/trace` package no longer returns an error in addition to a `TraceState`. (#1931)
+- Updated `Get` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931)
+- Updated `Insert` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a pair of `string`s instead of an `attribute.KeyValue` type. (#1931)
+- Updated `Delete` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931)
+- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/stdout` package. (#1985)
+- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/metric/prometheus` package. (#1985)
+- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1985)
+- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1985)
+- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985)
+- Renamed `NewUnstartedExporter` to `NewUnstarted` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985)
+- The `go.opentelemetry.io/otel/semconv` package has been moved to `go.opentelemetry.io/otel/semconv/v1.4.0` to allow for multiple [telemetry schema](https://github.com/open-telemetry/oteps/blob/main/text/0152-telemetry-schemas.md) versions to be used concurrently. (#1987)
+- Metrics test helpers in `go.opentelemetry.io/otel/oteltest` have been moved to `go.opentelemetry.io/otel/metric/metrictest`. (#1988)
+
+### Deprecated
+
+- The `go.opentelemetry.io/otel/exporters/metric/prometheus` is deprecated, use `go.opentelemetry.io/otel/exporters/prometheus` instead. (#1993)
+- The `go.opentelemetry.io/otel/exporters/trace/jaeger` is deprecated, use `go.opentelemetry.io/otel/exporters/jaeger` instead. (#1993)
+- The `go.opentelemetry.io/otel/exporters/trace/zipkin` is deprecated, use `go.opentelemetry.io/otel/exporters/zipkin` instead. (#1993)
+
+### Removed
+
+- Removed `resource.WithoutBuiltin()`. Use `resource.New()`. (#1810)
+- Unexported types `resource.FromEnv`, `resource.Host`, and `resource.TelemetrySDK`, Use the corresponding `With*()` to use individually. (#1810)
+- Removed the `Tracer` and `IsRecording` method from the `ReadOnlySpan` in the `go.opentelemetry.io/otel/sdk/trace`.
+ The `Tracer` method is not a required to be included in this interface and given the mutable nature of the tracer that is associated with a span, this method is not appropriate.
+ The `IsRecording` method returns if the span is recording or not.
+ A read-only span value does not need to know if updates to it will be recorded or not.
+ By definition, it cannot be updated so there is no point in communicating if an update is recorded. (#1873)
+- Removed the `SpanSnapshot` type from the `go.opentelemetry.io/otel/sdk/trace` package.
+ The use of this type has been replaced with the use of the explicitly immutable `ReadOnlySpan` type.
+ When a concrete representation of a read-only span is needed for testing, the newly added `SpanStub` in the `go.opentelemetry.io/otel/sdk/trace/tracetest` package should be used. (#1873)
+- Removed the `Tracer` method from the `Span` interface in the `go.opentelemetry.io/otel/trace` package.
+ Using the same tracer that created a span introduces the error where an instrumentation library's `Tracer` is used by other code instead of their own.
+ The `"go.opentelemetry.io/otel".Tracer` function or a `TracerProvider` should be used to acquire a library specific `Tracer` instead. (#1900)
+ - The `TracerProvider()` method on the `Span` interface may also be used to obtain a `TracerProvider` using the same trace processing pipeline. (#2009)
+- The `http.url` attribute generated by `HTTPClientAttributesFromHTTPRequest` will no longer include username or password information. (#1919)
+- Removed `IsEmpty` method of the `TraceState` type in the `go.opentelemetry.io/otel/trace` package in favor of using the added `TraceState.Len` method. (#1931)
+- Removed `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions in the `go.opentelemetry.io/otel/baggage` package.
+ Handling of baggage is now done using the added `Baggage` type and related context functions (`ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext`) in that package. (#1967)
+- The `InstallNewPipeline` and `NewExportPipeline` creation functions in all the exporters (prometheus, otlp, stdout, jaeger, and zipkin) have been removed.
+ These functions were deemed premature attempts to provide convenience that did not achieve this aim. (#1985)
+- The `go.opentelemetry.io/otel/exporters/otlp` exporter has been removed. Use `go.opentelemetry.io/otel/exporters/otlp/otlptrace` instead. (#1990)
+- The `go.opentelemetry.io/otel/exporters/stdout` exporter has been removed. Use `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` or `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` instead. (#2005)
+
+### Fixed
+
+- Only report errors from the `"go.opentelemetry.io/otel/sdk/resource".Environment` function when they are not `nil`. (#1850, #1851)
+- The `Shutdown` method of the simple `SpanProcessor` in the `go.opentelemetry.io/otel/sdk/trace` package now honors the context deadline or cancellation. (#1616, #1856)
+- BatchSpanProcessor now drops span batches that failed to be exported. (#1860)
+- Use `http://localhost:14268/api/traces` as default Jaeger collector endpoint instead of `http://localhost:14250`. (#1898)
+- Allow trailing and leading whitespace in the parsing of a `tracestate` header. (#1931)
+- Add logic to determine if the channel is closed to fix Jaeger exporter test panic with close closed channel. (#1870, #1973)
+- Avoid transport security when OTLP endpoint is a Unix socket. (#2001)
+
+### Security
+
+## [0.20.0] - 2021-04-23
+
+### Added
+
+- The OTLP exporter now has two new convenience functions, `NewExportPipeline` and `InstallNewPipeline`, setup and install the exporter in tracing and metrics pipelines. (#1373)
+- Adds semantic conventions for exceptions. (#1492)
+- Added Jaeger Environment variables: `OTEL_EXPORTER_JAEGER_AGENT_HOST`, `OTEL_EXPORTER_JAEGER_AGENT_PORT`
+ These environment variables can be used to override Jaeger agent hostname and port (#1752)
+- Option `ExportTimeout` was added to batch span processor. (#1755)
+- `trace.TraceFlags` is now a defined type over `byte` and `WithSampled(bool) TraceFlags` and `IsSampled() bool` methods have been added to it. (#1770)
+- The `Event` and `Link` struct types from the `go.opentelemetry.io/otel` package now include a `DroppedAttributeCount` field to record the number of attributes that were not recorded due to configured limits being reached. (#1771)
+- The Jaeger exporter now reports dropped attributes for a Span event in the exported log. (#1771)
+- Adds test to check BatchSpanProcessor ignores `OnEnd` and `ForceFlush` post `Shutdown`. (#1772)
+- Extract resource attributes from the `OTEL_RESOURCE_ATTRIBUTES` environment variable and merge them with the `resource.Default` resource as well as resources provided to the `TracerProvider` and metric `Controller`. (#1785)
+- Added `WithOSType` resource configuration option to set OS (Operating System) type resource attribute (`os.type`). (#1788)
+- Added `WithProcess*` resource configuration options to set Process resource attributes. (#1788)
+ - `process.pid`
+ - `process.executable.name`
+ - `process.executable.path`
+ - `process.command_args`
+ - `process.owner`
+ - `process.runtime.name`
+ - `process.runtime.version`
+ - `process.runtime.description`
+- Adds `k8s.node.name` and `k8s.node.uid` attribute keys to the `semconv` package. (#1789)
+- Added support for configuring OTLP/HTTP and OTLP/gRPC Endpoints, TLS Certificates, Headers, Compression and Timeout via Environment Variables. (#1758, #1769 and #1811)
+ - `OTEL_EXPORTER_OTLP_ENDPOINT`
+ - `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`
+ - `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT`
+ - `OTEL_EXPORTER_OTLP_HEADERS`
+ - `OTEL_EXPORTER_OTLP_TRACES_HEADERS`
+ - `OTEL_EXPORTER_OTLP_METRICS_HEADERS`
+ - `OTEL_EXPORTER_OTLP_COMPRESSION`
+ - `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION`
+ - `OTEL_EXPORTER_OTLP_METRICS_COMPRESSION`
+ - `OTEL_EXPORTER_OTLP_TIMEOUT`
+ - `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT`
+ - `OTEL_EXPORTER_OTLP_METRICS_TIMEOUT`
+ - `OTEL_EXPORTER_OTLP_CERTIFICATE`
+ - `OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE`
+ - `OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE`
+- Adds `otlpgrpc.WithTimeout` option for configuring timeout to the otlp/gRPC exporter. (#1821)
+- Adds `jaeger.WithMaxPacketSize` option for configuring maximum UDP packet size used when connecting to the Jaeger agent. (#1853)
+
+### Fixed
+
+- The `Span.IsRecording` implementation from `go.opentelemetry.io/otel/sdk/trace` always returns false when not being sampled. (#1750)
+- The Jaeger exporter now correctly sets tags for the Span status code and message.
+ This means it uses the correct tag keys (`"otel.status_code"`, `"otel.status_description"`) and does not set the status message as a tag unless it is set on the span. (#1761)
+- The Jaeger exporter now correctly records Span event's names using the `"event"` key for a tag.
+ Additionally, this tag is overridden, as specified in the OTel specification, if the event contains an attribute with that key. (#1768)
+- Zipkin Exporter: Ensure mapping between OTel and Zipkin span data complies with the specification. (#1688)
+- Fixed typo for default service name in Jaeger Exporter. (#1797)
+- Fix flaky OTLP for the reconnnection of the client connection. (#1527, #1814)
+- Fix Jaeger exporter dropping of span batches that exceed the UDP packet size limit.
+ Instead, the exporter now splits the batch into smaller sendable batches. (#1828)
+
+### Changed
+
+- Span `RecordError` now records an `exception` event to comply with the semantic convention specification. (#1492)
+- Jaeger exporter was updated to use thrift v0.14.1. (#1712)
+- Migrate from using internally built and maintained version of the OTLP to the one hosted at `go.opentelemetry.io/proto/otlp`. (#1713)
+- Migrate from using `github.com/gogo/protobuf` to `google.golang.org/protobuf` to match `go.opentelemetry.io/proto/otlp`. (#1713)
+- The storage of a local or remote Span in a `context.Context` using its SpanContext is unified to store just the current Span.
+ The Span's SpanContext can now self-identify as being remote or not.
+ This means that `"go.opentelemetry.io/otel/trace".ContextWithRemoteSpanContext` will now overwrite any existing current Span, not just existing remote Spans, and make it the current Span in a `context.Context`. (#1731)
+- Improve OTLP/gRPC exporter connection errors. (#1737)
+- Information about a parent span context in a `"go.opentelemetry.io/otel/export/trace".SpanSnapshot` is unified in a new `Parent` field.
+ The existing `ParentSpanID` and `HasRemoteParent` fields are removed in favor of this. (#1748)
+- The `ParentContext` field of the `"go.opentelemetry.io/otel/sdk/trace".SamplingParameters` is updated to hold a `context.Context` containing the parent span.
+ This changes it to make `SamplingParameters` conform with the OpenTelemetry specification. (#1749)
+- Updated Jaeger Environment Variables: `JAEGER_ENDPOINT`, `JAEGER_USER`, `JAEGER_PASSWORD`
+ to `OTEL_EXPORTER_JAEGER_ENDPOINT`, `OTEL_EXPORTER_JAEGER_USER`, `OTEL_EXPORTER_JAEGER_PASSWORD` in compliance with OTel specification. (#1752)
+- Modify `BatchSpanProcessor.ForceFlush` to abort after timeout/cancellation. (#1757)
+- The `DroppedAttributeCount` field of the `Span` in the `go.opentelemetry.io/otel` package now only represents the number of attributes dropped for the span itself.
+ It no longer is a conglomerate of itself, events, and link attributes that have been dropped. (#1771)
+- Make `ExportSpans` in Jaeger Exporter honor context deadline. (#1773)
+- Modify Zipkin Exporter default service name, use default resource's serviceName instead of empty. (#1777)
+- The `go.opentelemetry.io/otel/sdk/export/trace` package is merged into the `go.opentelemetry.io/otel/sdk/trace` package. (#1778)
+- The prometheus.InstallNewPipeline example is moved from comment to example test (#1796)
+- The convenience functions for the stdout exporter have been updated to return the `TracerProvider` implementation and enable the shutdown of the exporter. (#1800)
+- Replace the flush function returned from the Jaeger exporter's convenience creation functions (`InstallNewPipeline` and `NewExportPipeline`) with the `TracerProvider` implementation they create.
+ This enables the caller to shutdown and flush using the related `TracerProvider` methods. (#1822)
+- Updated the Jaeger exporter to have a default endpoint, `http://localhost:14250`, for the collector. (#1824)
+- Changed the function `WithCollectorEndpoint` in the Jaeger exporter to no longer accept an endpoint as an argument.
+ The endpoint can be passed with the `CollectorEndpointOption` using the `WithEndpoint` function or by setting the `OTEL_EXPORTER_JAEGER_ENDPOINT` environment variable value appropriately. (#1824)
+- The Jaeger exporter no longer batches exported spans itself, instead it relies on the SDK's `BatchSpanProcessor` for this functionality. (#1830)
+- The Jaeger exporter creation functions (`NewRawExporter`, `NewExportPipeline`, and `InstallNewPipeline`) no longer accept the removed `Option` type as a variadic argument. (#1830)
+
+### Removed
+
+- Removed Jaeger Environment variables: `JAEGER_SERVICE_NAME`, `JAEGER_DISABLED`, `JAEGER_TAGS`
+ These environment variables will no longer be used to override values of the Jaeger exporter (#1752)
+- No longer set the links for a `Span` in `go.opentelemetry.io/otel/sdk/trace` that is configured to be a new root.
+ This is unspecified behavior that the OpenTelemetry community plans to standardize in the future.
+ To prevent backwards incompatible changes when it is specified, these links are removed. (#1726)
+- Setting error status while recording error with Span from oteltest package. (#1729)
+- The concept of a remote and local Span stored in a context is unified to just the current Span.
+ Because of this `"go.opentelemetry.io/otel/trace".RemoteSpanContextFromContext` is removed as it is no longer needed.
+ Instead, `"go.opentelemetry.io/otel/trace".SpanContextFromContext` can be used to return the current Span.
+ If needed, that Span's `SpanContext.IsRemote()` can then be used to determine if it is remote or not. (#1731)
+- The `HasRemoteParent` field of the `"go.opentelemetry.io/otel/sdk/trace".SamplingParameters` is removed.
+ This field is redundant to the information returned from the `Remote` method of the `SpanContext` held in the `ParentContext` field. (#1749)
+- The `trace.FlagsDebug` and `trace.FlagsDeferred` constants have been removed and will be localized to the B3 propagator. (#1770)
+- Remove `Process` configuration, `WithProcessFromEnv` and `ProcessFromEnv`, and type from the Jaeger exporter package.
+ The information that could be configured in the `Process` struct should be configured in a `Resource` instead. (#1776, #1804)
+- Remove the `WithDisabled` option from the Jaeger exporter.
+ To disable the exporter unregister it from the `TracerProvider` or use a no-operation `TracerProvider`. (#1806)
+- Removed the functions `CollectorEndpointFromEnv` and `WithCollectorEndpointOptionFromEnv` from the Jaeger exporter.
+ These functions for retrieving specific environment variable values are redundant of other internal functions and
+ are not intended for end user use. (#1824)
+- Removed the Jaeger exporter `WithSDKOptions` `Option`.
+ This option was used to set SDK options for the exporter creation convenience functions.
+ These functions are provided as a way to easily setup or install the exporter with what are deemed reasonable SDK settings for common use cases.
+ If the SDK needs to be configured differently, the `NewRawExporter` function and direct setup of the SDK with the desired settings should be used. (#1825)
+- The `WithBufferMaxCount` and `WithBatchMaxCount` `Option`s from the Jaeger exporter are removed.
+ The exporter no longer batches exports, instead relying on the SDK's `BatchSpanProcessor` for this functionality. (#1830)
+- The Jaeger exporter `Option` type is removed.
+ The type is no longer used by the exporter to configure anything.
+ All the previous configurations these options provided were duplicates of SDK configuration.
+ They have been removed in favor of using the SDK configuration and focuses the exporter configuration to be only about the endpoints it will send telemetry to. (#1830)
+
+## [0.19.0] - 2021-03-18
+
+### Added
+
+- Added `Marshaler` config option to `otlphttp` to enable otlp over json or protobufs. (#1586)
+- A `ForceFlush` method to the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` to flush all registered `SpanProcessor`s. (#1608)
+- Added `WithSampler` and `WithSpanLimits` to tracer provider. (#1633, #1702)
+- `"go.opentelemetry.io/otel/trace".SpanContext` now has a `remote` property, and `IsRemote()` predicate, that is true when the `SpanContext` has been extracted from remote context data. (#1701)
+- A `Valid` method to the `"go.opentelemetry.io/otel/attribute".KeyValue` type. (#1703)
+
+### Changed
+
+- `trace.SpanContext` is now immutable and has no exported fields. (#1573)
+ - `trace.NewSpanContext()` can be used in conjunction with the `trace.SpanContextConfig` struct to initialize a new `SpanContext` where all values are known.
+- Update the `ForceFlush` method signature to the `"go.opentelemetry.io/otel/sdk/trace".SpanProcessor` to accept a `context.Context` and return an error. (#1608)
+- Update the `Shutdown` method to the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` return an error on shutdown failure. (#1608)
+- The SimpleSpanProcessor will now shut down the enclosed `SpanExporter` and gracefully ignore subsequent calls to `OnEnd` after `Shutdown` is called. (#1612)
+- `"go.opentelemetry.io/sdk/metric/controller.basic".WithPusher` is replaced with `WithExporter` to provide consistent naming across project. (#1656)
+- Added non-empty string check for trace `Attribute` keys. (#1659)
+- Add `description` to SpanStatus only when `StatusCode` is set to error. (#1662)
+- Jaeger exporter falls back to `resource.Default`'s `service.name` if the exported Span does not have one. (#1673)
+- Jaeger exporter populates Jaeger's Span Process from Resource. (#1673)
+- Renamed the `LabelSet` method of `"go.opentelemetry.io/otel/sdk/resource".Resource` to `Set`. (#1692)
+- Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1693)
+- Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1693)
+
+### Removed
+
+- Removed `serviceName` parameter from Zipkin exporter and uses resource instead. (#1549)
+- Removed `WithConfig` from tracer provider to avoid overriding configuration. (#1633)
+- Removed the exported `SimpleSpanProcessor` and `BatchSpanProcessor` structs.
+ These are now returned as a SpanProcessor interface from their respective constructors. (#1638)
+- Removed `WithRecord()` from `trace.SpanOption` when creating a span. (#1660)
+- Removed setting status to `Error` while recording an error as a span event in `RecordError`. (#1663)
+- Removed `jaeger.WithProcess` configuration option. (#1673)
+- Removed `ApplyConfig` method from `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` and the now unneeded `Config` struct. (#1693)
+
+### Fixed
+
+- Jaeger Exporter: Ensure mapping between OTEL and Jaeger span data complies with the specification. (#1626)
+- `SamplingResult.TraceState` is correctly propagated to a newly created span's `SpanContext`. (#1655)
+- The `otel-collector` example now correctly flushes metric events prior to shutting down the exporter. (#1678)
+- Do not set span status message in `SpanStatusFromHTTPStatusCode` if it can be inferred from `http.status_code`. (#1681)
+- Synchronization issues in global trace delegate implementation. (#1686)
+- Reduced excess memory usage by global `TracerProvider`. (#1687)
+
+## [0.18.0] - 2021-03-03
+
+### Added
+
+- Added `resource.Default()` for use with meter and tracer providers. (#1507)
+- `AttributePerEventCountLimit` and `AttributePerLinkCountLimit` for `SpanLimits`. (#1535)
+- Added `Keys()` method to `propagation.TextMapCarrier` and `propagation.HeaderCarrier` to adapt `http.Header` to this interface. (#1544)
+- Added `code` attributes to `go.opentelemetry.io/otel/semconv` package. (#1558)
+- Compatibility testing suite in the CI system for the following systems. (#1567)
+ | OS | Go Version | Architecture |
+ | ------- | ---------- | ------------ |
+ | Ubuntu | 1.15 | amd64 |
+ | Ubuntu | 1.14 | amd64 |
+ | Ubuntu | 1.15 | 386 |
+ | Ubuntu | 1.14 | 386 |
+ | MacOS | 1.15 | amd64 |
+ | MacOS | 1.14 | amd64 |
+ | Windows | 1.15 | amd64 |
+ | Windows | 1.14 | amd64 |
+ | Windows | 1.15 | 386 |
+ | Windows | 1.14 | 386 |
+
+### Changed
+
+- Replaced interface `oteltest.SpanRecorder` with its existing implementation
+ `StandardSpanRecorder`. (#1542)
+- Default span limit values to 128. (#1535)
+- Rename `MaxEventsPerSpan`, `MaxAttributesPerSpan` and `MaxLinksPerSpan` to `EventCountLimit`, `AttributeCountLimit` and `LinkCountLimit`, and move these fields into `SpanLimits`. (#1535)
+- Renamed the `otel/label` package to `otel/attribute`. (#1541)
+- Vendor the Jaeger exporter's dependency on Apache Thrift. (#1551)
+- Parallelize the CI linting and testing. (#1567)
+- Stagger timestamps in exact aggregator tests. (#1569)
+- Changed all examples to use `WithBatchTimeout(5 * time.Second)` rather than `WithBatchTimeout(5)`. (#1621)
+- Prevent end-users from implementing some interfaces (#1575)
+
+ ```
+ "otel/exporters/otlp/otlphttp".Option
+ "otel/exporters/stdout".Option
+ "otel/oteltest".Option
+ "otel/trace".TracerOption
+ "otel/trace".SpanOption
+ "otel/trace".EventOption
+ "otel/trace".LifeCycleOption
+ "otel/trace".InstrumentationOption
+ "otel/sdk/resource".Option
+ "otel/sdk/trace".ParentBasedSamplerOption
+ "otel/sdk/trace".ReadOnlySpan
+ "otel/sdk/trace".ReadWriteSpan
+ ```
+
+### Removed
+
+- Removed attempt to resample spans upon changing the span name with `span.SetName()`. (#1545)
+- The `test-benchmark` is no longer a dependency of the `precommit` make target. (#1567)
+- Removed the `test-386` make target.
+ This was replaced with a full compatibility testing suite (i.e. multi OS/arch) in the CI system. (#1567)
+
+### Fixed
+
+- The sequential timing check of timestamps in the stdout exporter are now setup explicitly to be sequential (#1571). (#1572)
+- Windows build of Jaeger tests now compiles with OS specific functions (#1576). (#1577)
+- The sequential timing check of timestamps of go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue are now setup explicitly to be sequential (#1578). (#1579)
+- Validate tracestate header keys with vendors according to the W3C TraceContext specification (#1475). (#1581)
+- The OTLP exporter includes related labels for translations of a GaugeArray (#1563). (#1570)
+
+## [0.17.0] - 2021-02-12
+
+### Changed
+
+- Rename project default branch from `master` to `main`. (#1505)
+- Reverse order in which `Resource` attributes are merged, per change in spec. (#1501)
+- Add tooling to maintain "replace" directives in go.mod files automatically. (#1528)
+- Create new modules: otel/metric, otel/trace, otel/oteltest, otel/sdk/export/metric, otel/sdk/metric (#1528)
+- Move metric-related public global APIs from otel to otel/metric/global. (#1528)
+
+## Fixed
+
+- Fixed otlpgrpc reconnection issue.
+- The example code in the README.md of `go.opentelemetry.io/otel/exporters/otlp` is moved to a compiled example test and used the new `WithAddress` instead of `WithEndpoint`. (#1513)
+- The otel-collector example now uses the default OTLP receiver port of the collector.
+
+## [0.16.0] - 2021-01-13
+
+### Added
+
+- Add the `ReadOnlySpan` and `ReadWriteSpan` interfaces to provide better control for accessing span data. (#1360)
+- `NewGRPCDriver` function returns a `ProtocolDriver` that maintains a single gRPC connection to the collector. (#1369)
+- Added documentation about the project's versioning policy. (#1388)
+- Added `NewSplitDriver` for OTLP exporter that allows sending traces and metrics to different endpoints. (#1418)
+- Added codeql workflow to GitHub Actions (#1428)
+- Added Gosec workflow to GitHub Actions (#1429)
+- Add new HTTP driver for OTLP exporter in `exporters/otlp/otlphttp`. Currently it only supports the binary protobuf payloads. (#1420)
+- Add an OpenCensus exporter bridge. (#1444)
+
+### Changed
+
+- Rename `internal/testing` to `internal/internaltest`. (#1449)
+- Rename `export.SpanData` to `export.SpanSnapshot` and use it only for exporting spans. (#1360)
+- Store the parent's full `SpanContext` rather than just its span ID in the `span` struct. (#1360)
+- Improve span duration accuracy. (#1360)
+- Migrated CI/CD from CircleCI to GitHub Actions (#1382)
+- Remove duplicate checkout from GitHub Actions workflow (#1407)
+- Metric `array` aggregator renamed `exact` to match its `aggregation.Kind` (#1412)
+- Metric `exact` aggregator includes per-point timestamps (#1412)
+- Metric stdout exporter uses MinMaxSumCount aggregator for ValueRecorder instruments (#1412)
+- `NewExporter` from `exporters/otlp` now takes a `ProtocolDriver` as a parameter. (#1369)
+- Many OTLP Exporter options became gRPC ProtocolDriver options. (#1369)
+- Unify endpoint API that related to OTel exporter. (#1401)
+- Optimize metric histogram aggregator to reuse its slice of buckets. (#1435)
+- Metric aggregator Count() and histogram Bucket.Counts are consistently `uint64`. (1430)
+- Histogram aggregator accepts functional options, uses default boundaries if none given. (#1434)
+- `SamplingResult` now passed a `Tracestate` from the parent `SpanContext` (#1432)
+- Moved gRPC driver for OTLP exporter to `exporters/otlp/otlpgrpc`. (#1420)
+- The `TraceContext` propagator now correctly propagates `TraceState` through the `SpanContext`. (#1447)
+- Metric Push and Pull Controller components are combined into a single "basic" Controller:
+ - `WithExporter()` and `Start()` to configure Push behavior
+ - `Start()` is optional; use `Collect()` and `ForEach()` for Pull behavior
+ - `Start()` and `Stop()` accept Context. (#1378)
+- The `Event` type is moved from the `otel/sdk/export/trace` package to the `otel/trace` API package. (#1452)
+
+### Removed
+
+- Remove `errUninitializedSpan` as its only usage is now obsolete. (#1360)
+- Remove Metric export functionality related to quantiles and summary data points: this is not specified (#1412)
+- Remove DDSketch metric aggregator; our intention is to re-introduce this as an option of the histogram aggregator after [new OTLP histogram data types](https://github.com/open-telemetry/opentelemetry-proto/pull/226) are released (#1412)
+
+### Fixed
+
+- `BatchSpanProcessor.Shutdown()` will now shutdown underlying `export.SpanExporter`. (#1443)
+
+## [0.15.0] - 2020-12-10
+
+### Added
+
+- The `WithIDGenerator` `TracerProviderOption` is added to the `go.opentelemetry.io/otel/trace` package to configure an `IDGenerator` for the `TracerProvider`. (#1363)
+
+### Changed
+
+- The Zipkin exporter now uses the Span status code to determine. (#1328)
+- `NewExporter` and `Start` functions in `go.opentelemetry.io/otel/exporters/otlp` now receive `context.Context` as a first parameter. (#1357)
+- Move the OpenCensus example into `example` directory. (#1359)
+- Moved the SDK's `internal.IDGenerator` interface in to the `sdk/trace` package to enable support for externally-defined ID generators. (#1363)
+- Bump `github.com/google/go-cmp` from 0.5.3 to 0.5.4 (#1374)
+- Bump `github.com/golangci/golangci-lint` in `/internal/tools` (#1375)
+
+### Fixed
+
+- Metric SDK `SumObserver` and `UpDownSumObserver` instruments correctness fixes. (#1381)
+
+## [0.14.0] - 2020-11-19
+
+### Added
+
+- An `EventOption` and the related `NewEventConfig` function are added to the `go.opentelemetry.io/otel` package to configure Span events. (#1254)
+- A `TextMapPropagator` and associated `TextMapCarrier` are added to the `go.opentelemetry.io/otel/oteltest` package to test `TextMap` type propagators and their use. (#1259)
+- `SpanContextFromContext` returns `SpanContext` from context. (#1255)
+- `TraceState` has been added to `SpanContext`. (#1340)
+- `DeploymentEnvironmentKey` added to `go.opentelemetry.io/otel/semconv` package. (#1323)
+- Add an OpenCensus to OpenTelemetry tracing bridge. (#1305)
+- Add a parent context argument to `SpanProcessor.OnStart` to follow the specification. (#1333)
+- Add missing tests for `sdk/trace/attributes_map.go`. (#1337)
+
+### Changed
+
+- Move the `go.opentelemetry.io/otel/api/trace` package into `go.opentelemetry.io/otel/trace` with the following changes. (#1229) (#1307)
+ - `ID` has been renamed to `TraceID`.
+ - `IDFromHex` has been renamed to `TraceIDFromHex`.
+ - `EmptySpanContext` is removed.
+- Move the `go.opentelemetry.io/otel/api/trace/tracetest` package into `go.opentelemetry.io/otel/oteltest`. (#1229)
+- OTLP Exporter updates:
+ - supports OTLP v0.6.0 (#1230, #1354)
+ - supports configurable aggregation temporality (default: Cumulative, optional: Stateless). (#1296)
+- The Sampler is now called on local child spans. (#1233)
+- The `Kind` type from the `go.opentelemetry.io/otel/api/metric` package was renamed to `InstrumentKind` to more specifically describe what it is and avoid semantic ambiguity. (#1240)
+- The `MetricKind` method of the `Descriptor` type in the `go.opentelemetry.io/otel/api/metric` package was renamed to `Descriptor.InstrumentKind`.
+ This matches the returned type and fixes misuse of the term metric. (#1240)
+- Move test harness from the `go.opentelemetry.io/otel/api/apitest` package into `go.opentelemetry.io/otel/oteltest`. (#1241)
+- Move the `go.opentelemetry.io/otel/api/metric/metrictest` package into `go.opentelemetry.io/oteltest` as part of #964. (#1252)
+- Move the `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric` as part of #1303. (#1321)
+- Move the `go.opentelemetry.io/otel/api/metric/registry` package into `go.opentelemetry.io/otel/metric/registry` as a part of #1303. (#1316)
+- Move the `Number` type (together with related functions) from `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric/number` as a part of #1303. (#1316)
+- The function signature of the Span `AddEvent` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required name and a variable number of `EventOption`s. (#1254)
+- The function signature of the Span `RecordError` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required error value and a variable number of `EventOption`s. (#1254)
+- Move the `go.opentelemetry.io/otel/api/global` package to `go.opentelemetry.io/otel`. (#1262) (#1330)
+- Move the `Version` function from `go.opentelemetry.io/otel/sdk` to `go.opentelemetry.io/otel`. (#1330)
+- Rename correlation context header from `"otcorrelations"` to `"baggage"` to match the OpenTelemetry specification. (#1267)
+- Fix `Code.UnmarshalJSON` to work with valid JSON only. (#1276)
+- The `resource.New()` method changes signature to support builtin attributes and functional options, including `telemetry.sdk.*` and
+ `host.name` semantic conventions; the former method is renamed `resource.NewWithAttributes`. (#1235)
+- The Prometheus exporter now exports non-monotonic counters (i.e. `UpDownCounter`s) as gauges. (#1210)
+- Correct the `Span.End` method documentation in the `otel` API to state updates are not allowed on a span after it has ended. (#1310)
+- Updated span collection limits for attribute, event and link counts to 1000 (#1318)
+- Renamed `semconv.HTTPUrlKey` to `semconv.HTTPURLKey`. (#1338)
+
+### Removed
+
+- The `ErrInvalidHexID`, `ErrInvalidTraceIDLength`, `ErrInvalidSpanIDLength`, `ErrInvalidSpanIDLength`, or `ErrNilSpanID` from the `go.opentelemetry.io/otel` package are unexported now. (#1243)
+- The `AddEventWithTimestamp` method on the `Span` interface in `go.opentelemetry.io/otel` is removed due to its redundancy.
+ It is replaced by using the `AddEvent` method with a `WithTimestamp` option. (#1254)
+- The `MockSpan` and `MockTracer` types are removed from `go.opentelemetry.io/otel/oteltest`.
+ `Tracer` and `Span` from the same module should be used in their place instead. (#1306)
+- `WorkerCount` option is removed from `go.opentelemetry.io/otel/exporters/otlp`. (#1350)
+- Remove the following labels types: INT32, UINT32, UINT64 and FLOAT32. (#1314)
+
+### Fixed
+
+- Rename `MergeItererator` to `MergeIterator` in the `go.opentelemetry.io/otel/label` package. (#1244)
+- The `go.opentelemetry.io/otel/api/global` packages global TextMapPropagator now delegates functionality to a globally set delegate for all previously returned propagators. (#1258)
+- Fix condition in `label.Any`. (#1299)
+- Fix global `TracerProvider` to pass options to its configured provider. (#1329)
+- Fix missing handler for `ExactKind` aggregator in OTLP metrics transformer (#1309)
+
+## [0.13.0] - 2020-10-08
+
+### Added
+
+- OTLP Metric exporter supports Histogram aggregation. (#1209)
+- The `Code` struct from the `go.opentelemetry.io/otel/codes` package now supports JSON marshaling and unmarshaling as well as implements the `Stringer` interface. (#1214)
+- A Baggage API to implement the OpenTelemetry specification. (#1217)
+- Add Shutdown method to sdk/trace/provider, shutdown processors in the order they were registered. (#1227)
+
+### Changed
+
+- Set default propagator to no-op propagator. (#1184)
+- The `HTTPSupplier`, `HTTPExtractor`, `HTTPInjector`, and `HTTPPropagator` from the `go.opentelemetry.io/otel/api/propagation` package were replaced with unified `TextMapCarrier` and `TextMapPropagator` in the `go.opentelemetry.io/otel/propagation` package. (#1212) (#1325)
+- The `New` function from the `go.opentelemetry.io/otel/api/propagation` package was replaced with `NewCompositeTextMapPropagator` in the `go.opentelemetry.io/otel` package. (#1212)
+- The status codes of the `go.opentelemetry.io/otel/codes` package have been updated to match the latest OpenTelemetry specification.
+ They now are `Unset`, `Error`, and `Ok`.
+ They no longer track the gRPC codes. (#1214)
+- The `StatusCode` field of the `SpanData` struct in the `go.opentelemetry.io/otel/sdk/export/trace` package now uses the codes package from this package instead of the gRPC project. (#1214)
+- Move the `go.opentelemetry.io/otel/api/baggage` package into `go.opentelemetry.io/otel/baggage`. (#1217) (#1325)
+- A `Shutdown` method of `SpanProcessor` and all its implementations receives a context and returns an error. (#1264)
+
+### Fixed
+
+- Copies of data from arrays and slices passed to `go.opentelemetry.io/otel/label.ArrayValue()` are now used in the returned `Value` instead of using the mutable data itself. (#1226)
+
+### Removed
+
+- The `ExtractHTTP` and `InjectHTTP` functions from the `go.opentelemetry.io/otel/api/propagation` package were removed. (#1212)
+- The `Propagators` interface from the `go.opentelemetry.io/otel/api/propagation` package was removed to conform to the OpenTelemetry specification.
+ The explicit `TextMapPropagator` type can be used in its place as this is the `Propagator` type the specification defines. (#1212)
+- The `SetAttribute` method of the `Span` from the `go.opentelemetry.io/otel/api/trace` package was removed given its redundancy with the `SetAttributes` method. (#1216)
+- The internal implementation of Baggage storage is removed in favor of using the new Baggage API functionality. (#1217)
+- Remove duplicate hostname key `HostHostNameKey` in Resource semantic conventions. (#1219)
+- Nested array/slice support has been removed. (#1226)
+
+## [0.12.0] - 2020-09-24
+
+### Added
+
+- A `SpanConfigure` function in `go.opentelemetry.io/otel/api/trace` to create a new `SpanConfig` from `SpanOption`s. (#1108)
+- In the `go.opentelemetry.io/otel/api/trace` package, `NewTracerConfig` was added to construct new `TracerConfig`s.
+ This addition was made to conform with our project option conventions. (#1155)
+- Instrumentation library information was added to the Zipkin exporter. (#1119)
+- The `SpanProcessor` interface now has a `ForceFlush()` method. (#1166)
+- More semantic conventions for k8s as resource attributes. (#1167)
+
+### Changed
+
+- Add reconnecting udp connection type to Jaeger exporter.
+ This change adds a new optional implementation of the udp conn interface used to detect changes to an agent's host dns record.
+ It then adopts the new destination address to ensure the exporter doesn't get stuck. This change was ported from jaegertracing/jaeger-client-go#520. (#1063)
+- Replace `StartOption` and `EndOption` in `go.opentelemetry.io/otel/api/trace` with `SpanOption`.
+ This change is matched by replacing the `StartConfig` and `EndConfig` with a unified `SpanConfig`. (#1108)
+- Replace the `LinkedTo` span option in `go.opentelemetry.io/otel/api/trace` with `WithLinks`.
+ This is be more consistent with our other option patterns, i.e. passing the item to be configured directly instead of its component parts, and provides a cleaner function signature. (#1108)
+- The `go.opentelemetry.io/otel/api/trace` `TracerOption` was changed to an interface to conform to project option conventions. (#1109)
+- Move the `B3` and `TraceContext` from within the `go.opentelemetry.io/otel/api/trace` package to their own `go.opentelemetry.io/otel/propagators` package.
+ This removal of the propagators is reflective of the OpenTelemetry specification for these propagators as well as cleans up the `go.opentelemetry.io/otel/api/trace` API. (#1118)
+- Rename Jaeger tags used for instrumentation library information to reflect changes in OpenTelemetry specification. (#1119)
+- Rename `ProbabilitySampler` to `TraceIDRatioBased` and change semantics to ignore parent span sampling status. (#1115)
+- Move `tools` package under `internal`. (#1141)
+- Move `go.opentelemetry.io/otel/api/correlation` package to `go.opentelemetry.io/otel/api/baggage`. (#1142)
+ The `correlation.CorrelationContext` propagator has been renamed `baggage.Baggage`. Other exported functions and types are unchanged.
+- Rename `ParentOrElse` sampler to `ParentBased` and allow setting samplers depending on parent span. (#1153)
+- In the `go.opentelemetry.io/otel/api/trace` package, `SpanConfigure` was renamed to `NewSpanConfig`. (#1155)
+- Change `dependabot.yml` to add a `Skip Changelog` label to dependabot-sourced PRs. (#1161)
+- The [configuration style guide](https://github.com/open-telemetry/opentelemetry-go/blob/master/CONTRIBUTING.md#config) has been updated to
+ recommend the use of `newConfig()` instead of `configure()`. (#1163)
+- The `otlp.Config` type has been unexported and changed to `otlp.config`, along with its initializer. (#1163)
+- Ensure exported interface types include parameter names and update the
+ Style Guide to reflect this styling rule. (#1172)
+- Don't consider unset environment variable for resource detection to be an error. (#1170)
+- Rename `go.opentelemetry.io/otel/api/metric.ConfigureInstrument` to `NewInstrumentConfig` and
+ `go.opentelemetry.io/otel/api/metric.ConfigureMeter` to `NewMeterConfig`.
+- ValueObserver instruments use LastValue aggregator by default. (#1165)
+- OTLP Metric exporter supports LastValue aggregation. (#1165)
+- Move the `go.opentelemetry.io/otel/api/unit` package to `go.opentelemetry.io/otel/unit`. (#1185)
+- Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190)
+- Rename `NoopProvider` to `NoopMeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190)
+- Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metric/metrictest` package. (#1190)
+- Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric/registry` package. (#1190)
+- Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metri/registryc` package. (#1190)
+- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190)
+- Rename `NoopProvider` to `NoopTracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190)
+- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190)
+- Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190)
+- Rename `WrapperProvider` to `WrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190)
+- Rename `NewWrapperProvider` to `NewWrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190)
+- Rename `Provider` method of the pull controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/pull` package. (#1190)
+- Rename `Provider` method of the push controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/push` package. (#1190)
+- Rename `ProviderOptions` to `TracerProviderConfig` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190)
+- Rename `ProviderOption` to `TracerProviderOption` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190)
+- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190)
+- Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190)
+- Renamed `SamplingDecision` values to comply with OpenTelemetry specification change. (#1192)
+- Renamed Zipkin attribute names from `ot.status_code & ot.status_description` to `otel.status_code & otel.status_description`. (#1201)
+- The default SDK now invokes registered `SpanProcessor`s in the order they were registered with the `TracerProvider`. (#1195)
+- Add test of spans being processed by the `SpanProcessor`s in the order they were registered. (#1203)
+
+### Removed
+
+- Remove the B3 propagator from `go.opentelemetry.io/otel/propagators`. It is now located in the
+ `go.opentelemetry.io/contrib/propagators/` module. (#1191)
+- Remove the semantic convention for HTTP status text, `HTTPStatusTextKey` from package `go.opentelemetry.io/otel/semconv`. (#1194)
+
+### Fixed
+
+- Zipkin example no longer mentions `ParentSampler`, corrected to `ParentBased`. (#1171)
+- Fix missing shutdown processor in otel-collector example. (#1186)
+- Fix missing shutdown processor in basic and namedtracer examples. (#1197)
+
+## [0.11.0] - 2020-08-24
+
+### Added
+
+- Support for exporting array-valued attributes via OTLP. (#992)
+- `Noop` and `InMemory` `SpanBatcher` implementations to help with testing integrations. (#994)
+- Support for filtering metric label sets. (#1047)
+- A dimensionality-reducing metric Processor. (#1057)
+- Integration tests for more OTel Collector Attribute types. (#1062)
+- A new `WithSpanProcessor` `ProviderOption` is added to the `go.opentelemetry.io/otel/sdk/trace` package to create a `Provider` and automatically register the `SpanProcessor`. (#1078)
+
+### Changed
+
+- Rename `sdk/metric/processor/test` to `sdk/metric/processor/processortest`. (#1049)
+- Rename `sdk/metric/controller/test` to `sdk/metric/controller/controllertest`. (#1049)
+- Rename `api/testharness` to `api/apitest`. (#1049)
+- Rename `api/trace/testtrace` to `api/trace/tracetest`. (#1049)
+- Change Metric Processor to merge multiple observations. (#1024)
+- The `go.opentelemetry.io/otel/bridge/opentracing` bridge package has been made into its own module.
+ This removes the package dependencies of this bridge from the rest of the OpenTelemetry based project. (#1038)
+- Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016)
+- The environment variable used for resource detection has been changed from `OTEL_RESOURCE_LABELS` to `OTEL_RESOURCE_ATTRIBUTES` (#1042)
+- Replace `WithSyncer` with `WithBatcher` in examples. (#1044)
+- Replace the `google.golang.org/grpc/codes` dependency in the API with an equivalent `go.opentelemetry.io/otel/codes` package. (#1046)
+- Merge the `go.opentelemetry.io/otel/api/label` and `go.opentelemetry.io/otel/api/kv` into the new `go.opentelemetry.io/otel/label` package. (#1060)
+- Unify Callback Function Naming.
+ Rename `*Callback` with `*Func`. (#1061)
+- CI builds validate against last two versions of Go, dropping 1.13 and adding 1.15. (#1064)
+- The `go.opentelemetry.io/otel/sdk/export/trace` interfaces `SpanSyncer` and `SpanBatcher` have been replaced with a specification compliant `Exporter` interface.
+ This interface still supports the export of `SpanData`, but only as a slice.
+ Implementation are also required now to return any error from `ExportSpans` if one occurs as well as implement a `Shutdown` method for exporter clean-up. (#1078)
+- The `go.opentelemetry.io/otel/sdk/trace` `NewBatchSpanProcessor` function no longer returns an error.
+ If a `nil` exporter is passed as an argument to this function, instead of it returning an error, it now returns a `BatchSpanProcessor` that handles the export of `SpanData` by not taking any action. (#1078)
+- The `go.opentelemetry.io/otel/sdk/trace` `NewProvider` function to create a `Provider` no longer returns an error, instead only a `*Provider`.
+ This change is related to `NewBatchSpanProcessor` not returning an error which was the only error this function would return. (#1078)
+
+### Removed
+
+- Duplicate, unused API sampler interface. (#999)
+ Use the [`Sampler` interface](https://github.com/open-telemetry/opentelemetry-go/blob/v0.11.0/sdk/trace/sampling.go) provided by the SDK instead.
+- The `grpctrace` instrumentation was moved to the `go.opentelemetry.io/contrib` repository and out of this repository.
+ This move includes moving the `grpc` example to the `go.opentelemetry.io/contrib` as well. (#1027)
+- The `WithSpan` method of the `Tracer` interface.
+ The functionality this method provided was limited compared to what a user can provide themselves.
+ It was removed with the understanding that if there is sufficient user need it can be added back based on actual user usage. (#1043)
+- The `RegisterSpanProcessor` and `UnregisterSpanProcessor` functions.
+ These were holdovers from an approach prior to the TracerProvider design. They were not used anymore. (#1077)
+- The `oterror` package. (#1026)
+- The `othttp` and `httptrace` instrumentations were moved to `go.opentelemetry.io/contrib`. (#1032)
+
+### Fixed
+
+- The `semconv.HTTPServerMetricAttributesFromHTTPRequest()` function no longer generates the high-cardinality `http.request.content.length` label. (#1031)
+- Correct instrumentation version tag in Jaeger exporter. (#1037)
+- The SDK span will now set an error event if the `End` method is called during a panic (i.e. it was deferred). (#1043)
+- Move internally generated protobuf code from the `go.opentelemetry.io/otel` to the OTLP exporter to reduce dependency overhead. (#1050)
+- The `otel-collector` example referenced outdated collector processors. (#1006)
+
+## [0.10.0] - 2020-07-29
+
+This release migrates the default OpenTelemetry SDK into its own Go module, decoupling the SDK from the API and reducing dependencies for instrumentation packages.
+
+### Added
+
+- The Zipkin exporter now has `NewExportPipeline` and `InstallNewPipeline` constructor functions to match the common pattern.
+ These function build a new exporter with default SDK options and register the exporter with the `global` package respectively. (#944)
+- Add propagator option for gRPC instrumentation. (#986)
+- The `testtrace` package now tracks the `trace.SpanKind` for each span. (#987)
+
+### Changed
+
+- Replace the `RegisterGlobal` `Option` in the Jaeger exporter with an `InstallNewPipeline` constructor function.
+ This matches the other exporter constructor patterns and will register a new exporter after building it with default configuration. (#944)
+- The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`.
+ This new exporter was made into its own Go module to follow the pattern of all exporters and decouple it from the `go.opentelemetry.io/otel` module. (#956, #963)
+- Move the `go.opentelemetry.io/otel/exporters/test` test package to `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#962)
+- The `go.opentelemetry.io/otel/api/kv/value` package was merged into the parent `go.opentelemetry.io/otel/api/kv` package. (#968)
+ - `value.Bool` was replaced with `kv.BoolValue`.
+ - `value.Int64` was replaced with `kv.Int64Value`.
+ - `value.Uint64` was replaced with `kv.Uint64Value`.
+ - `value.Float64` was replaced with `kv.Float64Value`.
+ - `value.Int32` was replaced with `kv.Int32Value`.
+ - `value.Uint32` was replaced with `kv.Uint32Value`.
+ - `value.Float32` was replaced with `kv.Float32Value`.
+ - `value.String` was replaced with `kv.StringValue`.
+ - `value.Int` was replaced with `kv.IntValue`.
+ - `value.Uint` was replaced with `kv.UintValue`.
+ - `value.Array` was replaced with `kv.ArrayValue`.
+- Rename `Infer` to `Any` in the `go.opentelemetry.io/otel/api/kv` package. (#972)
+- Change `othttp` to use the `httpsnoop` package to wrap the `ResponseWriter` so that optional interfaces (`http.Hijacker`, `http.Flusher`, etc.) that are implemented by the original `ResponseWriter`are also implemented by the wrapped `ResponseWriter`. (#979)
+- Rename `go.opentelemetry.io/otel/sdk/metric/aggregator/test` package to `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest`. (#980)
+- Make the SDK into its own Go module called `go.opentelemetry.io/otel/sdk`. (#985)
+- Changed the default trace `Sampler` from `AlwaysOn` to `ParentOrElse(AlwaysOn)`. (#989)
+
+### Removed
+
+- The `IndexedAttribute` function from the `go.opentelemetry.io/otel/api/label` package was removed in favor of `IndexedLabel` which it was synonymous with. (#970)
+
+### Fixed
+
+- Bump github.com/golangci/golangci-lint from 1.28.3 to 1.29.0 in /tools. (#953)
+- Bump github.com/google/go-cmp from 0.5.0 to 0.5.1. (#957)
+- Use `global.Handle` for span export errors in the OTLP exporter. (#946)
+- Correct Go language formatting in the README documentation. (#961)
+- Remove default SDK dependencies from the `go.opentelemetry.io/otel/api` package. (#977)
+- Remove default SDK dependencies from the `go.opentelemetry.io/otel/instrumentation` package. (#983)
+- Move documented examples for `go.opentelemetry.io/otel/instrumentation/grpctrace` interceptors into Go example tests. (#984)
+
+## [0.9.0] - 2020-07-20
+
+### Added
+
+- A new Resource Detector interface is included to allow resources to be automatically detected and included. (#939)
+- A Detector to automatically detect resources from an environment variable. (#939)
+- Github action to generate protobuf Go bindings locally in `internal/opentelemetry-proto-gen`. (#938)
+- OTLP .proto files from `open-telemetry/opentelemetry-proto` imported as a git submodule under `internal/opentelemetry-proto`.
+ References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#942)
+
+### Changed
+
+- Non-nil value `struct`s for key-value pairs will be marshalled using JSON rather than `Sprintf`. (#948)
+
+### Removed
+
+- Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943)
+
+## [0.8.0] - 2020-07-09
+
+### Added
+
+- The `B3Encoding` type to represent the B3 encoding(s) the B3 propagator can inject.
+ A value for HTTP supported encodings (Multiple Header: `MultipleHeader`, Single Header: `SingleHeader`) are included. (#882)
+- The `FlagsDeferred` trace flag to indicate if the trace sampling decision has been deferred. (#882)
+- The `FlagsDebug` trace flag to indicate if the trace is a debug trace. (#882)
+- Add `peer.service` semantic attribute. (#898)
+- Add database-specific semantic attributes. (#899)
+- Add semantic convention for `faas.coldstart` and `container.id`. (#909)
+- Add http content size semantic conventions. (#905)
+- Include `http.request_content_length` in HTTP request basic attributes. (#905)
+- Add semantic conventions for operating system process resource attribute keys. (#919)
+- The Jaeger exporter now has a `WithBatchMaxCount` option to specify the maximum number of spans sent in a batch. (#931)
+
+### Changed
+
+- Update `CONTRIBUTING.md` to ask for updates to `CHANGELOG.md` with each pull request. (#879)
+- Use lowercase header names for B3 Multiple Headers. (#881)
+- The B3 propagator `SingleHeader` field has been replaced with `InjectEncoding`.
+ This new field can be set to combinations of the `B3Encoding` bitmasks and will inject trace information in these encodings.
+ If no encoding is set, the propagator will default to `MultipleHeader` encoding. (#882)
+- The B3 propagator now extracts from either HTTP encoding of B3 (Single Header or Multiple Header) based on what is contained in the header.
+ Preference is given to Single Header encoding with Multiple Header being the fallback if Single Header is not found or is invalid.
+ This behavior change is made to dynamically support all correctly encoded traces received instead of having to guess the expected encoding prior to receiving. (#882)
+- Extend semantic conventions for RPC. (#900)
+- To match constant naming conventions in the `api/standard` package, the `FaaS*` key names are appended with a suffix of `Key`. (#920)
+ - `"api/standard".FaaSName` -> `FaaSNameKey`
+ - `"api/standard".FaaSID` -> `FaaSIDKey`
+ - `"api/standard".FaaSVersion` -> `FaaSVersionKey`
+ - `"api/standard".FaaSInstance` -> `FaaSInstanceKey`
+
+### Removed
+
+- The `FlagsUnused` trace flag is removed.
+ The purpose of this flag was to act as the inverse of `FlagsSampled`, the inverse of `FlagsSampled` is used instead. (#882)
+- The B3 header constants (`B3SingleHeader`, `B3DebugFlagHeader`, `B3TraceIDHeader`, `B3SpanIDHeader`, `B3SampledHeader`, `B3ParentSpanIDHeader`) are removed.
+ If B3 header keys are needed [the authoritative OpenZipkin package constants](https://pkg.go.dev/github.com/openzipkin/zipkin-go@v0.2.2/propagation/b3?tab=doc#pkg-constants) should be used instead. (#882)
+
+### Fixed
+
+- The B3 Single Header name is now correctly `b3` instead of the previous `X-B3`. (#881)
+- The B3 propagator now correctly supports sampling only values (`b3: 0`, `b3: 1`, or `b3: d`) for a Single B3 Header. (#882)
+- The B3 propagator now propagates the debug flag.
+ This removes the behavior of changing the debug flag into a set sampling bit.
+ Instead, this now follow the B3 specification and omits the `X-B3-Sampling` header. (#882)
+- The B3 propagator now tracks "unset" sampling state (meaning "defer the decision") and does not set the `X-B3-Sampling` header when injecting. (#882)
+- Bump github.com/itchyny/gojq from 0.10.3 to 0.10.4 in /tools. (#883)
+- Bump github.com/opentracing/opentracing-go from v1.1.1-0.20190913142402-a7454ce5950e to v1.2.0. (#885)
+- The tracing time conversion for OTLP spans is now correctly set to `UnixNano`. (#896)
+- Ensure span status is not set to `Unknown` when no HTTP status code is provided as it is assumed to be `200 OK`. (#908)
+- Ensure `httptrace.clientTracer` closes `http.headers` span. (#912)
+- Prometheus exporter will not apply stale updates or forget inactive metrics. (#903)
+- Add test for api.standard `HTTPClientAttributesFromHTTPRequest`. (#905)
+- Bump github.com/golangci/golangci-lint from 1.27.0 to 1.28.1 in /tools. (#901, #913)
+- Update otel-collector example to use the v0.5.0 collector. (#915)
+- The `grpctrace` instrumentation uses a span name conforming to the OpenTelemetry semantic conventions (does not contain a leading slash (`/`)). (#922)
+- The `grpctrace` instrumentation includes an `rpc.method` attribute now set to the gRPC method name. (#900, #922)
+- The `grpctrace` instrumentation `rpc.service` attribute now contains the package name if one exists.
+ This is in accordance with OpenTelemetry semantic conventions. (#922)
+- Correlation Context extractor will no longer insert an empty map into the returned context when no valid values are extracted. (#923)
+- Bump google.golang.org/api from 0.28.0 to 0.29.0 in /exporters/trace/jaeger. (#925)
+- Bump github.com/itchyny/gojq from 0.10.4 to 0.11.0 in /tools. (#926)
+- Bump github.com/golangci/golangci-lint from 1.28.1 to 1.28.2 in /tools. (#930)
+
+## [0.7.0] - 2020-06-26
+
+This release implements the v0.5.0 version of the OpenTelemetry specification.
+
+### Added
+
+- The othttp instrumentation now includes default metrics. (#861)
+- This CHANGELOG file to track all changes in the project going forward.
+- Support for array type attributes. (#798)
+- Apply transitive dependabot go.mod dependency updates as part of a new automatic Github workflow. (#844)
+- Timestamps are now passed to exporters for each export. (#835)
+- Add new `Accumulation` type to metric SDK to transport telemetry from `Accumulator`s to `Processor`s.
+ This replaces the prior `Record` `struct` use for this purpose. (#835)
+- New dependabot integration to automate package upgrades. (#814)
+- `Meter` and `Tracer` implementations accept instrumentation version version as an optional argument.
+ This instrumentation version is passed on to exporters. (#811) (#805) (#802)
+- The OTLP exporter includes the instrumentation version in telemetry it exports. (#811)
+- Environment variables for Jaeger exporter are supported. (#796)
+- New `aggregation.Kind` in the export metric API. (#808)
+- New example that uses OTLP and the collector. (#790)
+- Handle errors in the span `SetName` during span initialization. (#791)
+- Default service config to enable retries for retry-able failed requests in the OTLP exporter and an option to override this default. (#777)
+- New `go.opentelemetry.io/otel/api/oterror` package to uniformly support error handling and definitions for the project. (#778)
+- New `global` default implementation of the `go.opentelemetry.io/otel/api/oterror.Handler` interface to be used to handle errors prior to an user defined `Handler`.
+ There is also functionality for the user to register their `Handler` as well as a convenience function `Handle` to handle an error with this global `Handler`(#778)
+- Options to specify propagators for httptrace and grpctrace instrumentation. (#784)
+- The required `application/json` header for the Zipkin exporter is included in all exports. (#774)
+- Integrate HTTP semantics helpers from the contrib repository into the `api/standard` package. #769
+
+### Changed
+
+- Rename `Integrator` to `Processor` in the metric SDK. (#863)
+- Rename `AggregationSelector` to `AggregatorSelector`. (#859)
+- Rename `SynchronizedCopy` to `SynchronizedMove`. (#858)
+- Rename `simple` integrator to `basic` integrator. (#857)
+- Merge otlp collector examples. (#841)
+- Change the metric SDK to support cumulative, delta, and pass-through exporters directly.
+ With these changes, cumulative and delta specific exporters are able to request the correct kind of aggregation from the SDK. (#840)
+- The `Aggregator.Checkpoint` API is renamed to `SynchronizedCopy` and adds an argument, a different `Aggregator` into which the copy is stored. (#812)
+- The `export.Aggregator` contract is that `Update()` and `SynchronizedCopy()` are synchronized with each other.
+ All the aggregation interfaces (`Sum`, `LastValue`, ...) are not meant to be synchronized, as the caller is expected to synchronize aggregators at a higher level after the `Accumulator`.
+ Some of the `Aggregators` used unnecessary locking and that has been cleaned up. (#812)
+- Use of `metric.Number` was replaced by `int64` now that we use `sync.Mutex` in the `MinMaxSumCount` and `Histogram` `Aggregators`. (#812)
+- Replace `AlwaysParentSample` with `ParentSample(fallback)` to match the OpenTelemetry v0.5.0 specification. (#810)
+- Rename `sdk/export/metric/aggregator` to `sdk/export/metric/aggregation`. #808
+- Send configured headers with every request in the OTLP exporter, instead of just on connection creation. (#806)
+- Update error handling for any one off error handlers, replacing, instead, with the `global.Handle` function. (#791)
+- Rename `plugin` directory to `instrumentation` to match the OpenTelemetry specification. (#779)
+- Makes the argument order to Histogram and DDSketch `New()` consistent. (#781)
+
+### Removed
+
+- `Uint64NumberKind` and related functions from the API. (#864)
+- Context arguments from `Aggregator.Checkpoint` and `Integrator.Process` as they were unused. (#803)
+- `SpanID` is no longer included in parameters for sampling decision to match the OpenTelemetry specification. (#775)
+
+### Fixed
+
+- Upgrade OTLP exporter to opentelemetry-proto matching the opentelemetry-collector v0.4.0 release. (#866)
+- Allow changes to `go.sum` and `go.mod` when running dependabot tidy-up. (#871)
+- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1. (#824)
+- Bump github.com/prometheus/client_golang from 1.7.0 to 1.7.1 in /exporters/metric/prometheus. (#867)
+- Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/jaeger. (#853)
+- Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/zipkin. (#854)
+- Bumps github.com/golang/protobuf from 1.3.2 to 1.4.2 (#848)
+- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/otlp (#817)
+- Bump github.com/golangci/golangci-lint from 1.25.1 to 1.27.0 in /tools (#828)
+- Bump github.com/prometheus/client_golang from 1.5.0 to 1.7.0 in /exporters/metric/prometheus (#838)
+- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/jaeger (#829)
+- Bump github.com/benbjohnson/clock from 1.0.0 to 1.0.3 (#815)
+- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/zipkin (#823)
+- Bump github.com/itchyny/gojq from 0.10.1 to 0.10.3 in /tools (#830)
+- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/metric/prometheus (#822)
+- Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/zipkin (#820)
+- Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/jaeger (#831)
+- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 (#836)
+- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/trace/jaeger (#837)
+- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/otlp (#839)
+- Bump google.golang.org/api from 0.20.0 to 0.28.0 in /exporters/trace/jaeger (#843)
+- Set span status from HTTP status code in the othttp instrumentation. (#832)
+- Fixed typo in push controller comment. (#834)
+- The `Aggregator` testing has been updated and cleaned. (#812)
+- `metric.Number(0)` expressions are replaced by `0` where possible. (#812)
+- Fixed `global` `handler_test.go` test failure. #804
+- Fixed `BatchSpanProcessor.Shutdown` to wait until all spans are processed. (#766)
+- Fixed OTLP example's accidental early close of exporter. (#807)
+- Ensure zipkin exporter reads and closes response body. (#788)
+- Update instrumentation to use `api/standard` keys instead of custom keys. (#782)
+- Clean up tools and RELEASING documentation. (#762)
+
+## [0.6.0] - 2020-05-21
+
+### Added
+
+- Support for `Resource`s in the prometheus exporter. (#757)
+- New pull controller. (#751)
+- New `UpDownSumObserver` instrument. (#750)
+- OpenTelemetry collector demo. (#711)
+- New `SumObserver` instrument. (#747)
+- New `UpDownCounter` instrument. (#745)
+- New timeout `Option` and configuration function `WithTimeout` to the push controller. (#742)
+- New `api/standards` package to implement semantic conventions and standard key-value generation. (#731)
+
+### Changed
+
+- Rename `Register*` functions in the metric API to `New*` for all `Observer` instruments. (#761)
+- Use `[]float64` for histogram boundaries, not `[]metric.Number`. (#758)
+- Change OTLP example to use exporter as a trace `Syncer` instead of as an unneeded `Batcher`. (#756)
+- Replace `WithResourceAttributes()` with `WithResource()` in the trace SDK. (#754)
+- The prometheus exporter now uses the new pull controller. (#751)
+- Rename `ScheduleDelayMillis` to `BatchTimeout` in the trace `BatchSpanProcessor`.(#752)
+- Support use of synchronous instruments in asynchronous callbacks (#725)
+- Move `Resource` from the `Export` method parameter into the metric export `Record`. (#739)
+- Rename `Observer` instrument to `ValueObserver`. (#734)
+- The push controller now has a method (`Provider()`) to return a `metric.Provider` instead of the old `Meter` method that acted as a `metric.Provider`. (#738)
+- Replace `Measure` instrument by `ValueRecorder` instrument. (#732)
+- Rename correlation context header from `"Correlation-Context"` to `"otcorrelations"` to match the OpenTelemetry specification. (#727)
+
+### Fixed
+
+- Ensure gRPC `ClientStream` override methods do not panic in grpctrace package. (#755)
+- Disable parts of `BatchSpanProcessor` test until a fix is found. (#743)
+- Fix `string` case in `kv` `Infer` function. (#746)
+- Fix panic in grpctrace client interceptors. (#740)
+- Refactor the `api/metrics` push controller and add `CheckpointSet` synchronization. (#737)
+- Rewrite span batch process queue batching logic. (#719)
+- Remove the push controller named Meter map. (#738)
+- Fix Histogram aggregator initial state (fix #735). (#736)
+- Ensure golang alpine image is running `golang-1.14` for examples. (#733)
+- Added test for grpctrace `UnaryInterceptorClient`. (#695)
+- Rearrange `api/metric` code layout. (#724)
+
+## [0.5.0] - 2020-05-13
+
+### Added
+
+- Batch `Observer` callback support. (#717)
+- Alias `api` types to root package of project. (#696)
+- Create basic `othttp.Transport` for simple client instrumentation. (#678)
+- `SetAttribute(string, interface{})` to the trace API. (#674)
+- Jaeger exporter option that allows user to specify custom http client. (#671)
+- `Stringer` and `Infer` methods to `key`s. (#662)
+
+### Changed
+
+- Rename `NewKey` in the `kv` package to just `Key`. (#721)
+- Move `core` and `key` to `kv` package. (#720)
+- Make the metric API `Meter` a `struct` so the abstract `MeterImpl` can be passed and simplify implementation. (#709)
+- Rename SDK `Batcher` to `Integrator` to match draft OpenTelemetry SDK specification. (#710)
+- Rename SDK `Ungrouped` integrator to `simple.Integrator` to match draft OpenTelemetry SDK specification. (#710)
+- Rename SDK `SDK` `struct` to `Accumulator` to match draft OpenTelemetry SDK specification. (#710)
+- Move `Number` from `core` to `api/metric` package. (#706)
+- Move `SpanContext` from `core` to `trace` package. (#692)
+- Change traceparent header from `Traceparent` to `traceparent` to implement the W3C specification. (#681)
+
+### Fixed
+
+- Update tooling to run generators in all submodules. (#705)
+- gRPC interceptor regexp to match methods without a service name. (#683)
+- Use a `const` for padding 64-bit B3 trace IDs. (#701)
+- Update `mockZipkin` listen address from `:0` to `127.0.0.1:0`. (#700)
+- Left-pad 64-bit B3 trace IDs with zero. (#698)
+- Propagate at least the first W3C tracestate header. (#694)
+- Remove internal `StateLocker` implementation. (#688)
+- Increase instance size CI system uses. (#690)
+- Add a `key` benchmark and use reflection in `key.Infer()`. (#679)
+- Fix internal `global` test by using `global.Meter` with `RecordBatch()`. (#680)
+- Reimplement histogram using mutex instead of `StateLocker`. (#669)
+- Switch `MinMaxSumCount` to a mutex lock implementation instead of `StateLocker`. (#667)
+- Update documentation to not include any references to `WithKeys`. (#672)
+- Correct misspelling. (#668)
+- Fix clobbering of the span context if extraction fails. (#656)
+- Bump `golangci-lint` and work around the corrupting bug. (#666) (#670)
+
+## [0.4.3] - 2020-04-24
+
+### Added
+
+- `Dockerfile` and `docker-compose.yml` to run example code. (#635)
+- New `grpctrace` package that provides gRPC client and server interceptors for both unary and stream connections. (#621)
+- New `api/label` package, providing common label set implementation. (#651)
+- Support for JSON marshaling of `Resources`. (#654)
+- `TraceID` and `SpanID` implementations for `Stringer` interface. (#642)
+- `RemoteAddrKey` in the othttp plugin to include the HTTP client address in top-level spans. (#627)
+- `WithSpanFormatter` option to the othttp plugin. (#617)
+- Updated README to include section for compatible libraries and include reference to the contrib repository. (#612)
+- The prometheus exporter now supports exporting histograms. (#601)
+- A `String` method to the `Resource` to return a hashable identifier for a now unique resource. (#613)
+- An `Iter` method to the `Resource` to return an array `AttributeIterator`. (#613)
+- An `Equal` method to the `Resource` test the equivalence of resources. (#613)
+- An iterable structure (`AttributeIterator`) for `Resource` attributes.
+
+### Changed
+
+- zipkin export's `NewExporter` now requires a `serviceName` argument to ensure this needed values is provided. (#644)
+- Pass `Resources` through the metrics export pipeline. (#659)
+
+### Removed
+
+- `WithKeys` option from the metric API. (#639)
+
+### Fixed
+
+- Use the `label.Set.Equivalent` value instead of an encoding in the batcher. (#658)
+- Correct typo `trace.Exporter` to `trace.SpanSyncer` in comments. (#653)
+- Use type names for return values in jaeger exporter. (#648)
+- Increase the visibility of the `api/key` package by updating comments and fixing usages locally. (#650)
+- `Checkpoint` only after `Update`; Keep records in the `sync.Map` longer. (#647)
+- Do not cache `reflect.ValueOf()` in metric Labels. (#649)
+- Batch metrics exported from the OTLP exporter based on `Resource` and labels. (#626)
+- Add error wrapping to the prometheus exporter. (#631)
+- Update the OTLP exporter batching of traces to use a unique `string` representation of an associated `Resource` as the batching key. (#623)
+- Update OTLP `SpanData` transform to only include the `ParentSpanID` if one exists. (#614)
+- Update `Resource` internal representation to uniquely and reliably identify resources. (#613)
+- Check return value from `CheckpointSet.ForEach` in prometheus exporter. (#622)
+- Ensure spans created by httptrace client tracer reflect operation structure. (#618)
+- Create a new recorder rather than reuse when multiple observations in same epoch for asynchronous instruments. #610
+- The default port the OTLP exporter uses to connect to the OpenTelemetry collector is updated to match the one the collector listens on by default. (#611)
+
+## [0.4.2] - 2020-03-31
+
+### Fixed
+
+- Fix `pre_release.sh` to update version in `sdk/opentelemetry.go`. (#607)
+- Fix time conversion from internal to OTLP in OTLP exporter. (#606)
+
+## [0.4.1] - 2020-03-31
+
+### Fixed
+
+- Update `tag.sh` to create signed tags. (#604)
+
+## [0.4.0] - 2020-03-30
+
+### Added
+
+- New API package `api/metric/registry` that exposes a `MeterImpl` wrapper for use by SDKs to generate unique instruments. (#580)
+- Script to verify examples after a new release. (#579)
+
+### Removed
+
+- The dogstatsd exporter due to lack of support.
+ This additionally removes support for statsd. (#591)
+- `LabelSet` from the metric API.
+ This is replaced by a `[]core.KeyValue` slice. (#595)
+- `Labels` from the metric API's `Meter` interface. (#595)
+
+### Changed
+
+- The metric `export.Labels` became an interface which the SDK implements and the `export` package provides a simple, immutable implementation of this interface intended for testing purposes. (#574)
+- Renamed `internal/metric.Meter` to `MeterImpl`. (#580)
+- Renamed `api/global/internal.obsImpl` to `asyncImpl`. (#580)
+
+### Fixed
+
+- Corrected missing return in mock span. (#582)
+- Update License header for all source files to match CNCF guidelines and include a test to ensure it is present. (#586) (#596)
+- Update to v0.3.0 of the OTLP in the OTLP exporter. (#588)
+- Update pre-release script to be compatible between GNU and BSD based systems. (#592)
+- Add a `RecordBatch` benchmark. (#594)
+- Moved span transforms of the OTLP exporter to the internal package. (#593)
+- Build both go-1.13 and go-1.14 in circleci to test for all supported versions of Go. (#569)
+- Removed unneeded allocation on empty labels in OLTP exporter. (#597)
+- Update `BatchedSpanProcessor` to process the queue until no data but respect max batch size. (#599)
+- Update project documentation godoc.org links to pkg.go.dev. (#602)
+
+## [0.3.0] - 2020-03-21
+
+This is a first official beta release, which provides almost fully complete metrics, tracing, and context propagation functionality.
+There is still a possibility of breaking changes.
+
+### Added
+
+- Add `Observer` metric instrument. (#474)
+- Add global `Propagators` functionality to enable deferred initialization for propagators registered before the first Meter SDK is installed. (#494)
+- Simplified export setup pipeline for the jaeger exporter to match other exporters. (#459)
+- The zipkin trace exporter. (#495)
+- The OTLP exporter to export metric and trace telemetry to the OpenTelemetry collector. (#497) (#544) (#545)
+- Add `StatusMessage` field to the trace `Span`. (#524)
+- Context propagation in OpenTracing bridge in terms of OpenTelemetry context propagation. (#525)
+- The `Resource` type was added to the SDK. (#528)
+- The global API now supports a `Tracer` and `Meter` function as shortcuts to getting a global `*Provider` and calling these methods directly. (#538)
+- The metric API now defines a generic `MeterImpl` interface to support general purpose `Meter` construction.
+ Additionally, `SyncImpl` and `AsyncImpl` are added to support general purpose instrument construction. (#560)
+- A metric `Kind` is added to represent the `MeasureKind`, `ObserverKind`, and `CounterKind`. (#560)
+- Scripts to better automate the release process. (#576)
+
+### Changed
+
+- Default to to use `AlwaysSampler` instead of `ProbabilitySampler` to match OpenTelemetry specification. (#506)
+- Renamed `AlwaysSampleSampler` to `AlwaysOnSampler` in the trace API. (#511)
+- Renamed `NeverSampleSampler` to `AlwaysOffSampler` in the trace API. (#511)
+- The `Status` field of the `Span` was changed to `StatusCode` to disambiguate with the added `StatusMessage`. (#524)
+- Updated the trace `Sampler` interface conform to the OpenTelemetry specification. (#531)
+- Rename metric API `Options` to `Config`. (#541)
+- Rename metric `Counter` aggregator to be `Sum`. (#541)
+- Unify metric options into `Option` from instrument specific options. (#541)
+- The trace API's `TraceProvider` now support `Resource`s. (#545)
+- Correct error in zipkin module name. (#548)
+- The jaeger trace exporter now supports `Resource`s. (#551)
+- Metric SDK now supports `Resource`s.
+ The `WithResource` option was added to configure a `Resource` on creation and the `Resource` method was added to the metric `Descriptor` to return the associated `Resource`. (#552)
+- Replace `ErrNoLastValue` and `ErrEmptyDataSet` by `ErrNoData` in the metric SDK. (#557)
+- The stdout trace exporter now supports `Resource`s. (#558)
+- The metric `Descriptor` is now included at the API instead of the SDK. (#560)
+- Replace `Ordered` with an iterator in `export.Labels`. (#567)
+
+### Removed
+
+- The vendor specific Stackdriver. It is now hosted on 3rd party vendor infrastructure. (#452)
+- The `Unregister` method for metric observers as it is not in the OpenTelemetry specification. (#560)
+- `GetDescriptor` from the metric SDK. (#575)
+- The `Gauge` instrument from the metric API. (#537)
+
+### Fixed
+
+- Make histogram aggregator checkpoint consistent. (#438)
+- Update README with import instructions and how to build and test. (#505)
+- The default label encoding was updated to be unique. (#508)
+- Use `NewRoot` in the othttp plugin for public endpoints. (#513)
+- Fix data race in `BatchedSpanProcessor`. (#518)
+- Skip test-386 for Mac OS 10.15.x (Catalina and upwards). #521
+- Use a variable-size array to represent ordered labels in maps. (#523)
+- Update the OTLP protobuf and update changed import path. (#532)
+- Use `StateLocker` implementation in `MinMaxSumCount`. (#546)
+- Eliminate goroutine leak in histogram stress test. (#547)
+- Update OTLP exporter with latest protobuf. (#550)
+- Add filters to the othttp plugin. (#556)
+- Provide an implementation of the `Header*` filters that do not depend on Go 1.14. (#565)
+- Encode labels once during checkpoint.
+ The checkpoint function is executed in a single thread so we can do the encoding lazily before passing the encoded version of labels to the exporter.
+ This is a cheap and quick way to avoid encoding the labels on every collection interval. (#572)
+- Run coverage over all packages in `COVERAGE_MOD_DIR`. (#573)
+
+## [0.2.3] - 2020-03-04
+
+### Added
+
+- `RecordError` method on `Span`s in the trace API to Simplify adding error events to spans. (#473)
+- Configurable push frequency for exporters setup pipeline. (#504)
+
+### Changed
+
+- Rename the `exporter` directory to `exporters`.
+ The `go.opentelemetry.io/otel/exporter/trace/jaeger` package was mistakenly released with a `v1.0.0` tag instead of `v0.1.0`.
+ This resulted in all subsequent releases not becoming the default latest.
+ A consequence of this was that all `go get`s pulled in the incompatible `v0.1.0` release of that package when pulling in more recent packages from other otel packages.
+ Renaming the `exporter` directory to `exporters` fixes this issue by renaming the package and therefore clearing any existing dependency tags.
+ Consequentially, this action also renames *all* exporter packages. (#502)
+
+### Removed
+
+- The `CorrelationContextHeader` constant in the `correlation` package is no longer exported. (#503)
+
+## [0.2.2] - 2020-02-27
+
+### Added
+
+- `HTTPSupplier` interface in the propagation API to specify methods to retrieve and store a single value for a key to be associated with a carrier. (#467)
+- `HTTPExtractor` interface in the propagation API to extract information from an `HTTPSupplier` into a context. (#467)
+- `HTTPInjector` interface in the propagation API to inject information into an `HTTPSupplier.` (#467)
+- `Config` and configuring `Option` to the propagator API. (#467)
+- `Propagators` interface in the propagation API to contain the set of injectors and extractors for all supported carrier formats. (#467)
+- `HTTPPropagator` interface in the propagation API to inject and extract from an `HTTPSupplier.` (#467)
+- `WithInjectors` and `WithExtractors` functions to the propagator API to configure injectors and extractors to use. (#467)
+- `ExtractHTTP` and `InjectHTTP` functions to apply configured HTTP extractors and injectors to a passed context. (#467)
+- Histogram aggregator. (#433)
+- `DefaultPropagator` function and have it return `trace.TraceContext` as the default context propagator. (#456)
+- `AlwaysParentSample` sampler to the trace API. (#455)
+- `WithNewRoot` option function to the trace API to specify the created span should be considered a root span. (#451)
+
+### Changed
+
+- Renamed `WithMap` to `ContextWithMap` in the correlation package. (#481)
+- Renamed `FromContext` to `MapFromContext` in the correlation package. (#481)
+- Move correlation context propagation to correlation package. (#479)
+- Do not default to putting remote span context into links. (#480)
+- `Tracer.WithSpan` updated to accept `StartOptions`. (#472)
+- Renamed `MetricKind` to `Kind` to not stutter in the type usage. (#432)
+- Renamed the `export` package to `metric` to match directory structure. (#432)
+- Rename the `api/distributedcontext` package to `api/correlation`. (#444)
+- Rename the `api/propagators` package to `api/propagation`. (#444)
+- Move the propagators from the `propagators` package into the `trace` API package. (#444)
+- Update `Float64Gauge`, `Int64Gauge`, `Float64Counter`, `Int64Counter`, `Float64Measure`, and `Int64Measure` metric methods to use value receivers instead of pointers. (#462)
+- Moved all dependencies of tools package to a tools directory. (#466)
+
+### Removed
+
+- Binary propagators. (#467)
+- NOOP propagator. (#467)
+
+### Fixed
+
+- Upgraded `github.com/golangci/golangci-lint` from `v1.21.0` to `v1.23.6` in `tools/`. (#492)
+- Fix a possible nil-dereference crash (#478)
+- Correct comments for `InstallNewPipeline` in the stdout exporter. (#483)
+- Correct comments for `InstallNewPipeline` in the dogstatsd exporter. (#484)
+- Correct comments for `InstallNewPipeline` in the prometheus exporter. (#482)
+- Initialize `onError` based on `Config` in prometheus exporter. (#486)
+- Correct module name in prometheus exporter README. (#475)
+- Removed tracer name prefix from span names. (#430)
+- Fix `aggregator_test.go` import package comment. (#431)
+- Improved detail in stdout exporter. (#436)
+- Fix a dependency issue (generate target should depend on stringer, not lint target) in Makefile. (#442)
+- Reorders the Makefile targets within `precommit` target so we generate files and build the code before doing linting, so we can get much nicer errors about syntax errors from the compiler. (#442)
+- Reword function documentation in gRPC plugin. (#446)
+- Send the `span.kind` tag to Jaeger from the jaeger exporter. (#441)
+- Fix `metadataSupplier` in the jaeger exporter to overwrite the header if existing instead of appending to it. (#441)
+- Upgraded to Go 1.13 in CI. (#465)
+- Correct opentelemetry.io URL in trace SDK documentation. (#464)
+- Refactored reference counting logic in SDK determination of stale records. (#468)
+- Add call to `runtime.Gosched` in instrument `acquireHandle` logic to not block the collector. (#469)
+
+## [0.2.1.1] - 2020-01-13
+
+### Fixed
+
+- Use stateful batcher on Prometheus exporter fixing regression introduced in #395. (#428)
+
+## [0.2.1] - 2020-01-08
+
+### Added
+
+- Global meter forwarding implementation.
+ This enables deferred initialization for metric instruments registered before the first Meter SDK is installed. (#392)
+- Global trace forwarding implementation.
+ This enables deferred initialization for tracers registered before the first Trace SDK is installed. (#406)
+- Standardize export pipeline creation in all exporters. (#395)
+- A testing, organization, and comments for 64-bit field alignment. (#418)
+- Script to tag all modules in the project. (#414)
+
+### Changed
+
+- Renamed `propagation` package to `propagators`. (#362)
+- Renamed `B3Propagator` propagator to `B3`. (#362)
+- Renamed `TextFormatPropagator` propagator to `TextFormat`. (#362)
+- Renamed `BinaryPropagator` propagator to `Binary`. (#362)
+- Renamed `BinaryFormatPropagator` propagator to `BinaryFormat`. (#362)
+- Renamed `NoopTextFormatPropagator` propagator to `NoopTextFormat`. (#362)
+- Renamed `TraceContextPropagator` propagator to `TraceContext`. (#362)
+- Renamed `SpanOption` to `StartOption` in the trace API. (#369)
+- Renamed `StartOptions` to `StartConfig` in the trace API. (#369)
+- Renamed `EndOptions` to `EndConfig` in the trace API. (#369)
+- `Number` now has a pointer receiver for its methods. (#375)
+- Renamed `CurrentSpan` to `SpanFromContext` in the trace API. (#379)
+- Renamed `SetCurrentSpan` to `ContextWithSpan` in the trace API. (#379)
+- Renamed `Message` in Event to `Name` in the trace API. (#389)
+- Prometheus exporter no longer aggregates metrics, instead it only exports them. (#385)
+- Renamed `HandleImpl` to `BoundInstrumentImpl` in the metric API. (#400)
+- Renamed `Float64CounterHandle` to `Float64CounterBoundInstrument` in the metric API. (#400)
+- Renamed `Int64CounterHandle` to `Int64CounterBoundInstrument` in the metric API. (#400)
+- Renamed `Float64GaugeHandle` to `Float64GaugeBoundInstrument` in the metric API. (#400)
+- Renamed `Int64GaugeHandle` to `Int64GaugeBoundInstrument` in the metric API. (#400)
+- Renamed `Float64MeasureHandle` to `Float64MeasureBoundInstrument` in the metric API. (#400)
+- Renamed `Int64MeasureHandle` to `Int64MeasureBoundInstrument` in the metric API. (#400)
+- Renamed `Release` method for bound instruments in the metric API to `Unbind`. (#400)
+- Renamed `AcquireHandle` method for bound instruments in the metric API to `Bind`. (#400)
+- Renamed the `File` option in the stdout exporter to `Writer`. (#404)
+- Renamed all `Options` to `Config` for all metric exports where this wasn't already the case.
+
+### Fixed
+
+- Aggregator import path corrected. (#421)
+- Correct links in README. (#368)
+- The README was updated to match latest code changes in its examples. (#374)
+- Don't capitalize error statements. (#375)
+- Fix ignored errors. (#375)
+- Fix ambiguous variable naming. (#375)
+- Removed unnecessary type casting. (#375)
+- Use named parameters. (#375)
+- Updated release schedule. (#378)
+- Correct http-stackdriver example module name. (#394)
+- Removed the `http.request` span in `httptrace` package. (#397)
+- Add comments in the metrics SDK (#399)
+- Initialize checkpoint when creating ddsketch aggregator to prevent panic when merging into a empty one. (#402) (#403)
+- Add documentation of compatible exporters in the README. (#405)
+- Typo fix. (#408)
+- Simplify span check logic in SDK tracer implementation. (#419)
+
+## [0.2.0] - 2019-12-03
+
+### Added
+
+- Unary gRPC tracing example. (#351)
+- Prometheus exporter. (#334)
+- Dogstatsd metrics exporter. (#326)
+
+### Changed
+
+- Rename `MaxSumCount` aggregation to `MinMaxSumCount` and add the `Min` interface for this aggregation. (#352)
+- Rename `GetMeter` to `Meter`. (#357)
+- Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355)
+- Rename `HTTPB3Propagator` to `B3Propagator`. (#355)
+- Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355)
+- Move `/global` package to `/api/global`. (#356)
+- Rename `GetTracer` to `Tracer`. (#347)
+
+### Removed
+
+- `SetAttribute` from the `Span` interface in the trace API. (#361)
+- `AddLink` from the `Span` interface in the trace API. (#349)
+- `Link` from the `Span` interface in the trace API. (#349)
+
+### Fixed
+
+- Exclude example directories from coverage report. (#365)
+- Lint make target now implements automatic fixes with `golangci-lint` before a second run to report the remaining issues. (#360)
+- Drop `GO111MODULE` environment variable in Makefile as Go 1.13 is the project specified minimum version and this is environment variable is not needed for that version of Go. (#359)
+- Run the race checker for all test. (#354)
+- Redundant commands in the Makefile are removed. (#354)
+- Split the `generate` and `lint` targets of the Makefile. (#354)
+- Renames `circle-ci` target to more generic `ci` in Makefile. (#354)
+- Add example Prometheus binary to gitignore. (#358)
+- Support negative numbers with the `MaxSumCount`. (#335)
+- Resolve race conditions in `push_test.go` identified in #339. (#340)
+- Use `/usr/bin/env bash` as a shebang in scripts rather than `/bin/bash`. (#336)
+- Trace benchmark now tests both `AlwaysSample` and `NeverSample`.
+ Previously it was testing `AlwaysSample` twice. (#325)
+- Trace benchmark now uses a `[]byte` for `TraceID` to fix failing test. (#325)
+- Added a trace benchmark to test variadic functions in `setAttribute` vs `setAttributes` (#325)
+- The `defaultkeys` batcher was only using the encoded label set as its map key while building a checkpoint.
+ This allowed distinct label sets through, but any metrics sharing a label set could be overwritten or merged incorrectly.
+ This was corrected. (#333)
+
+## [0.1.2] - 2019-11-18
+
+### Fixed
+
+- Optimized the `simplelru` map for attributes to reduce the number of allocations. (#328)
+- Removed unnecessary unslicing of parameters that are already a slice. (#324)
+
+## [0.1.1] - 2019-11-18
+
+This release contains a Metrics SDK with stdout exporter and supports basic aggregations such as counter, gauges, array, maxsumcount, and ddsketch.
+
+### Added
+
+- Metrics stdout export pipeline. (#265)
+- Array aggregation for raw measure metrics. (#282)
+- The core.Value now have a `MarshalJSON` method. (#281)
+
+### Removed
+
+- `WithService`, `WithResources`, and `WithComponent` methods of tracers. (#314)
+- Prefix slash in `Tracer.Start()` for the Jaeger example. (#292)
+
+### Changed
+
+- Allocation in LabelSet construction to reduce GC overhead. (#318)
+- `trace.WithAttributes` to append values instead of replacing (#315)
+- Use a formula for tolerance in sampling tests. (#298)
+- Move export types into trace and metric-specific sub-directories. (#289)
+- `SpanKind` back to being based on an `int` type. (#288)
+
+### Fixed
+
+- URL to OpenTelemetry website in README. (#323)
+- Name of othttp default tracer. (#321)
+- `ExportSpans` for the stackdriver exporter now handles `nil` context. (#294)
+- CI modules cache to correctly restore/save from/to the cache. (#316)
+- Fix metric SDK race condition between `LoadOrStore` and the assignment `rec.recorder = i.meter.exporter.AggregatorFor(rec)`. (#293)
+- README now reflects the new code structure introduced with these changes. (#291)
+- Make the basic example work. (#279)
+
+## [0.1.0] - 2019-11-04
+
+This is the first release of open-telemetry go library.
+It contains api and sdk for trace and meter.
+
+### Added
+
+- Initial OpenTelemetry trace and metric API prototypes.
+- Initial OpenTelemetry trace, metric, and export SDK packages.
+- A wireframe bridge to support compatibility with OpenTracing.
+- Example code for a basic, http-stackdriver, http, jaeger, and named tracer setup.
+- Exporters for Jaeger, Stackdriver, and stdout.
+- Propagators for binary, B3, and trace-context protocols.
+- Project information and guidelines in the form of a README and CONTRIBUTING.
+- Tools to build the project and a Makefile to automate the process.
+- Apache-2.0 license.
+- CircleCI build CI manifest files.
+- CODEOWNERS file to track owners of this project.
+
+[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.34.0...HEAD
+[1.34.0/0.56.0/0.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.34.0
+[1.33.0/0.55.0/0.9.0/0.0.12]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.33.0
+[1.32.0/0.54.0/0.8.0/0.0.11]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.32.0
+[1.31.0/0.53.0/0.7.0/0.0.10]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.31.0
+[1.30.0/0.52.0/0.6.0/0.0.9]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.30.0
+[1.29.0/0.51.0/0.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.29.0
+[1.28.0/0.50.0/0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.28.0
+[1.27.0/0.49.0/0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.27.0
+[1.26.0/0.48.0/0.2.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.26.0
+[1.25.0/0.47.0/0.0.8/0.1.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.25.0
+[1.24.0/0.46.0/0.0.1-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.24.0
+[1.23.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.1
+[1.23.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0
+[1.23.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0-rc.1
+[1.22.0/0.45.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.22.0
+[1.21.0/0.44.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0
+[1.20.0/0.43.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.20.0
+[1.19.0/0.42.0/0.0.7]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0
+[1.19.0-rc.1/0.42.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0-rc.1
+[1.18.0/0.41.0/0.0.6]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.18.0
+[1.17.0/0.40.0/0.0.5]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.17.0
+[1.16.0/0.39.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0
+[1.16.0-rc.1/0.39.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0-rc.1
+[1.15.1/0.38.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.1
+[1.15.0/0.38.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0
+[1.15.0-rc.2/0.38.0-rc.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0-rc.2
+[1.15.0-rc.1/0.38.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0-rc.1
+[1.14.0/0.37.0/0.0.4]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.14.0
+[1.13.0/0.36.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.13.0
+[1.12.0/0.35.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.12.0
+[1.11.2/0.34.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.2
+[1.11.1/0.33.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.1
+[1.11.0/0.32.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.0
+[0.32.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.2
+[0.32.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.1
+[0.32.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.0
+[1.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.10.0
+[1.9.0/0.0.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.9.0
+[1.8.0/0.31.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.8.0
+[1.7.0/0.30.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.7.0
+[0.29.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.29.0
+[1.6.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.3
+[1.6.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.2
+[1.6.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.1
+[1.6.0/0.28.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.0
+[1.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.5.0
+[1.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.1
+[1.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.0
+[1.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.3.0
+[1.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.2.0
+[1.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.1.0
+[1.0.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.1
+[Metrics 0.24.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.24.0
+[1.0.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0
+[1.0.0-RC3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC3
+[1.0.0-RC2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC2
+[Experimental Metrics v0.22.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.22.0
+[1.0.0-RC1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC1
+[0.20.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.20.0
+[0.19.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.19.0
+[0.18.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.18.0
+[0.17.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.17.0
+[0.16.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.16.0
+[0.15.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.15.0
+[0.14.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.14.0
+[0.13.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.13.0
+[0.12.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.12.0
+[0.11.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.11.0
+[0.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.10.0
+[0.9.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.9.0
+[0.8.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.8.0
+[0.7.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.7.0
+[0.6.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.6.0
+[0.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.5.0
+[0.4.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.3
+[0.4.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.2
+[0.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.1
+[0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.0
+[0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.3.0
+[0.2.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.3
+[0.2.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.2
+[0.2.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1.1
+[0.2.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1
+[0.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.0
+[0.1.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.2
+[0.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.1
+[0.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.0
+
+
+
+[Go 1.23]: https://go.dev/doc/go1.23
+[Go 1.22]: https://go.dev/doc/go1.22
+[Go 1.21]: https://go.dev/doc/go1.21
+[Go 1.20]: https://go.dev/doc/go1.20
+[Go 1.19]: https://go.dev/doc/go1.19
+[Go 1.18]: https://go.dev/doc/go1.18
+
+[metric API]:https://pkg.go.dev/go.opentelemetry.io/otel/metric
+[metric SDK]:https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric
+[trace API]:https://pkg.go.dev/go.opentelemetry.io/otel/trace
+
+[GO-2024-2687]: https://pkg.go.dev/vuln/GO-2024-2687
diff --git a/vendor/go.opentelemetry.io/otel/CODEOWNERS b/vendor/go.opentelemetry.io/otel/CODEOWNERS
new file mode 100644
index 00000000..945a07d2
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/CODEOWNERS
@@ -0,0 +1,17 @@
+#####################################################
+#
+# List of approvers for this repository
+#
+#####################################################
+#
+# Learn about membership in OpenTelemetry community:
+# https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md
+#
+#
+# Learn about CODEOWNERS file format:
+# https://help.github.com/en/articles/about-code-owners
+#
+
+* @MrAlias @XSAM @dashpole @pellared @dmathieu
+
+CODEOWNERS @MrAlias @pellared @dashpole @XSAM @dmathieu
diff --git a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
new file mode 100644
index 00000000..22a2e9db
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md
@@ -0,0 +1,664 @@
+# Contributing to opentelemetry-go
+
+The Go special interest group (SIG) meets regularly. See the
+OpenTelemetry
+[community](https://github.com/open-telemetry/community#golang-sdk)
+repo for information on this and other language SIGs.
+
+See the [public meeting
+notes](https://docs.google.com/document/d/1E5e7Ld0NuU1iVvf-42tOBpu2VBBLYnh73GJuITGJTTU/edit)
+for a summary description of past meetings. To request edit access,
+join the meeting or get in touch on
+[Slack](https://cloud-native.slack.com/archives/C01NPAXACKT).
+
+## Development
+
+You can view and edit the source code by cloning this repository:
+
+```sh
+git clone https://github.com/open-telemetry/opentelemetry-go.git
+```
+
+Run `make test` to run the tests instead of `go test`.
+
+There are some generated files checked into the repo. To make sure
+that the generated files are up-to-date, run `make` (or `make
+precommit` - the `precommit` target is the default).
+
+The `precommit` target also fixes the formatting of the code and
+checks the status of the go module files.
+
+Additionally, there is a `codespell` target that checks for common
+typos in the code. It is not run by default, but you can run it
+manually with `make codespell`. It will set up a virtual environment
+in `venv` and install `codespell` there.
+
+If after running `make precommit` the output of `git status` contains
+`nothing to commit, working tree clean` then it means that everything
+is up-to-date and properly formatted.
+
+## Pull Requests
+
+### How to Send Pull Requests
+
+Everyone is welcome to contribute code to `opentelemetry-go` via
+GitHub pull requests (PRs).
+
+To create a new PR, fork the project in GitHub and clone the upstream
+repo:
+
+```sh
+go get -d go.opentelemetry.io/otel
+```
+
+(This may print some warning about "build constraints exclude all Go
+files", just ignore it.)
+
+This will put the project in `${GOPATH}/src/go.opentelemetry.io/otel`. You
+can alternatively use `git` directly with:
+
+```sh
+git clone https://github.com/open-telemetry/opentelemetry-go
+```
+
+(Note that `git clone` is *not* using the `go.opentelemetry.io/otel` name -
+that name is a kind of a redirector to GitHub that `go get` can
+understand, but `git` does not.)
+
+This would put the project in the `opentelemetry-go` directory in
+current working directory.
+
+Enter the newly created directory and add your fork as a new remote:
+
+```sh
+git remote add git@github.com:/opentelemetry-go
+```
+
+Check out a new branch, make modifications, run linters and tests, update
+`CHANGELOG.md`, and push the branch to your fork:
+
+```sh
+git checkout -b
+# edit files
+# update changelog
+make precommit
+git add -p
+git commit
+git push
+```
+
+Open a pull request against the main `opentelemetry-go` repo. Be sure to add the pull
+request ID to the entry you added to `CHANGELOG.md`.
+
+Avoid rebasing and force-pushing to your branch to facilitate reviewing the pull request.
+Rewriting Git history makes it difficult to keep track of iterations during code review.
+All pull requests are squashed to a single commit upon merge to `main`.
+
+### How to Receive Comments
+
+* If the PR is not ready for review, please put `[WIP]` in the title,
+ tag it as `work-in-progress`, or mark it as
+ [`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
+* Make sure CLA is signed and CI is clear.
+
+### How to Get PRs Merged
+
+A PR is considered **ready to merge** when:
+
+* It has received two qualified approvals[^1].
+
+ This is not enforced through automation, but needs to be validated by the
+ maintainer merging.
+ * The qualified approvals need to be from [Approver]s/[Maintainer]s
+ affiliated with different companies. Two qualified approvals from
+ [Approver]s or [Maintainer]s affiliated with the same company counts as a
+ single qualified approval.
+ * PRs introducing changes that have already been discussed and consensus
+ reached only need one qualified approval. The discussion and resolution
+ needs to be linked to the PR.
+ * Trivial changes[^2] only need one qualified approval.
+
+* All feedback has been addressed.
+ * All PR comments and suggestions are resolved.
+ * All GitHub Pull Request reviews with a status of "Request changes" have
+ been addressed. Another review by the objecting reviewer with a different
+ status can be submitted to clear the original review, or the review can be
+ dismissed by a [Maintainer] when the issues from the original review have
+ been addressed.
+ * Any comments or reviews that cannot be resolved between the PR author and
+ reviewers can be submitted to the community [Approver]s and [Maintainer]s
+ during the weekly SIG meeting. If consensus is reached among the
+ [Approver]s and [Maintainer]s during the SIG meeting the objections to the
+ PR may be dismissed or resolved or the PR closed by a [Maintainer].
+ * Any substantive changes to the PR require existing Approval reviews be
+ cleared unless the approver explicitly states that their approval persists
+ across changes. This includes changes resulting from other feedback.
+ [Approver]s and [Maintainer]s can help in clearing reviews and they should
+ be consulted if there are any questions.
+
+* The PR branch is up to date with the base branch it is merging into.
+ * To ensure this does not block the PR, it should be configured to allow
+ maintainers to update it.
+
+* It has been open for review for at least one working day. This gives people
+ reasonable time to review.
+ * Trivial changes[^2] do not have to wait for one day and may be merged with
+ a single [Maintainer]'s approval.
+
+* All required GitHub workflows have succeeded.
+* Urgent fix can take exception as long as it has been actively communicated
+ among [Maintainer]s.
+
+Any [Maintainer] can merge the PR once the above criteria have been met.
+
+[^1]: A qualified approval is a GitHub Pull Request review with "Approve"
+ status from an OpenTelemetry Go [Approver] or [Maintainer].
+[^2]: Trivial changes include: typo corrections, cosmetic non-substantive
+ changes, documentation corrections or updates, dependency updates, etc.
+
+## Design Choices
+
+As with other OpenTelemetry clients, opentelemetry-go follows the
+[OpenTelemetry Specification](https://opentelemetry.io/docs/specs/otel).
+
+It's especially valuable to read through the [library
+guidelines](https://opentelemetry.io/docs/specs/otel/library-guidelines).
+
+### Focus on Capabilities, Not Structure Compliance
+
+OpenTelemetry is an evolving specification, one where the desires and
+use cases are clear, but the method to satisfy those uses cases are
+not.
+
+As such, Contributions should provide functionality and behavior that
+conforms to the specification, but the interface and structure is
+flexible.
+
+It is preferable to have contributions follow the idioms of the
+language rather than conform to specific API names or argument
+patterns in the spec.
+
+For a deeper discussion, see
+[this](https://github.com/open-telemetry/opentelemetry-specification/issues/165).
+
+## Documentation
+
+Each (non-internal, non-test) package must be documented using
+[Go Doc Comments](https://go.dev/doc/comment),
+preferably in a `doc.go` file.
+
+Prefer using [Examples](https://pkg.go.dev/testing#hdr-Examples)
+instead of putting code snippets in Go doc comments.
+In some cases, you can even create [Testable Examples](https://go.dev/blog/examples).
+
+You can install and run a "local Go Doc site" in the following way:
+
+ ```sh
+ go install golang.org/x/pkgsite/cmd/pkgsite@latest
+ pkgsite
+ ```
+
+[`go.opentelemetry.io/otel/metric`](https://pkg.go.dev/go.opentelemetry.io/otel/metric)
+is an example of a very well-documented package.
+
+### README files
+
+Each (non-internal, non-test, non-documentation) package must contain a
+`README.md` file containing at least a title, and a `pkg.go.dev` badge.
+
+The README should not be a repetition of Go doc comments.
+
+You can verify the presence of all README files with the `make verify-readmes`
+command.
+
+## Style Guide
+
+One of the primary goals of this project is that it is actually used by
+developers. With this goal in mind the project strives to build
+user-friendly and idiomatic Go code adhering to the Go community's best
+practices.
+
+For a non-comprehensive but foundational overview of these best practices
+the [Effective Go](https://golang.org/doc/effective_go.html) documentation
+is an excellent starting place.
+
+As a convenience for developers building this project the `make precommit`
+will format, lint, validate, and in some cases fix the changes you plan to
+submit. This check will need to pass for your changes to be able to be
+merged.
+
+In addition to idiomatic Go, the project has adopted certain standards for
+implementations of common patterns. These standards should be followed as a
+default, and if they are not followed documentation needs to be included as
+to the reasons why.
+
+### Configuration
+
+When creating an instantiation function for a complex `type T struct`, it is
+useful to allow variable number of options to be applied. However, the strong
+type system of Go restricts the function design options. There are a few ways
+to solve this problem, but we have landed on the following design.
+
+#### `config`
+
+Configuration should be held in a `struct` named `config`, or prefixed with
+specific type name this Configuration applies to if there are multiple
+`config` in the package. This type must contain configuration options.
+
+```go
+// config contains configuration options for a thing.
+type config struct {
+ // options ...
+}
+```
+
+In general the `config` type will not need to be used externally to the
+package and should be unexported. If, however, it is expected that the user
+will likely want to build custom options for the configuration, the `config`
+should be exported. Please, include in the documentation for the `config`
+how the user can extend the configuration.
+
+It is important that internal `config` are not shared across package boundaries.
+Meaning a `config` from one package should not be directly used by another. The
+one exception is the API packages. The configs from the base API, eg.
+`go.opentelemetry.io/otel/trace.TracerConfig` and
+`go.opentelemetry.io/otel/metric.InstrumentConfig`, are intended to be consumed
+by the SDK therefore it is expected that these are exported.
+
+When a config is exported we want to maintain forward and backward
+compatibility, to achieve this no fields should be exported but should
+instead be accessed by methods.
+
+Optionally, it is common to include a `newConfig` function (with the same
+naming scheme). This function wraps any defaults setting and looping over
+all options to create a configured `config`.
+
+```go
+// newConfig returns an appropriately configured config.
+func newConfig(options ...Option) config {
+ // Set default values for config.
+ config := config{/* […] */}
+ for _, option := range options {
+ config = option.apply(config)
+ }
+ // Perform any validation here.
+ return config
+}
+```
+
+If validation of the `config` options is also performed this can return an
+error as well that is expected to be handled by the instantiation function
+or propagated to the user.
+
+Given the design goal of not having the user need to work with the `config`,
+the `newConfig` function should also be unexported.
+
+#### `Option`
+
+To set the value of the options a `config` contains, a corresponding
+`Option` interface type should be used.
+
+```go
+type Option interface {
+ apply(config) config
+}
+```
+
+Having `apply` unexported makes sure that it will not be used externally.
+Moreover, the interface becomes sealed so the user cannot easily implement
+the interface on its own.
+
+The `apply` method should return a modified version of the passed config.
+This approach, instead of passing a pointer, is used to prevent the config from being allocated to the heap.
+
+The name of the interface should be prefixed in the same way the
+corresponding `config` is (if at all).
+
+#### Options
+
+All user configurable options for a `config` must have a related unexported
+implementation of the `Option` interface and an exported configuration
+function that wraps this implementation.
+
+The wrapping function name should be prefixed with `With*` (or in the
+special case of a boolean options `Without*`) and should have the following
+function signature.
+
+```go
+func With*(…) Option { … }
+```
+
+##### `bool` Options
+
+```go
+type defaultFalseOption bool
+
+func (o defaultFalseOption) apply(c config) config {
+ c.Bool = bool(o)
+ return c
+}
+
+// WithOption sets a T to have an option included.
+func WithOption() Option {
+ return defaultFalseOption(true)
+}
+```
+
+```go
+type defaultTrueOption bool
+
+func (o defaultTrueOption) apply(c config) config {
+ c.Bool = bool(o)
+ return c
+}
+
+// WithoutOption sets a T to have Bool option excluded.
+func WithoutOption() Option {
+ return defaultTrueOption(false)
+}
+```
+
+##### Declared Type Options
+
+```go
+type myTypeOption struct {
+ MyType MyType
+}
+
+func (o myTypeOption) apply(c config) config {
+ c.MyType = o.MyType
+ return c
+}
+
+// WithMyType sets T to have include MyType.
+func WithMyType(t MyType) Option {
+ return myTypeOption{t}
+}
+```
+
+##### Functional Options
+
+```go
+type optionFunc func(config) config
+
+func (fn optionFunc) apply(c config) config {
+ return fn(c)
+}
+
+// WithMyType sets t as MyType.
+func WithMyType(t MyType) Option {
+ return optionFunc(func(c config) config {
+ c.MyType = t
+ return c
+ })
+}
+```
+
+#### Instantiation
+
+Using this configuration pattern to configure instantiation with a `NewT`
+function.
+
+```go
+func NewT(options ...Option) T {…}
+```
+
+Any required parameters can be declared before the variadic `options`.
+
+#### Dealing with Overlap
+
+Sometimes there are multiple complex `struct` that share common
+configuration and also have distinct configuration. To avoid repeated
+portions of `config`s, a common `config` can be used with the union of
+options being handled with the `Option` interface.
+
+For example.
+
+```go
+// config holds options for all animals.
+type config struct {
+ Weight float64
+ Color string
+ MaxAltitude float64
+}
+
+// DogOption apply Dog specific options.
+type DogOption interface {
+ applyDog(config) config
+}
+
+// BirdOption apply Bird specific options.
+type BirdOption interface {
+ applyBird(config) config
+}
+
+// Option apply options for all animals.
+type Option interface {
+ BirdOption
+ DogOption
+}
+
+type weightOption float64
+
+func (o weightOption) applyDog(c config) config {
+ c.Weight = float64(o)
+ return c
+}
+
+func (o weightOption) applyBird(c config) config {
+ c.Weight = float64(o)
+ return c
+}
+
+func WithWeight(w float64) Option { return weightOption(w) }
+
+type furColorOption string
+
+func (o furColorOption) applyDog(c config) config {
+ c.Color = string(o)
+ return c
+}
+
+func WithFurColor(c string) DogOption { return furColorOption(c) }
+
+type maxAltitudeOption float64
+
+func (o maxAltitudeOption) applyBird(c config) config {
+ c.MaxAltitude = float64(o)
+ return c
+}
+
+func WithMaxAltitude(a float64) BirdOption { return maxAltitudeOption(a) }
+
+func NewDog(name string, o ...DogOption) Dog {…}
+func NewBird(name string, o ...BirdOption) Bird {…}
+```
+
+### Interfaces
+
+To allow other developers to better comprehend the code, it is important
+to ensure it is sufficiently documented. One simple measure that contributes
+to this aim is self-documenting by naming method parameters. Therefore,
+where appropriate, methods of every exported interface type should have
+their parameters appropriately named.
+
+#### Interface Stability
+
+All exported stable interfaces that include the following warning in their
+documentation are allowed to be extended with additional methods.
+
+> Warning: methods may be added to this interface in minor releases.
+
+These interfaces are defined by the OpenTelemetry specification and will be
+updated as the specification evolves.
+
+Otherwise, stable interfaces MUST NOT be modified.
+
+#### How to Change Specification Interfaces
+
+When an API change must be made, we will update the SDK with the new method one
+release before the API change. This will allow the SDK one version before the
+API change to work seamlessly with the new API.
+
+If an incompatible version of the SDK is used with the new API the application
+will fail to compile.
+
+#### How Not to Change Specification Interfaces
+
+We have explored using a v2 of the API to change interfaces and found that there
+was no way to introduce a v2 and have it work seamlessly with the v1 of the API.
+Problems happened with libraries that upgraded to v2 when an application did not,
+and would not produce any telemetry.
+
+More detail of the approaches considered and their limitations can be found in
+the [Use a V2 API to evolve interfaces](https://github.com/open-telemetry/opentelemetry-go/issues/3920)
+issue.
+
+#### How to Change Other Interfaces
+
+If new functionality is needed for an interface that cannot be changed it MUST
+be added by including an additional interface. That added interface can be a
+simple interface for the specific functionality that you want to add or it can
+be a super-set of the original interface. For example, if you wanted to a
+`Close` method to the `Exporter` interface:
+
+```go
+type Exporter interface {
+ Export()
+}
+```
+
+A new interface, `Closer`, can be added:
+
+```go
+type Closer interface {
+ Close()
+}
+```
+
+Code that is passed the `Exporter` interface can now check to see if the passed
+value also satisfies the new interface. E.g.
+
+```go
+func caller(e Exporter) {
+ /* ... */
+ if c, ok := e.(Closer); ok {
+ c.Close()
+ }
+ /* ... */
+}
+```
+
+Alternatively, a new type that is the super-set of an `Exporter` can be created.
+
+```go
+type ClosingExporter struct {
+ Exporter
+ Close()
+}
+```
+
+This new type can be used similar to the simple interface above in that a
+passed `Exporter` type can be asserted to satisfy the `ClosingExporter` type
+and the `Close` method called.
+
+This super-set approach can be useful if there is explicit behavior that needs
+to be coupled with the original type and passed as a unified type to a new
+function, but, because of this coupling, it also limits the applicability of
+the added functionality. If there exist other interfaces where this
+functionality should be added, each one will need their own super-set
+interfaces and will duplicate the pattern. For this reason, the simple targeted
+interface that defines the specific functionality should be preferred.
+
+See also:
+[Keeping Your Modules Compatible: Working with interfaces](https://go.dev/blog/module-compatibility#working-with-interfaces).
+
+### Testing
+
+The tests should never leak goroutines.
+
+Use the term `ConcurrentSafe` in the test name when it aims to verify the
+absence of race conditions. The top-level tests with this term will be run
+many times in the `test-concurrent-safe` CI job to increase the chance of
+catching concurrency issues. This does not apply to subtests when this term
+is not in their root name.
+
+### Internal packages
+
+The use of internal packages should be scoped to a single module. A sub-module
+should never import from a parent internal package. This creates a coupling
+between the two modules where a user can upgrade the parent without the child
+and if the internal package API has changed it will fail to upgrade[^3].
+
+There are two known exceptions to this rule:
+
+- `go.opentelemetry.io/otel/internal/global`
+ - This package manages global state for all of opentelemetry-go. It needs to
+ be a single package in order to ensure the uniqueness of the global state.
+- `go.opentelemetry.io/otel/internal/baggage`
+ - This package provides values in a `context.Context` that need to be
+ recognized by `go.opentelemetry.io/otel/baggage` and
+ `go.opentelemetry.io/otel/bridge/opentracing` but remain private.
+
+If you have duplicate code in multiple modules, make that code into a Go
+template stored in `go.opentelemetry.io/otel/internal/shared` and use [gotmpl]
+to render the templates in the desired locations. See [#4404] for an example of
+this.
+
+[^3]: https://github.com/open-telemetry/opentelemetry-go/issues/3548
+
+### Ignoring context cancellation
+
+OpenTelemetry API implementations need to ignore the cancellation of the context that are
+passed when recording a value (e.g. starting a span, recording a measurement, emitting a log).
+Recording methods should not return an error describing the cancellation state of the context
+when they complete, nor should they abort any work.
+
+This rule may not apply if the OpenTelemetry specification defines a timeout mechanism for
+the method. In that case the context cancellation can be used for the timeout with the
+restriction that this behavior is documented for the method. Otherwise, timeouts
+are expected to be handled by the user calling the API, not the implementation.
+
+Stoppage of the telemetry pipeline is handled by calling the appropriate `Shutdown` method
+of a provider. It is assumed the context passed from a user is not used for this purpose.
+
+Outside of the direct recording of telemetry from the API (e.g. exporting telemetry,
+force flushing telemetry, shutting down a signal provider) the context cancellation
+should be honored. This means all work done on behalf of the user provided context
+should be canceled.
+
+## Approvers and Maintainers
+
+### Triagers
+
+- [Cheng-Zhen Yang](https://github.com/scorpionknifes), Independent
+
+### Approvers
+
+### Maintainers
+
+- [Damien Mathieu](https://github.com/dmathieu), Elastic
+- [David Ashpole](https://github.com/dashpole), Google
+- [Robert PajÄ…k](https://github.com/pellared), Splunk
+- [Sam Xie](https://github.com/XSAM), Cisco/AppDynamics
+- [Tyler Yahn](https://github.com/MrAlias), Splunk
+
+### Emeritus
+
+- [Aaron Clawson](https://github.com/MadVikingGod)
+- [Anthony Mirabella](https://github.com/Aneurysm9)
+- [Chester Cheung](https://github.com/hanyuancheung)
+- [Evan Torrie](https://github.com/evantorrie)
+- [Gustavo Silva Paiva](https://github.com/paivagustavo)
+- [Josh MacDonald](https://github.com/jmacd)
+- [Liz Fong-Jones](https://github.com/lizthegrey)
+
+### Become an Approver or a Maintainer
+
+See the [community membership document in OpenTelemetry community
+repo](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md).
+
+[Approver]: #approvers
+[Maintainer]: #maintainers
+[gotmpl]: https://pkg.go.dev/go.opentelemetry.io/build-tools/gotmpl
+[#4404]: https://github.com/open-telemetry/opentelemetry-go/pull/4404
diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile
new file mode 100644
index 00000000..a7f6d8cc
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/Makefile
@@ -0,0 +1,307 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+TOOLS_MOD_DIR := ./internal/tools
+
+ALL_DOCS := $(shell find . -name '*.md' -type f | sort)
+ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
+OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS))
+ALL_COVERAGE_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | grep -E -v '^./example|^$(TOOLS_MOD_DIR)' | sort)
+
+GO = go
+TIMEOUT = 60
+
+.DEFAULT_GOAL := precommit
+
+.PHONY: precommit ci
+precommit: generate toolchain-check license-check misspell go-mod-tidy golangci-lint-fix verify-readmes verify-mods test-default
+ci: generate toolchain-check license-check lint vanity-import-check verify-readmes verify-mods build test-default check-clean-work-tree test-coverage
+
+# Tools
+
+TOOLS = $(CURDIR)/.tools
+
+$(TOOLS):
+ @mkdir -p $@
+$(TOOLS)/%: $(TOOLS_MOD_DIR)/go.mod | $(TOOLS)
+ cd $(TOOLS_MOD_DIR) && \
+ $(GO) build -o $@ $(PACKAGE)
+
+MULTIMOD = $(TOOLS)/multimod
+$(TOOLS)/multimod: PACKAGE=go.opentelemetry.io/build-tools/multimod
+
+SEMCONVGEN = $(TOOLS)/semconvgen
+$(TOOLS)/semconvgen: PACKAGE=go.opentelemetry.io/build-tools/semconvgen
+
+CROSSLINK = $(TOOLS)/crosslink
+$(TOOLS)/crosslink: PACKAGE=go.opentelemetry.io/build-tools/crosslink
+
+SEMCONVKIT = $(TOOLS)/semconvkit
+$(TOOLS)/semconvkit: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/semconvkit
+
+GOLANGCI_LINT = $(TOOLS)/golangci-lint
+$(TOOLS)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/cmd/golangci-lint
+
+MISSPELL = $(TOOLS)/misspell
+$(TOOLS)/misspell: PACKAGE=github.com/client9/misspell/cmd/misspell
+
+GOCOVMERGE = $(TOOLS)/gocovmerge
+$(TOOLS)/gocovmerge: PACKAGE=github.com/wadey/gocovmerge
+
+STRINGER = $(TOOLS)/stringer
+$(TOOLS)/stringer: PACKAGE=golang.org/x/tools/cmd/stringer
+
+PORTO = $(TOOLS)/porto
+$(TOOLS)/porto: PACKAGE=github.com/jcchavezs/porto/cmd/porto
+
+GOTMPL = $(TOOLS)/gotmpl
+$(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl
+
+GORELEASE = $(TOOLS)/gorelease
+$(GORELEASE): PACKAGE=golang.org/x/exp/cmd/gorelease
+
+GOVULNCHECK = $(TOOLS)/govulncheck
+$(TOOLS)/govulncheck: PACKAGE=golang.org/x/vuln/cmd/govulncheck
+
+.PHONY: tools
+tools: $(CROSSLINK) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE)
+
+# Virtualized python tools via docker
+
+# The directory where the virtual environment is created.
+VENVDIR := venv
+
+# The directory where the python tools are installed.
+PYTOOLS := $(VENVDIR)/bin
+
+# The pip executable in the virtual environment.
+PIP := $(PYTOOLS)/pip
+
+# The directory in the docker image where the current directory is mounted.
+WORKDIR := /workdir
+
+# The python image to use for the virtual environment.
+PYTHONIMAGE := python:3.11.3-slim-bullseye
+
+# Run the python image with the current directory mounted.
+DOCKERPY := docker run --rm -v "$(CURDIR):$(WORKDIR)" -w $(WORKDIR) $(PYTHONIMAGE)
+
+# Create a virtual environment for Python tools.
+$(PYTOOLS):
+# The `--upgrade` flag is needed to ensure that the virtual environment is
+# created with the latest pip version.
+ @$(DOCKERPY) bash -c "python3 -m venv $(VENVDIR) && $(PIP) install --upgrade pip"
+
+# Install python packages into the virtual environment.
+$(PYTOOLS)/%: $(PYTOOLS)
+ @$(DOCKERPY) $(PIP) install -r requirements.txt
+
+CODESPELL = $(PYTOOLS)/codespell
+$(CODESPELL): PACKAGE=codespell
+
+# Generate
+
+.PHONY: generate
+generate: go-generate vanity-import-fix
+
+.PHONY: go-generate
+go-generate: $(OTEL_GO_MOD_DIRS:%=go-generate/%)
+go-generate/%: DIR=$*
+go-generate/%: $(STRINGER) $(GOTMPL)
+ @echo "$(GO) generate $(DIR)/..." \
+ && cd $(DIR) \
+ && PATH="$(TOOLS):$${PATH}" $(GO) generate ./...
+
+.PHONY: vanity-import-fix
+vanity-import-fix: $(PORTO)
+ @$(PORTO) --include-internal -w .
+
+# Generate go.work file for local development.
+.PHONY: go-work
+go-work: $(CROSSLINK)
+ $(CROSSLINK) work --root=$(shell pwd)
+
+# Build
+
+.PHONY: build
+
+build: $(OTEL_GO_MOD_DIRS:%=build/%) $(OTEL_GO_MOD_DIRS:%=build-tests/%)
+build/%: DIR=$*
+build/%:
+ @echo "$(GO) build $(DIR)/..." \
+ && cd $(DIR) \
+ && $(GO) build ./...
+
+build-tests/%: DIR=$*
+build-tests/%:
+ @echo "$(GO) build tests $(DIR)/..." \
+ && cd $(DIR) \
+ && $(GO) list ./... \
+ | grep -v third_party \
+ | xargs $(GO) test -vet=off -run xxxxxMatchNothingxxxxx >/dev/null
+
+# Tests
+
+TEST_TARGETS := test-default test-bench test-short test-verbose test-race test-concurrent-safe
+.PHONY: $(TEST_TARGETS) test
+test-default test-race: ARGS=-race
+test-bench: ARGS=-run=xxxxxMatchNothingxxxxx -test.benchtime=1ms -bench=.
+test-short: ARGS=-short
+test-verbose: ARGS=-v -race
+test-concurrent-safe: ARGS=-run=ConcurrentSafe -count=100 -race
+test-concurrent-safe: TIMEOUT=120
+$(TEST_TARGETS): test
+test: $(OTEL_GO_MOD_DIRS:%=test/%)
+test/%: DIR=$*
+test/%:
+ @echo "$(GO) test -timeout $(TIMEOUT)s $(ARGS) $(DIR)/..." \
+ && cd $(DIR) \
+ && $(GO) list ./... \
+ | grep -v third_party \
+ | xargs $(GO) test -timeout $(TIMEOUT)s $(ARGS)
+
+COVERAGE_MODE = atomic
+COVERAGE_PROFILE = coverage.out
+.PHONY: test-coverage
+test-coverage: $(GOCOVMERGE)
+ @set -e; \
+ printf "" > coverage.txt; \
+ for dir in $(ALL_COVERAGE_MOD_DIRS); do \
+ echo "$(GO) test -coverpkg=go.opentelemetry.io/otel/... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" $${dir}/..."; \
+ (cd "$${dir}" && \
+ $(GO) list ./... \
+ | grep -v third_party \
+ | grep -v 'semconv/v.*' \
+ | xargs $(GO) test -coverpkg=./... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" && \
+ $(GO) tool cover -html=coverage.out -o coverage.html); \
+ done; \
+ $(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt
+
+.PHONY: benchmark
+benchmark: $(OTEL_GO_MOD_DIRS:%=benchmark/%)
+benchmark/%:
+ @echo "$(GO) test -run=xxxxxMatchNothingxxxxx -bench=. $*..." \
+ && cd $* \
+ && $(GO) list ./... \
+ | grep -v third_party \
+ | xargs $(GO) test -run=xxxxxMatchNothingxxxxx -bench=.
+
+.PHONY: golangci-lint golangci-lint-fix
+golangci-lint-fix: ARGS=--fix
+golangci-lint-fix: golangci-lint
+golangci-lint: $(OTEL_GO_MOD_DIRS:%=golangci-lint/%)
+golangci-lint/%: DIR=$*
+golangci-lint/%: $(GOLANGCI_LINT)
+ @echo 'golangci-lint $(if $(ARGS),$(ARGS) ,)$(DIR)' \
+ && cd $(DIR) \
+ && $(GOLANGCI_LINT) run --allow-serial-runners $(ARGS)
+
+.PHONY: crosslink
+crosslink: $(CROSSLINK)
+ @echo "Updating intra-repository dependencies in all go modules" \
+ && $(CROSSLINK) --root=$(shell pwd) --prune
+
+.PHONY: go-mod-tidy
+go-mod-tidy: $(ALL_GO_MOD_DIRS:%=go-mod-tidy/%)
+go-mod-tidy/%: DIR=$*
+go-mod-tidy/%: crosslink
+ @echo "$(GO) mod tidy in $(DIR)" \
+ && cd $(DIR) \
+ && $(GO) mod tidy -compat=1.21
+
+.PHONY: lint-modules
+lint-modules: go-mod-tidy
+
+.PHONY: lint
+lint: misspell lint-modules golangci-lint govulncheck
+
+.PHONY: vanity-import-check
+vanity-import-check: $(PORTO)
+ @$(PORTO) --include-internal -l . || ( echo "(run: make vanity-import-fix)"; exit 1 )
+
+.PHONY: misspell
+misspell: $(MISSPELL)
+ @$(MISSPELL) -w $(ALL_DOCS)
+
+.PHONY: govulncheck
+govulncheck: $(OTEL_GO_MOD_DIRS:%=govulncheck/%)
+govulncheck/%: DIR=$*
+govulncheck/%: $(GOVULNCHECK)
+ @echo "govulncheck ./... in $(DIR)" \
+ && cd $(DIR) \
+ && $(GOVULNCHECK) ./...
+
+.PHONY: codespell
+codespell: $(CODESPELL)
+ @$(DOCKERPY) $(CODESPELL)
+
+.PHONY: toolchain-check
+toolchain-check:
+ @toolchainRes=$$(for f in $(ALL_GO_MOD_DIRS); do \
+ awk '/^toolchain/ { found=1; next } END { if (found) print FILENAME }' $$f/go.mod; \
+ done); \
+ if [ -n "$${toolchainRes}" ]; then \
+ echo "toolchain checking failed:"; echo "$${toolchainRes}"; \
+ exit 1; \
+ fi
+
+.PHONY: license-check
+license-check:
+ @licRes=$$(for f in $$(find . -type f \( -iname '*.go' -o -iname '*.sh' \) ! -path '**/third_party/*' ! -path './.git/*' ) ; do \
+ awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=4 { found=1; next } END { if (!found) print FILENAME }' $$f; \
+ done); \
+ if [ -n "$${licRes}" ]; then \
+ echo "license header checking failed:"; echo "$${licRes}"; \
+ exit 1; \
+ fi
+
+.PHONY: check-clean-work-tree
+check-clean-work-tree:
+ @if ! git diff --quiet; then \
+ echo; \
+ echo 'Working tree is not clean, did you forget to run "make precommit"?'; \
+ echo; \
+ git status; \
+ exit 1; \
+ fi
+
+SEMCONVPKG ?= "semconv/"
+.PHONY: semconv-generate
+semconv-generate: $(SEMCONVGEN) $(SEMCONVKIT)
+ [ "$(TAG)" ] || ( echo "TAG unset: missing opentelemetry semantic-conventions tag"; exit 1 )
+ [ "$(OTEL_SEMCONV_REPO)" ] || ( echo "OTEL_SEMCONV_REPO unset: missing path to opentelemetry semantic-conventions repo"; exit 1 )
+ $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=attribute_group -p conventionType=trace -f attribute_group.go -z "$(SEMCONVPKG)/capitalizations.txt" -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)"
+ $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=metric -f metric.go -t "$(SEMCONVPKG)/metric_template.j2" -s "$(TAG)"
+ $(SEMCONVKIT) -output "$(SEMCONVPKG)/$(TAG)" -tag "$(TAG)"
+
+.PHONY: gorelease
+gorelease: $(OTEL_GO_MOD_DIRS:%=gorelease/%)
+gorelease/%: DIR=$*
+gorelease/%:| $(GORELEASE)
+ @echo "gorelease in $(DIR):" \
+ && cd $(DIR) \
+ && $(GORELEASE) \
+ || echo ""
+
+.PHONY: verify-mods
+verify-mods: $(MULTIMOD)
+ $(MULTIMOD) verify
+
+.PHONY: prerelease
+prerelease: verify-mods
+ @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 )
+ $(MULTIMOD) prerelease -m ${MODSET}
+
+COMMIT ?= "HEAD"
+.PHONY: add-tags
+add-tags: verify-mods
+ @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 )
+ $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT}
+
+.PHONY: lint-markdown
+lint-markdown:
+ docker run -v "$(CURDIR):$(WORKDIR)" avtodev/markdown-lint:v1 -c $(WORKDIR)/.markdownlint.yaml $(WORKDIR)/**/*.md
+
+.PHONY: verify-readmes
+verify-readmes:
+ ./verify_readmes.sh
diff --git a/vendor/go.opentelemetry.io/otel/README.md b/vendor/go.opentelemetry.io/otel/README.md
new file mode 100644
index 00000000..d9a19207
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/README.md
@@ -0,0 +1,111 @@
+# OpenTelemetry-Go
+
+[](https://github.com/open-telemetry/opentelemetry-go/actions/workflows/ci.yml)
+[](https://app.codecov.io/gh/open-telemetry/opentelemetry-go?branch=main)
+[](https://pkg.go.dev/go.opentelemetry.io/otel)
+[](https://goreportcard.com/report/go.opentelemetry.io/otel)
+[](https://cloud-native.slack.com/archives/C01NPAXACKT)
+
+OpenTelemetry-Go is the [Go](https://golang.org/) implementation of [OpenTelemetry](https://opentelemetry.io/).
+It provides a set of APIs to directly measure performance and behavior of your software and send this data to observability platforms.
+
+## Project Status
+
+| Signal | Status |
+|---------|--------------------|
+| Traces | Stable |
+| Metrics | Stable |
+| Logs | Beta[^1] |
+
+Progress and status specific to this repository is tracked in our
+[project boards](https://github.com/open-telemetry/opentelemetry-go/projects)
+and
+[milestones](https://github.com/open-telemetry/opentelemetry-go/milestones).
+
+Project versioning information and stability guarantees can be found in the
+[versioning documentation](VERSIONING.md).
+
+[^1]: https://github.com/orgs/open-telemetry/projects/43
+
+### Compatibility
+
+OpenTelemetry-Go ensures compatibility with the current supported versions of
+the [Go language](https://golang.org/doc/devel/release#policy):
+
+> Each major Go release is supported until there are two newer major releases.
+> For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release.
+
+For versions of Go that are no longer supported upstream, opentelemetry-go will
+stop ensuring compatibility with these versions in the following manner:
+
+- A minor release of opentelemetry-go will be made to add support for the new
+ supported release of Go.
+- The following minor release of opentelemetry-go will remove compatibility
+ testing for the oldest (now archived upstream) version of Go. This, and
+ future, releases of opentelemetry-go may include features only supported by
+ the currently supported versions of Go.
+
+Currently, this project supports the following environments.
+
+| OS | Go Version | Architecture |
+|----------|------------|--------------|
+| Ubuntu | 1.23 | amd64 |
+| Ubuntu | 1.22 | amd64 |
+| Ubuntu | 1.23 | 386 |
+| Ubuntu | 1.22 | 386 |
+| Linux | 1.23 | arm64 |
+| Linux | 1.22 | arm64 |
+| macOS 13 | 1.23 | amd64 |
+| macOS 13 | 1.22 | amd64 |
+| macOS | 1.23 | arm64 |
+| macOS | 1.22 | arm64 |
+| Windows | 1.23 | amd64 |
+| Windows | 1.22 | amd64 |
+| Windows | 1.23 | 386 |
+| Windows | 1.22 | 386 |
+
+While this project should work for other systems, no compatibility guarantees
+are made for those systems currently.
+
+## Getting Started
+
+You can find a getting started guide on [opentelemetry.io](https://opentelemetry.io/docs/languages/go/getting-started/).
+
+OpenTelemetry's goal is to provide a single set of APIs to capture distributed
+traces and metrics from your application and send them to an observability
+platform. This project allows you to do just that for applications written in
+Go. There are two steps to this process: instrument your application, and
+configure an exporter.
+
+### Instrumentation
+
+To start capturing distributed traces and metric events from your application
+it first needs to be instrumented. The easiest way to do this is by using an
+instrumentation library for your code. Be sure to check out [the officially
+supported instrumentation
+libraries](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation).
+
+If you need to extend the telemetry an instrumentation library provides or want
+to build your own instrumentation for your application directly you will need
+to use the
+[Go otel](https://pkg.go.dev/go.opentelemetry.io/otel)
+package. The [examples](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples)
+are a good way to see some practical uses of this process.
+
+### Export
+
+Now that your application is instrumented to collect telemetry, it needs an
+export pipeline to send that telemetry to an observability platform.
+
+All officially supported exporters for the OpenTelemetry project are contained in the [exporters directory](./exporters).
+
+| Exporter | Logs | Metrics | Traces |
+|---------------------------------------|:----:|:-------:|:------:|
+| [OTLP](./exporters/otlp/) | ✓ | ✓ | ✓ |
+| [Prometheus](./exporters/prometheus/) | | ✓ | |
+| [stdout](./exporters/stdout/) | ✓ | ✓ | ✓ |
+| [Zipkin](./exporters/zipkin/) | | | ✓ |
+
+## Contributing
+
+See the [contributing documentation](CONTRIBUTING.md).
diff --git a/vendor/go.opentelemetry.io/otel/RELEASING.md b/vendor/go.opentelemetry.io/otel/RELEASING.md
new file mode 100644
index 00000000..4ebef4f9
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/RELEASING.md
@@ -0,0 +1,135 @@
+# Release Process
+
+## Semantic Convention Generation
+
+New versions of the [OpenTelemetry Semantic Conventions] mean new versions of the `semconv` package need to be generated.
+The `semconv-generate` make target is used for this.
+
+1. Checkout a local copy of the [OpenTelemetry Semantic Conventions] to the desired release tag.
+2. Pull the latest `otel/semconvgen` image: `docker pull otel/semconvgen:latest`
+3. Run the `make semconv-generate ...` target from this repository.
+
+For example,
+
+```sh
+export TAG="v1.21.0" # Change to the release version you are generating.
+export OTEL_SEMCONV_REPO="/absolute/path/to/opentelemetry/semantic-conventions"
+docker pull otel/semconvgen:latest
+make semconv-generate # Uses the exported TAG and OTEL_SEMCONV_REPO.
+```
+
+This should create a new sub-package of [`semconv`](./semconv).
+Ensure things look correct before submitting a pull request to include the addition.
+
+## Breaking changes validation
+
+You can run `make gorelease` that runs [gorelease](https://pkg.go.dev/golang.org/x/exp/cmd/gorelease) to ensure that there are no unwanted changes done in the public API.
+
+You can check/report problems with `gorelease` [here](https://golang.org/issues/26420).
+
+## Verify changes for contrib repository
+
+If the changes in the main repository are going to affect the contrib repository, it is important to verify that the changes are compatible with the contrib repository.
+
+Follow [the steps](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md#verify-otel-changes) in the contrib repository to verify OTel changes.
+
+## Pre-Release
+
+First, decide which module sets will be released and update their versions
+in `versions.yaml`. Commit this change to a new branch.
+
+Update go.mod for submodules to depend on the new release which will happen in the next step.
+
+1. Run the `prerelease` make target. It creates a branch
+ `prerelease__` that will contain all release changes.
+
+ ```
+ make prerelease MODSET=
+ ```
+
+2. Verify the changes.
+
+ ```
+ git diff ...prerelease__
+ ```
+
+ This should have changed the version for all modules to be ``.
+ If these changes look correct, merge them into your pre-release branch:
+
+ ```go
+ git merge prerelease__
+ ```
+
+3. Update the [Changelog](./CHANGELOG.md).
+ - Make sure all relevant changes for this release are included and are in language that non-contributors to the project can understand.
+ To verify this, you can look directly at the commits since the ``.
+
+ ```
+ git --no-pager log --pretty=oneline "..HEAD"
+ ```
+
+ - Move all the `Unreleased` changes into a new section following the title scheme (`[] - `).
+ - Make sure the new section is under the comment for released section, like ``, so it is protected from being overwritten in the future.
+ - Update all the appropriate links at the bottom.
+
+4. Push the changes to upstream and create a Pull Request on GitHub.
+ Be sure to include the curated changes from the [Changelog](./CHANGELOG.md) in the description.
+
+## Tag
+
+Once the Pull Request with all the version changes has been approved and merged it is time to tag the merged commit.
+
+***IMPORTANT***: It is critical you use the same tag that you used in the Pre-Release step!
+Failure to do so will leave things in a broken state. As long as you do not
+change `versions.yaml` between pre-release and this step, things should be fine.
+
+***IMPORTANT***: [There is currently no way to remove an incorrectly tagged version of a Go module](https://github.com/golang/go/issues/34189).
+It is critical you make sure the version you push upstream is correct.
+[Failure to do so will lead to minor emergencies and tough to work around](https://github.com/open-telemetry/opentelemetry-go/issues/331).
+
+1. For each module set that will be released, run the `add-tags` make target
+ using the `` of the commit on the main branch for the merged Pull Request.
+
+ ```
+ make add-tags MODSET= COMMIT=
+ ```
+
+ It should only be necessary to provide an explicit `COMMIT` value if the
+ current `HEAD` of your working directory is not the correct commit.
+
+2. Push tags to the upstream remote (not your fork: `github.com/open-telemetry/opentelemetry-go.git`).
+ Make sure you push all sub-modules as well.
+
+ ```
+ git push upstream
+ git push upstream
+ ...
+ ```
+
+## Release
+
+Finally create a Release for the new `` on GitHub.
+The release body should include all the release notes from the Changelog for this release.
+
+## Post-Release
+
+### Contrib Repository
+
+Once verified be sure to [make a release for the `contrib` repository](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md) that uses this release.
+
+### Website Documentation
+
+Update the [Go instrumentation documentation] in the OpenTelemetry website under [content/en/docs/languages/go].
+Importantly, bump any package versions referenced to be the latest one you just released and ensure all code examples still compile and are accurate.
+
+[OpenTelemetry Semantic Conventions]: https://github.com/open-telemetry/semantic-conventions
+[Go instrumentation documentation]: https://opentelemetry.io/docs/languages/go/
+[content/en/docs/languages/go]: https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/docs/languages/go
+
+### Demo Repository
+
+Bump the dependencies in the following Go services:
+
+- [`accounting`](https://github.com/open-telemetry/opentelemetry-demo/tree/main/src/accounting)
+- [`checkoutservice`](https://github.com/open-telemetry/opentelemetry-demo/tree/main/src/checkout)
+- [`productcatalogservice`](https://github.com/open-telemetry/opentelemetry-demo/tree/main/src/product-catalog)
diff --git a/vendor/go.opentelemetry.io/otel/VERSIONING.md b/vendor/go.opentelemetry.io/otel/VERSIONING.md
new file mode 100644
index 00000000..b8cb605c
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/VERSIONING.md
@@ -0,0 +1,224 @@
+# Versioning
+
+This document describes the versioning policy for this repository. This policy
+is designed so the following goals can be achieved.
+
+**Users are provided a codebase of value that is stable and secure.**
+
+## Policy
+
+* Versioning of this project will be idiomatic of a Go project using [Go
+ modules](https://github.com/golang/go/wiki/Modules).
+ * [Semantic import
+ versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning)
+ will be used.
+ * Versions will comply with [semver
+ 2.0](https://semver.org/spec/v2.0.0.html) with the following exceptions.
+ * New methods may be added to exported API interfaces. All exported
+ interfaces that fall within this exception will include the following
+ paragraph in their public documentation.
+
+ > Warning: methods may be added to this interface in minor releases.
+
+ * If a module is version `v2` or higher, the major version of the module
+ must be included as a `/vN` at the end of the module paths used in
+ `go.mod` files (e.g., `module go.opentelemetry.io/otel/v2`, `require
+ go.opentelemetry.io/otel/v2 v2.0.1`) and in the package import path
+ (e.g., `import "go.opentelemetry.io/otel/v2/trace"`). This includes the
+ paths used in `go get` commands (e.g., `go get
+ go.opentelemetry.io/otel/v2@v2.0.1`). Note there is both a `/v2` and a
+ `@v2.0.1` in that example. One way to think about it is that the module
+ name now includes the `/v2`, so include `/v2` whenever you are using the
+ module name).
+ * If a module is version `v0` or `v1`, do not include the major version in
+ either the module path or the import path.
+ * Modules will be used to encapsulate signals and components.
+ * Experimental modules still under active development will be versioned at
+ `v0` to imply the stability guarantee defined by
+ [semver](https://semver.org/spec/v2.0.0.html#spec-item-4).
+
+ > Major version zero (0.y.z) is for initial development. Anything MAY
+ > change at any time. The public API SHOULD NOT be considered stable.
+
+ * Mature modules for which we guarantee a stable public API will be versioned
+ with a major version greater than `v0`.
+ * The decision to make a module stable will be made on a case-by-case
+ basis by the maintainers of this project.
+ * Experimental modules will start their versioning at `v0.0.0` and will
+ increment their minor version when backwards incompatible changes are
+ released and increment their patch version when backwards compatible
+ changes are released.
+ * All stable modules that use the same major version number will use the
+ same entire version number.
+ * Stable modules may be released with an incremented minor or patch
+ version even though that module has not been changed, but rather so
+ that it will remain at the same version as other stable modules that
+ did undergo change.
+ * When an experimental module becomes stable a new stable module version
+ will be released and will include this now stable module. The new
+ stable module version will be an increment of the minor version number
+ and will be applied to all existing stable modules as well as the newly
+ stable module being released.
+* Versioning of the associated [contrib
+ repository](https://github.com/open-telemetry/opentelemetry-go-contrib) of
+ this project will be idiomatic of a Go project using [Go
+ modules](https://github.com/golang/go/wiki/Modules).
+ * [Semantic import
+ versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning)
+ will be used.
+ * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html).
+ * If a module is version `v2` or higher, the
+ major version of the module must be included as a `/vN` at the end of the
+ module paths used in `go.mod` files (e.g., `module
+ go.opentelemetry.io/contrib/instrumentation/host/v2`, `require
+ go.opentelemetry.io/contrib/instrumentation/host/v2 v2.0.1`) and in the
+ package import path (e.g., `import
+ "go.opentelemetry.io/contrib/instrumentation/host/v2"`). This includes
+ the paths used in `go get` commands (e.g., `go get
+ go.opentelemetry.io/contrib/instrumentation/host/v2@v2.0.1`. Note there
+ is both a `/v2` and a `@v2.0.1` in that example. One way to think about
+ it is that the module name now includes the `/v2`, so include `/v2`
+ whenever you are using the module name).
+ * If a module is version `v0` or `v1`, do not include the major version
+ in either the module path or the import path.
+ * In addition to public APIs, telemetry produced by stable instrumentation
+ will remain stable and backwards compatible. This is to avoid breaking
+ alerts and dashboard.
+ * Modules will be used to encapsulate instrumentation, detectors, exporters,
+ propagators, and any other independent sets of related components.
+ * Experimental modules still under active development will be versioned at
+ `v0` to imply the stability guarantee defined by
+ [semver](https://semver.org/spec/v2.0.0.html#spec-item-4).
+
+ > Major version zero (0.y.z) is for initial development. Anything MAY
+ > change at any time. The public API SHOULD NOT be considered stable.
+
+ * Mature modules for which we guarantee a stable public API and telemetry will
+ be versioned with a major version greater than `v0`.
+ * Experimental modules will start their versioning at `v0.0.0` and will
+ increment their minor version when backwards incompatible changes are
+ released and increment their patch version when backwards compatible
+ changes are released.
+ * Stable contrib modules cannot depend on experimental modules from this
+ project.
+ * All stable contrib modules of the same major version with this project
+ will use the same entire version as this project.
+ * Stable modules may be released with an incremented minor or patch
+ version even though that module's code has not been changed. Instead
+ the only change that will have been included is to have updated that
+ modules dependency on this project's stable APIs.
+ * When an experimental module in contrib becomes stable a new stable
+ module version will be released and will include this now stable
+ module. The new stable module version will be an increment of the minor
+ version number and will be applied to all existing stable contrib
+ modules, this project's modules, and the newly stable module being
+ released.
+ * Contrib modules will be kept up to date with this project's releases.
+ * Due to the dependency contrib modules will implicitly have on this
+ project's modules the release of stable contrib modules to match the
+ released version number will be staggered after this project's release.
+ There is no explicit time guarantee for how long after this projects
+ release the contrib release will be. Effort should be made to keep them
+ as close in time as possible.
+ * No additional stable release in this project can be made until the
+ contrib repository has a matching stable release.
+ * No release can be made in the contrib repository after this project's
+ stable release except for a stable release of the contrib repository.
+* GitHub releases will be made for all releases.
+* Go modules will be made available at Go package mirrors.
+
+## Example Versioning Lifecycle
+
+To better understand the implementation of the above policy the following
+example is provided. This project is simplified to include only the following
+modules and their versions:
+
+* `otel`: `v0.14.0`
+* `otel/trace`: `v0.14.0`
+* `otel/metric`: `v0.14.0`
+* `otel/baggage`: `v0.14.0`
+* `otel/sdk/trace`: `v0.14.0`
+* `otel/sdk/metric`: `v0.14.0`
+
+These modules have been developed to a point where the `otel/trace`,
+`otel/baggage`, and `otel/sdk/trace` modules have reached a point that they
+should be considered for a stable release. The `otel/metric` and
+`otel/sdk/metric` are still under active development and the `otel` module
+depends on both `otel/trace` and `otel/metric`.
+
+The `otel` package is refactored to remove its dependencies on `otel/metric` so
+it can be released as stable as well. With that done the following release
+candidates are made:
+
+* `otel`: `v1.0.0-RC1`
+* `otel/trace`: `v1.0.0-RC1`
+* `otel/baggage`: `v1.0.0-RC1`
+* `otel/sdk/trace`: `v1.0.0-RC1`
+
+The `otel/metric` and `otel/sdk/metric` modules remain at `v0.14.0`.
+
+A few minor issues are discovered in the `otel/trace` package. These issues are
+resolved with some minor, but backwards incompatible, changes and are released
+as a second release candidate:
+
+* `otel`: `v1.0.0-RC2`
+* `otel/trace`: `v1.0.0-RC2`
+* `otel/baggage`: `v1.0.0-RC2`
+* `otel/sdk/trace`: `v1.0.0-RC2`
+
+Notice that all module version numbers are incremented to adhere to our
+versioning policy.
+
+After these release candidates have been evaluated to satisfaction, they are
+released as version `v1.0.0`.
+
+* `otel`: `v1.0.0`
+* `otel/trace`: `v1.0.0`
+* `otel/baggage`: `v1.0.0`
+* `otel/sdk/trace`: `v1.0.0`
+
+Since both the `go` utility and the Go module system support [the semantic
+versioning definition of
+precedence](https://semver.org/spec/v2.0.0.html#spec-item-11), this release
+will correctly be interpreted as the successor to the previous release
+candidates.
+
+Active development of this project continues. The `otel/metric` module now has
+backwards incompatible changes to its API that need to be released and the
+`otel/baggage` module has a minor bug fix that needs to be released. The
+following release is made:
+
+* `otel`: `v1.0.1`
+* `otel/trace`: `v1.0.1`
+* `otel/metric`: `v0.15.0`
+* `otel/baggage`: `v1.0.1`
+* `otel/sdk/trace`: `v1.0.1`
+* `otel/sdk/metric`: `v0.15.0`
+
+Notice that, again, all stable module versions are incremented in unison and
+the `otel/sdk/metric` package, which depends on the `otel/metric` package, also
+bumped its version. This bump of the `otel/sdk/metric` package makes sense
+given their coupling, though it is not explicitly required by our versioning
+policy.
+
+As we progress, the `otel/metric` and `otel/sdk/metric` packages have reached a
+point where they should be evaluated for stability. The `otel` module is
+reintegrated with the `otel/metric` package and the following release is made:
+
+* `otel`: `v1.1.0-RC1`
+* `otel/trace`: `v1.1.0-RC1`
+* `otel/metric`: `v1.1.0-RC1`
+* `otel/baggage`: `v1.1.0-RC1`
+* `otel/sdk/trace`: `v1.1.0-RC1`
+* `otel/sdk/metric`: `v1.1.0-RC1`
+
+All the modules are evaluated and determined to a viable stable release. They
+are then released as version `v1.1.0` (the minor version is incremented to
+indicate the addition of new signal).
+
+* `otel`: `v1.1.0`
+* `otel/trace`: `v1.1.0`
+* `otel/metric`: `v1.1.0`
+* `otel/baggage`: `v1.1.0`
+* `otel/sdk/trace`: `v1.1.0`
+* `otel/sdk/metric`: `v1.1.0`
diff --git a/vendor/go.opentelemetry.io/otel/baggage/README.md b/vendor/go.opentelemetry.io/otel/baggage/README.md
new file mode 100644
index 00000000..7d798435
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/baggage/README.md
@@ -0,0 +1,3 @@
+# Baggage
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/baggage)
diff --git a/vendor/go.opentelemetry.io/otel/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/baggage/baggage.go
new file mode 100644
index 00000000..0e1fe242
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/baggage/baggage.go
@@ -0,0 +1,1018 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package baggage // import "go.opentelemetry.io/otel/baggage"
+
+import (
+ "errors"
+ "fmt"
+ "net/url"
+ "strings"
+ "unicode/utf8"
+
+ "go.opentelemetry.io/otel/internal/baggage"
+)
+
+const (
+ maxMembers = 180
+ maxBytesPerMembers = 4096
+ maxBytesPerBaggageString = 8192
+
+ listDelimiter = ","
+ keyValueDelimiter = "="
+ propertyDelimiter = ";"
+)
+
+var (
+ errInvalidKey = errors.New("invalid key")
+ errInvalidValue = errors.New("invalid value")
+ errInvalidProperty = errors.New("invalid baggage list-member property")
+ errInvalidMember = errors.New("invalid baggage list-member")
+ errMemberNumber = errors.New("too many list-members in baggage-string")
+ errMemberBytes = errors.New("list-member too large")
+ errBaggageBytes = errors.New("baggage-string too large")
+)
+
+// Property is an additional metadata entry for a baggage list-member.
+type Property struct {
+ key, value string
+
+ // hasValue indicates if a zero-value value means the property does not
+ // have a value or if it was the zero-value.
+ hasValue bool
+}
+
+// NewKeyProperty returns a new Property for key.
+//
+// The passed key must be valid, non-empty UTF-8 string.
+// If key is invalid, an error will be returned.
+// However, the specific Propagators that are used to transmit baggage entries across
+// component boundaries may impose their own restrictions on Property key.
+// For example, the W3C Baggage specification restricts the Property keys to strings that
+// satisfy the token definition from RFC7230, Section 3.2.6.
+// For maximum compatibility, alphanumeric value are strongly recommended to be used as Property key.
+func NewKeyProperty(key string) (Property, error) {
+ if !validateBaggageName(key) {
+ return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key)
+ }
+
+ p := Property{key: key}
+ return p, nil
+}
+
+// NewKeyValueProperty returns a new Property for key with value.
+//
+// The passed key must be compliant with W3C Baggage specification.
+// The passed value must be percent-encoded as defined in W3C Baggage specification.
+//
+// Notice: Consider using [NewKeyValuePropertyRaw] instead
+// that does not require percent-encoding of the value.
+func NewKeyValueProperty(key, value string) (Property, error) {
+ if !validateKey(key) {
+ return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key)
+ }
+
+ if !validateValue(value) {
+ return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value)
+ }
+ decodedValue, err := url.PathUnescape(value)
+ if err != nil {
+ return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value)
+ }
+ return NewKeyValuePropertyRaw(key, decodedValue)
+}
+
+// NewKeyValuePropertyRaw returns a new Property for key with value.
+//
+// The passed key must be valid, non-empty UTF-8 string.
+// The passed value must be valid UTF-8 string.
+// However, the specific Propagators that are used to transmit baggage entries across
+// component boundaries may impose their own restrictions on Property key.
+// For example, the W3C Baggage specification restricts the Property keys to strings that
+// satisfy the token definition from RFC7230, Section 3.2.6.
+// For maximum compatibility, alphanumeric value are strongly recommended to be used as Property key.
+func NewKeyValuePropertyRaw(key, value string) (Property, error) {
+ if !validateBaggageName(key) {
+ return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key)
+ }
+ if !validateBaggageValue(value) {
+ return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value)
+ }
+
+ p := Property{
+ key: key,
+ value: value,
+ hasValue: true,
+ }
+ return p, nil
+}
+
+func newInvalidProperty() Property {
+ return Property{}
+}
+
+// parseProperty attempts to decode a Property from the passed string. It
+// returns an error if the input is invalid according to the W3C Baggage
+// specification.
+func parseProperty(property string) (Property, error) {
+ if property == "" {
+ return newInvalidProperty(), nil
+ }
+
+ p, ok := parsePropertyInternal(property)
+ if !ok {
+ return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidProperty, property)
+ }
+
+ return p, nil
+}
+
+// validate ensures p conforms to the W3C Baggage specification, returning an
+// error otherwise.
+func (p Property) validate() error {
+ errFunc := func(err error) error {
+ return fmt.Errorf("invalid property: %w", err)
+ }
+
+ if !validateBaggageName(p.key) {
+ return errFunc(fmt.Errorf("%w: %q", errInvalidKey, p.key))
+ }
+ if !p.hasValue && p.value != "" {
+ return errFunc(errors.New("inconsistent value"))
+ }
+ if p.hasValue && !validateBaggageValue(p.value) {
+ return errFunc(fmt.Errorf("%w: %q", errInvalidValue, p.value))
+ }
+ return nil
+}
+
+// Key returns the Property key.
+func (p Property) Key() string {
+ return p.key
+}
+
+// Value returns the Property value. Additionally, a boolean value is returned
+// indicating if the returned value is the empty if the Property has a value
+// that is empty or if the value is not set.
+func (p Property) Value() (string, bool) {
+ return p.value, p.hasValue
+}
+
+// String encodes Property into a header string compliant with the W3C Baggage
+// specification.
+// It would return empty string if the key is invalid with the W3C Baggage
+// specification. This could happen for a UTF-8 key, as it may contain
+// invalid characters.
+func (p Property) String() string {
+ // W3C Baggage specification does not allow percent-encoded keys.
+ if !validateKey(p.key) {
+ return ""
+ }
+
+ if p.hasValue {
+ return fmt.Sprintf("%s%s%v", p.key, keyValueDelimiter, valueEscape(p.value))
+ }
+ return p.key
+}
+
+type properties []Property
+
+func fromInternalProperties(iProps []baggage.Property) properties {
+ if len(iProps) == 0 {
+ return nil
+ }
+
+ props := make(properties, len(iProps))
+ for i, p := range iProps {
+ props[i] = Property{
+ key: p.Key,
+ value: p.Value,
+ hasValue: p.HasValue,
+ }
+ }
+ return props
+}
+
+func (p properties) asInternal() []baggage.Property {
+ if len(p) == 0 {
+ return nil
+ }
+
+ iProps := make([]baggage.Property, len(p))
+ for i, prop := range p {
+ iProps[i] = baggage.Property{
+ Key: prop.key,
+ Value: prop.value,
+ HasValue: prop.hasValue,
+ }
+ }
+ return iProps
+}
+
+func (p properties) Copy() properties {
+ if len(p) == 0 {
+ return nil
+ }
+
+ props := make(properties, len(p))
+ copy(props, p)
+ return props
+}
+
+// validate ensures each Property in p conforms to the W3C Baggage
+// specification, returning an error otherwise.
+func (p properties) validate() error {
+ for _, prop := range p {
+ if err := prop.validate(); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// String encodes properties into a header string compliant with the W3C Baggage
+// specification.
+func (p properties) String() string {
+ props := make([]string, 0, len(p))
+ for _, prop := range p {
+ s := prop.String()
+
+ // Ignored empty properties.
+ if s != "" {
+ props = append(props, s)
+ }
+ }
+ return strings.Join(props, propertyDelimiter)
+}
+
+// Member is a list-member of a baggage-string as defined by the W3C Baggage
+// specification.
+type Member struct {
+ key, value string
+ properties properties
+
+ // hasData indicates whether the created property contains data or not.
+ // Properties that do not contain data are invalid with no other check
+ // required.
+ hasData bool
+}
+
+// NewMember returns a new Member from the passed arguments.
+//
+// The passed key must be compliant with W3C Baggage specification.
+// The passed value must be percent-encoded as defined in W3C Baggage specification.
+//
+// Notice: Consider using [NewMemberRaw] instead
+// that does not require percent-encoding of the value.
+func NewMember(key, value string, props ...Property) (Member, error) {
+ if !validateKey(key) {
+ return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidKey, key)
+ }
+
+ if !validateValue(value) {
+ return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value)
+ }
+ decodedValue, err := url.PathUnescape(value)
+ if err != nil {
+ return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value)
+ }
+ return NewMemberRaw(key, decodedValue, props...)
+}
+
+// NewMemberRaw returns a new Member from the passed arguments.
+//
+// The passed key must be valid, non-empty UTF-8 string.
+// The passed value must be valid UTF-8 string.
+// However, the specific Propagators that are used to transmit baggage entries across
+// component boundaries may impose their own restrictions on baggage key.
+// For example, the W3C Baggage specification restricts the baggage keys to strings that
+// satisfy the token definition from RFC7230, Section 3.2.6.
+// For maximum compatibility, alphanumeric value are strongly recommended to be used as baggage key.
+func NewMemberRaw(key, value string, props ...Property) (Member, error) {
+ m := Member{
+ key: key,
+ value: value,
+ properties: properties(props).Copy(),
+ hasData: true,
+ }
+ if err := m.validate(); err != nil {
+ return newInvalidMember(), err
+ }
+ return m, nil
+}
+
+func newInvalidMember() Member {
+ return Member{}
+}
+
+// parseMember attempts to decode a Member from the passed string. It returns
+// an error if the input is invalid according to the W3C Baggage
+// specification.
+func parseMember(member string) (Member, error) {
+ if n := len(member); n > maxBytesPerMembers {
+ return newInvalidMember(), fmt.Errorf("%w: %d", errMemberBytes, n)
+ }
+
+ var props properties
+ keyValue, properties, found := strings.Cut(member, propertyDelimiter)
+ if found {
+ // Parse the member properties.
+ for _, pStr := range strings.Split(properties, propertyDelimiter) {
+ p, err := parseProperty(pStr)
+ if err != nil {
+ return newInvalidMember(), err
+ }
+ props = append(props, p)
+ }
+ }
+ // Parse the member key/value pair.
+
+ // Take into account a value can contain equal signs (=).
+ k, v, found := strings.Cut(keyValue, keyValueDelimiter)
+ if !found {
+ return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidMember, member)
+ }
+ // "Leading and trailing whitespaces are allowed but MUST be trimmed
+ // when converting the header into a data structure."
+ key := strings.TrimSpace(k)
+ if !validateKey(key) {
+ return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidKey, key)
+ }
+
+ rawVal := strings.TrimSpace(v)
+ if !validateValue(rawVal) {
+ return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, v)
+ }
+
+ // Decode a percent-encoded value.
+ unescapeVal, err := url.PathUnescape(rawVal)
+ if err != nil {
+ return newInvalidMember(), fmt.Errorf("%w: %w", errInvalidValue, err)
+ }
+
+ value := replaceInvalidUTF8Sequences(len(rawVal), unescapeVal)
+ return Member{key: key, value: value, properties: props, hasData: true}, nil
+}
+
+// replaceInvalidUTF8Sequences replaces invalid UTF-8 sequences with '�'.
+func replaceInvalidUTF8Sequences(c int, unescapeVal string) string {
+ if utf8.ValidString(unescapeVal) {
+ return unescapeVal
+ }
+ // W3C baggage spec:
+ // https://github.com/w3c/baggage/blob/8c215efbeebd3fa4b1aceb937a747e56444f22f3/baggage/HTTP_HEADER_FORMAT.md?plain=1#L69
+
+ var b strings.Builder
+ b.Grow(c)
+ for i := 0; i < len(unescapeVal); {
+ r, size := utf8.DecodeRuneInString(unescapeVal[i:])
+ if r == utf8.RuneError && size == 1 {
+ // Invalid UTF-8 sequence found, replace it with '�'
+ _, _ = b.WriteString("�")
+ } else {
+ _, _ = b.WriteRune(r)
+ }
+ i += size
+ }
+
+ return b.String()
+}
+
+// validate ensures m conforms to the W3C Baggage specification.
+// A key must be an ASCII string, returning an error otherwise.
+func (m Member) validate() error {
+ if !m.hasData {
+ return fmt.Errorf("%w: %q", errInvalidMember, m)
+ }
+
+ if !validateBaggageName(m.key) {
+ return fmt.Errorf("%w: %q", errInvalidKey, m.key)
+ }
+ if !validateBaggageValue(m.value) {
+ return fmt.Errorf("%w: %q", errInvalidValue, m.value)
+ }
+ return m.properties.validate()
+}
+
+// Key returns the Member key.
+func (m Member) Key() string { return m.key }
+
+// Value returns the Member value.
+func (m Member) Value() string { return m.value }
+
+// Properties returns a copy of the Member properties.
+func (m Member) Properties() []Property { return m.properties.Copy() }
+
+// String encodes Member into a header string compliant with the W3C Baggage
+// specification.
+// It would return empty string if the key is invalid with the W3C Baggage
+// specification. This could happen for a UTF-8 key, as it may contain
+// invalid characters.
+func (m Member) String() string {
+ // W3C Baggage specification does not allow percent-encoded keys.
+ if !validateKey(m.key) {
+ return ""
+ }
+
+ s := m.key + keyValueDelimiter + valueEscape(m.value)
+ if len(m.properties) > 0 {
+ s += propertyDelimiter + m.properties.String()
+ }
+ return s
+}
+
+// Baggage is a list of baggage members representing the baggage-string as
+// defined by the W3C Baggage specification.
+type Baggage struct { //nolint:golint
+ list baggage.List
+}
+
+// New returns a new valid Baggage. It returns an error if it results in a
+// Baggage exceeding limits set in that specification.
+//
+// It expects all the provided members to have already been validated.
+func New(members ...Member) (Baggage, error) {
+ if len(members) == 0 {
+ return Baggage{}, nil
+ }
+
+ b := make(baggage.List)
+ for _, m := range members {
+ if !m.hasData {
+ return Baggage{}, errInvalidMember
+ }
+
+ // OpenTelemetry resolves duplicates by last-one-wins.
+ b[m.key] = baggage.Item{
+ Value: m.value,
+ Properties: m.properties.asInternal(),
+ }
+ }
+
+ // Check member numbers after deduplication.
+ if len(b) > maxMembers {
+ return Baggage{}, errMemberNumber
+ }
+
+ bag := Baggage{b}
+ if n := len(bag.String()); n > maxBytesPerBaggageString {
+ return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n)
+ }
+
+ return bag, nil
+}
+
+// Parse attempts to decode a baggage-string from the passed string. It
+// returns an error if the input is invalid according to the W3C Baggage
+// specification.
+//
+// If there are duplicate list-members contained in baggage, the last one
+// defined (reading left-to-right) will be the only one kept. This diverges
+// from the W3C Baggage specification which allows duplicate list-members, but
+// conforms to the OpenTelemetry Baggage specification.
+func Parse(bStr string) (Baggage, error) {
+ if bStr == "" {
+ return Baggage{}, nil
+ }
+
+ if n := len(bStr); n > maxBytesPerBaggageString {
+ return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n)
+ }
+
+ b := make(baggage.List)
+ for _, memberStr := range strings.Split(bStr, listDelimiter) {
+ m, err := parseMember(memberStr)
+ if err != nil {
+ return Baggage{}, err
+ }
+ // OpenTelemetry resolves duplicates by last-one-wins.
+ b[m.key] = baggage.Item{
+ Value: m.value,
+ Properties: m.properties.asInternal(),
+ }
+ }
+
+ // OpenTelemetry does not allow for duplicate list-members, but the W3C
+ // specification does. Now that we have deduplicated, ensure the baggage
+ // does not exceed list-member limits.
+ if len(b) > maxMembers {
+ return Baggage{}, errMemberNumber
+ }
+
+ return Baggage{b}, nil
+}
+
+// Member returns the baggage list-member identified by key.
+//
+// If there is no list-member matching the passed key the returned Member will
+// be a zero-value Member.
+// The returned member is not validated, as we assume the validation happened
+// when it was added to the Baggage.
+func (b Baggage) Member(key string) Member {
+ v, ok := b.list[key]
+ if !ok {
+ // We do not need to worry about distinguishing between the situation
+ // where a zero-valued Member is included in the Baggage because a
+ // zero-valued Member is invalid according to the W3C Baggage
+ // specification (it has an empty key).
+ return newInvalidMember()
+ }
+
+ return Member{
+ key: key,
+ value: v.Value,
+ properties: fromInternalProperties(v.Properties),
+ hasData: true,
+ }
+}
+
+// Members returns all the baggage list-members.
+// The order of the returned list-members is not significant.
+//
+// The returned members are not validated, as we assume the validation happened
+// when they were added to the Baggage.
+func (b Baggage) Members() []Member {
+ if len(b.list) == 0 {
+ return nil
+ }
+
+ members := make([]Member, 0, len(b.list))
+ for k, v := range b.list {
+ members = append(members, Member{
+ key: k,
+ value: v.Value,
+ properties: fromInternalProperties(v.Properties),
+ hasData: true,
+ })
+ }
+ return members
+}
+
+// SetMember returns a copy of the Baggage with the member included. If the
+// baggage contains a Member with the same key, the existing Member is
+// replaced.
+//
+// If member is invalid according to the W3C Baggage specification, an error
+// is returned with the original Baggage.
+func (b Baggage) SetMember(member Member) (Baggage, error) {
+ if !member.hasData {
+ return b, errInvalidMember
+ }
+
+ n := len(b.list)
+ if _, ok := b.list[member.key]; !ok {
+ n++
+ }
+ list := make(baggage.List, n)
+
+ for k, v := range b.list {
+ // Do not copy if we are just going to overwrite.
+ if k == member.key {
+ continue
+ }
+ list[k] = v
+ }
+
+ list[member.key] = baggage.Item{
+ Value: member.value,
+ Properties: member.properties.asInternal(),
+ }
+
+ return Baggage{list: list}, nil
+}
+
+// DeleteMember returns a copy of the Baggage with the list-member identified
+// by key removed.
+func (b Baggage) DeleteMember(key string) Baggage {
+ n := len(b.list)
+ if _, ok := b.list[key]; ok {
+ n--
+ }
+ list := make(baggage.List, n)
+
+ for k, v := range b.list {
+ if k == key {
+ continue
+ }
+ list[k] = v
+ }
+
+ return Baggage{list: list}
+}
+
+// Len returns the number of list-members in the Baggage.
+func (b Baggage) Len() int {
+ return len(b.list)
+}
+
+// String encodes Baggage into a header string compliant with the W3C Baggage
+// specification.
+// It would ignore members where the member key is invalid with the W3C Baggage
+// specification. This could happen for a UTF-8 key, as it may contain
+// invalid characters.
+func (b Baggage) String() string {
+ members := make([]string, 0, len(b.list))
+ for k, v := range b.list {
+ s := Member{
+ key: k,
+ value: v.Value,
+ properties: fromInternalProperties(v.Properties),
+ }.String()
+
+ // Ignored empty members.
+ if s != "" {
+ members = append(members, s)
+ }
+ }
+ return strings.Join(members, listDelimiter)
+}
+
+// parsePropertyInternal attempts to decode a Property from the passed string.
+// It follows the spec at https://www.w3.org/TR/baggage/#definition.
+func parsePropertyInternal(s string) (p Property, ok bool) {
+ // For the entire function we will use " key = value " as an example.
+ // Attempting to parse the key.
+ // First skip spaces at the beginning "< >key = value " (they could be empty).
+ index := skipSpace(s, 0)
+
+ // Parse the key: " = value ".
+ keyStart := index
+ keyEnd := index
+ for _, c := range s[keyStart:] {
+ if !validateKeyChar(c) {
+ break
+ }
+ keyEnd++
+ }
+
+ // If we couldn't find any valid key character,
+ // it means the key is either empty or invalid.
+ if keyStart == keyEnd {
+ return
+ }
+
+ // Skip spaces after the key: " key< >= value ".
+ index = skipSpace(s, keyEnd)
+
+ if index == len(s) {
+ // A key can have no value, like: " key ".
+ ok = true
+ p.key = s[keyStart:keyEnd]
+ return
+ }
+
+ // If we have not reached the end and we can't find the '=' delimiter,
+ // it means the property is invalid.
+ if s[index] != keyValueDelimiter[0] {
+ return
+ }
+
+ // Attempting to parse the value.
+ // Match: " key =< >value ".
+ index = skipSpace(s, index+1)
+
+ // Match the value string: " key = ".
+ // A valid property can be: " key =".
+ // Therefore, we don't have to check if the value is empty.
+ valueStart := index
+ valueEnd := index
+ for _, c := range s[valueStart:] {
+ if !validateValueChar(c) {
+ break
+ }
+ valueEnd++
+ }
+
+ // Skip all trailing whitespaces: " key = value< >".
+ index = skipSpace(s, valueEnd)
+
+ // If after looking for the value and skipping whitespaces
+ // we have not reached the end, it means the property is
+ // invalid, something like: " key = value value1".
+ if index != len(s) {
+ return
+ }
+
+ // Decode a percent-encoded value.
+ rawVal := s[valueStart:valueEnd]
+ unescapeVal, err := url.PathUnescape(rawVal)
+ if err != nil {
+ return
+ }
+ value := replaceInvalidUTF8Sequences(len(rawVal), unescapeVal)
+
+ ok = true
+ p.key = s[keyStart:keyEnd]
+ p.hasValue = true
+
+ p.value = value
+ return
+}
+
+func skipSpace(s string, offset int) int {
+ i := offset
+ for ; i < len(s); i++ {
+ c := s[i]
+ if c != ' ' && c != '\t' {
+ break
+ }
+ }
+ return i
+}
+
+var safeKeyCharset = [utf8.RuneSelf]bool{
+ // 0x23 to 0x27
+ '#': true,
+ '$': true,
+ '%': true,
+ '&': true,
+ '\'': true,
+
+ // 0x30 to 0x39
+ '0': true,
+ '1': true,
+ '2': true,
+ '3': true,
+ '4': true,
+ '5': true,
+ '6': true,
+ '7': true,
+ '8': true,
+ '9': true,
+
+ // 0x41 to 0x5a
+ 'A': true,
+ 'B': true,
+ 'C': true,
+ 'D': true,
+ 'E': true,
+ 'F': true,
+ 'G': true,
+ 'H': true,
+ 'I': true,
+ 'J': true,
+ 'K': true,
+ 'L': true,
+ 'M': true,
+ 'N': true,
+ 'O': true,
+ 'P': true,
+ 'Q': true,
+ 'R': true,
+ 'S': true,
+ 'T': true,
+ 'U': true,
+ 'V': true,
+ 'W': true,
+ 'X': true,
+ 'Y': true,
+ 'Z': true,
+
+ // 0x5e to 0x7a
+ '^': true,
+ '_': true,
+ '`': true,
+ 'a': true,
+ 'b': true,
+ 'c': true,
+ 'd': true,
+ 'e': true,
+ 'f': true,
+ 'g': true,
+ 'h': true,
+ 'i': true,
+ 'j': true,
+ 'k': true,
+ 'l': true,
+ 'm': true,
+ 'n': true,
+ 'o': true,
+ 'p': true,
+ 'q': true,
+ 'r': true,
+ 's': true,
+ 't': true,
+ 'u': true,
+ 'v': true,
+ 'w': true,
+ 'x': true,
+ 'y': true,
+ 'z': true,
+
+ // remainder
+ '!': true,
+ '*': true,
+ '+': true,
+ '-': true,
+ '.': true,
+ '|': true,
+ '~': true,
+}
+
+// validateBaggageName checks if the string is a valid OpenTelemetry Baggage name.
+// Baggage name is a valid, non-empty UTF-8 string.
+func validateBaggageName(s string) bool {
+ if len(s) == 0 {
+ return false
+ }
+
+ return utf8.ValidString(s)
+}
+
+// validateBaggageValue checks if the string is a valid OpenTelemetry Baggage value.
+// Baggage value is a valid UTF-8 strings.
+// Empty string is also a valid UTF-8 string.
+func validateBaggageValue(s string) bool {
+ return utf8.ValidString(s)
+}
+
+// validateKey checks if the string is a valid W3C Baggage key.
+func validateKey(s string) bool {
+ if len(s) == 0 {
+ return false
+ }
+
+ for _, c := range s {
+ if !validateKeyChar(c) {
+ return false
+ }
+ }
+
+ return true
+}
+
+func validateKeyChar(c int32) bool {
+ return c >= 0 && c < int32(utf8.RuneSelf) && safeKeyCharset[c]
+}
+
+// validateValue checks if the string is a valid W3C Baggage value.
+func validateValue(s string) bool {
+ for _, c := range s {
+ if !validateValueChar(c) {
+ return false
+ }
+ }
+
+ return true
+}
+
+var safeValueCharset = [utf8.RuneSelf]bool{
+ '!': true, // 0x21
+
+ // 0x23 to 0x2b
+ '#': true,
+ '$': true,
+ '%': true,
+ '&': true,
+ '\'': true,
+ '(': true,
+ ')': true,
+ '*': true,
+ '+': true,
+
+ // 0x2d to 0x3a
+ '-': true,
+ '.': true,
+ '/': true,
+ '0': true,
+ '1': true,
+ '2': true,
+ '3': true,
+ '4': true,
+ '5': true,
+ '6': true,
+ '7': true,
+ '8': true,
+ '9': true,
+ ':': true,
+
+ // 0x3c to 0x5b
+ '<': true, // 0x3C
+ '=': true, // 0x3D
+ '>': true, // 0x3E
+ '?': true, // 0x3F
+ '@': true, // 0x40
+ 'A': true, // 0x41
+ 'B': true, // 0x42
+ 'C': true, // 0x43
+ 'D': true, // 0x44
+ 'E': true, // 0x45
+ 'F': true, // 0x46
+ 'G': true, // 0x47
+ 'H': true, // 0x48
+ 'I': true, // 0x49
+ 'J': true, // 0x4A
+ 'K': true, // 0x4B
+ 'L': true, // 0x4C
+ 'M': true, // 0x4D
+ 'N': true, // 0x4E
+ 'O': true, // 0x4F
+ 'P': true, // 0x50
+ 'Q': true, // 0x51
+ 'R': true, // 0x52
+ 'S': true, // 0x53
+ 'T': true, // 0x54
+ 'U': true, // 0x55
+ 'V': true, // 0x56
+ 'W': true, // 0x57
+ 'X': true, // 0x58
+ 'Y': true, // 0x59
+ 'Z': true, // 0x5A
+ '[': true, // 0x5B
+
+ // 0x5d to 0x7e
+ ']': true, // 0x5D
+ '^': true, // 0x5E
+ '_': true, // 0x5F
+ '`': true, // 0x60
+ 'a': true, // 0x61
+ 'b': true, // 0x62
+ 'c': true, // 0x63
+ 'd': true, // 0x64
+ 'e': true, // 0x65
+ 'f': true, // 0x66
+ 'g': true, // 0x67
+ 'h': true, // 0x68
+ 'i': true, // 0x69
+ 'j': true, // 0x6A
+ 'k': true, // 0x6B
+ 'l': true, // 0x6C
+ 'm': true, // 0x6D
+ 'n': true, // 0x6E
+ 'o': true, // 0x6F
+ 'p': true, // 0x70
+ 'q': true, // 0x71
+ 'r': true, // 0x72
+ 's': true, // 0x73
+ 't': true, // 0x74
+ 'u': true, // 0x75
+ 'v': true, // 0x76
+ 'w': true, // 0x77
+ 'x': true, // 0x78
+ 'y': true, // 0x79
+ 'z': true, // 0x7A
+ '{': true, // 0x7B
+ '|': true, // 0x7C
+ '}': true, // 0x7D
+ '~': true, // 0x7E
+}
+
+func validateValueChar(c int32) bool {
+ return c >= 0 && c < int32(utf8.RuneSelf) && safeValueCharset[c]
+}
+
+// valueEscape escapes the string so it can be safely placed inside a baggage value,
+// replacing special characters with %XX sequences as needed.
+//
+// The implementation is based on:
+// https://github.com/golang/go/blob/f6509cf5cdbb5787061b784973782933c47f1782/src/net/url/url.go#L285.
+func valueEscape(s string) string {
+ hexCount := 0
+ for i := 0; i < len(s); i++ {
+ c := s[i]
+ if shouldEscape(c) {
+ hexCount++
+ }
+ }
+
+ if hexCount == 0 {
+ return s
+ }
+
+ var buf [64]byte
+ var t []byte
+
+ required := len(s) + 2*hexCount
+ if required <= len(buf) {
+ t = buf[:required]
+ } else {
+ t = make([]byte, required)
+ }
+
+ j := 0
+ for i := 0; i < len(s); i++ {
+ c := s[i]
+ if shouldEscape(s[i]) {
+ const upperhex = "0123456789ABCDEF"
+ t[j] = '%'
+ t[j+1] = upperhex[c>>4]
+ t[j+2] = upperhex[c&15]
+ j += 3
+ } else {
+ t[j] = c
+ j++
+ }
+ }
+
+ return string(t)
+}
+
+// shouldEscape returns true if the specified byte should be escaped when
+// appearing in a baggage value string.
+func shouldEscape(c byte) bool {
+ if c == '%' {
+ // The percent character must be encoded so that percent-encoding can work.
+ return true
+ }
+ return !validateValueChar(int32(c))
+}
diff --git a/vendor/go.opentelemetry.io/otel/baggage/context.go b/vendor/go.opentelemetry.io/otel/baggage/context.go
new file mode 100644
index 00000000..a572461a
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/baggage/context.go
@@ -0,0 +1,28 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package baggage // import "go.opentelemetry.io/otel/baggage"
+
+import (
+ "context"
+
+ "go.opentelemetry.io/otel/internal/baggage"
+)
+
+// ContextWithBaggage returns a copy of parent with baggage.
+func ContextWithBaggage(parent context.Context, b Baggage) context.Context {
+ // Delegate so any hooks for the OpenTracing bridge are handled.
+ return baggage.ContextWithList(parent, b.list)
+}
+
+// ContextWithoutBaggage returns a copy of parent with no baggage.
+func ContextWithoutBaggage(parent context.Context) context.Context {
+ // Delegate so any hooks for the OpenTracing bridge are handled.
+ return baggage.ContextWithList(parent, nil)
+}
+
+// FromContext returns the baggage contained in ctx.
+func FromContext(ctx context.Context) Baggage {
+ // Delegate so any hooks for the OpenTracing bridge are handled.
+ return Baggage{list: baggage.ListFromContext(ctx)}
+}
diff --git a/vendor/go.opentelemetry.io/otel/baggage/doc.go b/vendor/go.opentelemetry.io/otel/baggage/doc.go
new file mode 100644
index 00000000..b51d87ca
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/baggage/doc.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package baggage provides functionality for storing and retrieving
+baggage items in Go context. For propagating the baggage, see the
+go.opentelemetry.io/otel/propagation package.
+*/
+package baggage // import "go.opentelemetry.io/otel/baggage"
diff --git a/vendor/go.opentelemetry.io/otel/codes/README.md b/vendor/go.opentelemetry.io/otel/codes/README.md
new file mode 100644
index 00000000..24c52b38
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/codes/README.md
@@ -0,0 +1,3 @@
+# Codes
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/codes)
diff --git a/vendor/go.opentelemetry.io/otel/codes/codes.go b/vendor/go.opentelemetry.io/otel/codes/codes.go
new file mode 100644
index 00000000..49a35b12
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/codes/codes.go
@@ -0,0 +1,106 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package codes // import "go.opentelemetry.io/otel/codes"
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "strconv"
+)
+
+const (
+ // Unset is the default status code.
+ Unset Code = 0
+
+ // Error indicates the operation contains an error.
+ //
+ // NOTE: The error code in OTLP is 2.
+ // The value of this enum is only relevant to the internals
+ // of the Go SDK.
+ Error Code = 1
+
+ // Ok indicates operation has been validated by an Application developers
+ // or Operator to have completed successfully, or contain no error.
+ //
+ // NOTE: The Ok code in OTLP is 1.
+ // The value of this enum is only relevant to the internals
+ // of the Go SDK.
+ Ok Code = 2
+
+ maxCode = 3
+)
+
+// Code is an 32-bit representation of a status state.
+type Code uint32
+
+var codeToStr = map[Code]string{
+ Unset: "Unset",
+ Error: "Error",
+ Ok: "Ok",
+}
+
+var strToCode = map[string]Code{
+ `"Unset"`: Unset,
+ `"Error"`: Error,
+ `"Ok"`: Ok,
+}
+
+// String returns the Code as a string.
+func (c Code) String() string {
+ return codeToStr[c]
+}
+
+// UnmarshalJSON unmarshals b into the Code.
+//
+// This is based on the functionality in the gRPC codes package:
+// https://github.com/grpc/grpc-go/blob/bb64fee312b46ebee26be43364a7a966033521b1/codes/codes.go#L218-L244
+func (c *Code) UnmarshalJSON(b []byte) error {
+ // From json.Unmarshaler: By convention, to approximate the behavior of
+ // Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte("null")) as
+ // a no-op.
+ if string(b) == "null" {
+ return nil
+ }
+ if c == nil {
+ return errors.New("nil receiver passed to UnmarshalJSON")
+ }
+
+ var x interface{}
+ if err := json.Unmarshal(b, &x); err != nil {
+ return err
+ }
+ switch x.(type) {
+ case string:
+ if jc, ok := strToCode[string(b)]; ok {
+ *c = jc
+ return nil
+ }
+ return fmt.Errorf("invalid code: %q", string(b))
+ case float64:
+ if ci, err := strconv.ParseUint(string(b), 10, 32); err == nil {
+ if ci >= maxCode {
+ return fmt.Errorf("invalid code: %q", ci)
+ }
+
+ *c = Code(ci) // nolint: gosec // Bit size of 32 check above.
+ return nil
+ }
+ return fmt.Errorf("invalid code: %q", string(b))
+ default:
+ return fmt.Errorf("invalid code: %q", string(b))
+ }
+}
+
+// MarshalJSON returns c as the JSON encoding of c.
+func (c *Code) MarshalJSON() ([]byte, error) {
+ if c == nil {
+ return []byte("null"), nil
+ }
+ str, ok := codeToStr[*c]
+ if !ok {
+ return nil, fmt.Errorf("invalid code: %d", *c)
+ }
+ return []byte(fmt.Sprintf("%q", str)), nil
+}
diff --git a/vendor/go.opentelemetry.io/otel/codes/doc.go b/vendor/go.opentelemetry.io/otel/codes/doc.go
new file mode 100644
index 00000000..ee8db448
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/codes/doc.go
@@ -0,0 +1,10 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package codes defines the canonical error codes used by OpenTelemetry.
+
+It conforms to [the OpenTelemetry
+specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/api.md#set-status).
+*/
+package codes // import "go.opentelemetry.io/otel/codes"
diff --git a/vendor/go.opentelemetry.io/otel/doc.go b/vendor/go.opentelemetry.io/otel/doc.go
new file mode 100644
index 00000000..921f8596
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/doc.go
@@ -0,0 +1,25 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package otel provides global access to the OpenTelemetry API. The subpackages of
+the otel package provide an implementation of the OpenTelemetry API.
+
+The provided API is used to instrument code and measure data about that code's
+performance and operation. The measured data, by default, is not processed or
+transmitted anywhere. An implementation of the OpenTelemetry SDK, like the
+default SDK implementation (go.opentelemetry.io/otel/sdk), and associated
+exporters are used to process and transport this data.
+
+To read the getting started guide, see https://opentelemetry.io/docs/languages/go/getting-started/.
+
+To read more about tracing, see go.opentelemetry.io/otel/trace.
+
+To read more about metrics, see go.opentelemetry.io/otel/metric.
+
+To read more about logs, see go.opentelemetry.io/otel/log.
+
+To read more about propagation, see go.opentelemetry.io/otel/propagation and
+go.opentelemetry.io/otel/baggage.
+*/
+package otel // import "go.opentelemetry.io/otel"
diff --git a/vendor/go.opentelemetry.io/otel/error_handler.go b/vendor/go.opentelemetry.io/otel/error_handler.go
new file mode 100644
index 00000000..67414c71
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/error_handler.go
@@ -0,0 +1,27 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otel // import "go.opentelemetry.io/otel"
+
+// ErrorHandler handles irremediable events.
+type ErrorHandler interface {
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Handle handles any error deemed irremediable by an OpenTelemetry
+ // component.
+ Handle(error)
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+}
+
+// ErrorHandlerFunc is a convenience adapter to allow the use of a function
+// as an ErrorHandler.
+type ErrorHandlerFunc func(error)
+
+var _ ErrorHandler = ErrorHandlerFunc(nil)
+
+// Handle handles the irremediable error by calling the ErrorHandlerFunc itself.
+func (f ErrorHandlerFunc) Handle(err error) {
+ f(err)
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/README.md b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/README.md
new file mode 100644
index 00000000..50802d5a
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/README.md
@@ -0,0 +1,3 @@
+# OTLP Trace Exporter
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace)
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go
new file mode 100644
index 00000000..3c1a625c
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go
@@ -0,0 +1,43 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+
+import (
+ "context"
+
+ tracepb "go.opentelemetry.io/proto/otlp/trace/v1"
+)
+
+// Client manages connections to the collector, handles the
+// transformation of data into wire format, and the transmission of that
+// data to the collector.
+type Client interface {
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Start should establish connection(s) to endpoint(s). It is
+ // called just once by the exporter, so the implementation
+ // does not need to worry about idempotence and locking.
+ Start(ctx context.Context) error
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Stop should close the connections. The function is called
+ // only once by the exporter, so the implementation does not
+ // need to worry about idempotence, but it may be called
+ // concurrently with UploadTraces, so proper
+ // locking is required. The function serves as a
+ // synchronization point - after the function returns, the
+ // process of closing connections is assumed to be finished.
+ Stop(ctx context.Context) error
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // UploadTraces should transform the passed traces to the wire
+ // format and send it to the collector. May be called
+ // concurrently.
+ UploadTraces(ctx context.Context, protoSpans []*tracepb.ResourceSpans) error
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
new file mode 100644
index 00000000..09ad5ead
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go
@@ -0,0 +1,10 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package otlptrace contains abstractions for OTLP span exporters.
+See the official OTLP span exporter implementations:
+ - [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc],
+ - [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp].
+*/
+package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
new file mode 100644
index 00000000..3f0a518a
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go
@@ -0,0 +1,105 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "sync"
+
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
+ tracesdk "go.opentelemetry.io/otel/sdk/trace"
+)
+
+var errAlreadyStarted = errors.New("already started")
+
+// Exporter exports trace data in the OTLP wire format.
+type Exporter struct {
+ client Client
+
+ mu sync.RWMutex
+ started bool
+
+ startOnce sync.Once
+ stopOnce sync.Once
+}
+
+// ExportSpans exports a batch of spans.
+func (e *Exporter) ExportSpans(ctx context.Context, ss []tracesdk.ReadOnlySpan) error {
+ protoSpans := tracetransform.Spans(ss)
+ if len(protoSpans) == 0 {
+ return nil
+ }
+
+ err := e.client.UploadTraces(ctx, protoSpans)
+ if err != nil {
+ return fmt.Errorf("traces export: %w", err)
+ }
+ return nil
+}
+
+// Start establishes a connection to the receiving endpoint.
+func (e *Exporter) Start(ctx context.Context) error {
+ err := errAlreadyStarted
+ e.startOnce.Do(func() {
+ e.mu.Lock()
+ e.started = true
+ e.mu.Unlock()
+ err = e.client.Start(ctx)
+ })
+
+ return err
+}
+
+// Shutdown flushes all exports and closes all connections to the receiving endpoint.
+func (e *Exporter) Shutdown(ctx context.Context) error {
+ e.mu.RLock()
+ started := e.started
+ e.mu.RUnlock()
+
+ if !started {
+ return nil
+ }
+
+ var err error
+
+ e.stopOnce.Do(func() {
+ err = e.client.Stop(ctx)
+ e.mu.Lock()
+ e.started = false
+ e.mu.Unlock()
+ })
+
+ return err
+}
+
+var _ tracesdk.SpanExporter = (*Exporter)(nil)
+
+// New constructs a new Exporter and starts it.
+func New(ctx context.Context, client Client) (*Exporter, error) {
+ exp := NewUnstarted(client)
+ if err := exp.Start(ctx); err != nil {
+ return nil, err
+ }
+ return exp, nil
+}
+
+// NewUnstarted constructs a new Exporter and does not start it.
+func NewUnstarted(client Client) *Exporter {
+ return &Exporter{
+ client: client,
+ }
+}
+
+// MarshalLog is the marshaling function used by the logging system to represent this Exporter.
+func (e *Exporter) MarshalLog() interface{} {
+ return struct {
+ Type string
+ Client Client
+ }{
+ Type: "otlptrace",
+ Client: e.client,
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
new file mode 100644
index 00000000..4571a5ca
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go
@@ -0,0 +1,147 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
+
+import (
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/sdk/resource"
+ commonpb "go.opentelemetry.io/proto/otlp/common/v1"
+)
+
+// KeyValues transforms a slice of attribute KeyValues into OTLP key-values.
+func KeyValues(attrs []attribute.KeyValue) []*commonpb.KeyValue {
+ if len(attrs) == 0 {
+ return nil
+ }
+
+ out := make([]*commonpb.KeyValue, 0, len(attrs))
+ for _, kv := range attrs {
+ out = append(out, KeyValue(kv))
+ }
+ return out
+}
+
+// Iterator transforms an attribute iterator into OTLP key-values.
+func Iterator(iter attribute.Iterator) []*commonpb.KeyValue {
+ l := iter.Len()
+ if l == 0 {
+ return nil
+ }
+
+ out := make([]*commonpb.KeyValue, 0, l)
+ for iter.Next() {
+ out = append(out, KeyValue(iter.Attribute()))
+ }
+ return out
+}
+
+// ResourceAttributes transforms a Resource OTLP key-values.
+func ResourceAttributes(res *resource.Resource) []*commonpb.KeyValue {
+ return Iterator(res.Iter())
+}
+
+// KeyValue transforms an attribute KeyValue into an OTLP key-value.
+func KeyValue(kv attribute.KeyValue) *commonpb.KeyValue {
+ return &commonpb.KeyValue{Key: string(kv.Key), Value: Value(kv.Value)}
+}
+
+// Value transforms an attribute Value into an OTLP AnyValue.
+func Value(v attribute.Value) *commonpb.AnyValue {
+ av := new(commonpb.AnyValue)
+ switch v.Type() {
+ case attribute.BOOL:
+ av.Value = &commonpb.AnyValue_BoolValue{
+ BoolValue: v.AsBool(),
+ }
+ case attribute.BOOLSLICE:
+ av.Value = &commonpb.AnyValue_ArrayValue{
+ ArrayValue: &commonpb.ArrayValue{
+ Values: boolSliceValues(v.AsBoolSlice()),
+ },
+ }
+ case attribute.INT64:
+ av.Value = &commonpb.AnyValue_IntValue{
+ IntValue: v.AsInt64(),
+ }
+ case attribute.INT64SLICE:
+ av.Value = &commonpb.AnyValue_ArrayValue{
+ ArrayValue: &commonpb.ArrayValue{
+ Values: int64SliceValues(v.AsInt64Slice()),
+ },
+ }
+ case attribute.FLOAT64:
+ av.Value = &commonpb.AnyValue_DoubleValue{
+ DoubleValue: v.AsFloat64(),
+ }
+ case attribute.FLOAT64SLICE:
+ av.Value = &commonpb.AnyValue_ArrayValue{
+ ArrayValue: &commonpb.ArrayValue{
+ Values: float64SliceValues(v.AsFloat64Slice()),
+ },
+ }
+ case attribute.STRING:
+ av.Value = &commonpb.AnyValue_StringValue{
+ StringValue: v.AsString(),
+ }
+ case attribute.STRINGSLICE:
+ av.Value = &commonpb.AnyValue_ArrayValue{
+ ArrayValue: &commonpb.ArrayValue{
+ Values: stringSliceValues(v.AsStringSlice()),
+ },
+ }
+ default:
+ av.Value = &commonpb.AnyValue_StringValue{
+ StringValue: "INVALID",
+ }
+ }
+ return av
+}
+
+func boolSliceValues(vals []bool) []*commonpb.AnyValue {
+ converted := make([]*commonpb.AnyValue, len(vals))
+ for i, v := range vals {
+ converted[i] = &commonpb.AnyValue{
+ Value: &commonpb.AnyValue_BoolValue{
+ BoolValue: v,
+ },
+ }
+ }
+ return converted
+}
+
+func int64SliceValues(vals []int64) []*commonpb.AnyValue {
+ converted := make([]*commonpb.AnyValue, len(vals))
+ for i, v := range vals {
+ converted[i] = &commonpb.AnyValue{
+ Value: &commonpb.AnyValue_IntValue{
+ IntValue: v,
+ },
+ }
+ }
+ return converted
+}
+
+func float64SliceValues(vals []float64) []*commonpb.AnyValue {
+ converted := make([]*commonpb.AnyValue, len(vals))
+ for i, v := range vals {
+ converted[i] = &commonpb.AnyValue{
+ Value: &commonpb.AnyValue_DoubleValue{
+ DoubleValue: v,
+ },
+ }
+ }
+ return converted
+}
+
+func stringSliceValues(vals []string) []*commonpb.AnyValue {
+ converted := make([]*commonpb.AnyValue, len(vals))
+ for i, v := range vals {
+ converted[i] = &commonpb.AnyValue{
+ Value: &commonpb.AnyValue_StringValue{
+ StringValue: v,
+ },
+ }
+ }
+ return converted
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go
new file mode 100644
index 00000000..2e7690e4
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go
@@ -0,0 +1,20 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
+
+import (
+ "go.opentelemetry.io/otel/sdk/instrumentation"
+ commonpb "go.opentelemetry.io/proto/otlp/common/v1"
+)
+
+func InstrumentationScope(il instrumentation.Scope) *commonpb.InstrumentationScope {
+ if il == (instrumentation.Scope{}) {
+ return nil
+ }
+ return &commonpb.InstrumentationScope{
+ Name: il.Name,
+ Version: il.Version,
+ Attributes: Iterator(il.Attributes.Iter()),
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go
new file mode 100644
index 00000000..db7b698a
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/resource.go
@@ -0,0 +1,17 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
+
+import (
+ "go.opentelemetry.io/otel/sdk/resource"
+ resourcepb "go.opentelemetry.io/proto/otlp/resource/v1"
+)
+
+// Resource transforms a Resource into an OTLP Resource.
+func Resource(r *resource.Resource) *resourcepb.Resource {
+ if r == nil {
+ return nil
+ }
+ return &resourcepb.Resource{Attributes: ResourceAttributes(r)}
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/span.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/span.go
new file mode 100644
index 00000000..bf27ef02
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/span.go
@@ -0,0 +1,219 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
+
+import (
+ "math"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/codes"
+ "go.opentelemetry.io/otel/sdk/instrumentation"
+ tracesdk "go.opentelemetry.io/otel/sdk/trace"
+ "go.opentelemetry.io/otel/trace"
+ tracepb "go.opentelemetry.io/proto/otlp/trace/v1"
+)
+
+// Spans transforms a slice of OpenTelemetry spans into a slice of OTLP
+// ResourceSpans.
+func Spans(sdl []tracesdk.ReadOnlySpan) []*tracepb.ResourceSpans {
+ if len(sdl) == 0 {
+ return nil
+ }
+
+ rsm := make(map[attribute.Distinct]*tracepb.ResourceSpans)
+
+ type key struct {
+ r attribute.Distinct
+ is instrumentation.Scope
+ }
+ ssm := make(map[key]*tracepb.ScopeSpans)
+
+ var resources int
+ for _, sd := range sdl {
+ if sd == nil {
+ continue
+ }
+
+ rKey := sd.Resource().Equivalent()
+ k := key{
+ r: rKey,
+ is: sd.InstrumentationScope(),
+ }
+ scopeSpan, iOk := ssm[k]
+ if !iOk {
+ // Either the resource or instrumentation scope were unknown.
+ scopeSpan = &tracepb.ScopeSpans{
+ Scope: InstrumentationScope(sd.InstrumentationScope()),
+ Spans: []*tracepb.Span{},
+ SchemaUrl: sd.InstrumentationScope().SchemaURL,
+ }
+ }
+ scopeSpan.Spans = append(scopeSpan.Spans, span(sd))
+ ssm[k] = scopeSpan
+
+ rs, rOk := rsm[rKey]
+ if !rOk {
+ resources++
+ // The resource was unknown.
+ rs = &tracepb.ResourceSpans{
+ Resource: Resource(sd.Resource()),
+ ScopeSpans: []*tracepb.ScopeSpans{scopeSpan},
+ SchemaUrl: sd.Resource().SchemaURL(),
+ }
+ rsm[rKey] = rs
+ continue
+ }
+
+ // The resource has been seen before. Check if the instrumentation
+ // library lookup was unknown because if so we need to add it to the
+ // ResourceSpans. Otherwise, the instrumentation library has already
+ // been seen and the append we did above will be included it in the
+ // ScopeSpans reference.
+ if !iOk {
+ rs.ScopeSpans = append(rs.ScopeSpans, scopeSpan)
+ }
+ }
+
+ // Transform the categorized map into a slice
+ rss := make([]*tracepb.ResourceSpans, 0, resources)
+ for _, rs := range rsm {
+ rss = append(rss, rs)
+ }
+ return rss
+}
+
+// span transforms a Span into an OTLP span.
+func span(sd tracesdk.ReadOnlySpan) *tracepb.Span {
+ if sd == nil {
+ return nil
+ }
+
+ tid := sd.SpanContext().TraceID()
+ sid := sd.SpanContext().SpanID()
+
+ s := &tracepb.Span{
+ TraceId: tid[:],
+ SpanId: sid[:],
+ TraceState: sd.SpanContext().TraceState().String(),
+ Status: status(sd.Status().Code, sd.Status().Description),
+ StartTimeUnixNano: uint64(max(0, sd.StartTime().UnixNano())), // nolint:gosec // Overflow checked.
+ EndTimeUnixNano: uint64(max(0, sd.EndTime().UnixNano())), // nolint:gosec // Overflow checked.
+ Links: links(sd.Links()),
+ Kind: spanKind(sd.SpanKind()),
+ Name: sd.Name(),
+ Attributes: KeyValues(sd.Attributes()),
+ Events: spanEvents(sd.Events()),
+ DroppedAttributesCount: clampUint32(sd.DroppedAttributes()),
+ DroppedEventsCount: clampUint32(sd.DroppedEvents()),
+ DroppedLinksCount: clampUint32(sd.DroppedLinks()),
+ }
+
+ if psid := sd.Parent().SpanID(); psid.IsValid() {
+ s.ParentSpanId = psid[:]
+ }
+ s.Flags = buildSpanFlags(sd.Parent())
+
+ return s
+}
+
+func clampUint32(v int) uint32 {
+ if v < 0 {
+ return 0
+ }
+ if int64(v) > math.MaxUint32 {
+ return math.MaxUint32
+ }
+ return uint32(v) // nolint: gosec // Overflow/Underflow checked.
+}
+
+// status transform a span code and message into an OTLP span status.
+func status(status codes.Code, message string) *tracepb.Status {
+ var c tracepb.Status_StatusCode
+ switch status {
+ case codes.Ok:
+ c = tracepb.Status_STATUS_CODE_OK
+ case codes.Error:
+ c = tracepb.Status_STATUS_CODE_ERROR
+ default:
+ c = tracepb.Status_STATUS_CODE_UNSET
+ }
+ return &tracepb.Status{
+ Code: c,
+ Message: message,
+ }
+}
+
+// links transforms span Links to OTLP span links.
+func links(links []tracesdk.Link) []*tracepb.Span_Link {
+ if len(links) == 0 {
+ return nil
+ }
+
+ sl := make([]*tracepb.Span_Link, 0, len(links))
+ for _, otLink := range links {
+ // This redefinition is necessary to prevent otLink.*ID[:] copies
+ // being reused -- in short we need a new otLink per iteration.
+ otLink := otLink
+
+ tid := otLink.SpanContext.TraceID()
+ sid := otLink.SpanContext.SpanID()
+
+ flags := buildSpanFlags(otLink.SpanContext)
+
+ sl = append(sl, &tracepb.Span_Link{
+ TraceId: tid[:],
+ SpanId: sid[:],
+ Attributes: KeyValues(otLink.Attributes),
+ DroppedAttributesCount: clampUint32(otLink.DroppedAttributeCount),
+ Flags: flags,
+ })
+ }
+ return sl
+}
+
+func buildSpanFlags(sc trace.SpanContext) uint32 {
+ flags := tracepb.SpanFlags_SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK
+ if sc.IsRemote() {
+ flags |= tracepb.SpanFlags_SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK
+ }
+
+ return uint32(flags) // nolint:gosec // Flags is a bitmask and can't be negative
+}
+
+// spanEvents transforms span Events to an OTLP span events.
+func spanEvents(es []tracesdk.Event) []*tracepb.Span_Event {
+ if len(es) == 0 {
+ return nil
+ }
+
+ events := make([]*tracepb.Span_Event, len(es))
+ // Transform message events
+ for i := 0; i < len(es); i++ {
+ events[i] = &tracepb.Span_Event{
+ Name: es[i].Name,
+ TimeUnixNano: uint64(max(0, es[i].Time.UnixNano())), // nolint:gosec // Overflow checked.
+ Attributes: KeyValues(es[i].Attributes),
+ DroppedAttributesCount: clampUint32(es[i].DroppedAttributeCount),
+ }
+ }
+ return events
+}
+
+// spanKind transforms a SpanKind to an OTLP span kind.
+func spanKind(kind trace.SpanKind) tracepb.Span_SpanKind {
+ switch kind {
+ case trace.SpanKindInternal:
+ return tracepb.Span_SPAN_KIND_INTERNAL
+ case trace.SpanKindClient:
+ return tracepb.Span_SPAN_KIND_CLIENT
+ case trace.SpanKindServer:
+ return tracepb.Span_SPAN_KIND_SERVER
+ case trace.SpanKindProducer:
+ return tracepb.Span_SPAN_KIND_PRODUCER
+ case trace.SpanKindConsumer:
+ return tracepb.Span_SPAN_KIND_CONSUMER
+ default:
+ return tracepb.Span_SPAN_KIND_UNSPECIFIED
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/LICENSE b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/README.md b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/README.md
new file mode 100644
index 00000000..5309bb7c
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/README.md
@@ -0,0 +1,3 @@
+# OTLP Trace gRPC Exporter
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc)
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go
new file mode 100644
index 00000000..8409b5f8
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/client.go
@@ -0,0 +1,300 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otlptracegrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
+
+import (
+ "context"
+ "errors"
+ "sync"
+ "time"
+
+ "google.golang.org/genproto/googleapis/rpc/errdetails"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry"
+ coltracepb "go.opentelemetry.io/proto/otlp/collector/trace/v1"
+ tracepb "go.opentelemetry.io/proto/otlp/trace/v1"
+)
+
+type client struct {
+ endpoint string
+ dialOpts []grpc.DialOption
+ metadata metadata.MD
+ exportTimeout time.Duration
+ requestFunc retry.RequestFunc
+
+ // stopCtx is used as a parent context for all exports. Therefore, when it
+ // is canceled with the stopFunc all exports are canceled.
+ stopCtx context.Context
+ // stopFunc cancels stopCtx, stopping any active exports.
+ stopFunc context.CancelFunc
+
+ // ourConn keeps track of where conn was created: true if created here on
+ // Start, or false if passed with an option. This is important on Shutdown
+ // as the conn should only be closed if created here on start. Otherwise,
+ // it is up to the processes that passed the conn to close it.
+ ourConn bool
+ conn *grpc.ClientConn
+ tscMu sync.RWMutex
+ tsc coltracepb.TraceServiceClient
+}
+
+// Compile time check *client implements otlptrace.Client.
+var _ otlptrace.Client = (*client)(nil)
+
+// NewClient creates a new gRPC trace client.
+func NewClient(opts ...Option) otlptrace.Client {
+ return newClient(opts...)
+}
+
+func newClient(opts ...Option) *client {
+ cfg := otlpconfig.NewGRPCConfig(asGRPCOptions(opts)...)
+
+ ctx, cancel := context.WithCancel(context.Background())
+
+ c := &client{
+ endpoint: cfg.Traces.Endpoint,
+ exportTimeout: cfg.Traces.Timeout,
+ requestFunc: cfg.RetryConfig.RequestFunc(retryable),
+ dialOpts: cfg.DialOptions,
+ stopCtx: ctx,
+ stopFunc: cancel,
+ conn: cfg.GRPCConn,
+ }
+
+ if len(cfg.Traces.Headers) > 0 {
+ c.metadata = metadata.New(cfg.Traces.Headers)
+ }
+
+ return c
+}
+
+// Start establishes a gRPC connection to the collector.
+func (c *client) Start(context.Context) error {
+ if c.conn == nil {
+ // If the caller did not provide a ClientConn when the client was
+ // created, create one using the configuration they did provide.
+ conn, err := grpc.NewClient(c.endpoint, c.dialOpts...)
+ if err != nil {
+ return err
+ }
+ // Keep track that we own the lifecycle of this conn and need to close
+ // it on Shutdown.
+ c.ourConn = true
+ c.conn = conn
+ }
+
+ // The otlptrace.Client interface states this method is called just once,
+ // so no need to check if already started.
+ c.tscMu.Lock()
+ c.tsc = coltracepb.NewTraceServiceClient(c.conn)
+ c.tscMu.Unlock()
+
+ return nil
+}
+
+var errAlreadyStopped = errors.New("the client is already stopped")
+
+// Stop shuts down the client.
+//
+// Any active connections to a remote endpoint are closed if they were created
+// by the client. Any gRPC connection passed during creation using
+// WithGRPCConn will not be closed. It is the caller's responsibility to
+// handle cleanup of that resource.
+//
+// This method synchronizes with the UploadTraces method of the client. It
+// will wait for any active calls to that method to complete unimpeded, or it
+// will cancel any active calls if ctx expires. If ctx expires, the context
+// error will be forwarded as the returned error. All client held resources
+// will still be released in this situation.
+//
+// If the client has already stopped, an error will be returned describing
+// this.
+func (c *client) Stop(ctx context.Context) error {
+ // Make sure to return context error if the context is done when calling this method.
+ err := ctx.Err()
+
+ // Acquire the c.tscMu lock within the ctx lifetime.
+ acquired := make(chan struct{})
+ go func() {
+ c.tscMu.Lock()
+ close(acquired)
+ }()
+
+ select {
+ case <-ctx.Done():
+ // The Stop timeout is reached. Kill any remaining exports to force
+ // the clear of the lock and save the timeout error to return and
+ // signal the shutdown timed out before cleanly stopping.
+ c.stopFunc()
+ err = ctx.Err()
+
+ // To ensure the client is not left in a dirty state c.tsc needs to be
+ // set to nil. To avoid the race condition when doing this, ensure
+ // that all the exports are killed (initiated by c.stopFunc).
+ <-acquired
+ case <-acquired:
+ }
+ // Hold the tscMu lock for the rest of the function to ensure no new
+ // exports are started.
+ defer c.tscMu.Unlock()
+
+ // The otlptrace.Client interface states this method is called only
+ // once, but there is no guarantee it is called after Start. Ensure the
+ // client is started before doing anything and let the called know if they
+ // made a mistake.
+ if c.tsc == nil {
+ return errAlreadyStopped
+ }
+
+ // Clear c.tsc to signal the client is stopped.
+ c.tsc = nil
+
+ if c.ourConn {
+ closeErr := c.conn.Close()
+ // A context timeout error takes precedence over this error.
+ if err == nil && closeErr != nil {
+ err = closeErr
+ }
+ }
+ return err
+}
+
+var errShutdown = errors.New("the client is shutdown")
+
+// UploadTraces sends a batch of spans.
+//
+// Retryable errors from the server will be handled according to any
+// RetryConfig the client was created with.
+func (c *client) UploadTraces(ctx context.Context, protoSpans []*tracepb.ResourceSpans) error {
+ // Hold a read lock to ensure a shut down initiated after this starts does
+ // not abandon the export. This read lock acquire has less priority than a
+ // write lock acquire (i.e. Stop), meaning if the client is shutting down
+ // this will come after the shut down.
+ c.tscMu.RLock()
+ defer c.tscMu.RUnlock()
+
+ if c.tsc == nil {
+ return errShutdown
+ }
+
+ ctx, cancel := c.exportContext(ctx)
+ defer cancel()
+
+ return c.requestFunc(ctx, func(iCtx context.Context) error {
+ resp, err := c.tsc.Export(iCtx, &coltracepb.ExportTraceServiceRequest{
+ ResourceSpans: protoSpans,
+ })
+ if resp != nil && resp.PartialSuccess != nil {
+ msg := resp.PartialSuccess.GetErrorMessage()
+ n := resp.PartialSuccess.GetRejectedSpans()
+ if n != 0 || msg != "" {
+ err := internal.TracePartialSuccessError(n, msg)
+ otel.Handle(err)
+ }
+ }
+ // nil is converted to OK.
+ if status.Code(err) == codes.OK {
+ // Success.
+ return nil
+ }
+ return err
+ })
+}
+
+// exportContext returns a copy of parent with an appropriate deadline and
+// cancellation function.
+//
+// It is the callers responsibility to cancel the returned context once its
+// use is complete, via the parent or directly with the returned CancelFunc, to
+// ensure all resources are correctly released.
+func (c *client) exportContext(parent context.Context) (context.Context, context.CancelFunc) {
+ var (
+ ctx context.Context
+ cancel context.CancelFunc
+ )
+
+ if c.exportTimeout > 0 {
+ ctx, cancel = context.WithTimeout(parent, c.exportTimeout)
+ } else {
+ ctx, cancel = context.WithCancel(parent)
+ }
+
+ if c.metadata.Len() > 0 {
+ md := c.metadata
+ if outMD, ok := metadata.FromOutgoingContext(ctx); ok {
+ md = metadata.Join(md, outMD)
+ }
+
+ ctx = metadata.NewOutgoingContext(ctx, md)
+ }
+
+ // Unify the client stopCtx with the parent.
+ go func() {
+ select {
+ case <-ctx.Done():
+ case <-c.stopCtx.Done():
+ // Cancel the export as the shutdown has timed out.
+ cancel()
+ }
+ }()
+
+ return ctx, cancel
+}
+
+// retryable returns if err identifies a request that can be retried and a
+// duration to wait for if an explicit throttle time is included in err.
+func retryable(err error) (bool, time.Duration) {
+ s := status.Convert(err)
+ return retryableGRPCStatus(s)
+}
+
+func retryableGRPCStatus(s *status.Status) (bool, time.Duration) {
+ switch s.Code() {
+ case codes.Canceled,
+ codes.DeadlineExceeded,
+ codes.Aborted,
+ codes.OutOfRange,
+ codes.Unavailable,
+ codes.DataLoss:
+ // Additionally handle RetryInfo.
+ _, d := throttleDelay(s)
+ return true, d
+ case codes.ResourceExhausted:
+ // Retry only if the server signals that the recovery from resource exhaustion is possible.
+ return throttleDelay(s)
+ }
+
+ // Not a retry-able error.
+ return false, 0
+}
+
+// throttleDelay returns of the status is RetryInfo
+// and the its duration to wait for if an explicit throttle time.
+func throttleDelay(s *status.Status) (bool, time.Duration) {
+ for _, detail := range s.Details() {
+ if t, ok := detail.(*errdetails.RetryInfo); ok {
+ return true, t.RetryDelay.AsDuration()
+ }
+ }
+ return false, 0
+}
+
+// MarshalLog is the marshaling function used by the logging system to represent this Client.
+func (c *client) MarshalLog() interface{} {
+ return struct {
+ Type string
+ Endpoint string
+ }{
+ Type: "otlptracegrpc",
+ Endpoint: c.endpoint,
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/doc.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/doc.go
new file mode 100644
index 00000000..b7bd429f
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/doc.go
@@ -0,0 +1,65 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package otlptracegrpc provides an OTLP span exporter using gRPC.
+By default the telemetry is sent to https://localhost:4317.
+
+Exporter should be created using [New].
+
+The environment variables described below can be used for configuration.
+
+OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT (default: "https://localhost:4317") -
+target to which the exporter sends telemetry.
+The target syntax is defined in https://github.com/grpc/grpc/blob/master/doc/naming.md.
+The value must contain a scheme ("http" or "https") and host.
+The value may additionally contain a port, and a path.
+The value should not contain a query string or fragment.
+OTEL_EXPORTER_OTLP_TRACES_ENDPOINT takes precedence over OTEL_EXPORTER_OTLP_ENDPOINT.
+The configuration can be overridden by [WithEndpoint], [WithEndpointURL], [WithInsecure], and [WithGRPCConn] options.
+
+OTEL_EXPORTER_OTLP_INSECURE, OTEL_EXPORTER_OTLP_TRACES_INSECURE (default: "false") -
+setting "true" disables client transport security for the exporter's gRPC connection.
+You can use this only when an endpoint is provided without the http or https scheme.
+OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT setting overrides
+the scheme defined via OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.
+OTEL_EXPORTER_OTLP_TRACES_INSECURE takes precedence over OTEL_EXPORTER_OTLP_INSECURE.
+The configuration can be overridden by [WithInsecure], [WithGRPCConn] options.
+
+OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_TRACES_HEADERS (default: none) -
+key-value pairs used as gRPC metadata associated with gRPC requests.
+The value is expected to be represented in a format matching the [W3C Baggage HTTP Header Content Format],
+except that additional semi-colon delimited metadata is not supported.
+Example value: "key1=value1,key2=value2".
+OTEL_EXPORTER_OTLP_TRACES_HEADERS takes precedence over OTEL_EXPORTER_OTLP_HEADERS.
+The configuration can be overridden by [WithHeaders] option.
+
+OTEL_EXPORTER_OTLP_TIMEOUT, OTEL_EXPORTER_OTLP_TRACES_TIMEOUT (default: "10000") -
+maximum time in milliseconds the OTLP exporter waits for each batch export.
+OTEL_EXPORTER_OTLP_TRACES_TIMEOUT takes precedence over OTEL_EXPORTER_OTLP_TIMEOUT.
+The configuration can be overridden by [WithTimeout] option.
+
+OTEL_EXPORTER_OTLP_COMPRESSION, OTEL_EXPORTER_OTLP_TRACES_COMPRESSION (default: none) -
+the gRPC compressor the exporter uses.
+Supported value: "gzip".
+OTEL_EXPORTER_OTLP_TRACES_COMPRESSION takes precedence over OTEL_EXPORTER_OTLP_COMPRESSION.
+The configuration can be overridden by [WithCompressor], [WithGRPCConn] options.
+
+OTEL_EXPORTER_OTLP_CERTIFICATE, OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE (default: none) -
+the filepath to the trusted certificate to use when verifying a server's TLS credentials.
+OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE takes precedence over OTEL_EXPORTER_OTLP_CERTIFICATE.
+The configuration can be overridden by [WithTLSCredentials], [WithGRPCConn] options.
+
+OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE, OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE (default: none) -
+the filepath to the client certificate/chain trust for client's private key to use in mTLS communication in PEM format.
+OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE takes precedence over OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE.
+The configuration can be overridden by [WithTLSCredentials], [WithGRPCConn] options.
+
+OTEL_EXPORTER_OTLP_CLIENT_KEY, OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY (default: none) -
+the filepath to the client's private key to use in mTLS communication in PEM format.
+OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY takes precedence over OTEL_EXPORTER_OTLP_CLIENT_KEY.
+The configuration can be overridden by [WithTLSCredentials], [WithGRPCConn] option.
+
+[W3C Baggage HTTP Header Content Format]: https://www.w3.org/TR/baggage/#header-content
+*/
+package otlptracegrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/exporter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/exporter.go
new file mode 100644
index 00000000..b826b842
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/exporter.go
@@ -0,0 +1,20 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otlptracegrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
+
+import (
+ "context"
+
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+)
+
+// New constructs a new Exporter and starts it.
+func New(ctx context.Context, opts ...Option) (*otlptrace.Exporter, error) {
+ return otlptrace.New(ctx, NewClient(opts...))
+}
+
+// NewUnstarted constructs a new Exporter and does not start it.
+func NewUnstarted(opts ...Option) *otlptrace.Exporter {
+ return otlptrace.NewUnstarted(NewClient(opts...))
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig/envconfig.go
new file mode 100644
index 00000000..4abf48d1
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig/envconfig.go
@@ -0,0 +1,215 @@
+// Code created by gotmpl. DO NOT MODIFY.
+// source: internal/shared/otlp/envconfig/envconfig.go.tmpl
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package envconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig"
+
+import (
+ "crypto/tls"
+ "crypto/x509"
+ "errors"
+ "fmt"
+ "net/url"
+ "strconv"
+ "strings"
+ "time"
+ "unicode"
+
+ "go.opentelemetry.io/otel/internal/global"
+)
+
+// ConfigFn is the generic function used to set a config.
+type ConfigFn func(*EnvOptionsReader)
+
+// EnvOptionsReader reads the required environment variables.
+type EnvOptionsReader struct {
+ GetEnv func(string) string
+ ReadFile func(string) ([]byte, error)
+ Namespace string
+}
+
+// Apply runs every ConfigFn.
+func (e *EnvOptionsReader) Apply(opts ...ConfigFn) {
+ for _, o := range opts {
+ o(e)
+ }
+}
+
+// GetEnvValue gets an OTLP environment variable value of the specified key
+// using the GetEnv function.
+// This function prepends the OTLP specified namespace to all key lookups.
+func (e *EnvOptionsReader) GetEnvValue(key string) (string, bool) {
+ v := strings.TrimSpace(e.GetEnv(keyWithNamespace(e.Namespace, key)))
+ return v, v != ""
+}
+
+// WithString retrieves the specified config and passes it to ConfigFn as a string.
+func WithString(n string, fn func(string)) func(e *EnvOptionsReader) {
+ return func(e *EnvOptionsReader) {
+ if v, ok := e.GetEnvValue(n); ok {
+ fn(v)
+ }
+ }
+}
+
+// WithBool returns a ConfigFn that reads the environment variable n and if it exists passes its parsed bool value to fn.
+func WithBool(n string, fn func(bool)) ConfigFn {
+ return func(e *EnvOptionsReader) {
+ if v, ok := e.GetEnvValue(n); ok {
+ b := strings.ToLower(v) == "true"
+ fn(b)
+ }
+ }
+}
+
+// WithDuration retrieves the specified config and passes it to ConfigFn as a duration.
+func WithDuration(n string, fn func(time.Duration)) func(e *EnvOptionsReader) {
+ return func(e *EnvOptionsReader) {
+ if v, ok := e.GetEnvValue(n); ok {
+ d, err := strconv.Atoi(v)
+ if err != nil {
+ global.Error(err, "parse duration", "input", v)
+ return
+ }
+ fn(time.Duration(d) * time.Millisecond)
+ }
+ }
+}
+
+// WithHeaders retrieves the specified config and passes it to ConfigFn as a map of HTTP headers.
+func WithHeaders(n string, fn func(map[string]string)) func(e *EnvOptionsReader) {
+ return func(e *EnvOptionsReader) {
+ if v, ok := e.GetEnvValue(n); ok {
+ fn(stringToHeader(v))
+ }
+ }
+}
+
+// WithURL retrieves the specified config and passes it to ConfigFn as a net/url.URL.
+func WithURL(n string, fn func(*url.URL)) func(e *EnvOptionsReader) {
+ return func(e *EnvOptionsReader) {
+ if v, ok := e.GetEnvValue(n); ok {
+ u, err := url.Parse(v)
+ if err != nil {
+ global.Error(err, "parse url", "input", v)
+ return
+ }
+ fn(u)
+ }
+ }
+}
+
+// WithCertPool returns a ConfigFn that reads the environment variable n as a filepath to a TLS certificate pool. If it exists, it is parsed as a crypto/x509.CertPool and it is passed to fn.
+func WithCertPool(n string, fn func(*x509.CertPool)) ConfigFn {
+ return func(e *EnvOptionsReader) {
+ if v, ok := e.GetEnvValue(n); ok {
+ b, err := e.ReadFile(v)
+ if err != nil {
+ global.Error(err, "read tls ca cert file", "file", v)
+ return
+ }
+ c, err := createCertPool(b)
+ if err != nil {
+ global.Error(err, "create tls cert pool")
+ return
+ }
+ fn(c)
+ }
+ }
+}
+
+// WithClientCert returns a ConfigFn that reads the environment variable nc and nk as filepaths to a client certificate and key pair. If they exists, they are parsed as a crypto/tls.Certificate and it is passed to fn.
+func WithClientCert(nc, nk string, fn func(tls.Certificate)) ConfigFn {
+ return func(e *EnvOptionsReader) {
+ vc, okc := e.GetEnvValue(nc)
+ vk, okk := e.GetEnvValue(nk)
+ if !okc || !okk {
+ return
+ }
+ cert, err := e.ReadFile(vc)
+ if err != nil {
+ global.Error(err, "read tls client cert", "file", vc)
+ return
+ }
+ key, err := e.ReadFile(vk)
+ if err != nil {
+ global.Error(err, "read tls client key", "file", vk)
+ return
+ }
+ crt, err := tls.X509KeyPair(cert, key)
+ if err != nil {
+ global.Error(err, "create tls client key pair")
+ return
+ }
+ fn(crt)
+ }
+}
+
+func keyWithNamespace(ns, key string) string {
+ if ns == "" {
+ return key
+ }
+ return fmt.Sprintf("%s_%s", ns, key)
+}
+
+func stringToHeader(value string) map[string]string {
+ headersPairs := strings.Split(value, ",")
+ headers := make(map[string]string)
+
+ for _, header := range headersPairs {
+ n, v, found := strings.Cut(header, "=")
+ if !found {
+ global.Error(errors.New("missing '="), "parse headers", "input", header)
+ continue
+ }
+
+ trimmedName := strings.TrimSpace(n)
+
+ // Validate the key.
+ if !isValidHeaderKey(trimmedName) {
+ global.Error(errors.New("invalid header key"), "parse headers", "key", trimmedName)
+ continue
+ }
+
+ // Only decode the value.
+ value, err := url.PathUnescape(v)
+ if err != nil {
+ global.Error(err, "escape header value", "value", v)
+ continue
+ }
+ trimmedValue := strings.TrimSpace(value)
+
+ headers[trimmedName] = trimmedValue
+ }
+
+ return headers
+}
+
+func createCertPool(certBytes []byte) (*x509.CertPool, error) {
+ cp := x509.NewCertPool()
+ if ok := cp.AppendCertsFromPEM(certBytes); !ok {
+ return nil, errors.New("failed to append certificate to the cert pool")
+ }
+ return cp, nil
+}
+
+func isValidHeaderKey(key string) bool {
+ if key == "" {
+ return false
+ }
+ for _, c := range key {
+ if !isTokenChar(c) {
+ return false
+ }
+ }
+ return true
+}
+
+func isTokenChar(c rune) bool {
+ return c <= unicode.MaxASCII && (unicode.IsLetter(c) ||
+ unicode.IsDigit(c) ||
+ c == '!' || c == '#' || c == '$' || c == '%' || c == '&' || c == '\'' || c == '*' ||
+ c == '+' || c == '-' || c == '.' || c == '^' || c == '_' || c == '`' || c == '|' || c == '~')
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/gen.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/gen.go
new file mode 100644
index 00000000..97cd6c54
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/gen.go
@@ -0,0 +1,24 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal"
+
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/partialsuccess.go.tmpl "--data={}" --out=partialsuccess.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/partialsuccess_test.go.tmpl "--data={}" --out=partialsuccess_test.go
+
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/retry/retry.go.tmpl "--data={}" --out=retry/retry.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/retry/retry_test.go.tmpl "--data={}" --out=retry/retry_test.go
+
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/envconfig/envconfig.go.tmpl "--data={}" --out=envconfig/envconfig.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/envconfig/envconfig_test.go.tmpl "--data={}" --out=envconfig/envconfig_test.go
+
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlptrace/otlpconfig/envconfig.go.tmpl "--data={\"envconfigImportPath\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig\"}" --out=otlpconfig/envconfig.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlptrace/otlpconfig/options.go.tmpl "--data={\"retryImportPath\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry\"}" --out=otlpconfig/options.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlptrace/otlpconfig/options_test.go.tmpl "--data={\"envconfigImportPath\": \"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig\"}" --out=otlpconfig/options_test.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlptrace/otlpconfig/optiontypes.go.tmpl "--data={}" --out=otlpconfig/optiontypes.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlptrace/otlpconfig/tls.go.tmpl "--data={}" --out=otlpconfig/tls.go
+
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlptrace/otlptracetest/client.go.tmpl "--data={}" --out=otlptracetest/client.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlptrace/otlptracetest/collector.go.tmpl "--data={}" --out=otlptracetest/collector.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlptrace/otlptracetest/data.go.tmpl "--data={}" --out=otlptracetest/data.go
+//go:generate gotmpl --body=../../../../../internal/shared/otlp/otlptrace/otlptracetest/otlptest.go.tmpl "--data={}" --out=otlptracetest/otlptest.go
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/envconfig.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/envconfig.go
new file mode 100644
index 00000000..7bb189a9
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/envconfig.go
@@ -0,0 +1,142 @@
+// Code created by gotmpl. DO NOT MODIFY.
+// source: internal/shared/otlp/otlptrace/otlpconfig/envconfig.go.tmpl
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig"
+
+import (
+ "crypto/tls"
+ "crypto/x509"
+ "net/url"
+ "os"
+ "path"
+ "strings"
+ "time"
+
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig"
+)
+
+// DefaultEnvOptionsReader is the default environments reader.
+var DefaultEnvOptionsReader = envconfig.EnvOptionsReader{
+ GetEnv: os.Getenv,
+ ReadFile: os.ReadFile,
+ Namespace: "OTEL_EXPORTER_OTLP",
+}
+
+// ApplyGRPCEnvConfigs applies the env configurations for gRPC.
+func ApplyGRPCEnvConfigs(cfg Config) Config {
+ opts := getOptionsFromEnv()
+ for _, opt := range opts {
+ cfg = opt.ApplyGRPCOption(cfg)
+ }
+ return cfg
+}
+
+// ApplyHTTPEnvConfigs applies the env configurations for HTTP.
+func ApplyHTTPEnvConfigs(cfg Config) Config {
+ opts := getOptionsFromEnv()
+ for _, opt := range opts {
+ cfg = opt.ApplyHTTPOption(cfg)
+ }
+ return cfg
+}
+
+func getOptionsFromEnv() []GenericOption {
+ opts := []GenericOption{}
+
+ tlsConf := &tls.Config{}
+ DefaultEnvOptionsReader.Apply(
+ envconfig.WithURL("ENDPOINT", func(u *url.URL) {
+ opts = append(opts, withEndpointScheme(u))
+ opts = append(opts, newSplitOption(func(cfg Config) Config {
+ cfg.Traces.Endpoint = u.Host
+ // For OTLP/HTTP endpoint URLs without a per-signal
+ // configuration, the passed endpoint is used as a base URL
+ // and the signals are sent to these paths relative to that.
+ cfg.Traces.URLPath = path.Join(u.Path, DefaultTracesPath)
+ return cfg
+ }, withEndpointForGRPC(u)))
+ }),
+ envconfig.WithURL("TRACES_ENDPOINT", func(u *url.URL) {
+ opts = append(opts, withEndpointScheme(u))
+ opts = append(opts, newSplitOption(func(cfg Config) Config {
+ cfg.Traces.Endpoint = u.Host
+ // For endpoint URLs for OTLP/HTTP per-signal variables, the
+ // URL MUST be used as-is without any modification. The only
+ // exception is that if an URL contains no path part, the root
+ // path / MUST be used.
+ path := u.Path
+ if path == "" {
+ path = "/"
+ }
+ cfg.Traces.URLPath = path
+ return cfg
+ }, withEndpointForGRPC(u)))
+ }),
+ envconfig.WithCertPool("CERTIFICATE", func(p *x509.CertPool) { tlsConf.RootCAs = p }),
+ envconfig.WithCertPool("TRACES_CERTIFICATE", func(p *x509.CertPool) { tlsConf.RootCAs = p }),
+ envconfig.WithClientCert("CLIENT_CERTIFICATE", "CLIENT_KEY", func(c tls.Certificate) { tlsConf.Certificates = []tls.Certificate{c} }),
+ envconfig.WithClientCert("TRACES_CLIENT_CERTIFICATE", "TRACES_CLIENT_KEY", func(c tls.Certificate) { tlsConf.Certificates = []tls.Certificate{c} }),
+ withTLSConfig(tlsConf, func(c *tls.Config) { opts = append(opts, WithTLSClientConfig(c)) }),
+ envconfig.WithBool("INSECURE", func(b bool) { opts = append(opts, withInsecure(b)) }),
+ envconfig.WithBool("TRACES_INSECURE", func(b bool) { opts = append(opts, withInsecure(b)) }),
+ envconfig.WithHeaders("HEADERS", func(h map[string]string) { opts = append(opts, WithHeaders(h)) }),
+ envconfig.WithHeaders("TRACES_HEADERS", func(h map[string]string) { opts = append(opts, WithHeaders(h)) }),
+ WithEnvCompression("COMPRESSION", func(c Compression) { opts = append(opts, WithCompression(c)) }),
+ WithEnvCompression("TRACES_COMPRESSION", func(c Compression) { opts = append(opts, WithCompression(c)) }),
+ envconfig.WithDuration("TIMEOUT", func(d time.Duration) { opts = append(opts, WithTimeout(d)) }),
+ envconfig.WithDuration("TRACES_TIMEOUT", func(d time.Duration) { opts = append(opts, WithTimeout(d)) }),
+ )
+
+ return opts
+}
+
+func withEndpointScheme(u *url.URL) GenericOption {
+ switch strings.ToLower(u.Scheme) {
+ case "http", "unix":
+ return WithInsecure()
+ default:
+ return WithSecure()
+ }
+}
+
+func withEndpointForGRPC(u *url.URL) func(cfg Config) Config {
+ return func(cfg Config) Config {
+ // For OTLP/gRPC endpoints, this is the target to which the
+ // exporter is going to send telemetry.
+ cfg.Traces.Endpoint = path.Join(u.Host, u.Path)
+ return cfg
+ }
+}
+
+// WithEnvCompression retrieves the specified config and passes it to ConfigFn as a Compression.
+func WithEnvCompression(n string, fn func(Compression)) func(e *envconfig.EnvOptionsReader) {
+ return func(e *envconfig.EnvOptionsReader) {
+ if v, ok := e.GetEnvValue(n); ok {
+ cp := NoCompression
+ if v == "gzip" {
+ cp = GzipCompression
+ }
+
+ fn(cp)
+ }
+ }
+}
+
+// revive:disable-next-line:flag-parameter
+func withInsecure(b bool) GenericOption {
+ if b {
+ return WithInsecure()
+ }
+ return WithSecure()
+}
+
+func withTLSConfig(c *tls.Config, fn func(*tls.Config)) func(e *envconfig.EnvOptionsReader) {
+ return func(e *envconfig.EnvOptionsReader) {
+ if c.RootCAs != nil || len(c.Certificates) > 0 {
+ fn(c)
+ }
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go
new file mode 100644
index 00000000..0a317d92
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go
@@ -0,0 +1,351 @@
+// Code created by gotmpl. DO NOT MODIFY.
+// source: internal/shared/otlp/otlptrace/otlpconfig/options.go.tmpl
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig"
+
+import (
+ "crypto/tls"
+ "fmt"
+ "net/http"
+ "net/url"
+ "path"
+ "strings"
+ "time"
+
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/backoff"
+ "google.golang.org/grpc/credentials"
+ "google.golang.org/grpc/credentials/insecure"
+ "google.golang.org/grpc/encoding/gzip"
+
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry"
+ "go.opentelemetry.io/otel/internal/global"
+)
+
+const (
+ // DefaultTracesPath is a default URL path for endpoint that
+ // receives spans.
+ DefaultTracesPath string = "/v1/traces"
+ // DefaultTimeout is a default max waiting time for the backend to process
+ // each span batch.
+ DefaultTimeout time.Duration = 10 * time.Second
+)
+
+type (
+ // HTTPTransportProxyFunc is a function that resolves which URL to use as proxy for a given request.
+ // This type is compatible with `http.Transport.Proxy` and can be used to set a custom proxy function to the OTLP HTTP client.
+ HTTPTransportProxyFunc func(*http.Request) (*url.URL, error)
+
+ SignalConfig struct {
+ Endpoint string
+ Insecure bool
+ TLSCfg *tls.Config
+ Headers map[string]string
+ Compression Compression
+ Timeout time.Duration
+ URLPath string
+
+ // gRPC configurations
+ GRPCCredentials credentials.TransportCredentials
+
+ Proxy HTTPTransportProxyFunc
+ }
+
+ Config struct {
+ // Signal specific configurations
+ Traces SignalConfig
+
+ RetryConfig retry.Config
+
+ // gRPC configurations
+ ReconnectionPeriod time.Duration
+ ServiceConfig string
+ DialOptions []grpc.DialOption
+ GRPCConn *grpc.ClientConn
+ }
+)
+
+// NewHTTPConfig returns a new Config with all settings applied from opts and
+// any unset setting using the default HTTP config values.
+func NewHTTPConfig(opts ...HTTPOption) Config {
+ cfg := Config{
+ Traces: SignalConfig{
+ Endpoint: fmt.Sprintf("%s:%d", DefaultCollectorHost, DefaultCollectorHTTPPort),
+ URLPath: DefaultTracesPath,
+ Compression: NoCompression,
+ Timeout: DefaultTimeout,
+ },
+ RetryConfig: retry.DefaultConfig,
+ }
+ cfg = ApplyHTTPEnvConfigs(cfg)
+ for _, opt := range opts {
+ cfg = opt.ApplyHTTPOption(cfg)
+ }
+ cfg.Traces.URLPath = cleanPath(cfg.Traces.URLPath, DefaultTracesPath)
+ return cfg
+}
+
+// cleanPath returns a path with all spaces trimmed and all redundancies
+// removed. If urlPath is empty or cleaning it results in an empty string,
+// defaultPath is returned instead.
+func cleanPath(urlPath string, defaultPath string) string {
+ tmp := path.Clean(strings.TrimSpace(urlPath))
+ if tmp == "." {
+ return defaultPath
+ }
+ if !path.IsAbs(tmp) {
+ tmp = "/" + tmp
+ }
+ return tmp
+}
+
+// NewGRPCConfig returns a new Config with all settings applied from opts and
+// any unset setting using the default gRPC config values.
+func NewGRPCConfig(opts ...GRPCOption) Config {
+ userAgent := "OTel OTLP Exporter Go/" + otlptrace.Version()
+ cfg := Config{
+ Traces: SignalConfig{
+ Endpoint: fmt.Sprintf("%s:%d", DefaultCollectorHost, DefaultCollectorGRPCPort),
+ URLPath: DefaultTracesPath,
+ Compression: NoCompression,
+ Timeout: DefaultTimeout,
+ },
+ RetryConfig: retry.DefaultConfig,
+ DialOptions: []grpc.DialOption{grpc.WithUserAgent(userAgent)},
+ }
+ cfg = ApplyGRPCEnvConfigs(cfg)
+ for _, opt := range opts {
+ cfg = opt.ApplyGRPCOption(cfg)
+ }
+
+ if cfg.ServiceConfig != "" {
+ cfg.DialOptions = append(cfg.DialOptions, grpc.WithDefaultServiceConfig(cfg.ServiceConfig))
+ }
+ // Prioritize GRPCCredentials over Insecure (passing both is an error).
+ if cfg.Traces.GRPCCredentials != nil {
+ cfg.DialOptions = append(cfg.DialOptions, grpc.WithTransportCredentials(cfg.Traces.GRPCCredentials))
+ } else if cfg.Traces.Insecure {
+ cfg.DialOptions = append(cfg.DialOptions, grpc.WithTransportCredentials(insecure.NewCredentials()))
+ } else {
+ // Default to using the host's root CA.
+ creds := credentials.NewTLS(nil)
+ cfg.Traces.GRPCCredentials = creds
+ cfg.DialOptions = append(cfg.DialOptions, grpc.WithTransportCredentials(creds))
+ }
+ if cfg.Traces.Compression == GzipCompression {
+ cfg.DialOptions = append(cfg.DialOptions, grpc.WithDefaultCallOptions(grpc.UseCompressor(gzip.Name)))
+ }
+ if cfg.ReconnectionPeriod != 0 {
+ p := grpc.ConnectParams{
+ Backoff: backoff.DefaultConfig,
+ MinConnectTimeout: cfg.ReconnectionPeriod,
+ }
+ cfg.DialOptions = append(cfg.DialOptions, grpc.WithConnectParams(p))
+ }
+
+ return cfg
+}
+
+type (
+ // GenericOption applies an option to the HTTP or gRPC driver.
+ GenericOption interface {
+ ApplyHTTPOption(Config) Config
+ ApplyGRPCOption(Config) Config
+
+ // A private method to prevent users implementing the
+ // interface and so future additions to it will not
+ // violate compatibility.
+ private()
+ }
+
+ // HTTPOption applies an option to the HTTP driver.
+ HTTPOption interface {
+ ApplyHTTPOption(Config) Config
+
+ // A private method to prevent users implementing the
+ // interface and so future additions to it will not
+ // violate compatibility.
+ private()
+ }
+
+ // GRPCOption applies an option to the gRPC driver.
+ GRPCOption interface {
+ ApplyGRPCOption(Config) Config
+
+ // A private method to prevent users implementing the
+ // interface and so future additions to it will not
+ // violate compatibility.
+ private()
+ }
+)
+
+// genericOption is an option that applies the same logic
+// for both gRPC and HTTP.
+type genericOption struct {
+ fn func(Config) Config
+}
+
+func (g *genericOption) ApplyGRPCOption(cfg Config) Config {
+ return g.fn(cfg)
+}
+
+func (g *genericOption) ApplyHTTPOption(cfg Config) Config {
+ return g.fn(cfg)
+}
+
+func (genericOption) private() {}
+
+func newGenericOption(fn func(cfg Config) Config) GenericOption {
+ return &genericOption{fn: fn}
+}
+
+// splitOption is an option that applies different logics
+// for gRPC and HTTP.
+type splitOption struct {
+ httpFn func(Config) Config
+ grpcFn func(Config) Config
+}
+
+func (g *splitOption) ApplyGRPCOption(cfg Config) Config {
+ return g.grpcFn(cfg)
+}
+
+func (g *splitOption) ApplyHTTPOption(cfg Config) Config {
+ return g.httpFn(cfg)
+}
+
+func (splitOption) private() {}
+
+func newSplitOption(httpFn func(cfg Config) Config, grpcFn func(cfg Config) Config) GenericOption {
+ return &splitOption{httpFn: httpFn, grpcFn: grpcFn}
+}
+
+// httpOption is an option that is only applied to the HTTP driver.
+type httpOption struct {
+ fn func(Config) Config
+}
+
+func (h *httpOption) ApplyHTTPOption(cfg Config) Config {
+ return h.fn(cfg)
+}
+
+func (httpOption) private() {}
+
+func NewHTTPOption(fn func(cfg Config) Config) HTTPOption {
+ return &httpOption{fn: fn}
+}
+
+// grpcOption is an option that is only applied to the gRPC driver.
+type grpcOption struct {
+ fn func(Config) Config
+}
+
+func (h *grpcOption) ApplyGRPCOption(cfg Config) Config {
+ return h.fn(cfg)
+}
+
+func (grpcOption) private() {}
+
+func NewGRPCOption(fn func(cfg Config) Config) GRPCOption {
+ return &grpcOption{fn: fn}
+}
+
+// Generic Options
+
+// WithEndpoint configures the trace host and port only; endpoint should
+// resemble "example.com" or "localhost:4317". To configure the scheme and path,
+// use WithEndpointURL.
+func WithEndpoint(endpoint string) GenericOption {
+ return newGenericOption(func(cfg Config) Config {
+ cfg.Traces.Endpoint = endpoint
+ return cfg
+ })
+}
+
+// WithEndpointURL configures the trace scheme, host, port, and path; the
+// provided value should resemble "https://example.com:4318/v1/traces".
+func WithEndpointURL(v string) GenericOption {
+ return newGenericOption(func(cfg Config) Config {
+ u, err := url.Parse(v)
+ if err != nil {
+ global.Error(err, "otlptrace: parse endpoint url", "url", v)
+ return cfg
+ }
+
+ cfg.Traces.Endpoint = u.Host
+ cfg.Traces.URLPath = u.Path
+ cfg.Traces.Insecure = u.Scheme != "https"
+
+ return cfg
+ })
+}
+
+func WithCompression(compression Compression) GenericOption {
+ return newGenericOption(func(cfg Config) Config {
+ cfg.Traces.Compression = compression
+ return cfg
+ })
+}
+
+func WithURLPath(urlPath string) GenericOption {
+ return newGenericOption(func(cfg Config) Config {
+ cfg.Traces.URLPath = urlPath
+ return cfg
+ })
+}
+
+func WithRetry(rc retry.Config) GenericOption {
+ return newGenericOption(func(cfg Config) Config {
+ cfg.RetryConfig = rc
+ return cfg
+ })
+}
+
+func WithTLSClientConfig(tlsCfg *tls.Config) GenericOption {
+ return newSplitOption(func(cfg Config) Config {
+ cfg.Traces.TLSCfg = tlsCfg.Clone()
+ return cfg
+ }, func(cfg Config) Config {
+ cfg.Traces.GRPCCredentials = credentials.NewTLS(tlsCfg)
+ return cfg
+ })
+}
+
+func WithInsecure() GenericOption {
+ return newGenericOption(func(cfg Config) Config {
+ cfg.Traces.Insecure = true
+ return cfg
+ })
+}
+
+func WithSecure() GenericOption {
+ return newGenericOption(func(cfg Config) Config {
+ cfg.Traces.Insecure = false
+ return cfg
+ })
+}
+
+func WithHeaders(headers map[string]string) GenericOption {
+ return newGenericOption(func(cfg Config) Config {
+ cfg.Traces.Headers = headers
+ return cfg
+ })
+}
+
+func WithTimeout(duration time.Duration) GenericOption {
+ return newGenericOption(func(cfg Config) Config {
+ cfg.Traces.Timeout = duration
+ return cfg
+ })
+}
+
+func WithProxy(pf HTTPTransportProxyFunc) GenericOption {
+ return newGenericOption(func(cfg Config) Config {
+ cfg.Traces.Proxy = pf
+ return cfg
+ })
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/optiontypes.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/optiontypes.go
new file mode 100644
index 00000000..3d4f699d
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/optiontypes.go
@@ -0,0 +1,40 @@
+// Code created by gotmpl. DO NOT MODIFY.
+// source: internal/shared/otlp/otlptrace/otlpconfig/optiontypes.go.tmpl
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig"
+
+const (
+ // DefaultCollectorGRPCPort is the default gRPC port of the collector.
+ DefaultCollectorGRPCPort uint16 = 4317
+ // DefaultCollectorHTTPPort is the default HTTP port of the collector.
+ DefaultCollectorHTTPPort uint16 = 4318
+ // DefaultCollectorHost is the host address the Exporter will attempt
+ // connect to if no collector address is provided.
+ DefaultCollectorHost string = "localhost"
+)
+
+// Compression describes the compression used for payloads sent to the
+// collector.
+type Compression int
+
+const (
+ // NoCompression tells the driver to send payloads without
+ // compression.
+ NoCompression Compression = iota
+ // GzipCompression tells the driver to send payloads after
+ // compressing them with gzip.
+ GzipCompression
+)
+
+// Marshaler describes the kind of message format sent to the collector.
+type Marshaler int
+
+const (
+ // MarshalProto tells the driver to send using the protobuf binary format.
+ MarshalProto Marshaler = iota
+ // MarshalJSON tells the driver to send using json format.
+ MarshalJSON
+)
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/tls.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/tls.go
new file mode 100644
index 00000000..38b97a01
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/tls.go
@@ -0,0 +1,26 @@
+// Code created by gotmpl. DO NOT MODIFY.
+// source: internal/shared/otlp/otlptrace/otlpconfig/tls.go.tmpl
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig"
+
+import (
+ "crypto/tls"
+ "crypto/x509"
+ "errors"
+)
+
+// CreateTLSConfig creates a tls.Config from a raw certificate bytes
+// to verify a server certificate.
+func CreateTLSConfig(certBytes []byte) (*tls.Config, error) {
+ cp := x509.NewCertPool()
+ if ok := cp.AppendCertsFromPEM(certBytes); !ok {
+ return nil, errors.New("failed to append certificate to the cert pool")
+ }
+
+ return &tls.Config{
+ RootCAs: cp,
+ }, nil
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/partialsuccess.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/partialsuccess.go
new file mode 100644
index 00000000..a12ea4c4
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/partialsuccess.go
@@ -0,0 +1,56 @@
+// Code created by gotmpl. DO NOT MODIFY.
+// source: internal/shared/otlp/partialsuccess.go
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package internal // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal"
+
+import "fmt"
+
+// PartialSuccess represents the underlying error for all handling
+// OTLP partial success messages. Use `errors.Is(err,
+// PartialSuccess{})` to test whether an error passed to the OTel
+// error handler belongs to this category.
+type PartialSuccess struct {
+ ErrorMessage string
+ RejectedItems int64
+ RejectedKind string
+}
+
+var _ error = PartialSuccess{}
+
+// Error implements the error interface.
+func (ps PartialSuccess) Error() string {
+ msg := ps.ErrorMessage
+ if msg == "" {
+ msg = "empty message"
+ }
+ return fmt.Sprintf("OTLP partial success: %s (%d %s rejected)", msg, ps.RejectedItems, ps.RejectedKind)
+}
+
+// Is supports the errors.Is() interface.
+func (ps PartialSuccess) Is(err error) bool {
+ _, ok := err.(PartialSuccess)
+ return ok
+}
+
+// TracePartialSuccessError returns an error describing a partial success
+// response for the trace signal.
+func TracePartialSuccessError(itemsRejected int64, errorMessage string) error {
+ return PartialSuccess{
+ ErrorMessage: errorMessage,
+ RejectedItems: itemsRejected,
+ RejectedKind: "spans",
+ }
+}
+
+// MetricPartialSuccessError returns an error describing a partial success
+// response for the metric signal.
+func MetricPartialSuccessError(itemsRejected int64, errorMessage string) error {
+ return PartialSuccess{
+ ErrorMessage: errorMessage,
+ RejectedItems: itemsRejected,
+ RejectedKind: "metric data points",
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry.go
new file mode 100644
index 00000000..1c5450ab
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry.go
@@ -0,0 +1,145 @@
+// Code created by gotmpl. DO NOT MODIFY.
+// source: internal/shared/otlp/retry/retry.go.tmpl
+
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package retry provides request retry functionality that can perform
+// configurable exponential backoff for transient errors and honor any
+// explicit throttle responses received.
+package retry // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry"
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/cenkalti/backoff/v4"
+)
+
+// DefaultConfig are the recommended defaults to use.
+var DefaultConfig = Config{
+ Enabled: true,
+ InitialInterval: 5 * time.Second,
+ MaxInterval: 30 * time.Second,
+ MaxElapsedTime: time.Minute,
+}
+
+// Config defines configuration for retrying batches in case of export failure
+// using an exponential backoff.
+type Config struct {
+ // Enabled indicates whether to not retry sending batches in case of
+ // export failure.
+ Enabled bool
+ // InitialInterval the time to wait after the first failure before
+ // retrying.
+ InitialInterval time.Duration
+ // MaxInterval is the upper bound on backoff interval. Once this value is
+ // reached the delay between consecutive retries will always be
+ // `MaxInterval`.
+ MaxInterval time.Duration
+ // MaxElapsedTime is the maximum amount of time (including retries) spent
+ // trying to send a request/batch. Once this value is reached, the data
+ // is discarded.
+ MaxElapsedTime time.Duration
+}
+
+// RequestFunc wraps a request with retry logic.
+type RequestFunc func(context.Context, func(context.Context) error) error
+
+// EvaluateFunc returns if an error is retry-able and if an explicit throttle
+// duration should be honored that was included in the error.
+//
+// The function must return true if the error argument is retry-able,
+// otherwise it must return false for the first return parameter.
+//
+// The function must return a non-zero time.Duration if the error contains
+// explicit throttle duration that should be honored, otherwise it must return
+// a zero valued time.Duration.
+type EvaluateFunc func(error) (bool, time.Duration)
+
+// RequestFunc returns a RequestFunc using the evaluate function to determine
+// if requests can be retried and based on the exponential backoff
+// configuration of c.
+func (c Config) RequestFunc(evaluate EvaluateFunc) RequestFunc {
+ if !c.Enabled {
+ return func(ctx context.Context, fn func(context.Context) error) error {
+ return fn(ctx)
+ }
+ }
+
+ return func(ctx context.Context, fn func(context.Context) error) error {
+ // Do not use NewExponentialBackOff since it calls Reset and the code here
+ // must call Reset after changing the InitialInterval (this saves an
+ // unnecessary call to Now).
+ b := &backoff.ExponentialBackOff{
+ InitialInterval: c.InitialInterval,
+ RandomizationFactor: backoff.DefaultRandomizationFactor,
+ Multiplier: backoff.DefaultMultiplier,
+ MaxInterval: c.MaxInterval,
+ MaxElapsedTime: c.MaxElapsedTime,
+ Stop: backoff.Stop,
+ Clock: backoff.SystemClock,
+ }
+ b.Reset()
+
+ for {
+ err := fn(ctx)
+ if err == nil {
+ return nil
+ }
+
+ retryable, throttle := evaluate(err)
+ if !retryable {
+ return err
+ }
+
+ bOff := b.NextBackOff()
+ if bOff == backoff.Stop {
+ return fmt.Errorf("max retry time elapsed: %w", err)
+ }
+
+ // Wait for the greater of the backoff or throttle delay.
+ var delay time.Duration
+ if bOff > throttle {
+ delay = bOff
+ } else {
+ elapsed := b.GetElapsedTime()
+ if b.MaxElapsedTime != 0 && elapsed+throttle > b.MaxElapsedTime {
+ return fmt.Errorf("max retry time would elapse: %w", err)
+ }
+ delay = throttle
+ }
+
+ if ctxErr := waitFunc(ctx, delay); ctxErr != nil {
+ return fmt.Errorf("%w: %w", ctxErr, err)
+ }
+ }
+ }
+}
+
+// Allow override for testing.
+var waitFunc = wait
+
+// wait takes the caller's context, and the amount of time to wait. It will
+// return nil if the timer fires before or at the same time as the context's
+// deadline. This indicates that the call can be retried.
+func wait(ctx context.Context, delay time.Duration) error {
+ timer := time.NewTimer(delay)
+ defer timer.Stop()
+
+ select {
+ case <-ctx.Done():
+ // Handle the case where the timer and context deadline end
+ // simultaneously by prioritizing the timer expiration nil value
+ // response.
+ select {
+ case <-timer.C:
+ default:
+ return ctx.Err()
+ }
+ case <-timer.C:
+ }
+
+ return nil
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
new file mode 100644
index 00000000..00ab1f20
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go
@@ -0,0 +1,210 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otlptracegrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
+
+import (
+ "fmt"
+ "time"
+
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials"
+
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry"
+)
+
+// Option applies an option to the gRPC driver.
+type Option interface {
+ applyGRPCOption(otlpconfig.Config) otlpconfig.Config
+}
+
+func asGRPCOptions(opts []Option) []otlpconfig.GRPCOption {
+ converted := make([]otlpconfig.GRPCOption, len(opts))
+ for i, o := range opts {
+ converted[i] = otlpconfig.NewGRPCOption(o.applyGRPCOption)
+ }
+ return converted
+}
+
+// RetryConfig defines configuration for retrying export of span batches that
+// failed to be received by the target endpoint.
+//
+// This configuration does not define any network retry strategy. That is
+// entirely handled by the gRPC ClientConn.
+type RetryConfig retry.Config
+
+type wrappedOption struct {
+ otlpconfig.GRPCOption
+}
+
+func (w wrappedOption) applyGRPCOption(cfg otlpconfig.Config) otlpconfig.Config {
+ return w.ApplyGRPCOption(cfg)
+}
+
+// WithInsecure disables client transport security for the exporter's gRPC
+// connection just like grpc.WithInsecure()
+// (https://pkg.go.dev/google.golang.org/grpc#WithInsecure) does. Note, by
+// default, client security is required unless WithInsecure is used.
+//
+// This option has no effect if WithGRPCConn is used.
+func WithInsecure() Option {
+ return wrappedOption{otlpconfig.WithInsecure()}
+}
+
+// WithEndpoint sets the target endpoint (host and port) the Exporter will
+// connect to. The provided endpoint should resemble "example.com:4317" (no
+// scheme or path).
+//
+// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
+// environment variable is set, and this option is not passed, that variable
+// value will be used. If both environment variables are set,
+// OTEL_EXPORTER_OTLP_TRACES_ENDPOINT will take precedence. If an environment
+// variable is set, and this option is passed, this option will take precedence.
+//
+// If both this option and WithEndpointURL are used, the last used option will
+// take precedence.
+//
+// By default, if an environment variable is not set, and this option is not
+// passed, "localhost:4317" will be used.
+//
+// This option has no effect if WithGRPCConn is used.
+func WithEndpoint(endpoint string) Option {
+ return wrappedOption{otlpconfig.WithEndpoint(endpoint)}
+}
+
+// WithEndpointURL sets the target endpoint URL (scheme, host, port, path)
+// the Exporter will connect to. The provided endpoint URL should resemble
+// "https://example.com:4318/v1/traces".
+//
+// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
+// environment variable is set, and this option is not passed, that variable
+// value will be used. If both environment variables are set,
+// OTEL_EXPORTER_OTLP_TRACES_ENDPOINT will take precedence. If an environment
+// variable is set, and this option is passed, this option will take precedence.
+//
+// If both this option and WithEndpoint are used, the last used option will
+// take precedence.
+//
+// If an invalid URL is provided, the default value will be kept.
+//
+// By default, if an environment variable is not set, and this option is not
+// passed, "https://localhost:4317/v1/traces" will be used.
+//
+// This option has no effect if WithGRPCConn is used.
+func WithEndpointURL(u string) Option {
+ return wrappedOption{otlpconfig.WithEndpointURL(u)}
+}
+
+// WithReconnectionPeriod set the minimum amount of time between connection
+// attempts to the target endpoint.
+//
+// This option has no effect if WithGRPCConn is used.
+func WithReconnectionPeriod(rp time.Duration) Option {
+ return wrappedOption{otlpconfig.NewGRPCOption(func(cfg otlpconfig.Config) otlpconfig.Config {
+ cfg.ReconnectionPeriod = rp
+ return cfg
+ })}
+}
+
+func compressorToCompression(compressor string) otlpconfig.Compression {
+ if compressor == "gzip" {
+ return otlpconfig.GzipCompression
+ }
+
+ otel.Handle(fmt.Errorf("invalid compression type: '%s', using no compression as default", compressor))
+ return otlpconfig.NoCompression
+}
+
+// WithCompressor sets the compressor for the gRPC client to use when sending
+// requests. Supported compressor values: "gzip".
+func WithCompressor(compressor string) Option {
+ return wrappedOption{otlpconfig.WithCompression(compressorToCompression(compressor))}
+}
+
+// WithHeaders will send the provided headers with each gRPC requests.
+func WithHeaders(headers map[string]string) Option {
+ return wrappedOption{otlpconfig.WithHeaders(headers)}
+}
+
+// WithTLSCredentials allows the connection to use TLS credentials when
+// talking to the server. It takes in grpc.TransportCredentials instead of say
+// a Certificate file or a tls.Certificate, because the retrieving of these
+// credentials can be done in many ways e.g. plain file, in code tls.Config or
+// by certificate rotation, so it is up to the caller to decide what to use.
+//
+// This option has no effect if WithGRPCConn is used.
+func WithTLSCredentials(creds credentials.TransportCredentials) Option {
+ return wrappedOption{otlpconfig.NewGRPCOption(func(cfg otlpconfig.Config) otlpconfig.Config {
+ cfg.Traces.GRPCCredentials = creds
+ return cfg
+ })}
+}
+
+// WithServiceConfig defines the default gRPC service config used.
+//
+// This option has no effect if WithGRPCConn is used.
+func WithServiceConfig(serviceConfig string) Option {
+ return wrappedOption{otlpconfig.NewGRPCOption(func(cfg otlpconfig.Config) otlpconfig.Config {
+ cfg.ServiceConfig = serviceConfig
+ return cfg
+ })}
+}
+
+// WithDialOption sets explicit grpc.DialOptions to use when making a
+// connection. The options here are appended to the internal grpc.DialOptions
+// used so they will take precedence over any other internal grpc.DialOptions
+// they might conflict with.
+// The [grpc.WithBlock], [grpc.WithTimeout], and [grpc.WithReturnConnectionError]
+// grpc.DialOptions are ignored.
+//
+// This option has no effect if WithGRPCConn is used.
+func WithDialOption(opts ...grpc.DialOption) Option {
+ return wrappedOption{otlpconfig.NewGRPCOption(func(cfg otlpconfig.Config) otlpconfig.Config {
+ cfg.DialOptions = opts
+ return cfg
+ })}
+}
+
+// WithGRPCConn sets conn as the gRPC ClientConn used for all communication.
+//
+// This option takes precedence over any other option that relates to
+// establishing or persisting a gRPC connection to a target endpoint. Any
+// other option of those types passed will be ignored.
+//
+// It is the callers responsibility to close the passed conn. The client
+// Shutdown method will not close this connection.
+func WithGRPCConn(conn *grpc.ClientConn) Option {
+ return wrappedOption{otlpconfig.NewGRPCOption(func(cfg otlpconfig.Config) otlpconfig.Config {
+ cfg.GRPCConn = conn
+ return cfg
+ })}
+}
+
+// WithTimeout sets the max amount of time a client will attempt to export a
+// batch of spans. This takes precedence over any retry settings defined with
+// WithRetry, once this time limit has been reached the export is abandoned
+// and the batch of spans is dropped.
+//
+// If unset, the default timeout will be set to 10 seconds.
+func WithTimeout(duration time.Duration) Option {
+ return wrappedOption{otlpconfig.WithTimeout(duration)}
+}
+
+// WithRetry sets the retry policy for transient retryable errors that may be
+// returned by the target endpoint when exporting a batch of spans.
+//
+// If the target endpoint responds with not only a retryable error, but
+// explicitly returns a backoff time in the response. That time will take
+// precedence over these settings.
+//
+// These settings do not define any network retry strategy. That is entirely
+// handled by the gRPC ClientConn.
+//
+// If unset, the default retry policy will be used. It will retry the export
+// 5 seconds after receiving a retryable error and increase exponentially
+// after each error for no more than a total time of 1 minute.
+func WithRetry(settings RetryConfig) Option {
+ return wrappedOption{otlpconfig.WithRetry(retry.Config(settings))}
+}
diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
new file mode 100644
index 00000000..f156ee66
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace"
+
+// Version is the current release version of the OpenTelemetry OTLP trace exporter in use.
+func Version() string {
+ return "1.34.0"
+}
diff --git a/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh b/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh
new file mode 100644
index 00000000..93e80ea3
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/get_main_pkgs.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+set -euo pipefail
+
+top_dir='.'
+if [[ $# -gt 0 ]]; then
+ top_dir="${1}"
+fi
+
+p=$(pwd)
+mod_dirs=()
+
+# Note `mapfile` does not exist in older bash versions:
+# https://stackoverflow.com/questions/41475261/need-alternative-to-readarray-mapfile-for-script-on-older-version-of-bash
+
+while IFS= read -r line; do
+ mod_dirs+=("$line")
+done < <(find "${top_dir}" -type f -name 'go.mod' -exec dirname {} \; | sort)
+
+for mod_dir in "${mod_dirs[@]}"; do
+ cd "${mod_dir}"
+
+ while IFS= read -r line; do
+ echo ".${line#${p}}"
+ done < <(go list --find -f '{{.Name}}|{{.Dir}}' ./... | grep '^main|' | cut -f 2- -d '|')
+ cd "${p}"
+done
diff --git a/vendor/go.opentelemetry.io/otel/handler.go b/vendor/go.opentelemetry.io/otel/handler.go
new file mode 100644
index 00000000..07623b67
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/handler.go
@@ -0,0 +1,33 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otel // import "go.opentelemetry.io/otel"
+
+import (
+ "go.opentelemetry.io/otel/internal/global"
+)
+
+// Compile-time check global.ErrDelegator implements ErrorHandler.
+var _ ErrorHandler = (*global.ErrDelegator)(nil)
+
+// GetErrorHandler returns the global ErrorHandler instance.
+//
+// The default ErrorHandler instance returned will log all errors to STDERR
+// until an override ErrorHandler is set with SetErrorHandler. All
+// ErrorHandler returned prior to this will automatically forward errors to
+// the set instance instead of logging.
+//
+// Subsequent calls to SetErrorHandler after the first will not forward errors
+// to the new ErrorHandler for prior returned instances.
+func GetErrorHandler() ErrorHandler { return global.GetErrorHandler() }
+
+// SetErrorHandler sets the global ErrorHandler to h.
+//
+// The first time this is called all ErrorHandler previously returned from
+// GetErrorHandler will send errors to h instead of the default logging
+// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not
+// delegate errors to h.
+func SetErrorHandler(h ErrorHandler) { global.SetErrorHandler(h) }
+
+// Handle is a convenience function for GetErrorHandler().Handle(err).
+func Handle(err error) { global.GetErrorHandler().Handle(err) }
diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go
new file mode 100644
index 00000000..b4f85f44
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go
@@ -0,0 +1,32 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package baggage provides base types and functionality to store and retrieve
+baggage in Go context. This package exists because the OpenTracing bridge to
+OpenTelemetry needs to synchronize state whenever baggage for a context is
+modified and that context contains an OpenTracing span. If it were not for
+this need this package would not need to exist and the
+`go.opentelemetry.io/otel/baggage` package would be the singular place where
+W3C baggage is handled.
+*/
+package baggage // import "go.opentelemetry.io/otel/internal/baggage"
+
+// List is the collection of baggage members. The W3C allows for duplicates,
+// but OpenTelemetry does not, therefore, this is represented as a map.
+type List map[string]Item
+
+// Item is the value and metadata properties part of a list-member.
+type Item struct {
+ Value string
+ Properties []Property
+}
+
+// Property is a metadata entry for a list-member.
+type Property struct {
+ Key, Value string
+
+ // HasValue indicates if a zero-value value means the property does not
+ // have a value or if it was the zero-value.
+ HasValue bool
+}
diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/context.go b/vendor/go.opentelemetry.io/otel/internal/baggage/context.go
new file mode 100644
index 00000000..3aea9c49
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/internal/baggage/context.go
@@ -0,0 +1,81 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package baggage // import "go.opentelemetry.io/otel/internal/baggage"
+
+import "context"
+
+type baggageContextKeyType int
+
+const baggageKey baggageContextKeyType = iota
+
+// SetHookFunc is a callback called when storing baggage in the context.
+type SetHookFunc func(context.Context, List) context.Context
+
+// GetHookFunc is a callback called when getting baggage from the context.
+type GetHookFunc func(context.Context, List) List
+
+type baggageState struct {
+ list List
+
+ setHook SetHookFunc
+ getHook GetHookFunc
+}
+
+// ContextWithSetHook returns a copy of parent with hook configured to be
+// invoked every time ContextWithBaggage is called.
+//
+// Passing nil SetHookFunc creates a context with no set hook to call.
+func ContextWithSetHook(parent context.Context, hook SetHookFunc) context.Context {
+ var s baggageState
+ if v, ok := parent.Value(baggageKey).(baggageState); ok {
+ s = v
+ }
+
+ s.setHook = hook
+ return context.WithValue(parent, baggageKey, s)
+}
+
+// ContextWithGetHook returns a copy of parent with hook configured to be
+// invoked every time FromContext is called.
+//
+// Passing nil GetHookFunc creates a context with no get hook to call.
+func ContextWithGetHook(parent context.Context, hook GetHookFunc) context.Context {
+ var s baggageState
+ if v, ok := parent.Value(baggageKey).(baggageState); ok {
+ s = v
+ }
+
+ s.getHook = hook
+ return context.WithValue(parent, baggageKey, s)
+}
+
+// ContextWithList returns a copy of parent with baggage. Passing nil list
+// returns a context without any baggage.
+func ContextWithList(parent context.Context, list List) context.Context {
+ var s baggageState
+ if v, ok := parent.Value(baggageKey).(baggageState); ok {
+ s = v
+ }
+
+ s.list = list
+ ctx := context.WithValue(parent, baggageKey, s)
+ if s.setHook != nil {
+ ctx = s.setHook(ctx, list)
+ }
+
+ return ctx
+}
+
+// ListFromContext returns the baggage contained in ctx.
+func ListFromContext(ctx context.Context) List {
+ switch v := ctx.Value(baggageKey).(type) {
+ case baggageState:
+ if v.getHook != nil {
+ return v.getHook(ctx, v.list)
+ }
+ return v.list
+ default:
+ return nil
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/handler.go b/vendor/go.opentelemetry.io/otel/internal/global/handler.go
new file mode 100644
index 00000000..c657ff8e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/internal/global/handler.go
@@ -0,0 +1,36 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package global // import "go.opentelemetry.io/otel/internal/global"
+
+import (
+ "log"
+ "sync/atomic"
+)
+
+// ErrorHandler handles irremediable events.
+type ErrorHandler interface {
+ // Handle handles any error deemed irremediable by an OpenTelemetry
+ // component.
+ Handle(error)
+}
+
+type ErrDelegator struct {
+ delegate atomic.Pointer[ErrorHandler]
+}
+
+// Compile-time check that delegator implements ErrorHandler.
+var _ ErrorHandler = (*ErrDelegator)(nil)
+
+func (d *ErrDelegator) Handle(err error) {
+ if eh := d.delegate.Load(); eh != nil {
+ (*eh).Handle(err)
+ return
+ }
+ log.Print(err)
+}
+
+// setDelegate sets the ErrorHandler delegate.
+func (d *ErrDelegator) setDelegate(eh ErrorHandler) {
+ d.delegate.Store(&eh)
+}
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/instruments.go b/vendor/go.opentelemetry.io/otel/internal/global/instruments.go
new file mode 100644
index 00000000..ae92a425
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/internal/global/instruments.go
@@ -0,0 +1,412 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package global // import "go.opentelemetry.io/otel/internal/global"
+
+import (
+ "context"
+ "sync/atomic"
+
+ "go.opentelemetry.io/otel/metric"
+ "go.opentelemetry.io/otel/metric/embedded"
+)
+
+// unwrapper unwraps to return the underlying instrument implementation.
+type unwrapper interface {
+ unwrap() metric.Observable
+}
+
+type afCounter struct {
+ embedded.Float64ObservableCounter
+ metric.Float64Observable
+
+ name string
+ opts []metric.Float64ObservableCounterOption
+
+ delegate atomic.Value // metric.Float64ObservableCounter
+}
+
+var (
+ _ unwrapper = (*afCounter)(nil)
+ _ metric.Float64ObservableCounter = (*afCounter)(nil)
+)
+
+func (i *afCounter) setDelegate(m metric.Meter) {
+ ctr, err := m.Float64ObservableCounter(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *afCounter) unwrap() metric.Observable {
+ if ctr := i.delegate.Load(); ctr != nil {
+ return ctr.(metric.Float64ObservableCounter)
+ }
+ return nil
+}
+
+type afUpDownCounter struct {
+ embedded.Float64ObservableUpDownCounter
+ metric.Float64Observable
+
+ name string
+ opts []metric.Float64ObservableUpDownCounterOption
+
+ delegate atomic.Value // metric.Float64ObservableUpDownCounter
+}
+
+var (
+ _ unwrapper = (*afUpDownCounter)(nil)
+ _ metric.Float64ObservableUpDownCounter = (*afUpDownCounter)(nil)
+)
+
+func (i *afUpDownCounter) setDelegate(m metric.Meter) {
+ ctr, err := m.Float64ObservableUpDownCounter(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *afUpDownCounter) unwrap() metric.Observable {
+ if ctr := i.delegate.Load(); ctr != nil {
+ return ctr.(metric.Float64ObservableUpDownCounter)
+ }
+ return nil
+}
+
+type afGauge struct {
+ embedded.Float64ObservableGauge
+ metric.Float64Observable
+
+ name string
+ opts []metric.Float64ObservableGaugeOption
+
+ delegate atomic.Value // metric.Float64ObservableGauge
+}
+
+var (
+ _ unwrapper = (*afGauge)(nil)
+ _ metric.Float64ObservableGauge = (*afGauge)(nil)
+)
+
+func (i *afGauge) setDelegate(m metric.Meter) {
+ ctr, err := m.Float64ObservableGauge(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *afGauge) unwrap() metric.Observable {
+ if ctr := i.delegate.Load(); ctr != nil {
+ return ctr.(metric.Float64ObservableGauge)
+ }
+ return nil
+}
+
+type aiCounter struct {
+ embedded.Int64ObservableCounter
+ metric.Int64Observable
+
+ name string
+ opts []metric.Int64ObservableCounterOption
+
+ delegate atomic.Value // metric.Int64ObservableCounter
+}
+
+var (
+ _ unwrapper = (*aiCounter)(nil)
+ _ metric.Int64ObservableCounter = (*aiCounter)(nil)
+)
+
+func (i *aiCounter) setDelegate(m metric.Meter) {
+ ctr, err := m.Int64ObservableCounter(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *aiCounter) unwrap() metric.Observable {
+ if ctr := i.delegate.Load(); ctr != nil {
+ return ctr.(metric.Int64ObservableCounter)
+ }
+ return nil
+}
+
+type aiUpDownCounter struct {
+ embedded.Int64ObservableUpDownCounter
+ metric.Int64Observable
+
+ name string
+ opts []metric.Int64ObservableUpDownCounterOption
+
+ delegate atomic.Value // metric.Int64ObservableUpDownCounter
+}
+
+var (
+ _ unwrapper = (*aiUpDownCounter)(nil)
+ _ metric.Int64ObservableUpDownCounter = (*aiUpDownCounter)(nil)
+)
+
+func (i *aiUpDownCounter) setDelegate(m metric.Meter) {
+ ctr, err := m.Int64ObservableUpDownCounter(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *aiUpDownCounter) unwrap() metric.Observable {
+ if ctr := i.delegate.Load(); ctr != nil {
+ return ctr.(metric.Int64ObservableUpDownCounter)
+ }
+ return nil
+}
+
+type aiGauge struct {
+ embedded.Int64ObservableGauge
+ metric.Int64Observable
+
+ name string
+ opts []metric.Int64ObservableGaugeOption
+
+ delegate atomic.Value // metric.Int64ObservableGauge
+}
+
+var (
+ _ unwrapper = (*aiGauge)(nil)
+ _ metric.Int64ObservableGauge = (*aiGauge)(nil)
+)
+
+func (i *aiGauge) setDelegate(m metric.Meter) {
+ ctr, err := m.Int64ObservableGauge(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *aiGauge) unwrap() metric.Observable {
+ if ctr := i.delegate.Load(); ctr != nil {
+ return ctr.(metric.Int64ObservableGauge)
+ }
+ return nil
+}
+
+// Sync Instruments.
+type sfCounter struct {
+ embedded.Float64Counter
+
+ name string
+ opts []metric.Float64CounterOption
+
+ delegate atomic.Value // metric.Float64Counter
+}
+
+var _ metric.Float64Counter = (*sfCounter)(nil)
+
+func (i *sfCounter) setDelegate(m metric.Meter) {
+ ctr, err := m.Float64Counter(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *sfCounter) Add(ctx context.Context, incr float64, opts ...metric.AddOption) {
+ if ctr := i.delegate.Load(); ctr != nil {
+ ctr.(metric.Float64Counter).Add(ctx, incr, opts...)
+ }
+}
+
+type sfUpDownCounter struct {
+ embedded.Float64UpDownCounter
+
+ name string
+ opts []metric.Float64UpDownCounterOption
+
+ delegate atomic.Value // metric.Float64UpDownCounter
+}
+
+var _ metric.Float64UpDownCounter = (*sfUpDownCounter)(nil)
+
+func (i *sfUpDownCounter) setDelegate(m metric.Meter) {
+ ctr, err := m.Float64UpDownCounter(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *sfUpDownCounter) Add(ctx context.Context, incr float64, opts ...metric.AddOption) {
+ if ctr := i.delegate.Load(); ctr != nil {
+ ctr.(metric.Float64UpDownCounter).Add(ctx, incr, opts...)
+ }
+}
+
+type sfHistogram struct {
+ embedded.Float64Histogram
+
+ name string
+ opts []metric.Float64HistogramOption
+
+ delegate atomic.Value // metric.Float64Histogram
+}
+
+var _ metric.Float64Histogram = (*sfHistogram)(nil)
+
+func (i *sfHistogram) setDelegate(m metric.Meter) {
+ ctr, err := m.Float64Histogram(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *sfHistogram) Record(ctx context.Context, x float64, opts ...metric.RecordOption) {
+ if ctr := i.delegate.Load(); ctr != nil {
+ ctr.(metric.Float64Histogram).Record(ctx, x, opts...)
+ }
+}
+
+type sfGauge struct {
+ embedded.Float64Gauge
+
+ name string
+ opts []metric.Float64GaugeOption
+
+ delegate atomic.Value // metric.Float64Gauge
+}
+
+var _ metric.Float64Gauge = (*sfGauge)(nil)
+
+func (i *sfGauge) setDelegate(m metric.Meter) {
+ ctr, err := m.Float64Gauge(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *sfGauge) Record(ctx context.Context, x float64, opts ...metric.RecordOption) {
+ if ctr := i.delegate.Load(); ctr != nil {
+ ctr.(metric.Float64Gauge).Record(ctx, x, opts...)
+ }
+}
+
+type siCounter struct {
+ embedded.Int64Counter
+
+ name string
+ opts []metric.Int64CounterOption
+
+ delegate atomic.Value // metric.Int64Counter
+}
+
+var _ metric.Int64Counter = (*siCounter)(nil)
+
+func (i *siCounter) setDelegate(m metric.Meter) {
+ ctr, err := m.Int64Counter(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *siCounter) Add(ctx context.Context, x int64, opts ...metric.AddOption) {
+ if ctr := i.delegate.Load(); ctr != nil {
+ ctr.(metric.Int64Counter).Add(ctx, x, opts...)
+ }
+}
+
+type siUpDownCounter struct {
+ embedded.Int64UpDownCounter
+
+ name string
+ opts []metric.Int64UpDownCounterOption
+
+ delegate atomic.Value // metric.Int64UpDownCounter
+}
+
+var _ metric.Int64UpDownCounter = (*siUpDownCounter)(nil)
+
+func (i *siUpDownCounter) setDelegate(m metric.Meter) {
+ ctr, err := m.Int64UpDownCounter(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *siUpDownCounter) Add(ctx context.Context, x int64, opts ...metric.AddOption) {
+ if ctr := i.delegate.Load(); ctr != nil {
+ ctr.(metric.Int64UpDownCounter).Add(ctx, x, opts...)
+ }
+}
+
+type siHistogram struct {
+ embedded.Int64Histogram
+
+ name string
+ opts []metric.Int64HistogramOption
+
+ delegate atomic.Value // metric.Int64Histogram
+}
+
+var _ metric.Int64Histogram = (*siHistogram)(nil)
+
+func (i *siHistogram) setDelegate(m metric.Meter) {
+ ctr, err := m.Int64Histogram(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *siHistogram) Record(ctx context.Context, x int64, opts ...metric.RecordOption) {
+ if ctr := i.delegate.Load(); ctr != nil {
+ ctr.(metric.Int64Histogram).Record(ctx, x, opts...)
+ }
+}
+
+type siGauge struct {
+ embedded.Int64Gauge
+
+ name string
+ opts []metric.Int64GaugeOption
+
+ delegate atomic.Value // metric.Int64Gauge
+}
+
+var _ metric.Int64Gauge = (*siGauge)(nil)
+
+func (i *siGauge) setDelegate(m metric.Meter) {
+ ctr, err := m.Int64Gauge(i.name, i.opts...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+ i.delegate.Store(ctr)
+}
+
+func (i *siGauge) Record(ctx context.Context, x int64, opts ...metric.RecordOption) {
+ if ctr := i.delegate.Load(); ctr != nil {
+ ctr.(metric.Int64Gauge).Record(ctx, x, opts...)
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go
new file mode 100644
index 00000000..adbca7d3
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go
@@ -0,0 +1,62 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package global // import "go.opentelemetry.io/otel/internal/global"
+
+import (
+ "log"
+ "os"
+ "sync/atomic"
+
+ "github.com/go-logr/logr"
+ "github.com/go-logr/stdr"
+)
+
+// globalLogger holds a reference to the [logr.Logger] used within
+// go.opentelemetry.io/otel.
+//
+// The default logger uses stdr which is backed by the standard `log.Logger`
+// interface. This logger will only show messages at the Error Level.
+var globalLogger = func() *atomic.Pointer[logr.Logger] {
+ l := stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile))
+
+ p := new(atomic.Pointer[logr.Logger])
+ p.Store(&l)
+ return p
+}()
+
+// SetLogger sets the global Logger to l.
+//
+// To see Warn messages use a logger with `l.V(1).Enabled() == true`
+// To see Info messages use a logger with `l.V(4).Enabled() == true`
+// To see Debug messages use a logger with `l.V(8).Enabled() == true`.
+func SetLogger(l logr.Logger) {
+ globalLogger.Store(&l)
+}
+
+// GetLogger returns the global logger.
+func GetLogger() logr.Logger {
+ return *globalLogger.Load()
+}
+
+// Info prints messages about the general state of the API or SDK.
+// This should usually be less than 5 messages a minute.
+func Info(msg string, keysAndValues ...interface{}) {
+ GetLogger().V(4).Info(msg, keysAndValues...)
+}
+
+// Error prints messages about exceptional states of the API or SDK.
+func Error(err error, msg string, keysAndValues ...interface{}) {
+ GetLogger().Error(err, msg, keysAndValues...)
+}
+
+// Debug prints messages about all internal changes in the API or SDK.
+func Debug(msg string, keysAndValues ...interface{}) {
+ GetLogger().V(8).Info(msg, keysAndValues...)
+}
+
+// Warn prints messages about warnings in the API or SDK.
+// Not an error but is likely more important than an informational event.
+func Warn(msg string, keysAndValues ...interface{}) {
+ GetLogger().V(1).Info(msg, keysAndValues...)
+}
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/meter.go b/vendor/go.opentelemetry.io/otel/internal/global/meter.go
new file mode 100644
index 00000000..a6acd8dc
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/internal/global/meter.go
@@ -0,0 +1,598 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package global // import "go.opentelemetry.io/otel/internal/global"
+
+import (
+ "container/list"
+ "context"
+ "reflect"
+ "sync"
+
+ "go.opentelemetry.io/otel/metric"
+ "go.opentelemetry.io/otel/metric/embedded"
+)
+
+// meterProvider is a placeholder for a configured SDK MeterProvider.
+//
+// All MeterProvider functionality is forwarded to a delegate once
+// configured.
+type meterProvider struct {
+ embedded.MeterProvider
+
+ mtx sync.Mutex
+ meters map[il]*meter
+
+ delegate metric.MeterProvider
+}
+
+// setDelegate configures p to delegate all MeterProvider functionality to
+// provider.
+//
+// All Meters provided prior to this function call are switched out to be
+// Meters provided by provider. All instruments and callbacks are recreated and
+// delegated.
+//
+// It is guaranteed by the caller that this happens only once.
+func (p *meterProvider) setDelegate(provider metric.MeterProvider) {
+ p.mtx.Lock()
+ defer p.mtx.Unlock()
+
+ p.delegate = provider
+
+ if len(p.meters) == 0 {
+ return
+ }
+
+ for _, meter := range p.meters {
+ meter.setDelegate(provider)
+ }
+
+ p.meters = nil
+}
+
+// Meter implements MeterProvider.
+func (p *meterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter {
+ p.mtx.Lock()
+ defer p.mtx.Unlock()
+
+ if p.delegate != nil {
+ return p.delegate.Meter(name, opts...)
+ }
+
+ // At this moment it is guaranteed that no sdk is installed, save the meter in the meters map.
+
+ c := metric.NewMeterConfig(opts...)
+ key := il{
+ name: name,
+ version: c.InstrumentationVersion(),
+ schema: c.SchemaURL(),
+ attrs: c.InstrumentationAttributes(),
+ }
+
+ if p.meters == nil {
+ p.meters = make(map[il]*meter)
+ }
+
+ if val, ok := p.meters[key]; ok {
+ return val
+ }
+
+ t := &meter{name: name, opts: opts, instruments: make(map[instID]delegatedInstrument)}
+ p.meters[key] = t
+ return t
+}
+
+// meter is a placeholder for a metric.Meter.
+//
+// All Meter functionality is forwarded to a delegate once configured.
+// Otherwise, all functionality is forwarded to a NoopMeter.
+type meter struct {
+ embedded.Meter
+
+ name string
+ opts []metric.MeterOption
+
+ mtx sync.Mutex
+ instruments map[instID]delegatedInstrument
+
+ registry list.List
+
+ delegate metric.Meter
+}
+
+type delegatedInstrument interface {
+ setDelegate(metric.Meter)
+}
+
+// instID are the identifying properties of a instrument.
+type instID struct {
+ // name is the name of the stream.
+ name string
+ // description is the description of the stream.
+ description string
+ // kind defines the functional group of the instrument.
+ kind reflect.Type
+ // unit is the unit of the stream.
+ unit string
+}
+
+// setDelegate configures m to delegate all Meter functionality to Meters
+// created by provider.
+//
+// All subsequent calls to the Meter methods will be passed to the delegate.
+//
+// It is guaranteed by the caller that this happens only once.
+func (m *meter) setDelegate(provider metric.MeterProvider) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ meter := provider.Meter(m.name, m.opts...)
+ m.delegate = meter
+
+ for _, inst := range m.instruments {
+ inst.setDelegate(meter)
+ }
+
+ var n *list.Element
+ for e := m.registry.Front(); e != nil; e = n {
+ r := e.Value.(*registration)
+ r.setDelegate(meter)
+ n = e.Next()
+ m.registry.Remove(e)
+ }
+
+ m.instruments = nil
+ m.registry.Init()
+}
+
+func (m *meter) Int64Counter(name string, options ...metric.Int64CounterOption) (metric.Int64Counter, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Int64Counter(name, options...)
+ }
+
+ cfg := metric.NewInt64CounterConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*siCounter)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Int64Counter), nil
+ }
+ i := &siCounter{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Int64UpDownCounter(name string, options ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Int64UpDownCounter(name, options...)
+ }
+
+ cfg := metric.NewInt64UpDownCounterConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*siUpDownCounter)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Int64UpDownCounter), nil
+ }
+ i := &siUpDownCounter{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Int64Histogram(name string, options ...metric.Int64HistogramOption) (metric.Int64Histogram, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Int64Histogram(name, options...)
+ }
+
+ cfg := metric.NewInt64HistogramConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*siHistogram)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Int64Histogram), nil
+ }
+ i := &siHistogram{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Int64Gauge(name string, options ...metric.Int64GaugeOption) (metric.Int64Gauge, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Int64Gauge(name, options...)
+ }
+
+ cfg := metric.NewInt64GaugeConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*siGauge)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Int64Gauge), nil
+ }
+ i := &siGauge{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Int64ObservableCounter(name string, options ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Int64ObservableCounter(name, options...)
+ }
+
+ cfg := metric.NewInt64ObservableCounterConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*aiCounter)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Int64ObservableCounter), nil
+ }
+ i := &aiCounter{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Int64ObservableUpDownCounter(name string, options ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Int64ObservableUpDownCounter(name, options...)
+ }
+
+ cfg := metric.NewInt64ObservableUpDownCounterConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*aiUpDownCounter)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Int64ObservableUpDownCounter), nil
+ }
+ i := &aiUpDownCounter{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Int64ObservableGauge(name string, options ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Int64ObservableGauge(name, options...)
+ }
+
+ cfg := metric.NewInt64ObservableGaugeConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*aiGauge)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Int64ObservableGauge), nil
+ }
+ i := &aiGauge{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Float64Counter(name string, options ...metric.Float64CounterOption) (metric.Float64Counter, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Float64Counter(name, options...)
+ }
+
+ cfg := metric.NewFloat64CounterConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*sfCounter)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Float64Counter), nil
+ }
+ i := &sfCounter{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Float64UpDownCounter(name string, options ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Float64UpDownCounter(name, options...)
+ }
+
+ cfg := metric.NewFloat64UpDownCounterConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*sfUpDownCounter)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Float64UpDownCounter), nil
+ }
+ i := &sfUpDownCounter{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Float64Histogram(name string, options ...metric.Float64HistogramOption) (metric.Float64Histogram, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Float64Histogram(name, options...)
+ }
+
+ cfg := metric.NewFloat64HistogramConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*sfHistogram)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Float64Histogram), nil
+ }
+ i := &sfHistogram{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Float64Gauge(name string, options ...metric.Float64GaugeOption) (metric.Float64Gauge, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Float64Gauge(name, options...)
+ }
+
+ cfg := metric.NewFloat64GaugeConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*sfGauge)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Float64Gauge), nil
+ }
+ i := &sfGauge{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Float64ObservableCounter(name string, options ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Float64ObservableCounter(name, options...)
+ }
+
+ cfg := metric.NewFloat64ObservableCounterConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*afCounter)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Float64ObservableCounter), nil
+ }
+ i := &afCounter{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Float64ObservableUpDownCounter(name string, options ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Float64ObservableUpDownCounter(name, options...)
+ }
+
+ cfg := metric.NewFloat64ObservableUpDownCounterConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*afUpDownCounter)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Float64ObservableUpDownCounter), nil
+ }
+ i := &afUpDownCounter{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+func (m *meter) Float64ObservableGauge(name string, options ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.Float64ObservableGauge(name, options...)
+ }
+
+ cfg := metric.NewFloat64ObservableGaugeConfig(options...)
+ id := instID{
+ name: name,
+ kind: reflect.TypeOf((*afGauge)(nil)),
+ description: cfg.Description(),
+ unit: cfg.Unit(),
+ }
+ if f, ok := m.instruments[id]; ok {
+ return f.(metric.Float64ObservableGauge), nil
+ }
+ i := &afGauge{name: name, opts: options}
+ m.instruments[id] = i
+ return i, nil
+}
+
+// RegisterCallback captures the function that will be called during Collect.
+func (m *meter) RegisterCallback(f metric.Callback, insts ...metric.Observable) (metric.Registration, error) {
+ m.mtx.Lock()
+ defer m.mtx.Unlock()
+
+ if m.delegate != nil {
+ return m.delegate.RegisterCallback(unwrapCallback(f), unwrapInstruments(insts)...)
+ }
+
+ reg := ®istration{instruments: insts, function: f}
+ e := m.registry.PushBack(reg)
+ reg.unreg = func() error {
+ m.mtx.Lock()
+ _ = m.registry.Remove(e)
+ m.mtx.Unlock()
+ return nil
+ }
+ return reg, nil
+}
+
+func unwrapInstruments(instruments []metric.Observable) []metric.Observable {
+ out := make([]metric.Observable, 0, len(instruments))
+
+ for _, inst := range instruments {
+ if in, ok := inst.(unwrapper); ok {
+ out = append(out, in.unwrap())
+ } else {
+ out = append(out, inst)
+ }
+ }
+
+ return out
+}
+
+type registration struct {
+ embedded.Registration
+
+ instruments []metric.Observable
+ function metric.Callback
+
+ unreg func() error
+ unregMu sync.Mutex
+}
+
+type unwrapObs struct {
+ embedded.Observer
+ obs metric.Observer
+}
+
+// unwrapFloat64Observable returns an expected metric.Float64Observable after
+// unwrapping the global object.
+func unwrapFloat64Observable(inst metric.Float64Observable) metric.Float64Observable {
+ if unwrapped, ok := inst.(unwrapper); ok {
+ if floatObs, ok := unwrapped.unwrap().(metric.Float64Observable); ok {
+ // Note: if the unwrapped object does not
+ // unwrap as an observable for either of the
+ // predicates here, it means an internal bug in
+ // this package. We avoid logging an error in
+ // this case, because the SDK has to try its
+ // own type conversion on the object. The SDK
+ // will see this and be forced to respond with
+ // its own error.
+ //
+ // This code uses a double-nested if statement
+ // to avoid creating a branch that is
+ // impossible to cover.
+ inst = floatObs
+ }
+ }
+ return inst
+}
+
+// unwrapInt64Observable returns an expected metric.Int64Observable after
+// unwrapping the global object.
+func unwrapInt64Observable(inst metric.Int64Observable) metric.Int64Observable {
+ if unwrapped, ok := inst.(unwrapper); ok {
+ if unint, ok := unwrapped.unwrap().(metric.Int64Observable); ok {
+ // See the comment in unwrapFloat64Observable().
+ inst = unint
+ }
+ }
+ return inst
+}
+
+func (uo *unwrapObs) ObserveFloat64(inst metric.Float64Observable, value float64, opts ...metric.ObserveOption) {
+ uo.obs.ObserveFloat64(unwrapFloat64Observable(inst), value, opts...)
+}
+
+func (uo *unwrapObs) ObserveInt64(inst metric.Int64Observable, value int64, opts ...metric.ObserveOption) {
+ uo.obs.ObserveInt64(unwrapInt64Observable(inst), value, opts...)
+}
+
+func unwrapCallback(f metric.Callback) metric.Callback {
+ return func(ctx context.Context, obs metric.Observer) error {
+ return f(ctx, &unwrapObs{obs: obs})
+ }
+}
+
+func (c *registration) setDelegate(m metric.Meter) {
+ c.unregMu.Lock()
+ defer c.unregMu.Unlock()
+
+ if c.unreg == nil {
+ // Unregister already called.
+ return
+ }
+
+ reg, err := m.RegisterCallback(unwrapCallback(c.function), unwrapInstruments(c.instruments)...)
+ if err != nil {
+ GetErrorHandler().Handle(err)
+ return
+ }
+
+ c.unreg = reg.Unregister
+}
+
+func (c *registration) Unregister() error {
+ c.unregMu.Lock()
+ defer c.unregMu.Unlock()
+ if c.unreg == nil {
+ // Unregister already called.
+ return nil
+ }
+
+ var err error
+ err, c.unreg = c.unreg(), nil
+ return err
+}
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/propagator.go b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go
new file mode 100644
index 00000000..38560ff9
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go
@@ -0,0 +1,71 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package global // import "go.opentelemetry.io/otel/internal/global"
+
+import (
+ "context"
+ "sync"
+
+ "go.opentelemetry.io/otel/propagation"
+)
+
+// textMapPropagator is a default TextMapPropagator that delegates calls to a
+// registered delegate if one is set, otherwise it defaults to delegating the
+// calls to a the default no-op propagation.TextMapPropagator.
+type textMapPropagator struct {
+ mtx sync.Mutex
+ once sync.Once
+ delegate propagation.TextMapPropagator
+ noop propagation.TextMapPropagator
+}
+
+// Compile-time guarantee that textMapPropagator implements the
+// propagation.TextMapPropagator interface.
+var _ propagation.TextMapPropagator = (*textMapPropagator)(nil)
+
+func newTextMapPropagator() *textMapPropagator {
+ return &textMapPropagator{
+ noop: propagation.NewCompositeTextMapPropagator(),
+ }
+}
+
+// SetDelegate sets a delegate propagation.TextMapPropagator that all calls are
+// forwarded to. Delegation can only be performed once, all subsequent calls
+// perform no delegation.
+func (p *textMapPropagator) SetDelegate(delegate propagation.TextMapPropagator) {
+ if delegate == nil {
+ return
+ }
+
+ p.mtx.Lock()
+ p.once.Do(func() { p.delegate = delegate })
+ p.mtx.Unlock()
+}
+
+// effectiveDelegate returns the current delegate of p if one is set,
+// otherwise the default noop TextMapPropagator is returned. This method
+// can be called concurrently.
+func (p *textMapPropagator) effectiveDelegate() propagation.TextMapPropagator {
+ p.mtx.Lock()
+ defer p.mtx.Unlock()
+ if p.delegate != nil {
+ return p.delegate
+ }
+ return p.noop
+}
+
+// Inject set cross-cutting concerns from the Context into the carrier.
+func (p *textMapPropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) {
+ p.effectiveDelegate().Inject(ctx, carrier)
+}
+
+// Extract reads cross-cutting concerns from the carrier into a Context.
+func (p *textMapPropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context {
+ return p.effectiveDelegate().Extract(ctx, carrier)
+}
+
+// Fields returns the keys whose values are set with Inject.
+func (p *textMapPropagator) Fields() []string {
+ return p.effectiveDelegate().Fields()
+}
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/state.go b/vendor/go.opentelemetry.io/otel/internal/global/state.go
new file mode 100644
index 00000000..204ea142
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/internal/global/state.go
@@ -0,0 +1,199 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package global // import "go.opentelemetry.io/otel/internal/global"
+
+import (
+ "errors"
+ "sync"
+ "sync/atomic"
+
+ "go.opentelemetry.io/otel/metric"
+ "go.opentelemetry.io/otel/propagation"
+ "go.opentelemetry.io/otel/trace"
+)
+
+type (
+ errorHandlerHolder struct {
+ eh ErrorHandler
+ }
+
+ tracerProviderHolder struct {
+ tp trace.TracerProvider
+ }
+
+ propagatorsHolder struct {
+ tm propagation.TextMapPropagator
+ }
+
+ meterProviderHolder struct {
+ mp metric.MeterProvider
+ }
+)
+
+var (
+ globalErrorHandler = defaultErrorHandler()
+ globalTracer = defaultTracerValue()
+ globalPropagators = defaultPropagatorsValue()
+ globalMeterProvider = defaultMeterProvider()
+
+ delegateErrorHandlerOnce sync.Once
+ delegateTraceOnce sync.Once
+ delegateTextMapPropagatorOnce sync.Once
+ delegateMeterOnce sync.Once
+)
+
+// GetErrorHandler returns the global ErrorHandler instance.
+//
+// The default ErrorHandler instance returned will log all errors to STDERR
+// until an override ErrorHandler is set with SetErrorHandler. All
+// ErrorHandler returned prior to this will automatically forward errors to
+// the set instance instead of logging.
+//
+// Subsequent calls to SetErrorHandler after the first will not forward errors
+// to the new ErrorHandler for prior returned instances.
+func GetErrorHandler() ErrorHandler {
+ return globalErrorHandler.Load().(errorHandlerHolder).eh
+}
+
+// SetErrorHandler sets the global ErrorHandler to h.
+//
+// The first time this is called all ErrorHandler previously returned from
+// GetErrorHandler will send errors to h instead of the default logging
+// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not
+// delegate errors to h.
+func SetErrorHandler(h ErrorHandler) {
+ current := GetErrorHandler()
+
+ if _, cOk := current.(*ErrDelegator); cOk {
+ if _, ehOk := h.(*ErrDelegator); ehOk && current == h {
+ // Do not assign to the delegate of the default ErrDelegator to be
+ // itself.
+ Error(
+ errors.New("no ErrorHandler delegate configured"),
+ "ErrorHandler remains its current value.",
+ )
+ return
+ }
+ }
+
+ delegateErrorHandlerOnce.Do(func() {
+ if def, ok := current.(*ErrDelegator); ok {
+ def.setDelegate(h)
+ }
+ })
+ globalErrorHandler.Store(errorHandlerHolder{eh: h})
+}
+
+// TracerProvider is the internal implementation for global.TracerProvider.
+func TracerProvider() trace.TracerProvider {
+ return globalTracer.Load().(tracerProviderHolder).tp
+}
+
+// SetTracerProvider is the internal implementation for global.SetTracerProvider.
+func SetTracerProvider(tp trace.TracerProvider) {
+ current := TracerProvider()
+
+ if _, cOk := current.(*tracerProvider); cOk {
+ if _, tpOk := tp.(*tracerProvider); tpOk && current == tp {
+ // Do not assign the default delegating TracerProvider to delegate
+ // to itself.
+ Error(
+ errors.New("no delegate configured in tracer provider"),
+ "Setting tracer provider to its current value. No delegate will be configured",
+ )
+ return
+ }
+ }
+
+ delegateTraceOnce.Do(func() {
+ if def, ok := current.(*tracerProvider); ok {
+ def.setDelegate(tp)
+ }
+ })
+ globalTracer.Store(tracerProviderHolder{tp: tp})
+}
+
+// TextMapPropagator is the internal implementation for global.TextMapPropagator.
+func TextMapPropagator() propagation.TextMapPropagator {
+ return globalPropagators.Load().(propagatorsHolder).tm
+}
+
+// SetTextMapPropagator is the internal implementation for global.SetTextMapPropagator.
+func SetTextMapPropagator(p propagation.TextMapPropagator) {
+ current := TextMapPropagator()
+
+ if _, cOk := current.(*textMapPropagator); cOk {
+ if _, pOk := p.(*textMapPropagator); pOk && current == p {
+ // Do not assign the default delegating TextMapPropagator to
+ // delegate to itself.
+ Error(
+ errors.New("no delegate configured in text map propagator"),
+ "Setting text map propagator to its current value. No delegate will be configured",
+ )
+ return
+ }
+ }
+
+ // For the textMapPropagator already returned by TextMapPropagator
+ // delegate to p.
+ delegateTextMapPropagatorOnce.Do(func() {
+ if def, ok := current.(*textMapPropagator); ok {
+ def.SetDelegate(p)
+ }
+ })
+ // Return p when subsequent calls to TextMapPropagator are made.
+ globalPropagators.Store(propagatorsHolder{tm: p})
+}
+
+// MeterProvider is the internal implementation for global.MeterProvider.
+func MeterProvider() metric.MeterProvider {
+ return globalMeterProvider.Load().(meterProviderHolder).mp
+}
+
+// SetMeterProvider is the internal implementation for global.SetMeterProvider.
+func SetMeterProvider(mp metric.MeterProvider) {
+ current := MeterProvider()
+ if _, cOk := current.(*meterProvider); cOk {
+ if _, mpOk := mp.(*meterProvider); mpOk && current == mp {
+ // Do not assign the default delegating MeterProvider to delegate
+ // to itself.
+ Error(
+ errors.New("no delegate configured in meter provider"),
+ "Setting meter provider to its current value. No delegate will be configured",
+ )
+ return
+ }
+ }
+
+ delegateMeterOnce.Do(func() {
+ if def, ok := current.(*meterProvider); ok {
+ def.setDelegate(mp)
+ }
+ })
+ globalMeterProvider.Store(meterProviderHolder{mp: mp})
+}
+
+func defaultErrorHandler() *atomic.Value {
+ v := &atomic.Value{}
+ v.Store(errorHandlerHolder{eh: &ErrDelegator{}})
+ return v
+}
+
+func defaultTracerValue() *atomic.Value {
+ v := &atomic.Value{}
+ v.Store(tracerProviderHolder{tp: &tracerProvider{}})
+ return v
+}
+
+func defaultPropagatorsValue() *atomic.Value {
+ v := &atomic.Value{}
+ v.Store(propagatorsHolder{tm: newTextMapPropagator()})
+ return v
+}
+
+func defaultMeterProvider() *atomic.Value {
+ v := &atomic.Value{}
+ v.Store(meterProviderHolder{mp: &meterProvider{}})
+ return v
+}
diff --git a/vendor/go.opentelemetry.io/otel/internal/global/trace.go b/vendor/go.opentelemetry.io/otel/internal/global/trace.go
new file mode 100644
index 00000000..8982aa0d
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/internal/global/trace.go
@@ -0,0 +1,220 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package global // import "go.opentelemetry.io/otel/internal/global"
+
+/*
+This file contains the forwarding implementation of the TracerProvider used as
+the default global instance. Prior to initialization of an SDK, Tracers
+returned by the global TracerProvider will provide no-op functionality. This
+means that all Span created prior to initialization are no-op Spans.
+
+Once an SDK has been initialized, all provided no-op Tracers are swapped for
+Tracers provided by the SDK defined TracerProvider. However, any Span started
+prior to this initialization does not change its behavior. Meaning, the Span
+remains a no-op Span.
+
+The implementation to track and swap Tracers locks all new Tracer creation
+until the swap is complete. This assumes that this operation is not
+performance-critical. If that assumption is incorrect, be sure to configure an
+SDK prior to any Tracer creation.
+*/
+
+import (
+ "context"
+ "sync"
+ "sync/atomic"
+
+ "go.opentelemetry.io/auto/sdk"
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/codes"
+ "go.opentelemetry.io/otel/trace"
+ "go.opentelemetry.io/otel/trace/embedded"
+)
+
+// tracerProvider is a placeholder for a configured SDK TracerProvider.
+//
+// All TracerProvider functionality is forwarded to a delegate once
+// configured.
+type tracerProvider struct {
+ embedded.TracerProvider
+
+ mtx sync.Mutex
+ tracers map[il]*tracer
+ delegate trace.TracerProvider
+}
+
+// Compile-time guarantee that tracerProvider implements the TracerProvider
+// interface.
+var _ trace.TracerProvider = &tracerProvider{}
+
+// setDelegate configures p to delegate all TracerProvider functionality to
+// provider.
+//
+// All Tracers provided prior to this function call are switched out to be
+// Tracers provided by provider.
+//
+// It is guaranteed by the caller that this happens only once.
+func (p *tracerProvider) setDelegate(provider trace.TracerProvider) {
+ p.mtx.Lock()
+ defer p.mtx.Unlock()
+
+ p.delegate = provider
+
+ if len(p.tracers) == 0 {
+ return
+ }
+
+ for _, t := range p.tracers {
+ t.setDelegate(provider)
+ }
+
+ p.tracers = nil
+}
+
+// Tracer implements TracerProvider.
+func (p *tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer {
+ p.mtx.Lock()
+ defer p.mtx.Unlock()
+
+ if p.delegate != nil {
+ return p.delegate.Tracer(name, opts...)
+ }
+
+ // At this moment it is guaranteed that no sdk is installed, save the tracer in the tracers map.
+
+ c := trace.NewTracerConfig(opts...)
+ key := il{
+ name: name,
+ version: c.InstrumentationVersion(),
+ schema: c.SchemaURL(),
+ attrs: c.InstrumentationAttributes(),
+ }
+
+ if p.tracers == nil {
+ p.tracers = make(map[il]*tracer)
+ }
+
+ if val, ok := p.tracers[key]; ok {
+ return val
+ }
+
+ t := &tracer{name: name, opts: opts, provider: p}
+ p.tracers[key] = t
+ return t
+}
+
+type il struct {
+ name string
+ version string
+ schema string
+ attrs attribute.Set
+}
+
+// tracer is a placeholder for a trace.Tracer.
+//
+// All Tracer functionality is forwarded to a delegate once configured.
+// Otherwise, all functionality is forwarded to a NoopTracer.
+type tracer struct {
+ embedded.Tracer
+
+ name string
+ opts []trace.TracerOption
+ provider *tracerProvider
+
+ delegate atomic.Value
+}
+
+// Compile-time guarantee that tracer implements the trace.Tracer interface.
+var _ trace.Tracer = &tracer{}
+
+// setDelegate configures t to delegate all Tracer functionality to Tracers
+// created by provider.
+//
+// All subsequent calls to the Tracer methods will be passed to the delegate.
+//
+// It is guaranteed by the caller that this happens only once.
+func (t *tracer) setDelegate(provider trace.TracerProvider) {
+ t.delegate.Store(provider.Tracer(t.name, t.opts...))
+}
+
+// Start implements trace.Tracer by forwarding the call to t.delegate if
+// set, otherwise it forwards the call to a NoopTracer.
+func (t *tracer) Start(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span) {
+ delegate := t.delegate.Load()
+ if delegate != nil {
+ return delegate.(trace.Tracer).Start(ctx, name, opts...)
+ }
+
+ return t.newSpan(ctx, autoInstEnabled, name, opts)
+}
+
+// autoInstEnabled determines if the auto-instrumentation SDK span is returned
+// from the tracer when not backed by a delegate and auto-instrumentation has
+// attached to this process.
+//
+// The auto-instrumentation is expected to overwrite this value to true when it
+// attaches. By default, this will point to false and mean a tracer will return
+// a nonRecordingSpan by default.
+var autoInstEnabled = new(bool)
+
+func (t *tracer) newSpan(ctx context.Context, autoSpan *bool, name string, opts []trace.SpanStartOption) (context.Context, trace.Span) {
+ // autoInstEnabled is passed to newSpan via the autoSpan parameter. This is
+ // so the auto-instrumentation can define a uprobe for (*t).newSpan and be
+ // provided with the address of the bool autoInstEnabled points to. It
+ // needs to be a parameter so that pointer can be reliably determined, it
+ // should not be read from the global.
+
+ if *autoSpan {
+ tracer := sdk.TracerProvider().Tracer(t.name, t.opts...)
+ return tracer.Start(ctx, name, opts...)
+ }
+
+ s := nonRecordingSpan{sc: trace.SpanContextFromContext(ctx), tracer: t}
+ ctx = trace.ContextWithSpan(ctx, s)
+ return ctx, s
+}
+
+// nonRecordingSpan is a minimal implementation of a Span that wraps a
+// SpanContext. It performs no operations other than to return the wrapped
+// SpanContext.
+type nonRecordingSpan struct {
+ embedded.Span
+
+ sc trace.SpanContext
+ tracer *tracer
+}
+
+var _ trace.Span = nonRecordingSpan{}
+
+// SpanContext returns the wrapped SpanContext.
+func (s nonRecordingSpan) SpanContext() trace.SpanContext { return s.sc }
+
+// IsRecording always returns false.
+func (nonRecordingSpan) IsRecording() bool { return false }
+
+// SetStatus does nothing.
+func (nonRecordingSpan) SetStatus(codes.Code, string) {}
+
+// SetError does nothing.
+func (nonRecordingSpan) SetError(bool) {}
+
+// SetAttributes does nothing.
+func (nonRecordingSpan) SetAttributes(...attribute.KeyValue) {}
+
+// End does nothing.
+func (nonRecordingSpan) End(...trace.SpanEndOption) {}
+
+// RecordError does nothing.
+func (nonRecordingSpan) RecordError(error, ...trace.EventOption) {}
+
+// AddEvent does nothing.
+func (nonRecordingSpan) AddEvent(string, ...trace.EventOption) {}
+
+// AddLink does nothing.
+func (nonRecordingSpan) AddLink(trace.Link) {}
+
+// SetName does nothing.
+func (nonRecordingSpan) SetName(string) {}
+
+func (s nonRecordingSpan) TracerProvider() trace.TracerProvider { return s.tracer.provider }
diff --git a/vendor/go.opentelemetry.io/otel/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal_logging.go
new file mode 100644
index 00000000..6de7f2e4
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/internal_logging.go
@@ -0,0 +1,15 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otel // import "go.opentelemetry.io/otel"
+
+import (
+ "github.com/go-logr/logr"
+
+ "go.opentelemetry.io/otel/internal/global"
+)
+
+// SetLogger configures the logger used internally to opentelemetry.
+func SetLogger(logger logr.Logger) {
+ global.SetLogger(logger)
+}
diff --git a/vendor/go.opentelemetry.io/otel/metric.go b/vendor/go.opentelemetry.io/otel/metric.go
new file mode 100644
index 00000000..1e6473b3
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/metric.go
@@ -0,0 +1,42 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otel // import "go.opentelemetry.io/otel"
+
+import (
+ "go.opentelemetry.io/otel/internal/global"
+ "go.opentelemetry.io/otel/metric"
+)
+
+// Meter returns a Meter from the global MeterProvider. The name must be the
+// name of the library providing instrumentation. This name may be the same as
+// the instrumented code only if that code provides built-in instrumentation.
+// If the name is empty, then a implementation defined default name will be
+// used instead.
+//
+// If this is called before a global MeterProvider is registered the returned
+// Meter will be a No-op implementation of a Meter. When a global MeterProvider
+// is registered for the first time, the returned Meter, and all the
+// instruments it has created or will create, are recreated automatically from
+// the new MeterProvider.
+//
+// This is short for GetMeterProvider().Meter(name).
+func Meter(name string, opts ...metric.MeterOption) metric.Meter {
+ return GetMeterProvider().Meter(name, opts...)
+}
+
+// GetMeterProvider returns the registered global meter provider.
+//
+// If no global GetMeterProvider has been registered, a No-op GetMeterProvider
+// implementation is returned. When a global GetMeterProvider is registered for
+// the first time, the returned GetMeterProvider, and all the Meters it has
+// created or will create, are recreated automatically from the new
+// GetMeterProvider.
+func GetMeterProvider() metric.MeterProvider {
+ return global.MeterProvider()
+}
+
+// SetMeterProvider registers mp as the global MeterProvider.
+func SetMeterProvider(mp metric.MeterProvider) {
+ global.SetMeterProvider(mp)
+}
diff --git a/vendor/go.opentelemetry.io/otel/metric/noop/README.md b/vendor/go.opentelemetry.io/otel/metric/noop/README.md
new file mode 100644
index 00000000..bb896943
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/metric/noop/README.md
@@ -0,0 +1,3 @@
+# Metric Noop
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/metric/noop)
diff --git a/vendor/go.opentelemetry.io/otel/metric/noop/noop.go b/vendor/go.opentelemetry.io/otel/metric/noop/noop.go
new file mode 100644
index 00000000..ca6fcbdc
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/metric/noop/noop.go
@@ -0,0 +1,281 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package noop provides an implementation of the OpenTelemetry metric API that
+// produces no telemetry and minimizes used computation resources.
+//
+// Using this package to implement the OpenTelemetry metric API will
+// effectively disable OpenTelemetry.
+//
+// This implementation can be embedded in other implementations of the
+// OpenTelemetry metric API. Doing so will mean the implementation defaults to
+// no operation for methods it does not implement.
+package noop // import "go.opentelemetry.io/otel/metric/noop"
+
+import (
+ "context"
+
+ "go.opentelemetry.io/otel/metric"
+ "go.opentelemetry.io/otel/metric/embedded"
+)
+
+var (
+ // Compile-time check this implements the OpenTelemetry API.
+
+ _ metric.MeterProvider = MeterProvider{}
+ _ metric.Meter = Meter{}
+ _ metric.Observer = Observer{}
+ _ metric.Registration = Registration{}
+ _ metric.Int64Counter = Int64Counter{}
+ _ metric.Float64Counter = Float64Counter{}
+ _ metric.Int64UpDownCounter = Int64UpDownCounter{}
+ _ metric.Float64UpDownCounter = Float64UpDownCounter{}
+ _ metric.Int64Histogram = Int64Histogram{}
+ _ metric.Float64Histogram = Float64Histogram{}
+ _ metric.Int64Gauge = Int64Gauge{}
+ _ metric.Float64Gauge = Float64Gauge{}
+ _ metric.Int64ObservableCounter = Int64ObservableCounter{}
+ _ metric.Float64ObservableCounter = Float64ObservableCounter{}
+ _ metric.Int64ObservableGauge = Int64ObservableGauge{}
+ _ metric.Float64ObservableGauge = Float64ObservableGauge{}
+ _ metric.Int64ObservableUpDownCounter = Int64ObservableUpDownCounter{}
+ _ metric.Float64ObservableUpDownCounter = Float64ObservableUpDownCounter{}
+ _ metric.Int64Observer = Int64Observer{}
+ _ metric.Float64Observer = Float64Observer{}
+)
+
+// MeterProvider is an OpenTelemetry No-Op MeterProvider.
+type MeterProvider struct{ embedded.MeterProvider }
+
+// NewMeterProvider returns a MeterProvider that does not record any telemetry.
+func NewMeterProvider() MeterProvider {
+ return MeterProvider{}
+}
+
+// Meter returns an OpenTelemetry Meter that does not record any telemetry.
+func (MeterProvider) Meter(string, ...metric.MeterOption) metric.Meter {
+ return Meter{}
+}
+
+// Meter is an OpenTelemetry No-Op Meter.
+type Meter struct{ embedded.Meter }
+
+// Int64Counter returns a Counter used to record int64 measurements that
+// produces no telemetry.
+func (Meter) Int64Counter(string, ...metric.Int64CounterOption) (metric.Int64Counter, error) {
+ return Int64Counter{}, nil
+}
+
+// Int64UpDownCounter returns an UpDownCounter used to record int64
+// measurements that produces no telemetry.
+func (Meter) Int64UpDownCounter(string, ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error) {
+ return Int64UpDownCounter{}, nil
+}
+
+// Int64Histogram returns a Histogram used to record int64 measurements that
+// produces no telemetry.
+func (Meter) Int64Histogram(string, ...metric.Int64HistogramOption) (metric.Int64Histogram, error) {
+ return Int64Histogram{}, nil
+}
+
+// Int64Gauge returns a Gauge used to record int64 measurements that
+// produces no telemetry.
+func (Meter) Int64Gauge(string, ...metric.Int64GaugeOption) (metric.Int64Gauge, error) {
+ return Int64Gauge{}, nil
+}
+
+// Int64ObservableCounter returns an ObservableCounter used to record int64
+// measurements that produces no telemetry.
+func (Meter) Int64ObservableCounter(string, ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error) {
+ return Int64ObservableCounter{}, nil
+}
+
+// Int64ObservableUpDownCounter returns an ObservableUpDownCounter used to
+// record int64 measurements that produces no telemetry.
+func (Meter) Int64ObservableUpDownCounter(string, ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error) {
+ return Int64ObservableUpDownCounter{}, nil
+}
+
+// Int64ObservableGauge returns an ObservableGauge used to record int64
+// measurements that produces no telemetry.
+func (Meter) Int64ObservableGauge(string, ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error) {
+ return Int64ObservableGauge{}, nil
+}
+
+// Float64Counter returns a Counter used to record int64 measurements that
+// produces no telemetry.
+func (Meter) Float64Counter(string, ...metric.Float64CounterOption) (metric.Float64Counter, error) {
+ return Float64Counter{}, nil
+}
+
+// Float64UpDownCounter returns an UpDownCounter used to record int64
+// measurements that produces no telemetry.
+func (Meter) Float64UpDownCounter(string, ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error) {
+ return Float64UpDownCounter{}, nil
+}
+
+// Float64Histogram returns a Histogram used to record int64 measurements that
+// produces no telemetry.
+func (Meter) Float64Histogram(string, ...metric.Float64HistogramOption) (metric.Float64Histogram, error) {
+ return Float64Histogram{}, nil
+}
+
+// Float64Gauge returns a Gauge used to record float64 measurements that
+// produces no telemetry.
+func (Meter) Float64Gauge(string, ...metric.Float64GaugeOption) (metric.Float64Gauge, error) {
+ return Float64Gauge{}, nil
+}
+
+// Float64ObservableCounter returns an ObservableCounter used to record int64
+// measurements that produces no telemetry.
+func (Meter) Float64ObservableCounter(string, ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error) {
+ return Float64ObservableCounter{}, nil
+}
+
+// Float64ObservableUpDownCounter returns an ObservableUpDownCounter used to
+// record int64 measurements that produces no telemetry.
+func (Meter) Float64ObservableUpDownCounter(string, ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error) {
+ return Float64ObservableUpDownCounter{}, nil
+}
+
+// Float64ObservableGauge returns an ObservableGauge used to record int64
+// measurements that produces no telemetry.
+func (Meter) Float64ObservableGauge(string, ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error) {
+ return Float64ObservableGauge{}, nil
+}
+
+// RegisterCallback performs no operation.
+func (Meter) RegisterCallback(metric.Callback, ...metric.Observable) (metric.Registration, error) {
+ return Registration{}, nil
+}
+
+// Observer acts as a recorder of measurements for multiple instruments in a
+// Callback, it performing no operation.
+type Observer struct{ embedded.Observer }
+
+// ObserveFloat64 performs no operation.
+func (Observer) ObserveFloat64(metric.Float64Observable, float64, ...metric.ObserveOption) {
+}
+
+// ObserveInt64 performs no operation.
+func (Observer) ObserveInt64(metric.Int64Observable, int64, ...metric.ObserveOption) {
+}
+
+// Registration is the registration of a Callback with a No-Op Meter.
+type Registration struct{ embedded.Registration }
+
+// Unregister unregisters the Callback the Registration represents with the
+// No-Op Meter. This will always return nil because the No-Op Meter performs no
+// operation, including hold any record of registrations.
+func (Registration) Unregister() error { return nil }
+
+// Int64Counter is an OpenTelemetry Counter used to record int64 measurements.
+// It produces no telemetry.
+type Int64Counter struct{ embedded.Int64Counter }
+
+// Add performs no operation.
+func (Int64Counter) Add(context.Context, int64, ...metric.AddOption) {}
+
+// Float64Counter is an OpenTelemetry Counter used to record float64
+// measurements. It produces no telemetry.
+type Float64Counter struct{ embedded.Float64Counter }
+
+// Add performs no operation.
+func (Float64Counter) Add(context.Context, float64, ...metric.AddOption) {}
+
+// Int64UpDownCounter is an OpenTelemetry UpDownCounter used to record int64
+// measurements. It produces no telemetry.
+type Int64UpDownCounter struct{ embedded.Int64UpDownCounter }
+
+// Add performs no operation.
+func (Int64UpDownCounter) Add(context.Context, int64, ...metric.AddOption) {}
+
+// Float64UpDownCounter is an OpenTelemetry UpDownCounter used to record
+// float64 measurements. It produces no telemetry.
+type Float64UpDownCounter struct{ embedded.Float64UpDownCounter }
+
+// Add performs no operation.
+func (Float64UpDownCounter) Add(context.Context, float64, ...metric.AddOption) {}
+
+// Int64Histogram is an OpenTelemetry Histogram used to record int64
+// measurements. It produces no telemetry.
+type Int64Histogram struct{ embedded.Int64Histogram }
+
+// Record performs no operation.
+func (Int64Histogram) Record(context.Context, int64, ...metric.RecordOption) {}
+
+// Float64Histogram is an OpenTelemetry Histogram used to record float64
+// measurements. It produces no telemetry.
+type Float64Histogram struct{ embedded.Float64Histogram }
+
+// Record performs no operation.
+func (Float64Histogram) Record(context.Context, float64, ...metric.RecordOption) {}
+
+// Int64Gauge is an OpenTelemetry Gauge used to record instantaneous int64
+// measurements. It produces no telemetry.
+type Int64Gauge struct{ embedded.Int64Gauge }
+
+// Record performs no operation.
+func (Int64Gauge) Record(context.Context, int64, ...metric.RecordOption) {}
+
+// Float64Gauge is an OpenTelemetry Gauge used to record instantaneous float64
+// measurements. It produces no telemetry.
+type Float64Gauge struct{ embedded.Float64Gauge }
+
+// Record performs no operation.
+func (Float64Gauge) Record(context.Context, float64, ...metric.RecordOption) {}
+
+// Int64ObservableCounter is an OpenTelemetry ObservableCounter used to record
+// int64 measurements. It produces no telemetry.
+type Int64ObservableCounter struct {
+ metric.Int64Observable
+ embedded.Int64ObservableCounter
+}
+
+// Float64ObservableCounter is an OpenTelemetry ObservableCounter used to record
+// float64 measurements. It produces no telemetry.
+type Float64ObservableCounter struct {
+ metric.Float64Observable
+ embedded.Float64ObservableCounter
+}
+
+// Int64ObservableGauge is an OpenTelemetry ObservableGauge used to record
+// int64 measurements. It produces no telemetry.
+type Int64ObservableGauge struct {
+ metric.Int64Observable
+ embedded.Int64ObservableGauge
+}
+
+// Float64ObservableGauge is an OpenTelemetry ObservableGauge used to record
+// float64 measurements. It produces no telemetry.
+type Float64ObservableGauge struct {
+ metric.Float64Observable
+ embedded.Float64ObservableGauge
+}
+
+// Int64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter
+// used to record int64 measurements. It produces no telemetry.
+type Int64ObservableUpDownCounter struct {
+ metric.Int64Observable
+ embedded.Int64ObservableUpDownCounter
+}
+
+// Float64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter
+// used to record float64 measurements. It produces no telemetry.
+type Float64ObservableUpDownCounter struct {
+ metric.Float64Observable
+ embedded.Float64ObservableUpDownCounter
+}
+
+// Int64Observer is a recorder of int64 measurements that performs no operation.
+type Int64Observer struct{ embedded.Int64Observer }
+
+// Observe performs no operation.
+func (Int64Observer) Observe(int64, ...metric.ObserveOption) {}
+
+// Float64Observer is a recorder of float64 measurements that performs no
+// operation.
+type Float64Observer struct{ embedded.Float64Observer }
+
+// Observe performs no operation.
+func (Float64Observer) Observe(float64, ...metric.ObserveOption) {}
diff --git a/vendor/go.opentelemetry.io/otel/propagation.go b/vendor/go.opentelemetry.io/otel/propagation.go
new file mode 100644
index 00000000..2fd94973
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/propagation.go
@@ -0,0 +1,20 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otel // import "go.opentelemetry.io/otel"
+
+import (
+ "go.opentelemetry.io/otel/internal/global"
+ "go.opentelemetry.io/otel/propagation"
+)
+
+// GetTextMapPropagator returns the global TextMapPropagator. If none has been
+// set, a No-Op TextMapPropagator is returned.
+func GetTextMapPropagator() propagation.TextMapPropagator {
+ return global.TextMapPropagator()
+}
+
+// SetTextMapPropagator sets propagator as the global TextMapPropagator.
+func SetTextMapPropagator(propagator propagation.TextMapPropagator) {
+ global.SetTextMapPropagator(propagator)
+}
diff --git a/vendor/go.opentelemetry.io/otel/propagation/README.md b/vendor/go.opentelemetry.io/otel/propagation/README.md
new file mode 100644
index 00000000..e2959ac7
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/propagation/README.md
@@ -0,0 +1,3 @@
+# Propagation
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/propagation)
diff --git a/vendor/go.opentelemetry.io/otel/propagation/baggage.go b/vendor/go.opentelemetry.io/otel/propagation/baggage.go
new file mode 100644
index 00000000..552263ba
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/propagation/baggage.go
@@ -0,0 +1,47 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package propagation // import "go.opentelemetry.io/otel/propagation"
+
+import (
+ "context"
+
+ "go.opentelemetry.io/otel/baggage"
+)
+
+const baggageHeader = "baggage"
+
+// Baggage is a propagator that supports the W3C Baggage format.
+//
+// This propagates user-defined baggage associated with a trace. The complete
+// specification is defined at https://www.w3.org/TR/baggage/.
+type Baggage struct{}
+
+var _ TextMapPropagator = Baggage{}
+
+// Inject sets baggage key-values from ctx into the carrier.
+func (b Baggage) Inject(ctx context.Context, carrier TextMapCarrier) {
+ bStr := baggage.FromContext(ctx).String()
+ if bStr != "" {
+ carrier.Set(baggageHeader, bStr)
+ }
+}
+
+// Extract returns a copy of parent with the baggage from the carrier added.
+func (b Baggage) Extract(parent context.Context, carrier TextMapCarrier) context.Context {
+ bStr := carrier.Get(baggageHeader)
+ if bStr == "" {
+ return parent
+ }
+
+ bag, err := baggage.Parse(bStr)
+ if err != nil {
+ return parent
+ }
+ return baggage.ContextWithBaggage(parent, bag)
+}
+
+// Fields returns the keys who's values are set with Inject.
+func (b Baggage) Fields() []string {
+ return []string{baggageHeader}
+}
diff --git a/vendor/go.opentelemetry.io/otel/propagation/doc.go b/vendor/go.opentelemetry.io/otel/propagation/doc.go
new file mode 100644
index 00000000..33a3baf1
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/propagation/doc.go
@@ -0,0 +1,13 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package propagation contains OpenTelemetry context propagators.
+
+OpenTelemetry propagators are used to extract and inject context data from and
+into messages exchanged by applications. The propagator supported by this
+package is the W3C Trace Context encoding
+(https://www.w3.org/TR/trace-context/), and W3C Baggage
+(https://www.w3.org/TR/baggage/).
+*/
+package propagation // import "go.opentelemetry.io/otel/propagation"
diff --git a/vendor/go.opentelemetry.io/otel/propagation/propagation.go b/vendor/go.opentelemetry.io/otel/propagation/propagation.go
new file mode 100644
index 00000000..8c8286aa
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/propagation/propagation.go
@@ -0,0 +1,142 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package propagation // import "go.opentelemetry.io/otel/propagation"
+
+import (
+ "context"
+ "net/http"
+)
+
+// TextMapCarrier is the storage medium used by a TextMapPropagator.
+type TextMapCarrier interface {
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Get returns the value associated with the passed key.
+ Get(key string) string
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Set stores the key-value pair.
+ Set(key string, value string)
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Keys lists the keys stored in this carrier.
+ Keys() []string
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+}
+
+// MapCarrier is a TextMapCarrier that uses a map held in memory as a storage
+// medium for propagated key-value pairs.
+type MapCarrier map[string]string
+
+// Compile time check that MapCarrier implements the TextMapCarrier.
+var _ TextMapCarrier = MapCarrier{}
+
+// Get returns the value associated with the passed key.
+func (c MapCarrier) Get(key string) string {
+ return c[key]
+}
+
+// Set stores the key-value pair.
+func (c MapCarrier) Set(key, value string) {
+ c[key] = value
+}
+
+// Keys lists the keys stored in this carrier.
+func (c MapCarrier) Keys() []string {
+ keys := make([]string, 0, len(c))
+ for k := range c {
+ keys = append(keys, k)
+ }
+ return keys
+}
+
+// HeaderCarrier adapts http.Header to satisfy the TextMapCarrier interface.
+type HeaderCarrier http.Header
+
+// Get returns the value associated with the passed key.
+func (hc HeaderCarrier) Get(key string) string {
+ return http.Header(hc).Get(key)
+}
+
+// Set stores the key-value pair.
+func (hc HeaderCarrier) Set(key string, value string) {
+ http.Header(hc).Set(key, value)
+}
+
+// Keys lists the keys stored in this carrier.
+func (hc HeaderCarrier) Keys() []string {
+ keys := make([]string, 0, len(hc))
+ for k := range hc {
+ keys = append(keys, k)
+ }
+ return keys
+}
+
+// TextMapPropagator propagates cross-cutting concerns as key-value text
+// pairs within a carrier that travels in-band across process boundaries.
+type TextMapPropagator interface {
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Inject set cross-cutting concerns from the Context into the carrier.
+ Inject(ctx context.Context, carrier TextMapCarrier)
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Extract reads cross-cutting concerns from the carrier into a Context.
+ Extract(ctx context.Context, carrier TextMapCarrier) context.Context
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Fields returns the keys whose values are set with Inject.
+ Fields() []string
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+}
+
+type compositeTextMapPropagator []TextMapPropagator
+
+func (p compositeTextMapPropagator) Inject(ctx context.Context, carrier TextMapCarrier) {
+ for _, i := range p {
+ i.Inject(ctx, carrier)
+ }
+}
+
+func (p compositeTextMapPropagator) Extract(ctx context.Context, carrier TextMapCarrier) context.Context {
+ for _, i := range p {
+ ctx = i.Extract(ctx, carrier)
+ }
+ return ctx
+}
+
+func (p compositeTextMapPropagator) Fields() []string {
+ unique := make(map[string]struct{})
+ for _, i := range p {
+ for _, k := range i.Fields() {
+ unique[k] = struct{}{}
+ }
+ }
+
+ fields := make([]string, 0, len(unique))
+ for k := range unique {
+ fields = append(fields, k)
+ }
+ return fields
+}
+
+// NewCompositeTextMapPropagator returns a unified TextMapPropagator from the
+// group of passed TextMapPropagator. This allows different cross-cutting
+// concerns to be propagates in a unified manner.
+//
+// The returned TextMapPropagator will inject and extract cross-cutting
+// concerns in the order the TextMapPropagators were provided. Additionally,
+// the Fields method will return a de-duplicated slice of the keys that are
+// set with the Inject method.
+func NewCompositeTextMapPropagator(p ...TextMapPropagator) TextMapPropagator {
+ return compositeTextMapPropagator(p)
+}
diff --git a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go
new file mode 100644
index 00000000..6870e316
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go
@@ -0,0 +1,156 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package propagation // import "go.opentelemetry.io/otel/propagation"
+
+import (
+ "context"
+ "encoding/hex"
+ "fmt"
+ "strings"
+
+ "go.opentelemetry.io/otel/trace"
+)
+
+const (
+ supportedVersion = 0
+ maxVersion = 254
+ traceparentHeader = "traceparent"
+ tracestateHeader = "tracestate"
+ delimiter = "-"
+)
+
+// TraceContext is a propagator that supports the W3C Trace Context format
+// (https://www.w3.org/TR/trace-context/)
+//
+// This propagator will propagate the traceparent and tracestate headers to
+// guarantee traces are not broken. It is up to the users of this propagator
+// to choose if they want to participate in a trace by modifying the
+// traceparent header and relevant parts of the tracestate header containing
+// their proprietary information.
+type TraceContext struct{}
+
+var (
+ _ TextMapPropagator = TraceContext{}
+ versionPart = fmt.Sprintf("%.2X", supportedVersion)
+)
+
+// Inject injects the trace context from ctx into carrier.
+func (tc TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) {
+ sc := trace.SpanContextFromContext(ctx)
+ if !sc.IsValid() {
+ return
+ }
+
+ if ts := sc.TraceState().String(); ts != "" {
+ carrier.Set(tracestateHeader, ts)
+ }
+
+ // Clear all flags other than the trace-context supported sampling bit.
+ flags := sc.TraceFlags() & trace.FlagsSampled
+
+ var sb strings.Builder
+ sb.Grow(2 + 32 + 16 + 2 + 3)
+ _, _ = sb.WriteString(versionPart)
+ traceID := sc.TraceID()
+ spanID := sc.SpanID()
+ flagByte := [1]byte{byte(flags)}
+ var buf [32]byte
+ for _, src := range [][]byte{traceID[:], spanID[:], flagByte[:]} {
+ _ = sb.WriteByte(delimiter[0])
+ n := hex.Encode(buf[:], src)
+ _, _ = sb.Write(buf[:n])
+ }
+ carrier.Set(traceparentHeader, sb.String())
+}
+
+// Extract reads tracecontext from the carrier into a returned Context.
+//
+// The returned Context will be a copy of ctx and contain the extracted
+// tracecontext as the remote SpanContext. If the extracted tracecontext is
+// invalid, the passed ctx will be returned directly instead.
+func (tc TraceContext) Extract(ctx context.Context, carrier TextMapCarrier) context.Context {
+ sc := tc.extract(carrier)
+ if !sc.IsValid() {
+ return ctx
+ }
+ return trace.ContextWithRemoteSpanContext(ctx, sc)
+}
+
+func (tc TraceContext) extract(carrier TextMapCarrier) trace.SpanContext {
+ h := carrier.Get(traceparentHeader)
+ if h == "" {
+ return trace.SpanContext{}
+ }
+
+ var ver [1]byte
+ if !extractPart(ver[:], &h, 2) {
+ return trace.SpanContext{}
+ }
+ version := int(ver[0])
+ if version > maxVersion {
+ return trace.SpanContext{}
+ }
+
+ var scc trace.SpanContextConfig
+ if !extractPart(scc.TraceID[:], &h, 32) {
+ return trace.SpanContext{}
+ }
+ if !extractPart(scc.SpanID[:], &h, 16) {
+ return trace.SpanContext{}
+ }
+
+ var opts [1]byte
+ if !extractPart(opts[:], &h, 2) {
+ return trace.SpanContext{}
+ }
+ if version == 0 && (h != "" || opts[0] > 2) {
+ // version 0 not allow extra
+ // version 0 not allow other flag
+ return trace.SpanContext{}
+ }
+
+ // Clear all flags other than the trace-context supported sampling bit.
+ scc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled
+
+ // Ignore the error returned here. Failure to parse tracestate MUST NOT
+ // affect the parsing of traceparent according to the W3C tracecontext
+ // specification.
+ scc.TraceState, _ = trace.ParseTraceState(carrier.Get(tracestateHeader))
+ scc.Remote = true
+
+ sc := trace.NewSpanContext(scc)
+ if !sc.IsValid() {
+ return trace.SpanContext{}
+ }
+
+ return sc
+}
+
+// upperHex detect hex is upper case Unicode characters.
+func upperHex(v string) bool {
+ for _, c := range v {
+ if c >= 'A' && c <= 'F' {
+ return true
+ }
+ }
+ return false
+}
+
+func extractPart(dst []byte, h *string, n int) bool {
+ part, left, _ := strings.Cut(*h, delimiter)
+ *h = left
+ // hex.Decode decodes unsupported upper-case characters, so exclude explicitly.
+ if len(part) != n || upperHex(part) {
+ return false
+ }
+ if p, err := hex.Decode(dst, []byte(part)); err != nil || p != n/2 {
+ return false
+ }
+ return true
+}
+
+// Fields returns the keys who's values are set with Inject.
+func (tc TraceContext) Fields() []string {
+ return []string{traceparentHeader, tracestateHeader}
+}
diff --git a/vendor/go.opentelemetry.io/otel/renovate.json b/vendor/go.opentelemetry.io/otel/renovate.json
new file mode 100644
index 00000000..4f80c898
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/renovate.json
@@ -0,0 +1,26 @@
+{
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
+ "extends": [
+ "config:recommended"
+ ],
+ "ignorePaths": [],
+ "labels": ["Skip Changelog", "dependencies"],
+ "postUpdateOptions" : [
+ "gomodTidy"
+ ],
+ "packageRules": [
+ {
+ "matchManagers": ["gomod"],
+ "matchDepTypes": ["indirect"],
+ "enabled": true
+ },
+ {
+ "matchPackageNames": ["google.golang.org/genproto/googleapis/**"],
+ "groupName": "googleapis"
+ },
+ {
+ "matchPackageNames": ["golang.org/x/**"],
+ "groupName": "golang.org/x"
+ }
+ ]
+}
diff --git a/vendor/go.opentelemetry.io/otel/requirements.txt b/vendor/go.opentelemetry.io/otel/requirements.txt
new file mode 100644
index 00000000..ab09daf9
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/requirements.txt
@@ -0,0 +1 @@
+codespell==2.3.0
diff --git a/vendor/go.opentelemetry.io/otel/sdk/LICENSE b/vendor/go.opentelemetry.io/otel/sdk/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/go.opentelemetry.io/otel/sdk/README.md b/vendor/go.opentelemetry.io/otel/sdk/README.md
new file mode 100644
index 00000000..f81b1576
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/README.md
@@ -0,0 +1,3 @@
+# SDK
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/sdk)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/README.md b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/README.md
new file mode 100644
index 00000000..06e6d868
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/README.md
@@ -0,0 +1,3 @@
+# SDK Instrumentation
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/sdk/instrumentation)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/doc.go b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/doc.go
new file mode 100644
index 00000000..a4faa6a0
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/doc.go
@@ -0,0 +1,13 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package instrumentation provides types to represent the code libraries that
+// provide OpenTelemetry instrumentation. These types are used in the
+// OpenTelemetry signal pipelines to identify the source of telemetry.
+//
+// See
+// https://github.com/open-telemetry/oteps/blob/d226b677d73a785523fe9b9701be13225ebc528d/text/0083-component.md
+// and
+// https://github.com/open-telemetry/oteps/blob/d226b677d73a785523fe9b9701be13225ebc528d/text/0201-scope-attributes.md
+// for more information.
+package instrumentation // import "go.opentelemetry.io/otel/sdk/instrumentation"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go
new file mode 100644
index 00000000..f2cdf3c6
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package instrumentation // import "go.opentelemetry.io/otel/sdk/instrumentation"
+
+// Library represents the instrumentation library.
+//
+// Deprecated: use [Scope] instead.
+type Library = Scope
diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/scope.go b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/scope.go
new file mode 100644
index 00000000..34852a47
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/scope.go
@@ -0,0 +1,19 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package instrumentation // import "go.opentelemetry.io/otel/sdk/instrumentation"
+
+import "go.opentelemetry.io/otel/attribute"
+
+// Scope represents the instrumentation scope.
+type Scope struct {
+ // Name is the name of the instrumentation scope. This should be the
+ // Go package name of that scope.
+ Name string
+ // Version is the version of the instrumentation scope.
+ Version string
+ // SchemaURL of the telemetry emitted by the scope.
+ SchemaURL string
+ // Attributes of the telemetry emitted by the scope.
+ Attributes attribute.Set
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/env/env.go b/vendor/go.opentelemetry.io/otel/sdk/internal/env/env.go
new file mode 100644
index 00000000..07923ed8
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/internal/env/env.go
@@ -0,0 +1,166 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package env // import "go.opentelemetry.io/otel/sdk/internal/env"
+
+import (
+ "os"
+ "strconv"
+
+ "go.opentelemetry.io/otel/internal/global"
+)
+
+// Environment variable names.
+const (
+ // BatchSpanProcessorScheduleDelayKey is the delay interval between two
+ // consecutive exports (i.e. 5000).
+ BatchSpanProcessorScheduleDelayKey = "OTEL_BSP_SCHEDULE_DELAY"
+ // BatchSpanProcessorExportTimeoutKey is the maximum allowed time to
+ // export data (i.e. 3000).
+ BatchSpanProcessorExportTimeoutKey = "OTEL_BSP_EXPORT_TIMEOUT"
+ // BatchSpanProcessorMaxQueueSizeKey is the maximum queue size (i.e. 2048).
+ BatchSpanProcessorMaxQueueSizeKey = "OTEL_BSP_MAX_QUEUE_SIZE"
+ // BatchSpanProcessorMaxExportBatchSizeKey is the maximum batch size (i.e.
+ // 512). Note: it must be less than or equal to
+ // BatchSpanProcessorMaxQueueSize.
+ BatchSpanProcessorMaxExportBatchSizeKey = "OTEL_BSP_MAX_EXPORT_BATCH_SIZE"
+
+ // AttributeValueLengthKey is the maximum allowed attribute value size.
+ AttributeValueLengthKey = "OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT"
+
+ // AttributeCountKey is the maximum allowed span attribute count.
+ AttributeCountKey = "OTEL_ATTRIBUTE_COUNT_LIMIT"
+
+ // SpanAttributeValueLengthKey is the maximum allowed attribute value size
+ // for a span.
+ SpanAttributeValueLengthKey = "OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT"
+
+ // SpanAttributeCountKey is the maximum allowed span attribute count for a
+ // span.
+ SpanAttributeCountKey = "OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT"
+
+ // SpanEventCountKey is the maximum allowed span event count.
+ SpanEventCountKey = "OTEL_SPAN_EVENT_COUNT_LIMIT"
+
+ // SpanEventAttributeCountKey is the maximum allowed attribute per span
+ // event count.
+ SpanEventAttributeCountKey = "OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT"
+
+ // SpanLinkCountKey is the maximum allowed span link count.
+ SpanLinkCountKey = "OTEL_SPAN_LINK_COUNT_LIMIT"
+
+ // SpanLinkAttributeCountKey is the maximum allowed attribute per span
+ // link count.
+ SpanLinkAttributeCountKey = "OTEL_LINK_ATTRIBUTE_COUNT_LIMIT"
+)
+
+// firstInt returns the value of the first matching environment variable from
+// keys. If the value is not an integer or no match is found, defaultValue is
+// returned.
+func firstInt(defaultValue int, keys ...string) int {
+ for _, key := range keys {
+ value := os.Getenv(key)
+ if value == "" {
+ continue
+ }
+
+ intValue, err := strconv.Atoi(value)
+ if err != nil {
+ global.Info("Got invalid value, number value expected.", key, value)
+ return defaultValue
+ }
+
+ return intValue
+ }
+
+ return defaultValue
+}
+
+// IntEnvOr returns the int value of the environment variable with name key if
+// it exists, it is not empty, and the value is an int. Otherwise, defaultValue is returned.
+func IntEnvOr(key string, defaultValue int) int {
+ value := os.Getenv(key)
+ if value == "" {
+ return defaultValue
+ }
+
+ intValue, err := strconv.Atoi(value)
+ if err != nil {
+ global.Info("Got invalid value, number value expected.", key, value)
+ return defaultValue
+ }
+
+ return intValue
+}
+
+// BatchSpanProcessorScheduleDelay returns the environment variable value for
+// the OTEL_BSP_SCHEDULE_DELAY key if it exists, otherwise defaultValue is
+// returned.
+func BatchSpanProcessorScheduleDelay(defaultValue int) int {
+ return IntEnvOr(BatchSpanProcessorScheduleDelayKey, defaultValue)
+}
+
+// BatchSpanProcessorExportTimeout returns the environment variable value for
+// the OTEL_BSP_EXPORT_TIMEOUT key if it exists, otherwise defaultValue is
+// returned.
+func BatchSpanProcessorExportTimeout(defaultValue int) int {
+ return IntEnvOr(BatchSpanProcessorExportTimeoutKey, defaultValue)
+}
+
+// BatchSpanProcessorMaxQueueSize returns the environment variable value for
+// the OTEL_BSP_MAX_QUEUE_SIZE key if it exists, otherwise defaultValue is
+// returned.
+func BatchSpanProcessorMaxQueueSize(defaultValue int) int {
+ return IntEnvOr(BatchSpanProcessorMaxQueueSizeKey, defaultValue)
+}
+
+// BatchSpanProcessorMaxExportBatchSize returns the environment variable value for
+// the OTEL_BSP_MAX_EXPORT_BATCH_SIZE key if it exists, otherwise defaultValue
+// is returned.
+func BatchSpanProcessorMaxExportBatchSize(defaultValue int) int {
+ return IntEnvOr(BatchSpanProcessorMaxExportBatchSizeKey, defaultValue)
+}
+
+// SpanAttributeValueLength returns the environment variable value for the
+// OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT key if it exists. Otherwise, the
+// environment variable value for OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT is
+// returned or defaultValue if that is not set.
+func SpanAttributeValueLength(defaultValue int) int {
+ return firstInt(defaultValue, SpanAttributeValueLengthKey, AttributeValueLengthKey)
+}
+
+// SpanAttributeCount returns the environment variable value for the
+// OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT key if it exists. Otherwise, the
+// environment variable value for OTEL_ATTRIBUTE_COUNT_LIMIT is returned or
+// defaultValue if that is not set.
+func SpanAttributeCount(defaultValue int) int {
+ return firstInt(defaultValue, SpanAttributeCountKey, AttributeCountKey)
+}
+
+// SpanEventCount returns the environment variable value for the
+// OTEL_SPAN_EVENT_COUNT_LIMIT key if it exists, otherwise defaultValue is
+// returned.
+func SpanEventCount(defaultValue int) int {
+ return IntEnvOr(SpanEventCountKey, defaultValue)
+}
+
+// SpanEventAttributeCount returns the environment variable value for the
+// OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT key if it exists, otherwise defaultValue
+// is returned.
+func SpanEventAttributeCount(defaultValue int) int {
+ return IntEnvOr(SpanEventAttributeCountKey, defaultValue)
+}
+
+// SpanLinkCount returns the environment variable value for the
+// OTEL_SPAN_LINK_COUNT_LIMIT key if it exists, otherwise defaultValue is
+// returned.
+func SpanLinkCount(defaultValue int) int {
+ return IntEnvOr(SpanLinkCountKey, defaultValue)
+}
+
+// SpanLinkAttributeCount returns the environment variable value for the
+// OTEL_LINK_ATTRIBUTE_COUNT_LIMIT key if it exists, otherwise defaultValue is
+// returned.
+func SpanLinkAttributeCount(defaultValue int) int {
+ return IntEnvOr(SpanLinkAttributeCountKey, defaultValue)
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/x/README.md b/vendor/go.opentelemetry.io/otel/sdk/internal/x/README.md
new file mode 100644
index 00000000..fab61647
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/internal/x/README.md
@@ -0,0 +1,46 @@
+# Experimental Features
+
+The SDK contains features that have not yet stabilized in the OpenTelemetry specification.
+These features are added to the OpenTelemetry Go SDK prior to stabilization in the specification so that users can start experimenting with them and provide feedback.
+
+These feature may change in backwards incompatible ways as feedback is applied.
+See the [Compatibility and Stability](#compatibility-and-stability) section for more information.
+
+## Features
+
+- [Resource](#resource)
+
+### Resource
+
+[OpenTelemetry resource semantic conventions] include many attribute definitions that are defined as experimental.
+To have experimental semantic conventions be added by [resource detectors] set the `OTEL_GO_X_RESOURCE` environment variable.
+The value set must be the case-insensitive string of `"true"` to enable the feature.
+All other values are ignored.
+
+
+
+[OpenTelemetry resource semantic conventions]: https://opentelemetry.io/docs/specs/semconv/resource/
+[resource detectors]: https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource#Detector
+
+#### Examples
+
+Enable experimental resource semantic conventions.
+
+```console
+export OTEL_GO_X_RESOURCE=true
+```
+
+Disable experimental resource semantic conventions.
+
+```console
+unset OTEL_GO_X_RESOURCE
+```
+
+## Compatibility and Stability
+
+Experimental features do not fall within the scope of the OpenTelemetry Go versioning and stability [policy](../../../VERSIONING.md).
+These features may be removed or modified in successive version releases, including patch versions.
+
+When an experimental feature is promoted to a stable feature, a migration path will be included in the changelog entry of the release.
+There is no guarantee that any environment variable feature flags that enabled the experimental feature will be supported by the stable version.
+If they are supported, they may be accompanied with a deprecation notice stating a timeline for the removal of that support.
diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go b/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go
new file mode 100644
index 00000000..68d296cb
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go
@@ -0,0 +1,66 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package x contains support for OTel SDK experimental features.
+//
+// This package should only be used for features defined in the specification.
+// It should not be used for experiments or new project ideas.
+package x // import "go.opentelemetry.io/otel/sdk/internal/x"
+
+import (
+ "os"
+ "strings"
+)
+
+// Resource is an experimental feature flag that defines if resource detectors
+// should be included experimental semantic conventions.
+//
+// To enable this feature set the OTEL_GO_X_RESOURCE environment variable
+// to the case-insensitive string value of "true" (i.e. "True" and "TRUE"
+// will also enable this).
+var Resource = newFeature("RESOURCE", func(v string) (string, bool) {
+ if strings.ToLower(v) == "true" {
+ return v, true
+ }
+ return "", false
+})
+
+// Feature is an experimental feature control flag. It provides a uniform way
+// to interact with these feature flags and parse their values.
+type Feature[T any] struct {
+ key string
+ parse func(v string) (T, bool)
+}
+
+func newFeature[T any](suffix string, parse func(string) (T, bool)) Feature[T] {
+ const envKeyRoot = "OTEL_GO_X_"
+ return Feature[T]{
+ key: envKeyRoot + suffix,
+ parse: parse,
+ }
+}
+
+// Key returns the environment variable key that needs to be set to enable the
+// feature.
+func (f Feature[T]) Key() string { return f.key }
+
+// Lookup returns the user configured value for the feature and true if the
+// user has enabled the feature. Otherwise, if the feature is not enabled, a
+// zero-value and false are returned.
+func (f Feature[T]) Lookup() (v T, ok bool) {
+ // https://github.com/open-telemetry/opentelemetry-specification/blob/62effed618589a0bec416a87e559c0a9d96289bb/specification/configuration/sdk-environment-variables.md#parsing-empty-value
+ //
+ // > The SDK MUST interpret an empty value of an environment variable the
+ // > same way as when the variable is unset.
+ vRaw := os.Getenv(f.key)
+ if vRaw == "" {
+ return v, ok
+ }
+ return f.parse(vRaw)
+}
+
+// Enabled returns if the feature is enabled.
+func (f Feature[T]) Enabled() bool {
+ _, ok := f.Lookup()
+ return ok
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/README.md b/vendor/go.opentelemetry.io/otel/sdk/resource/README.md
new file mode 100644
index 00000000..4ad864d7
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/README.md
@@ -0,0 +1,3 @@
+# SDK Resource
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/auto.go b/vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
new file mode 100644
index 00000000..c02aeefd
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/auto.go
@@ -0,0 +1,92 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "context"
+ "errors"
+ "fmt"
+)
+
+// ErrPartialResource is returned by a detector when complete source
+// information for a Resource is unavailable or the source information
+// contains invalid values that are omitted from the returned Resource.
+var ErrPartialResource = errors.New("partial resource")
+
+// Detector detects OpenTelemetry resource information.
+type Detector interface {
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Detect returns an initialized Resource based on gathered information.
+ // If the source information to construct a Resource contains invalid
+ // values, a Resource is returned with the valid parts of the source
+ // information used for initialization along with an appropriately
+ // wrapped ErrPartialResource error.
+ Detect(ctx context.Context) (*Resource, error)
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+}
+
+// Detect returns a new [Resource] merged from all the Resources each of the
+// detectors produces. Each of the detectors are called sequentially, in the
+// order they are passed, merging the produced resource into the previous.
+//
+// This may return a partial Resource along with an error containing
+// [ErrPartialResource] if that error is returned from a detector. It may also
+// return a merge-conflicting Resource along with an error containing
+// [ErrSchemaURLConflict] if merging Resources from different detectors results
+// in a schema URL conflict. It is up to the caller to determine if this
+// returned Resource should be used or not.
+//
+// If one of the detectors returns an error that is not [ErrPartialResource],
+// the resource produced by the detector will not be merged and the returned
+// error will wrap that detector's error.
+func Detect(ctx context.Context, detectors ...Detector) (*Resource, error) {
+ r := new(Resource)
+ return r, detect(ctx, r, detectors)
+}
+
+// detect runs all detectors using ctx and merges the result into res. This
+// assumes res is allocated and not nil, it will panic otherwise.
+//
+// If the detectors or merging resources produces any errors (i.e.
+// [ErrPartialResource] [ErrSchemaURLConflict]), a single error wrapping all of
+// these errors will be returned. Otherwise, nil is returned.
+func detect(ctx context.Context, res *Resource, detectors []Detector) error {
+ var (
+ r *Resource
+ err error
+ e error
+ )
+
+ for _, detector := range detectors {
+ if detector == nil {
+ continue
+ }
+ r, e = detector.Detect(ctx)
+ if e != nil {
+ err = errors.Join(err, e)
+ if !errors.Is(e, ErrPartialResource) {
+ continue
+ }
+ }
+ r, e = Merge(res, r)
+ if e != nil {
+ err = errors.Join(err, e)
+ }
+ *res = *r
+ }
+
+ if err != nil {
+ if errors.Is(err, ErrSchemaURLConflict) {
+ // If there has been a merge conflict, ensure the resource has no
+ // schema URL.
+ res.schemaURL = ""
+ }
+
+ err = fmt.Errorf("error detecting resource: %w", err)
+ }
+ return err
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
new file mode 100644
index 00000000..cf3c88e1
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go
@@ -0,0 +1,116 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "path/filepath"
+
+ "github.com/google/uuid"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/sdk"
+ semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+)
+
+type (
+ // telemetrySDK is a Detector that provides information about
+ // the OpenTelemetry SDK used. This Detector is included as a
+ // builtin. If these resource attributes are not wanted, use
+ // resource.New() to explicitly disable them.
+ telemetrySDK struct{}
+
+ // host is a Detector that provides information about the host
+ // being run on. This Detector is included as a builtin. If
+ // these resource attributes are not wanted, use the
+ // resource.New() to explicitly disable them.
+ host struct{}
+
+ stringDetector struct {
+ schemaURL string
+ K attribute.Key
+ F func() (string, error)
+ }
+
+ defaultServiceNameDetector struct{}
+
+ defaultServiceInstanceIDDetector struct{}
+)
+
+var (
+ _ Detector = telemetrySDK{}
+ _ Detector = host{}
+ _ Detector = stringDetector{}
+ _ Detector = defaultServiceNameDetector{}
+ _ Detector = defaultServiceInstanceIDDetector{}
+)
+
+// Detect returns a *Resource that describes the OpenTelemetry SDK used.
+func (telemetrySDK) Detect(context.Context) (*Resource, error) {
+ return NewWithAttributes(
+ semconv.SchemaURL,
+ semconv.TelemetrySDKName("opentelemetry"),
+ semconv.TelemetrySDKLanguageGo,
+ semconv.TelemetrySDKVersion(sdk.Version()),
+ ), nil
+}
+
+// Detect returns a *Resource that describes the host being run on.
+func (host) Detect(ctx context.Context) (*Resource, error) {
+ return StringDetector(semconv.SchemaURL, semconv.HostNameKey, os.Hostname).Detect(ctx)
+}
+
+// StringDetector returns a Detector that will produce a *Resource
+// containing the string as a value corresponding to k. The resulting Resource
+// will have the specified schemaURL.
+func StringDetector(schemaURL string, k attribute.Key, f func() (string, error)) Detector {
+ return stringDetector{schemaURL: schemaURL, K: k, F: f}
+}
+
+// Detect returns a *Resource that describes the string as a value
+// corresponding to attribute.Key as well as the specific schemaURL.
+func (sd stringDetector) Detect(ctx context.Context) (*Resource, error) {
+ value, err := sd.F()
+ if err != nil {
+ return nil, fmt.Errorf("%s: %w", string(sd.K), err)
+ }
+ a := sd.K.String(value)
+ if !a.Valid() {
+ return nil, fmt.Errorf("invalid attribute: %q -> %q", a.Key, a.Value.Emit())
+ }
+ return NewWithAttributes(sd.schemaURL, sd.K.String(value)), nil
+}
+
+// Detect implements Detector.
+func (defaultServiceNameDetector) Detect(ctx context.Context) (*Resource, error) {
+ return StringDetector(
+ semconv.SchemaURL,
+ semconv.ServiceNameKey,
+ func() (string, error) {
+ executable, err := os.Executable()
+ if err != nil {
+ return "unknown_service:go", nil
+ }
+ return "unknown_service:" + filepath.Base(executable), nil
+ },
+ ).Detect(ctx)
+}
+
+// Detect implements Detector.
+func (defaultServiceInstanceIDDetector) Detect(ctx context.Context) (*Resource, error) {
+ return StringDetector(
+ semconv.SchemaURL,
+ semconv.ServiceInstanceIDKey,
+ func() (string, error) {
+ version4Uuid, err := uuid.NewRandom()
+ if err != nil {
+ return "", err
+ }
+
+ return version4Uuid.String(), nil
+ },
+ ).Detect(ctx)
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/config.go b/vendor/go.opentelemetry.io/otel/sdk/resource/config.go
new file mode 100644
index 00000000..0d6e213d
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/config.go
@@ -0,0 +1,195 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "context"
+
+ "go.opentelemetry.io/otel/attribute"
+)
+
+// config contains configuration for Resource creation.
+type config struct {
+ // detectors that will be evaluated.
+ detectors []Detector
+ // SchemaURL to associate with the Resource.
+ schemaURL string
+}
+
+// Option is the interface that applies a configuration option.
+type Option interface {
+ // apply sets the Option value of a config.
+ apply(config) config
+}
+
+// WithAttributes adds attributes to the configured Resource.
+func WithAttributes(attributes ...attribute.KeyValue) Option {
+ return WithDetectors(detectAttributes{attributes})
+}
+
+type detectAttributes struct {
+ attributes []attribute.KeyValue
+}
+
+func (d detectAttributes) Detect(context.Context) (*Resource, error) {
+ return NewSchemaless(d.attributes...), nil
+}
+
+// WithDetectors adds detectors to be evaluated for the configured resource.
+func WithDetectors(detectors ...Detector) Option {
+ return detectorsOption{detectors: detectors}
+}
+
+type detectorsOption struct {
+ detectors []Detector
+}
+
+func (o detectorsOption) apply(cfg config) config {
+ cfg.detectors = append(cfg.detectors, o.detectors...)
+ return cfg
+}
+
+// WithFromEnv adds attributes from environment variables to the configured resource.
+func WithFromEnv() Option {
+ return WithDetectors(fromEnv{})
+}
+
+// WithHost adds attributes from the host to the configured resource.
+func WithHost() Option {
+ return WithDetectors(host{})
+}
+
+// WithHostID adds host ID information to the configured resource.
+func WithHostID() Option {
+ return WithDetectors(hostIDDetector{})
+}
+
+// WithTelemetrySDK adds TelemetrySDK version info to the configured resource.
+func WithTelemetrySDK() Option {
+ return WithDetectors(telemetrySDK{})
+}
+
+// WithSchemaURL sets the schema URL for the configured resource.
+func WithSchemaURL(schemaURL string) Option {
+ return schemaURLOption(schemaURL)
+}
+
+type schemaURLOption string
+
+func (o schemaURLOption) apply(cfg config) config {
+ cfg.schemaURL = string(o)
+ return cfg
+}
+
+// WithOS adds all the OS attributes to the configured Resource.
+// See individual WithOS* functions to configure specific attributes.
+func WithOS() Option {
+ return WithDetectors(
+ osTypeDetector{},
+ osDescriptionDetector{},
+ )
+}
+
+// WithOSType adds an attribute with the operating system type to the configured Resource.
+func WithOSType() Option {
+ return WithDetectors(osTypeDetector{})
+}
+
+// WithOSDescription adds an attribute with the operating system description to the
+// configured Resource. The formatted string is equivalent to the output of the
+// `uname -snrvm` command.
+func WithOSDescription() Option {
+ return WithDetectors(osDescriptionDetector{})
+}
+
+// WithProcess adds all the Process attributes to the configured Resource.
+//
+// Warning! This option will include process command line arguments. If these
+// contain sensitive information it will be included in the exported resource.
+//
+// This option is equivalent to calling WithProcessPID,
+// WithProcessExecutableName, WithProcessExecutablePath,
+// WithProcessCommandArgs, WithProcessOwner, WithProcessRuntimeName,
+// WithProcessRuntimeVersion, and WithProcessRuntimeDescription. See each
+// option function for information about what resource attributes each
+// includes.
+func WithProcess() Option {
+ return WithDetectors(
+ processPIDDetector{},
+ processExecutableNameDetector{},
+ processExecutablePathDetector{},
+ processCommandArgsDetector{},
+ processOwnerDetector{},
+ processRuntimeNameDetector{},
+ processRuntimeVersionDetector{},
+ processRuntimeDescriptionDetector{},
+ )
+}
+
+// WithProcessPID adds an attribute with the process identifier (PID) to the
+// configured Resource.
+func WithProcessPID() Option {
+ return WithDetectors(processPIDDetector{})
+}
+
+// WithProcessExecutableName adds an attribute with the name of the process
+// executable to the configured Resource.
+func WithProcessExecutableName() Option {
+ return WithDetectors(processExecutableNameDetector{})
+}
+
+// WithProcessExecutablePath adds an attribute with the full path to the process
+// executable to the configured Resource.
+func WithProcessExecutablePath() Option {
+ return WithDetectors(processExecutablePathDetector{})
+}
+
+// WithProcessCommandArgs adds an attribute with all the command arguments (including
+// the command/executable itself) as received by the process to the configured
+// Resource.
+//
+// Warning! This option will include process command line arguments. If these
+// contain sensitive information it will be included in the exported resource.
+func WithProcessCommandArgs() Option {
+ return WithDetectors(processCommandArgsDetector{})
+}
+
+// WithProcessOwner adds an attribute with the username of the user that owns the process
+// to the configured Resource.
+func WithProcessOwner() Option {
+ return WithDetectors(processOwnerDetector{})
+}
+
+// WithProcessRuntimeName adds an attribute with the name of the runtime of this
+// process to the configured Resource.
+func WithProcessRuntimeName() Option {
+ return WithDetectors(processRuntimeNameDetector{})
+}
+
+// WithProcessRuntimeVersion adds an attribute with the version of the runtime of
+// this process to the configured Resource.
+func WithProcessRuntimeVersion() Option {
+ return WithDetectors(processRuntimeVersionDetector{})
+}
+
+// WithProcessRuntimeDescription adds an attribute with an additional description
+// about the runtime of the process to the configured Resource.
+func WithProcessRuntimeDescription() Option {
+ return WithDetectors(processRuntimeDescriptionDetector{})
+}
+
+// WithContainer adds all the Container attributes to the configured Resource.
+// See individual WithContainer* functions to configure specific attributes.
+func WithContainer() Option {
+ return WithDetectors(
+ cgroupContainerIDDetector{},
+ )
+}
+
+// WithContainerID adds an attribute with the id of the container to the configured Resource.
+// Note: WithContainerID will not extract the correct container ID in an ECS environment.
+// Please use the ECS resource detector instead (https://pkg.go.dev/go.opentelemetry.io/contrib/detectors/aws/ecs).
+func WithContainerID() Option {
+ return WithDetectors(cgroupContainerIDDetector{})
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/container.go b/vendor/go.opentelemetry.io/otel/sdk/resource/container.go
new file mode 100644
index 00000000..5ecd859a
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/container.go
@@ -0,0 +1,89 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "bufio"
+ "context"
+ "errors"
+ "io"
+ "os"
+ "regexp"
+
+ semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+)
+
+type containerIDProvider func() (string, error)
+
+var (
+ containerID containerIDProvider = getContainerIDFromCGroup
+ cgroupContainerIDRe = regexp.MustCompile(`^.*/(?:.*[-:])?([0-9a-f]+)(?:\.|\s*$)`)
+)
+
+type cgroupContainerIDDetector struct{}
+
+const cgroupPath = "/proc/self/cgroup"
+
+// Detect returns a *Resource that describes the id of the container.
+// If no container id found, an empty resource will be returned.
+func (cgroupContainerIDDetector) Detect(ctx context.Context) (*Resource, error) {
+ containerID, err := containerID()
+ if err != nil {
+ return nil, err
+ }
+
+ if containerID == "" {
+ return Empty(), nil
+ }
+ return NewWithAttributes(semconv.SchemaURL, semconv.ContainerID(containerID)), nil
+}
+
+var (
+ defaultOSStat = os.Stat
+ osStat = defaultOSStat
+
+ defaultOSOpen = func(name string) (io.ReadCloser, error) {
+ return os.Open(name)
+ }
+ osOpen = defaultOSOpen
+)
+
+// getContainerIDFromCGroup returns the id of the container from the cgroup file.
+// If no container id found, an empty string will be returned.
+func getContainerIDFromCGroup() (string, error) {
+ if _, err := osStat(cgroupPath); errors.Is(err, os.ErrNotExist) {
+ // File does not exist, skip
+ return "", nil
+ }
+
+ file, err := osOpen(cgroupPath)
+ if err != nil {
+ return "", err
+ }
+ defer file.Close()
+
+ return getContainerIDFromReader(file), nil
+}
+
+// getContainerIDFromReader returns the id of the container from reader.
+func getContainerIDFromReader(reader io.Reader) string {
+ scanner := bufio.NewScanner(reader)
+ for scanner.Scan() {
+ line := scanner.Text()
+
+ if id := getContainerIDFromLine(line); id != "" {
+ return id
+ }
+ }
+ return ""
+}
+
+// getContainerIDFromLine returns the id of the container from one string line.
+func getContainerIDFromLine(line string) string {
+ matches := cgroupContainerIDRe.FindStringSubmatch(line)
+ if len(matches) <= 1 {
+ return ""
+ }
+ return matches[1]
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/doc.go b/vendor/go.opentelemetry.io/otel/sdk/resource/doc.go
new file mode 100644
index 00000000..64939a27
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/doc.go
@@ -0,0 +1,20 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package resource provides detecting and representing resources.
+//
+// The fundamental struct is a Resource which holds identifying information
+// about the entities for which telemetry is exported.
+//
+// To automatically construct Resources from an environment a Detector
+// interface is defined. Implementations of this interface can be passed to
+// the Detect function to generate a Resource from the merged information.
+//
+// To load a user defined Resource from the environment variable
+// OTEL_RESOURCE_ATTRIBUTES the FromEnv Detector can be used. It will interpret
+// the value as a list of comma delimited key/value pairs
+// (e.g. `=,=,...`).
+//
+// While this package provides a stable API,
+// the attributes added by resource detectors may change.
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/env.go b/vendor/go.opentelemetry.io/otel/sdk/resource/env.go
new file mode 100644
index 00000000..813f0562
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/env.go
@@ -0,0 +1,95 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "context"
+ "fmt"
+ "net/url"
+ "os"
+ "strings"
+
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/attribute"
+ semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+)
+
+const (
+ // resourceAttrKey is the environment variable name OpenTelemetry Resource information will be read from.
+ resourceAttrKey = "OTEL_RESOURCE_ATTRIBUTES" //nolint:gosec // False positive G101: Potential hardcoded credentials
+
+ // svcNameKey is the environment variable name that Service Name information will be read from.
+ svcNameKey = "OTEL_SERVICE_NAME"
+)
+
+// errMissingValue is returned when a resource value is missing.
+var errMissingValue = fmt.Errorf("%w: missing value", ErrPartialResource)
+
+// fromEnv is a Detector that implements the Detector and collects
+// resources from environment. This Detector is included as a
+// builtin.
+type fromEnv struct{}
+
+// compile time assertion that FromEnv implements Detector interface.
+var _ Detector = fromEnv{}
+
+// Detect collects resources from environment.
+func (fromEnv) Detect(context.Context) (*Resource, error) {
+ attrs := strings.TrimSpace(os.Getenv(resourceAttrKey))
+ svcName := strings.TrimSpace(os.Getenv(svcNameKey))
+
+ if attrs == "" && svcName == "" {
+ return Empty(), nil
+ }
+
+ var res *Resource
+
+ if svcName != "" {
+ res = NewSchemaless(semconv.ServiceName(svcName))
+ }
+
+ r2, err := constructOTResources(attrs)
+
+ // Ensure that the resource with the service name from OTEL_SERVICE_NAME
+ // takes precedence, if it was defined.
+ res, err2 := Merge(r2, res)
+
+ if err == nil {
+ err = err2
+ } else if err2 != nil {
+ err = fmt.Errorf("detecting resources: %s", []string{err.Error(), err2.Error()})
+ }
+
+ return res, err
+}
+
+func constructOTResources(s string) (*Resource, error) {
+ if s == "" {
+ return Empty(), nil
+ }
+ pairs := strings.Split(s, ",")
+ var attrs []attribute.KeyValue
+ var invalid []string
+ for _, p := range pairs {
+ k, v, found := strings.Cut(p, "=")
+ if !found {
+ invalid = append(invalid, p)
+ continue
+ }
+ key := strings.TrimSpace(k)
+ val, err := url.PathUnescape(strings.TrimSpace(v))
+ if err != nil {
+ // Retain original value if decoding fails, otherwise it will be
+ // an empty string.
+ val = v
+ otel.Handle(err)
+ }
+ attrs = append(attrs, attribute.String(key, val))
+ }
+ var err error
+ if len(invalid) > 0 {
+ err = fmt.Errorf("%w: %v", errMissingValue, invalid)
+ }
+ return NewSchemaless(attrs...), err
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
new file mode 100644
index 00000000..2d0f6549
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
@@ -0,0 +1,109 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "context"
+ "errors"
+ "strings"
+
+ semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+)
+
+type hostIDProvider func() (string, error)
+
+var defaultHostIDProvider hostIDProvider = platformHostIDReader.read
+
+var hostID = defaultHostIDProvider
+
+type hostIDReader interface {
+ read() (string, error)
+}
+
+type fileReader func(string) (string, error)
+
+type commandExecutor func(string, ...string) (string, error)
+
+// hostIDReaderBSD implements hostIDReader.
+type hostIDReaderBSD struct {
+ execCommand commandExecutor
+ readFile fileReader
+}
+
+// read attempts to read the machine-id from /etc/hostid. If not found it will
+// execute `kenv -q smbios.system.uuid`. If neither location yields an id an
+// error will be returned.
+func (r *hostIDReaderBSD) read() (string, error) {
+ if result, err := r.readFile("/etc/hostid"); err == nil {
+ return strings.TrimSpace(result), nil
+ }
+
+ if result, err := r.execCommand("kenv", "-q", "smbios.system.uuid"); err == nil {
+ return strings.TrimSpace(result), nil
+ }
+
+ return "", errors.New("host id not found in: /etc/hostid or kenv")
+}
+
+// hostIDReaderDarwin implements hostIDReader.
+type hostIDReaderDarwin struct {
+ execCommand commandExecutor
+}
+
+// read executes `ioreg -rd1 -c "IOPlatformExpertDevice"` and parses host id
+// from the IOPlatformUUID line. If the command fails or the uuid cannot be
+// parsed an error will be returned.
+func (r *hostIDReaderDarwin) read() (string, error) {
+ result, err := r.execCommand("ioreg", "-rd1", "-c", "IOPlatformExpertDevice")
+ if err != nil {
+ return "", err
+ }
+
+ lines := strings.Split(result, "\n")
+ for _, line := range lines {
+ if strings.Contains(line, "IOPlatformUUID") {
+ parts := strings.Split(line, " = ")
+ if len(parts) == 2 {
+ return strings.Trim(parts[1], "\""), nil
+ }
+ break
+ }
+ }
+
+ return "", errors.New("could not parse IOPlatformUUID")
+}
+
+type hostIDReaderLinux struct {
+ readFile fileReader
+}
+
+// read attempts to read the machine-id from /etc/machine-id followed by
+// /var/lib/dbus/machine-id. If neither location yields an ID an error will
+// be returned.
+func (r *hostIDReaderLinux) read() (string, error) {
+ if result, err := r.readFile("/etc/machine-id"); err == nil {
+ return strings.TrimSpace(result), nil
+ }
+
+ if result, err := r.readFile("/var/lib/dbus/machine-id"); err == nil {
+ return strings.TrimSpace(result), nil
+ }
+
+ return "", errors.New("host id not found in: /etc/machine-id or /var/lib/dbus/machine-id")
+}
+
+type hostIDDetector struct{}
+
+// Detect returns a *Resource containing the platform specific host id.
+func (hostIDDetector) Detect(ctx context.Context) (*Resource, error) {
+ hostID, err := hostID()
+ if err != nil {
+ return nil, err
+ }
+
+ return NewWithAttributes(
+ semconv.SchemaURL,
+ semconv.HostID(hostID),
+ ), nil
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go
new file mode 100644
index 00000000..cc8b8938
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go
@@ -0,0 +1,12 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+//go:build dragonfly || freebsd || netbsd || openbsd || solaris
+// +build dragonfly freebsd netbsd openbsd solaris
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+var platformHostIDReader hostIDReader = &hostIDReaderBSD{
+ execCommand: execCommand,
+ readFile: readFile,
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_darwin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_darwin.go
new file mode 100644
index 00000000..b09fde3b
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_darwin.go
@@ -0,0 +1,8 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+var platformHostIDReader hostIDReader = &hostIDReaderDarwin{
+ execCommand: execCommand,
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go
new file mode 100644
index 00000000..d9e5d1a8
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go
@@ -0,0 +1,18 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+//go:build darwin || dragonfly || freebsd || netbsd || openbsd || solaris
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import "os/exec"
+
+func execCommand(name string, arg ...string) (string, error) {
+ cmd := exec.Command(name, arg...)
+ b, err := cmd.Output()
+ if err != nil {
+ return "", err
+ }
+
+ return string(b), nil
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go
new file mode 100644
index 00000000..f84f1732
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go
@@ -0,0 +1,11 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+//go:build linux
+// +build linux
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+var platformHostIDReader hostIDReader = &hostIDReaderLinux{
+ readFile: readFile,
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_readfile.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_readfile.go
new file mode 100644
index 00000000..6354b356
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_readfile.go
@@ -0,0 +1,17 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+//go:build linux || dragonfly || freebsd || netbsd || openbsd || solaris
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import "os"
+
+func readFile(filename string) (string, error) {
+ b, err := os.ReadFile(filename)
+ if err != nil {
+ return "", err
+ }
+
+ return string(b), nil
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go
new file mode 100644
index 00000000..df12c44c
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go
@@ -0,0 +1,19 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+// hostIDReaderUnsupported is a placeholder implementation for operating systems
+// for which this project currently doesn't support host.id
+// attribute detection. See build tags declaration early on this file
+// for a list of unsupported OSes.
+type hostIDReaderUnsupported struct{}
+
+func (*hostIDReaderUnsupported) read() (string, error) {
+ return "", nil
+}
+
+var platformHostIDReader hostIDReader = &hostIDReaderUnsupported{}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go
new file mode 100644
index 00000000..3677c83d
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go
@@ -0,0 +1,36 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+//go:build windows
+// +build windows
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "golang.org/x/sys/windows/registry"
+)
+
+// implements hostIDReader.
+type hostIDReaderWindows struct{}
+
+// read reads MachineGuid from the Windows registry key:
+// SOFTWARE\Microsoft\Cryptography.
+func (*hostIDReaderWindows) read() (string, error) {
+ k, err := registry.OpenKey(
+ registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Cryptography`,
+ registry.QUERY_VALUE|registry.WOW64_64KEY,
+ )
+ if err != nil {
+ return "", err
+ }
+ defer k.Close()
+
+ guid, _, err := k.GetStringValue("MachineGuid")
+ if err != nil {
+ return "", err
+ }
+
+ return guid, nil
+}
+
+var platformHostIDReader hostIDReader = &hostIDReaderWindows{}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os.go
new file mode 100644
index 00000000..8a48ab4f
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os.go
@@ -0,0 +1,89 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "context"
+ "strings"
+
+ "go.opentelemetry.io/otel/attribute"
+ semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+)
+
+type osDescriptionProvider func() (string, error)
+
+var defaultOSDescriptionProvider osDescriptionProvider = platformOSDescription
+
+var osDescription = defaultOSDescriptionProvider
+
+func setDefaultOSDescriptionProvider() {
+ setOSDescriptionProvider(defaultOSDescriptionProvider)
+}
+
+func setOSDescriptionProvider(osDescriptionProvider osDescriptionProvider) {
+ osDescription = osDescriptionProvider
+}
+
+type (
+ osTypeDetector struct{}
+ osDescriptionDetector struct{}
+)
+
+// Detect returns a *Resource that describes the operating system type the
+// service is running on.
+func (osTypeDetector) Detect(ctx context.Context) (*Resource, error) {
+ osType := runtimeOS()
+
+ osTypeAttribute := mapRuntimeOSToSemconvOSType(osType)
+
+ return NewWithAttributes(
+ semconv.SchemaURL,
+ osTypeAttribute,
+ ), nil
+}
+
+// Detect returns a *Resource that describes the operating system the
+// service is running on.
+func (osDescriptionDetector) Detect(ctx context.Context) (*Resource, error) {
+ description, err := osDescription()
+ if err != nil {
+ return nil, err
+ }
+
+ return NewWithAttributes(
+ semconv.SchemaURL,
+ semconv.OSDescription(description),
+ ), nil
+}
+
+// mapRuntimeOSToSemconvOSType translates the OS name as provided by the Go runtime
+// into an OS type attribute with the corresponding value defined by the semantic
+// conventions. In case the provided OS name isn't mapped, it's transformed to lowercase
+// and used as the value for the returned OS type attribute.
+func mapRuntimeOSToSemconvOSType(osType string) attribute.KeyValue {
+ // the elements in this map are the intersection between
+ // available GOOS values and defined semconv OS types
+ osTypeAttributeMap := map[string]attribute.KeyValue{
+ "aix": semconv.OSTypeAIX,
+ "darwin": semconv.OSTypeDarwin,
+ "dragonfly": semconv.OSTypeDragonflyBSD,
+ "freebsd": semconv.OSTypeFreeBSD,
+ "linux": semconv.OSTypeLinux,
+ "netbsd": semconv.OSTypeNetBSD,
+ "openbsd": semconv.OSTypeOpenBSD,
+ "solaris": semconv.OSTypeSolaris,
+ "windows": semconv.OSTypeWindows,
+ "zos": semconv.OSTypeZOS,
+ }
+
+ var osTypeAttribute attribute.KeyValue
+
+ if attr, ok := osTypeAttributeMap[osType]; ok {
+ osTypeAttribute = attr
+ } else {
+ osTypeAttribute = semconv.OSTypeKey.String(strings.ToLower(osType))
+ }
+
+ return osTypeAttribute
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_darwin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_darwin.go
new file mode 100644
index 00000000..ce455dc5
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_darwin.go
@@ -0,0 +1,91 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "encoding/xml"
+ "fmt"
+ "io"
+ "os"
+)
+
+type plist struct {
+ XMLName xml.Name `xml:"plist"`
+ Dict dict `xml:"dict"`
+}
+
+type dict struct {
+ Key []string `xml:"key"`
+ String []string `xml:"string"`
+}
+
+// osRelease builds a string describing the operating system release based on the
+// contents of the property list (.plist) system files. If no .plist files are found,
+// or if the required properties to build the release description string are missing,
+// an empty string is returned instead. The generated string resembles the output of
+// the `sw_vers` commandline program, but in a single-line string. For more information
+// about the `sw_vers` program, see: https://www.unix.com/man-page/osx/1/SW_VERS.
+func osRelease() string {
+ file, err := getPlistFile()
+ if err != nil {
+ return ""
+ }
+
+ defer file.Close()
+
+ values, err := parsePlistFile(file)
+ if err != nil {
+ return ""
+ }
+
+ return buildOSRelease(values)
+}
+
+// getPlistFile returns a *os.File pointing to one of the well-known .plist files
+// available on macOS. If no file can be opened, it returns an error.
+func getPlistFile() (*os.File, error) {
+ return getFirstAvailableFile([]string{
+ "/System/Library/CoreServices/SystemVersion.plist",
+ "/System/Library/CoreServices/ServerVersion.plist",
+ })
+}
+
+// parsePlistFile process the file pointed by `file` as a .plist file and returns
+// a map with the key-values for each pair of correlated and elements
+// contained in it.
+func parsePlistFile(file io.Reader) (map[string]string, error) {
+ var v plist
+
+ err := xml.NewDecoder(file).Decode(&v)
+ if err != nil {
+ return nil, err
+ }
+
+ if len(v.Dict.Key) != len(v.Dict.String) {
+ return nil, fmt.Errorf("the number of and elements doesn't match")
+ }
+
+ properties := make(map[string]string, len(v.Dict.Key))
+ for i, key := range v.Dict.Key {
+ properties[key] = v.Dict.String[i]
+ }
+
+ return properties, nil
+}
+
+// buildOSRelease builds a string describing the OS release based on the properties
+// available on the provided map. It tries to find the `ProductName`, `ProductVersion`
+// and `ProductBuildVersion` properties. If some of these properties are not found,
+// it returns an empty string.
+func buildOSRelease(properties map[string]string) string {
+ productName := properties["ProductName"]
+ productVersion := properties["ProductVersion"]
+ productBuildVersion := properties["ProductBuildVersion"]
+
+ if productName == "" || productVersion == "" || productBuildVersion == "" {
+ return ""
+ }
+
+ return fmt.Sprintf("%s %s (%s)", productName, productVersion, productBuildVersion)
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go
new file mode 100644
index 00000000..f537e5ca
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go
@@ -0,0 +1,143 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+//go:build aix || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix dragonfly freebsd linux netbsd openbsd solaris zos
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "bufio"
+ "fmt"
+ "io"
+ "os"
+ "strings"
+)
+
+// osRelease builds a string describing the operating system release based on the
+// properties of the os-release file. If no os-release file is found, or if the
+// required properties to build the release description string are missing, an empty
+// string is returned instead. For more information about os-release files, see:
+// https://www.freedesktop.org/software/systemd/man/os-release.html
+func osRelease() string {
+ file, err := getOSReleaseFile()
+ if err != nil {
+ return ""
+ }
+
+ defer file.Close()
+
+ values := parseOSReleaseFile(file)
+
+ return buildOSRelease(values)
+}
+
+// getOSReleaseFile returns a *os.File pointing to one of the well-known os-release
+// files, according to their order of preference. If no file can be opened, it
+// returns an error.
+func getOSReleaseFile() (*os.File, error) {
+ return getFirstAvailableFile([]string{"/etc/os-release", "/usr/lib/os-release"})
+}
+
+// parseOSReleaseFile process the file pointed by `file` as an os-release file and
+// returns a map with the key-values contained in it. Empty lines or lines starting
+// with a '#' character are ignored, as well as lines with the missing key=value
+// separator. Values are unquoted and unescaped.
+func parseOSReleaseFile(file io.Reader) map[string]string {
+ values := make(map[string]string)
+ scanner := bufio.NewScanner(file)
+
+ for scanner.Scan() {
+ line := scanner.Text()
+
+ if skip(line) {
+ continue
+ }
+
+ key, value, ok := parse(line)
+ if ok {
+ values[key] = value
+ }
+ }
+
+ return values
+}
+
+// skip returns true if the line is blank or starts with a '#' character, and
+// therefore should be skipped from processing.
+func skip(line string) bool {
+ line = strings.TrimSpace(line)
+
+ return len(line) == 0 || strings.HasPrefix(line, "#")
+}
+
+// parse attempts to split the provided line on the first '=' character, and then
+// sanitize each side of the split before returning them as a key-value pair.
+func parse(line string) (string, string, bool) {
+ k, v, found := strings.Cut(line, "=")
+
+ if !found || len(k) == 0 {
+ return "", "", false
+ }
+
+ key := strings.TrimSpace(k)
+ value := unescape(unquote(strings.TrimSpace(v)))
+
+ return key, value, true
+}
+
+// unquote checks whether the string `s` is quoted with double or single quotes
+// and, if so, returns a version of the string without them. Otherwise it returns
+// the provided string unchanged.
+func unquote(s string) string {
+ if len(s) < 2 {
+ return s
+ }
+
+ if (s[0] == '"' || s[0] == '\'') && s[0] == s[len(s)-1] {
+ return s[1 : len(s)-1]
+ }
+
+ return s
+}
+
+// unescape removes the `\` prefix from some characters that are expected
+// to have it added in front of them for escaping purposes.
+func unescape(s string) string {
+ return strings.NewReplacer(
+ `\$`, `$`,
+ `\"`, `"`,
+ `\'`, `'`,
+ `\\`, `\`,
+ "\\`", "`",
+ ).Replace(s)
+}
+
+// buildOSRelease builds a string describing the OS release based on the properties
+// available on the provided map. It favors a combination of the `NAME` and `VERSION`
+// properties as first option (falling back to `VERSION_ID` if `VERSION` isn't
+// found), and using `PRETTY_NAME` alone if some of the previous are not present. If
+// none of these properties are found, it returns an empty string.
+//
+// The rationale behind not using `PRETTY_NAME` as first choice was that, for some
+// Linux distributions, it doesn't include the same detail that can be found on the
+// individual `NAME` and `VERSION` properties, and combining `PRETTY_NAME` with
+// other properties can produce "pretty" redundant strings in some cases.
+func buildOSRelease(values map[string]string) string {
+ var osRelease string
+
+ name := values["NAME"]
+ version := values["VERSION"]
+
+ if version == "" {
+ version = values["VERSION_ID"]
+ }
+
+ if name != "" && version != "" {
+ osRelease = fmt.Sprintf("%s %s", name, version)
+ } else {
+ osRelease = values["PRETTY_NAME"]
+ }
+
+ return osRelease
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go
new file mode 100644
index 00000000..a6ff26a4
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go
@@ -0,0 +1,79 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "fmt"
+ "os"
+
+ "golang.org/x/sys/unix"
+)
+
+type unameProvider func(buf *unix.Utsname) (err error)
+
+var defaultUnameProvider unameProvider = unix.Uname
+
+var currentUnameProvider = defaultUnameProvider
+
+func setDefaultUnameProvider() {
+ setUnameProvider(defaultUnameProvider)
+}
+
+func setUnameProvider(unameProvider unameProvider) {
+ currentUnameProvider = unameProvider
+}
+
+// platformOSDescription returns a human readable OS version information string.
+// The final string combines OS release information (where available) and the
+// result of the `uname` system call.
+func platformOSDescription() (string, error) {
+ uname, err := uname()
+ if err != nil {
+ return "", err
+ }
+
+ osRelease := osRelease()
+ if osRelease != "" {
+ return fmt.Sprintf("%s (%s)", osRelease, uname), nil
+ }
+
+ return uname, nil
+}
+
+// uname issues a uname(2) system call (or equivalent on systems which doesn't
+// have one) and formats the output in a single string, similar to the output
+// of the `uname` commandline program. The final string resembles the one
+// obtained with a call to `uname -snrvm`.
+func uname() (string, error) {
+ var utsName unix.Utsname
+
+ err := currentUnameProvider(&utsName)
+ if err != nil {
+ return "", err
+ }
+
+ return fmt.Sprintf("%s %s %s %s %s",
+ unix.ByteSliceToString(utsName.Sysname[:]),
+ unix.ByteSliceToString(utsName.Nodename[:]),
+ unix.ByteSliceToString(utsName.Release[:]),
+ unix.ByteSliceToString(utsName.Version[:]),
+ unix.ByteSliceToString(utsName.Machine[:]),
+ ), nil
+}
+
+// getFirstAvailableFile returns an *os.File of the first available
+// file from a list of candidate file paths.
+func getFirstAvailableFile(candidates []string) (*os.File, error) {
+ for _, c := range candidates {
+ file, err := os.Open(c)
+ if err == nil {
+ return file, nil
+ }
+ }
+
+ return nil, fmt.Errorf("no candidate file available: %v", candidates)
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go
new file mode 100644
index 00000000..a77742b0
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go
@@ -0,0 +1,15 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+// platformOSDescription is a placeholder implementation for OSes
+// for which this project currently doesn't support os.description
+// attribute detection. See build tags declaration early on this file
+// for a list of unsupported OSes.
+func platformOSDescription() (string, error) {
+ return "", nil
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go
new file mode 100644
index 00000000..a6a5a53c
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go
@@ -0,0 +1,89 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "fmt"
+ "strconv"
+
+ "golang.org/x/sys/windows/registry"
+)
+
+// platformOSDescription returns a human readable OS version information string.
+// It does so by querying registry values under the
+// `SOFTWARE\Microsoft\Windows NT\CurrentVersion` key. The final string
+// resembles the one displayed by the Version Reporter Applet (winver.exe).
+func platformOSDescription() (string, error) {
+ k, err := registry.OpenKey(
+ registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE)
+ if err != nil {
+ return "", err
+ }
+
+ defer k.Close()
+
+ var (
+ productName = readProductName(k)
+ displayVersion = readDisplayVersion(k)
+ releaseID = readReleaseID(k)
+ currentMajorVersionNumber = readCurrentMajorVersionNumber(k)
+ currentMinorVersionNumber = readCurrentMinorVersionNumber(k)
+ currentBuildNumber = readCurrentBuildNumber(k)
+ ubr = readUBR(k)
+ )
+
+ if displayVersion != "" {
+ displayVersion += " "
+ }
+
+ return fmt.Sprintf("%s %s(%s) [Version %s.%s.%s.%s]",
+ productName,
+ displayVersion,
+ releaseID,
+ currentMajorVersionNumber,
+ currentMinorVersionNumber,
+ currentBuildNumber,
+ ubr,
+ ), nil
+}
+
+func getStringValue(name string, k registry.Key) string {
+ value, _, _ := k.GetStringValue(name)
+
+ return value
+}
+
+func getIntegerValue(name string, k registry.Key) uint64 {
+ value, _, _ := k.GetIntegerValue(name)
+
+ return value
+}
+
+func readProductName(k registry.Key) string {
+ return getStringValue("ProductName", k)
+}
+
+func readDisplayVersion(k registry.Key) string {
+ return getStringValue("DisplayVersion", k)
+}
+
+func readReleaseID(k registry.Key) string {
+ return getStringValue("ReleaseID", k)
+}
+
+func readCurrentMajorVersionNumber(k registry.Key) string {
+ return strconv.FormatUint(getIntegerValue("CurrentMajorVersionNumber", k), 10)
+}
+
+func readCurrentMinorVersionNumber(k registry.Key) string {
+ return strconv.FormatUint(getIntegerValue("CurrentMinorVersionNumber", k), 10)
+}
+
+func readCurrentBuildNumber(k registry.Key) string {
+ return getStringValue("CurrentBuildNumber", k)
+}
+
+func readUBR(k registry.Key) string {
+ return strconv.FormatUint(getIntegerValue("UBR", k), 10)
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/process.go b/vendor/go.opentelemetry.io/otel/sdk/resource/process.go
new file mode 100644
index 00000000..085fe68f
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/process.go
@@ -0,0 +1,173 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "os/user"
+ "path/filepath"
+ "runtime"
+
+ semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+)
+
+type (
+ pidProvider func() int
+ executablePathProvider func() (string, error)
+ commandArgsProvider func() []string
+ ownerProvider func() (*user.User, error)
+ runtimeNameProvider func() string
+ runtimeVersionProvider func() string
+ runtimeOSProvider func() string
+ runtimeArchProvider func() string
+)
+
+var (
+ defaultPidProvider pidProvider = os.Getpid
+ defaultExecutablePathProvider executablePathProvider = os.Executable
+ defaultCommandArgsProvider commandArgsProvider = func() []string { return os.Args }
+ defaultOwnerProvider ownerProvider = user.Current
+ defaultRuntimeNameProvider runtimeNameProvider = func() string {
+ if runtime.Compiler == "gc" {
+ return "go"
+ }
+ return runtime.Compiler
+ }
+ defaultRuntimeVersionProvider runtimeVersionProvider = runtime.Version
+ defaultRuntimeOSProvider runtimeOSProvider = func() string { return runtime.GOOS }
+ defaultRuntimeArchProvider runtimeArchProvider = func() string { return runtime.GOARCH }
+)
+
+var (
+ pid = defaultPidProvider
+ executablePath = defaultExecutablePathProvider
+ commandArgs = defaultCommandArgsProvider
+ owner = defaultOwnerProvider
+ runtimeName = defaultRuntimeNameProvider
+ runtimeVersion = defaultRuntimeVersionProvider
+ runtimeOS = defaultRuntimeOSProvider
+ runtimeArch = defaultRuntimeArchProvider
+)
+
+func setDefaultOSProviders() {
+ setOSProviders(
+ defaultPidProvider,
+ defaultExecutablePathProvider,
+ defaultCommandArgsProvider,
+ )
+}
+
+func setOSProviders(
+ pidProvider pidProvider,
+ executablePathProvider executablePathProvider,
+ commandArgsProvider commandArgsProvider,
+) {
+ pid = pidProvider
+ executablePath = executablePathProvider
+ commandArgs = commandArgsProvider
+}
+
+func setDefaultRuntimeProviders() {
+ setRuntimeProviders(
+ defaultRuntimeNameProvider,
+ defaultRuntimeVersionProvider,
+ defaultRuntimeOSProvider,
+ defaultRuntimeArchProvider,
+ )
+}
+
+func setRuntimeProviders(
+ runtimeNameProvider runtimeNameProvider,
+ runtimeVersionProvider runtimeVersionProvider,
+ runtimeOSProvider runtimeOSProvider,
+ runtimeArchProvider runtimeArchProvider,
+) {
+ runtimeName = runtimeNameProvider
+ runtimeVersion = runtimeVersionProvider
+ runtimeOS = runtimeOSProvider
+ runtimeArch = runtimeArchProvider
+}
+
+func setDefaultUserProviders() {
+ setUserProviders(defaultOwnerProvider)
+}
+
+func setUserProviders(ownerProvider ownerProvider) {
+ owner = ownerProvider
+}
+
+type (
+ processPIDDetector struct{}
+ processExecutableNameDetector struct{}
+ processExecutablePathDetector struct{}
+ processCommandArgsDetector struct{}
+ processOwnerDetector struct{}
+ processRuntimeNameDetector struct{}
+ processRuntimeVersionDetector struct{}
+ processRuntimeDescriptionDetector struct{}
+)
+
+// Detect returns a *Resource that describes the process identifier (PID) of the
+// executing process.
+func (processPIDDetector) Detect(ctx context.Context) (*Resource, error) {
+ return NewWithAttributes(semconv.SchemaURL, semconv.ProcessPID(pid())), nil
+}
+
+// Detect returns a *Resource that describes the name of the process executable.
+func (processExecutableNameDetector) Detect(ctx context.Context) (*Resource, error) {
+ executableName := filepath.Base(commandArgs()[0])
+
+ return NewWithAttributes(semconv.SchemaURL, semconv.ProcessExecutableName(executableName)), nil
+}
+
+// Detect returns a *Resource that describes the full path of the process executable.
+func (processExecutablePathDetector) Detect(ctx context.Context) (*Resource, error) {
+ executablePath, err := executablePath()
+ if err != nil {
+ return nil, err
+ }
+
+ return NewWithAttributes(semconv.SchemaURL, semconv.ProcessExecutablePath(executablePath)), nil
+}
+
+// Detect returns a *Resource that describes all the command arguments as received
+// by the process.
+func (processCommandArgsDetector) Detect(ctx context.Context) (*Resource, error) {
+ return NewWithAttributes(semconv.SchemaURL, semconv.ProcessCommandArgs(commandArgs()...)), nil
+}
+
+// Detect returns a *Resource that describes the username of the user that owns the
+// process.
+func (processOwnerDetector) Detect(ctx context.Context) (*Resource, error) {
+ owner, err := owner()
+ if err != nil {
+ return nil, err
+ }
+
+ return NewWithAttributes(semconv.SchemaURL, semconv.ProcessOwner(owner.Username)), nil
+}
+
+// Detect returns a *Resource that describes the name of the compiler used to compile
+// this process image.
+func (processRuntimeNameDetector) Detect(ctx context.Context) (*Resource, error) {
+ return NewWithAttributes(semconv.SchemaURL, semconv.ProcessRuntimeName(runtimeName())), nil
+}
+
+// Detect returns a *Resource that describes the version of the runtime of this process.
+func (processRuntimeVersionDetector) Detect(ctx context.Context) (*Resource, error) {
+ return NewWithAttributes(semconv.SchemaURL, semconv.ProcessRuntimeVersion(runtimeVersion())), nil
+}
+
+// Detect returns a *Resource that describes the runtime of this process.
+func (processRuntimeDescriptionDetector) Detect(ctx context.Context) (*Resource, error) {
+ runtimeDescription := fmt.Sprintf(
+ "go version %s %s/%s", runtimeVersion(), runtimeOS(), runtimeArch())
+
+ return NewWithAttributes(
+ semconv.SchemaURL,
+ semconv.ProcessRuntimeDescription(runtimeDescription),
+ ), nil
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go b/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go
new file mode 100644
index 00000000..ad4b50df
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go
@@ -0,0 +1,294 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package resource // import "go.opentelemetry.io/otel/sdk/resource"
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "sync"
+
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/sdk/internal/x"
+)
+
+// Resource describes an entity about which identifying information
+// and metadata is exposed. Resource is an immutable object,
+// equivalent to a map from key to unique value.
+//
+// Resources should be passed and stored as pointers
+// (`*resource.Resource`). The `nil` value is equivalent to an empty
+// Resource.
+type Resource struct {
+ attrs attribute.Set
+ schemaURL string
+}
+
+var (
+ defaultResource *Resource
+ defaultResourceOnce sync.Once
+)
+
+// ErrSchemaURLConflict is an error returned when two Resources are merged
+// together that contain different, non-empty, schema URLs.
+var ErrSchemaURLConflict = errors.New("conflicting Schema URL")
+
+// New returns a [Resource] built using opts.
+//
+// This may return a partial Resource along with an error containing
+// [ErrPartialResource] if options that provide a [Detector] are used and that
+// error is returned from one or more of the Detectors. It may also return a
+// merge-conflict Resource along with an error containing
+// [ErrSchemaURLConflict] if merging Resources from the opts results in a
+// schema URL conflict (see [Resource.Merge] for more information). It is up to
+// the caller to determine if this returned Resource should be used or not
+// based on these errors.
+func New(ctx context.Context, opts ...Option) (*Resource, error) {
+ cfg := config{}
+ for _, opt := range opts {
+ cfg = opt.apply(cfg)
+ }
+
+ r := &Resource{schemaURL: cfg.schemaURL}
+ return r, detect(ctx, r, cfg.detectors)
+}
+
+// NewWithAttributes creates a resource from attrs and associates the resource with a
+// schema URL. If attrs contains duplicate keys, the last value will be used. If attrs
+// contains any invalid items those items will be dropped. The attrs are assumed to be
+// in a schema identified by schemaURL.
+func NewWithAttributes(schemaURL string, attrs ...attribute.KeyValue) *Resource {
+ resource := NewSchemaless(attrs...)
+ resource.schemaURL = schemaURL
+ return resource
+}
+
+// NewSchemaless creates a resource from attrs. If attrs contains duplicate keys,
+// the last value will be used. If attrs contains any invalid items those items will
+// be dropped. The resource will not be associated with a schema URL. If the schema
+// of the attrs is known use NewWithAttributes instead.
+func NewSchemaless(attrs ...attribute.KeyValue) *Resource {
+ if len(attrs) == 0 {
+ return &Resource{}
+ }
+
+ // Ensure attributes comply with the specification:
+ // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/common/README.md#attribute
+ s, _ := attribute.NewSetWithFiltered(attrs, func(kv attribute.KeyValue) bool {
+ return kv.Valid()
+ })
+
+ // If attrs only contains invalid entries do not allocate a new resource.
+ if s.Len() == 0 {
+ return &Resource{}
+ }
+
+ return &Resource{attrs: s} //nolint
+}
+
+// String implements the Stringer interface and provides a
+// human-readable form of the resource.
+//
+// Avoid using this representation as the key in a map of resources,
+// use Equivalent() as the key instead.
+func (r *Resource) String() string {
+ if r == nil {
+ return ""
+ }
+ return r.attrs.Encoded(attribute.DefaultEncoder())
+}
+
+// MarshalLog is the marshaling function used by the logging system to represent this Resource.
+func (r *Resource) MarshalLog() interface{} {
+ return struct {
+ Attributes attribute.Set
+ SchemaURL string
+ }{
+ Attributes: r.attrs,
+ SchemaURL: r.schemaURL,
+ }
+}
+
+// Attributes returns a copy of attributes from the resource in a sorted order.
+// To avoid allocating a new slice, use an iterator.
+func (r *Resource) Attributes() []attribute.KeyValue {
+ if r == nil {
+ r = Empty()
+ }
+ return r.attrs.ToSlice()
+}
+
+// SchemaURL returns the schema URL associated with Resource r.
+func (r *Resource) SchemaURL() string {
+ if r == nil {
+ return ""
+ }
+ return r.schemaURL
+}
+
+// Iter returns an iterator of the Resource attributes.
+// This is ideal to use if you do not want a copy of the attributes.
+func (r *Resource) Iter() attribute.Iterator {
+ if r == nil {
+ r = Empty()
+ }
+ return r.attrs.Iter()
+}
+
+// Equal returns true when a Resource is equivalent to this Resource.
+func (r *Resource) Equal(eq *Resource) bool {
+ if r == nil {
+ r = Empty()
+ }
+ if eq == nil {
+ eq = Empty()
+ }
+ return r.Equivalent() == eq.Equivalent()
+}
+
+// Merge creates a new [Resource] by merging a and b.
+//
+// If there are common keys between a and b, then the value from b will
+// overwrite the value from a, even if b's value is empty.
+//
+// The SchemaURL of the resources will be merged according to the
+// [OpenTelemetry specification rules]:
+//
+// - If a's schema URL is empty then the returned Resource's schema URL will
+// be set to the schema URL of b,
+// - Else if b's schema URL is empty then the returned Resource's schema URL
+// will be set to the schema URL of a,
+// - Else if the schema URLs of a and b are the same then that will be the
+// schema URL of the returned Resource,
+// - Else this is a merging error. If the resources have different,
+// non-empty, schema URLs an error containing [ErrSchemaURLConflict] will
+// be returned with the merged Resource. The merged Resource will have an
+// empty schema URL. It may be the case that some unintended attributes
+// have been overwritten or old semantic conventions persisted in the
+// returned Resource. It is up to the caller to determine if this returned
+// Resource should be used or not.
+//
+// [OpenTelemetry specification rules]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/resource/sdk.md#merge
+func Merge(a, b *Resource) (*Resource, error) {
+ if a == nil && b == nil {
+ return Empty(), nil
+ }
+ if a == nil {
+ return b, nil
+ }
+ if b == nil {
+ return a, nil
+ }
+
+ // Note: 'b' attributes will overwrite 'a' with last-value-wins in attribute.Key()
+ // Meaning this is equivalent to: append(a.Attributes(), b.Attributes()...)
+ mi := attribute.NewMergeIterator(b.Set(), a.Set())
+ combine := make([]attribute.KeyValue, 0, a.Len()+b.Len())
+ for mi.Next() {
+ combine = append(combine, mi.Attribute())
+ }
+
+ switch {
+ case a.schemaURL == "":
+ return NewWithAttributes(b.schemaURL, combine...), nil
+ case b.schemaURL == "":
+ return NewWithAttributes(a.schemaURL, combine...), nil
+ case a.schemaURL == b.schemaURL:
+ return NewWithAttributes(a.schemaURL, combine...), nil
+ }
+ // Return the merged resource with an appropriate error. It is up to
+ // the user to decide if the returned resource can be used or not.
+ return NewSchemaless(combine...), fmt.Errorf(
+ "%w: %s and %s",
+ ErrSchemaURLConflict,
+ a.schemaURL,
+ b.schemaURL,
+ )
+}
+
+// Empty returns an instance of Resource with no attributes. It is
+// equivalent to a `nil` Resource.
+func Empty() *Resource {
+ return &Resource{}
+}
+
+// Default returns an instance of Resource with a default
+// "service.name" and OpenTelemetrySDK attributes.
+func Default() *Resource {
+ defaultResourceOnce.Do(func() {
+ var err error
+ defaultDetectors := []Detector{
+ defaultServiceNameDetector{},
+ fromEnv{},
+ telemetrySDK{},
+ }
+ if x.Resource.Enabled() {
+ defaultDetectors = append([]Detector{defaultServiceInstanceIDDetector{}}, defaultDetectors...)
+ }
+ defaultResource, err = Detect(
+ context.Background(),
+ defaultDetectors...,
+ )
+ if err != nil {
+ otel.Handle(err)
+ }
+ // If Detect did not return a valid resource, fall back to emptyResource.
+ if defaultResource == nil {
+ defaultResource = &Resource{}
+ }
+ })
+ return defaultResource
+}
+
+// Environment returns an instance of Resource with attributes
+// extracted from the OTEL_RESOURCE_ATTRIBUTES environment variable.
+func Environment() *Resource {
+ detector := &fromEnv{}
+ resource, err := detector.Detect(context.Background())
+ if err != nil {
+ otel.Handle(err)
+ }
+ return resource
+}
+
+// Equivalent returns an object that can be compared for equality
+// between two resources. This value is suitable for use as a key in
+// a map.
+func (r *Resource) Equivalent() attribute.Distinct {
+ return r.Set().Equivalent()
+}
+
+// Set returns the equivalent *attribute.Set of this resource's attributes.
+func (r *Resource) Set() *attribute.Set {
+ if r == nil {
+ r = Empty()
+ }
+ return &r.attrs
+}
+
+// MarshalJSON encodes the resource attributes as a JSON list of { "Key":
+// "...", "Value": ... } pairs in order sorted by key.
+func (r *Resource) MarshalJSON() ([]byte, error) {
+ if r == nil {
+ r = Empty()
+ }
+ return r.attrs.MarshalJSON()
+}
+
+// Len returns the number of unique key-values in this Resource.
+func (r *Resource) Len() int {
+ if r == nil {
+ return 0
+ }
+ return r.attrs.Len()
+}
+
+// Encoded returns an encoded representation of the resource.
+func (r *Resource) Encoded(enc attribute.Encoder) string {
+ if r == nil {
+ return ""
+ }
+ return r.attrs.Encoded(enc)
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/README.md b/vendor/go.opentelemetry.io/otel/sdk/trace/README.md
new file mode 100644
index 00000000..f2936e14
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/README.md
@@ -0,0 +1,3 @@
+# SDK Trace
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/sdk/trace)
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
new file mode 100644
index 00000000..ccc97e1b
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go
@@ -0,0 +1,414 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "context"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/internal/global"
+ "go.opentelemetry.io/otel/sdk/internal/env"
+ "go.opentelemetry.io/otel/trace"
+)
+
+// Defaults for BatchSpanProcessorOptions.
+const (
+ DefaultMaxQueueSize = 2048
+ DefaultScheduleDelay = 5000
+ DefaultExportTimeout = 30000
+ DefaultMaxExportBatchSize = 512
+)
+
+// BatchSpanProcessorOption configures a BatchSpanProcessor.
+type BatchSpanProcessorOption func(o *BatchSpanProcessorOptions)
+
+// BatchSpanProcessorOptions is configuration settings for a
+// BatchSpanProcessor.
+type BatchSpanProcessorOptions struct {
+ // MaxQueueSize is the maximum queue size to buffer spans for delayed processing. If the
+ // queue gets full it drops the spans. Use BlockOnQueueFull to change this behavior.
+ // The default value of MaxQueueSize is 2048.
+ MaxQueueSize int
+
+ // BatchTimeout is the maximum duration for constructing a batch. Processor
+ // forcefully sends available spans when timeout is reached.
+ // The default value of BatchTimeout is 5000 msec.
+ BatchTimeout time.Duration
+
+ // ExportTimeout specifies the maximum duration for exporting spans. If the timeout
+ // is reached, the export will be cancelled.
+ // The default value of ExportTimeout is 30000 msec.
+ ExportTimeout time.Duration
+
+ // MaxExportBatchSize is the maximum number of spans to process in a single batch.
+ // If there are more than one batch worth of spans then it processes multiple batches
+ // of spans one batch after the other without any delay.
+ // The default value of MaxExportBatchSize is 512.
+ MaxExportBatchSize int
+
+ // BlockOnQueueFull blocks onEnd() and onStart() method if the queue is full
+ // AND if BlockOnQueueFull is set to true.
+ // Blocking option should be used carefully as it can severely affect the performance of an
+ // application.
+ BlockOnQueueFull bool
+}
+
+// batchSpanProcessor is a SpanProcessor that batches asynchronously-received
+// spans and sends them to a trace.Exporter when complete.
+type batchSpanProcessor struct {
+ e SpanExporter
+ o BatchSpanProcessorOptions
+
+ queue chan ReadOnlySpan
+ dropped uint32
+
+ batch []ReadOnlySpan
+ batchMutex sync.Mutex
+ timer *time.Timer
+ stopWait sync.WaitGroup
+ stopOnce sync.Once
+ stopCh chan struct{}
+ stopped atomic.Bool
+}
+
+var _ SpanProcessor = (*batchSpanProcessor)(nil)
+
+// NewBatchSpanProcessor creates a new SpanProcessor that will send completed
+// span batches to the exporter with the supplied options.
+//
+// If the exporter is nil, the span processor will perform no action.
+func NewBatchSpanProcessor(exporter SpanExporter, options ...BatchSpanProcessorOption) SpanProcessor {
+ maxQueueSize := env.BatchSpanProcessorMaxQueueSize(DefaultMaxQueueSize)
+ maxExportBatchSize := env.BatchSpanProcessorMaxExportBatchSize(DefaultMaxExportBatchSize)
+
+ if maxExportBatchSize > maxQueueSize {
+ if DefaultMaxExportBatchSize > maxQueueSize {
+ maxExportBatchSize = maxQueueSize
+ } else {
+ maxExportBatchSize = DefaultMaxExportBatchSize
+ }
+ }
+
+ o := BatchSpanProcessorOptions{
+ BatchTimeout: time.Duration(env.BatchSpanProcessorScheduleDelay(DefaultScheduleDelay)) * time.Millisecond,
+ ExportTimeout: time.Duration(env.BatchSpanProcessorExportTimeout(DefaultExportTimeout)) * time.Millisecond,
+ MaxQueueSize: maxQueueSize,
+ MaxExportBatchSize: maxExportBatchSize,
+ }
+ for _, opt := range options {
+ opt(&o)
+ }
+ bsp := &batchSpanProcessor{
+ e: exporter,
+ o: o,
+ batch: make([]ReadOnlySpan, 0, o.MaxExportBatchSize),
+ timer: time.NewTimer(o.BatchTimeout),
+ queue: make(chan ReadOnlySpan, o.MaxQueueSize),
+ stopCh: make(chan struct{}),
+ }
+
+ bsp.stopWait.Add(1)
+ go func() {
+ defer bsp.stopWait.Done()
+ bsp.processQueue()
+ bsp.drainQueue()
+ }()
+
+ return bsp
+}
+
+// OnStart method does nothing.
+func (bsp *batchSpanProcessor) OnStart(parent context.Context, s ReadWriteSpan) {}
+
+// OnEnd method enqueues a ReadOnlySpan for later processing.
+func (bsp *batchSpanProcessor) OnEnd(s ReadOnlySpan) {
+ // Do not enqueue spans after Shutdown.
+ if bsp.stopped.Load() {
+ return
+ }
+
+ // Do not enqueue spans if we are just going to drop them.
+ if bsp.e == nil {
+ return
+ }
+ bsp.enqueue(s)
+}
+
+// Shutdown flushes the queue and waits until all spans are processed.
+// It only executes once. Subsequent call does nothing.
+func (bsp *batchSpanProcessor) Shutdown(ctx context.Context) error {
+ var err error
+ bsp.stopOnce.Do(func() {
+ bsp.stopped.Store(true)
+ wait := make(chan struct{})
+ go func() {
+ close(bsp.stopCh)
+ bsp.stopWait.Wait()
+ if bsp.e != nil {
+ if err := bsp.e.Shutdown(ctx); err != nil {
+ otel.Handle(err)
+ }
+ }
+ close(wait)
+ }()
+ // Wait until the wait group is done or the context is cancelled
+ select {
+ case <-wait:
+ case <-ctx.Done():
+ err = ctx.Err()
+ }
+ })
+ return err
+}
+
+type forceFlushSpan struct {
+ ReadOnlySpan
+ flushed chan struct{}
+}
+
+func (f forceFlushSpan) SpanContext() trace.SpanContext {
+ return trace.NewSpanContext(trace.SpanContextConfig{TraceFlags: trace.FlagsSampled})
+}
+
+// ForceFlush exports all ended spans that have not yet been exported.
+func (bsp *batchSpanProcessor) ForceFlush(ctx context.Context) error {
+ // Interrupt if context is already canceled.
+ if err := ctx.Err(); err != nil {
+ return err
+ }
+
+ // Do nothing after Shutdown.
+ if bsp.stopped.Load() {
+ return nil
+ }
+
+ var err error
+ if bsp.e != nil {
+ flushCh := make(chan struct{})
+ if bsp.enqueueBlockOnQueueFull(ctx, forceFlushSpan{flushed: flushCh}) {
+ select {
+ case <-bsp.stopCh:
+ // The batchSpanProcessor is Shutdown.
+ return nil
+ case <-flushCh:
+ // Processed any items in queue prior to ForceFlush being called
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+ }
+
+ wait := make(chan error)
+ go func() {
+ wait <- bsp.exportSpans(ctx)
+ close(wait)
+ }()
+ // Wait until the export is finished or the context is cancelled/timed out
+ select {
+ case err = <-wait:
+ case <-ctx.Done():
+ err = ctx.Err()
+ }
+ }
+ return err
+}
+
+// WithMaxQueueSize returns a BatchSpanProcessorOption that configures the
+// maximum queue size allowed for a BatchSpanProcessor.
+func WithMaxQueueSize(size int) BatchSpanProcessorOption {
+ return func(o *BatchSpanProcessorOptions) {
+ o.MaxQueueSize = size
+ }
+}
+
+// WithMaxExportBatchSize returns a BatchSpanProcessorOption that configures
+// the maximum export batch size allowed for a BatchSpanProcessor.
+func WithMaxExportBatchSize(size int) BatchSpanProcessorOption {
+ return func(o *BatchSpanProcessorOptions) {
+ o.MaxExportBatchSize = size
+ }
+}
+
+// WithBatchTimeout returns a BatchSpanProcessorOption that configures the
+// maximum delay allowed for a BatchSpanProcessor before it will export any
+// held span (whether the queue is full or not).
+func WithBatchTimeout(delay time.Duration) BatchSpanProcessorOption {
+ return func(o *BatchSpanProcessorOptions) {
+ o.BatchTimeout = delay
+ }
+}
+
+// WithExportTimeout returns a BatchSpanProcessorOption that configures the
+// amount of time a BatchSpanProcessor waits for an exporter to export before
+// abandoning the export.
+func WithExportTimeout(timeout time.Duration) BatchSpanProcessorOption {
+ return func(o *BatchSpanProcessorOptions) {
+ o.ExportTimeout = timeout
+ }
+}
+
+// WithBlocking returns a BatchSpanProcessorOption that configures a
+// BatchSpanProcessor to wait for enqueue operations to succeed instead of
+// dropping data when the queue is full.
+func WithBlocking() BatchSpanProcessorOption {
+ return func(o *BatchSpanProcessorOptions) {
+ o.BlockOnQueueFull = true
+ }
+}
+
+// exportSpans is a subroutine of processing and draining the queue.
+func (bsp *batchSpanProcessor) exportSpans(ctx context.Context) error {
+ bsp.timer.Reset(bsp.o.BatchTimeout)
+
+ bsp.batchMutex.Lock()
+ defer bsp.batchMutex.Unlock()
+
+ if bsp.o.ExportTimeout > 0 {
+ var cancel context.CancelFunc
+ ctx, cancel = context.WithTimeout(ctx, bsp.o.ExportTimeout)
+ defer cancel()
+ }
+
+ if l := len(bsp.batch); l > 0 {
+ global.Debug("exporting spans", "count", len(bsp.batch), "total_dropped", atomic.LoadUint32(&bsp.dropped))
+ err := bsp.e.ExportSpans(ctx, bsp.batch)
+
+ // A new batch is always created after exporting, even if the batch failed to be exported.
+ //
+ // It is up to the exporter to implement any type of retry logic if a batch is failing
+ // to be exported, since it is specific to the protocol and backend being sent to.
+ clear(bsp.batch) // Erase elements to let GC collect objects
+ bsp.batch = bsp.batch[:0]
+
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// processQueue removes spans from the `queue` channel until processor
+// is shut down. It calls the exporter in batches of up to MaxExportBatchSize
+// waiting up to BatchTimeout to form a batch.
+func (bsp *batchSpanProcessor) processQueue() {
+ defer bsp.timer.Stop()
+
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ for {
+ select {
+ case <-bsp.stopCh:
+ return
+ case <-bsp.timer.C:
+ if err := bsp.exportSpans(ctx); err != nil {
+ otel.Handle(err)
+ }
+ case sd := <-bsp.queue:
+ if ffs, ok := sd.(forceFlushSpan); ok {
+ close(ffs.flushed)
+ continue
+ }
+ bsp.batchMutex.Lock()
+ bsp.batch = append(bsp.batch, sd)
+ shouldExport := len(bsp.batch) >= bsp.o.MaxExportBatchSize
+ bsp.batchMutex.Unlock()
+ if shouldExport {
+ if !bsp.timer.Stop() {
+ // Handle both GODEBUG=asynctimerchan=[0|1] properly.
+ select {
+ case <-bsp.timer.C:
+ default:
+ }
+ }
+ if err := bsp.exportSpans(ctx); err != nil {
+ otel.Handle(err)
+ }
+ }
+ }
+ }
+}
+
+// drainQueue awaits the any caller that had added to bsp.stopWait
+// to finish the enqueue, then exports the final batch.
+func (bsp *batchSpanProcessor) drainQueue() {
+ ctx, cancel := context.WithCancel(context.Background())
+ defer cancel()
+ for {
+ select {
+ case sd := <-bsp.queue:
+ if _, ok := sd.(forceFlushSpan); ok {
+ // Ignore flush requests as they are not valid spans.
+ continue
+ }
+
+ bsp.batchMutex.Lock()
+ bsp.batch = append(bsp.batch, sd)
+ shouldExport := len(bsp.batch) == bsp.o.MaxExportBatchSize
+ bsp.batchMutex.Unlock()
+
+ if shouldExport {
+ if err := bsp.exportSpans(ctx); err != nil {
+ otel.Handle(err)
+ }
+ }
+ default:
+ // There are no more enqueued spans. Make final export.
+ if err := bsp.exportSpans(ctx); err != nil {
+ otel.Handle(err)
+ }
+ return
+ }
+ }
+}
+
+func (bsp *batchSpanProcessor) enqueue(sd ReadOnlySpan) {
+ ctx := context.TODO()
+ if bsp.o.BlockOnQueueFull {
+ bsp.enqueueBlockOnQueueFull(ctx, sd)
+ } else {
+ bsp.enqueueDrop(ctx, sd)
+ }
+}
+
+func (bsp *batchSpanProcessor) enqueueBlockOnQueueFull(ctx context.Context, sd ReadOnlySpan) bool {
+ if !sd.SpanContext().IsSampled() {
+ return false
+ }
+
+ select {
+ case bsp.queue <- sd:
+ return true
+ case <-ctx.Done():
+ return false
+ }
+}
+
+func (bsp *batchSpanProcessor) enqueueDrop(_ context.Context, sd ReadOnlySpan) bool {
+ if !sd.SpanContext().IsSampled() {
+ return false
+ }
+
+ select {
+ case bsp.queue <- sd:
+ return true
+ default:
+ atomic.AddUint32(&bsp.dropped, 1)
+ }
+ return false
+}
+
+// MarshalLog is the marshaling function used by the logging system to represent this Span Processor.
+func (bsp *batchSpanProcessor) MarshalLog() interface{} {
+ return struct {
+ Type string
+ SpanExporter SpanExporter
+ Config BatchSpanProcessorOptions
+ }{
+ Type: "BatchSpanProcessor",
+ SpanExporter: bsp.e,
+ Config: bsp.o,
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go b/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go
new file mode 100644
index 00000000..1f60524e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go
@@ -0,0 +1,10 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package trace contains support for OpenTelemetry distributed tracing.
+
+The following assumes a basic familiarity with OpenTelemetry concepts.
+See https://opentelemetry.io.
+*/
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/event.go b/vendor/go.opentelemetry.io/otel/sdk/trace/event.go
new file mode 100644
index 00000000..60a7ed13
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/event.go
@@ -0,0 +1,26 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "time"
+
+ "go.opentelemetry.io/otel/attribute"
+)
+
+// Event is a thing that happened during a Span's lifetime.
+type Event struct {
+ // Name is the name of this event
+ Name string
+
+ // Attributes describe the aspects of the event.
+ Attributes []attribute.KeyValue
+
+ // DroppedAttributeCount is the number of attributes that were not
+ // recorded due to configured limits being reached.
+ DroppedAttributeCount int
+
+ // Time at which this event was recorded.
+ Time time.Time
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go b/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go
new file mode 100644
index 00000000..8c308dd6
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go
@@ -0,0 +1,64 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "slices"
+ "sync"
+
+ "go.opentelemetry.io/otel/internal/global"
+)
+
+// evictedQueue is a FIFO queue with a configurable capacity.
+type evictedQueue[T any] struct {
+ queue []T
+ capacity int
+ droppedCount int
+ logDroppedMsg string
+ logDroppedOnce sync.Once
+}
+
+func newEvictedQueueEvent(capacity int) evictedQueue[Event] {
+ // Do not pre-allocate queue, do this lazily.
+ return evictedQueue[Event]{
+ capacity: capacity,
+ logDroppedMsg: "limit reached: dropping trace trace.Event",
+ }
+}
+
+func newEvictedQueueLink(capacity int) evictedQueue[Link] {
+ // Do not pre-allocate queue, do this lazily.
+ return evictedQueue[Link]{
+ capacity: capacity,
+ logDroppedMsg: "limit reached: dropping trace trace.Link",
+ }
+}
+
+// add adds value to the evictedQueue eq. If eq is at capacity, the oldest
+// queued value will be discarded and the drop count incremented.
+func (eq *evictedQueue[T]) add(value T) {
+ if eq.capacity == 0 {
+ eq.droppedCount++
+ eq.logDropped()
+ return
+ }
+
+ if eq.capacity > 0 && len(eq.queue) == eq.capacity {
+ // Drop first-in while avoiding allocating more capacity to eq.queue.
+ copy(eq.queue[:eq.capacity-1], eq.queue[1:])
+ eq.queue = eq.queue[:eq.capacity-1]
+ eq.droppedCount++
+ eq.logDropped()
+ }
+ eq.queue = append(eq.queue, value)
+}
+
+func (eq *evictedQueue[T]) logDropped() {
+ eq.logDroppedOnce.Do(func() { global.Warn(eq.logDroppedMsg) })
+}
+
+// copy returns a copy of the evictedQueue.
+func (eq *evictedQueue[T]) copy() []T {
+ return slices.Clone(eq.queue)
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go b/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go
new file mode 100644
index 00000000..925bcf99
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go
@@ -0,0 +1,81 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "context"
+ crand "crypto/rand"
+ "encoding/binary"
+ "math/rand"
+ "sync"
+
+ "go.opentelemetry.io/otel/trace"
+)
+
+// IDGenerator allows custom generators for TraceID and SpanID.
+type IDGenerator interface {
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // NewIDs returns a new trace and span ID.
+ NewIDs(ctx context.Context) (trace.TraceID, trace.SpanID)
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // NewSpanID returns a ID for a new span in the trace with traceID.
+ NewSpanID(ctx context.Context, traceID trace.TraceID) trace.SpanID
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+}
+
+type randomIDGenerator struct {
+ sync.Mutex
+ randSource *rand.Rand
+}
+
+var _ IDGenerator = &randomIDGenerator{}
+
+// NewSpanID returns a non-zero span ID from a randomly-chosen sequence.
+func (gen *randomIDGenerator) NewSpanID(ctx context.Context, traceID trace.TraceID) trace.SpanID {
+ gen.Lock()
+ defer gen.Unlock()
+ sid := trace.SpanID{}
+ for {
+ _, _ = gen.randSource.Read(sid[:])
+ if sid.IsValid() {
+ break
+ }
+ }
+ return sid
+}
+
+// NewIDs returns a non-zero trace ID and a non-zero span ID from a
+// randomly-chosen sequence.
+func (gen *randomIDGenerator) NewIDs(ctx context.Context) (trace.TraceID, trace.SpanID) {
+ gen.Lock()
+ defer gen.Unlock()
+ tid := trace.TraceID{}
+ sid := trace.SpanID{}
+ for {
+ _, _ = gen.randSource.Read(tid[:])
+ if tid.IsValid() {
+ break
+ }
+ }
+ for {
+ _, _ = gen.randSource.Read(sid[:])
+ if sid.IsValid() {
+ break
+ }
+ }
+ return tid, sid
+}
+
+func defaultIDGenerator() IDGenerator {
+ gen := &randomIDGenerator{}
+ var rngSeed int64
+ _ = binary.Read(crand.Reader, binary.LittleEndian, &rngSeed)
+ gen.randSource = rand.New(rand.NewSource(rngSeed))
+ return gen
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/link.go b/vendor/go.opentelemetry.io/otel/sdk/trace/link.go
new file mode 100644
index 00000000..c03bdc90
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/link.go
@@ -0,0 +1,23 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/trace"
+)
+
+// Link is the relationship between two Spans. The relationship can be within
+// the same Trace or across different Traces.
+type Link struct {
+ // SpanContext of the linked Span.
+ SpanContext trace.SpanContext
+
+ // Attributes describe the aspects of the link.
+ Attributes []attribute.KeyValue
+
+ // DroppedAttributeCount is the number of attributes that were not
+ // recorded due to configured limits being reached.
+ DroppedAttributeCount int
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go b/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
new file mode 100644
index 00000000..185aa7c0
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go
@@ -0,0 +1,494 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "context"
+ "fmt"
+ "sync"
+ "sync/atomic"
+
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/internal/global"
+ "go.opentelemetry.io/otel/sdk/instrumentation"
+ "go.opentelemetry.io/otel/sdk/resource"
+ "go.opentelemetry.io/otel/trace"
+ "go.opentelemetry.io/otel/trace/embedded"
+ "go.opentelemetry.io/otel/trace/noop"
+)
+
+const (
+ defaultTracerName = "go.opentelemetry.io/otel/sdk/tracer"
+)
+
+// tracerProviderConfig.
+type tracerProviderConfig struct {
+ // processors contains collection of SpanProcessors that are processing pipeline
+ // for spans in the trace signal.
+ // SpanProcessors registered with a TracerProvider and are called at the start
+ // and end of a Span's lifecycle, and are called in the order they are
+ // registered.
+ processors []SpanProcessor
+
+ // sampler is the default sampler used when creating new spans.
+ sampler Sampler
+
+ // idGenerator is used to generate all Span and Trace IDs when needed.
+ idGenerator IDGenerator
+
+ // spanLimits defines the attribute, event, and link limits for spans.
+ spanLimits SpanLimits
+
+ // resource contains attributes representing an entity that produces telemetry.
+ resource *resource.Resource
+}
+
+// MarshalLog is the marshaling function used by the logging system to represent this Provider.
+func (cfg tracerProviderConfig) MarshalLog() interface{} {
+ return struct {
+ SpanProcessors []SpanProcessor
+ SamplerType string
+ IDGeneratorType string
+ SpanLimits SpanLimits
+ Resource *resource.Resource
+ }{
+ SpanProcessors: cfg.processors,
+ SamplerType: fmt.Sprintf("%T", cfg.sampler),
+ IDGeneratorType: fmt.Sprintf("%T", cfg.idGenerator),
+ SpanLimits: cfg.spanLimits,
+ Resource: cfg.resource,
+ }
+}
+
+// TracerProvider is an OpenTelemetry TracerProvider. It provides Tracers to
+// instrumentation so it can trace operational flow through a system.
+type TracerProvider struct {
+ embedded.TracerProvider
+
+ mu sync.Mutex
+ namedTracer map[instrumentation.Scope]*tracer
+ spanProcessors atomic.Pointer[spanProcessorStates]
+
+ isShutdown atomic.Bool
+
+ // These fields are not protected by the lock mu. They are assumed to be
+ // immutable after creation of the TracerProvider.
+ sampler Sampler
+ idGenerator IDGenerator
+ spanLimits SpanLimits
+ resource *resource.Resource
+}
+
+var _ trace.TracerProvider = &TracerProvider{}
+
+// NewTracerProvider returns a new and configured TracerProvider.
+//
+// By default the returned TracerProvider is configured with:
+// - a ParentBased(AlwaysSample) Sampler
+// - a random number IDGenerator
+// - the resource.Default() Resource
+// - the default SpanLimits.
+//
+// The passed opts are used to override these default values and configure the
+// returned TracerProvider appropriately.
+func NewTracerProvider(opts ...TracerProviderOption) *TracerProvider {
+ o := tracerProviderConfig{
+ spanLimits: NewSpanLimits(),
+ }
+ o = applyTracerProviderEnvConfigs(o)
+
+ for _, opt := range opts {
+ o = opt.apply(o)
+ }
+
+ o = ensureValidTracerProviderConfig(o)
+
+ tp := &TracerProvider{
+ namedTracer: make(map[instrumentation.Scope]*tracer),
+ sampler: o.sampler,
+ idGenerator: o.idGenerator,
+ spanLimits: o.spanLimits,
+ resource: o.resource,
+ }
+ global.Info("TracerProvider created", "config", o)
+
+ spss := make(spanProcessorStates, 0, len(o.processors))
+ for _, sp := range o.processors {
+ spss = append(spss, newSpanProcessorState(sp))
+ }
+ tp.spanProcessors.Store(&spss)
+
+ return tp
+}
+
+// Tracer returns a Tracer with the given name and options. If a Tracer for
+// the given name and options does not exist it is created, otherwise the
+// existing Tracer is returned.
+//
+// If name is empty, DefaultTracerName is used instead.
+//
+// This method is safe to be called concurrently.
+func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer {
+ // This check happens before the mutex is acquired to avoid deadlocking if Tracer() is called from within Shutdown().
+ if p.isShutdown.Load() {
+ return noop.NewTracerProvider().Tracer(name, opts...)
+ }
+ c := trace.NewTracerConfig(opts...)
+ if name == "" {
+ name = defaultTracerName
+ }
+ is := instrumentation.Scope{
+ Name: name,
+ Version: c.InstrumentationVersion(),
+ SchemaURL: c.SchemaURL(),
+ Attributes: c.InstrumentationAttributes(),
+ }
+
+ t, ok := func() (trace.Tracer, bool) {
+ p.mu.Lock()
+ defer p.mu.Unlock()
+ // Must check the flag after acquiring the mutex to avoid returning a valid tracer if Shutdown() ran
+ // after the first check above but before we acquired the mutex.
+ if p.isShutdown.Load() {
+ return noop.NewTracerProvider().Tracer(name, opts...), true
+ }
+ t, ok := p.namedTracer[is]
+ if !ok {
+ t = &tracer{
+ provider: p,
+ instrumentationScope: is,
+ }
+ p.namedTracer[is] = t
+ }
+ return t, ok
+ }()
+ if !ok {
+ // This code is outside the mutex to not hold the lock while calling third party logging code:
+ // - That code may do slow things like I/O, which would prolong the duration the lock is held,
+ // slowing down all tracing consumers.
+ // - Logging code may be instrumented with tracing and deadlock because it could try
+ // acquiring the same non-reentrant mutex.
+ global.Info("Tracer created", "name", name, "version", is.Version, "schemaURL", is.SchemaURL, "attributes", is.Attributes)
+ }
+ return t
+}
+
+// RegisterSpanProcessor adds the given SpanProcessor to the list of SpanProcessors.
+func (p *TracerProvider) RegisterSpanProcessor(sp SpanProcessor) {
+ // This check prevents calls during a shutdown.
+ if p.isShutdown.Load() {
+ return
+ }
+ p.mu.Lock()
+ defer p.mu.Unlock()
+ // This check prevents calls after a shutdown.
+ if p.isShutdown.Load() {
+ return
+ }
+
+ current := p.getSpanProcessors()
+ newSPS := make(spanProcessorStates, 0, len(current)+1)
+ newSPS = append(newSPS, current...)
+ newSPS = append(newSPS, newSpanProcessorState(sp))
+ p.spanProcessors.Store(&newSPS)
+}
+
+// UnregisterSpanProcessor removes the given SpanProcessor from the list of SpanProcessors.
+func (p *TracerProvider) UnregisterSpanProcessor(sp SpanProcessor) {
+ // This check prevents calls during a shutdown.
+ if p.isShutdown.Load() {
+ return
+ }
+ p.mu.Lock()
+ defer p.mu.Unlock()
+ // This check prevents calls after a shutdown.
+ if p.isShutdown.Load() {
+ return
+ }
+ old := p.getSpanProcessors()
+ if len(old) == 0 {
+ return
+ }
+ spss := make(spanProcessorStates, len(old))
+ copy(spss, old)
+
+ // stop the span processor if it is started and remove it from the list
+ var stopOnce *spanProcessorState
+ var idx int
+ for i, sps := range spss {
+ if sps.sp == sp {
+ stopOnce = sps
+ idx = i
+ }
+ }
+ if stopOnce != nil {
+ stopOnce.state.Do(func() {
+ if err := sp.Shutdown(context.Background()); err != nil {
+ otel.Handle(err)
+ }
+ })
+ }
+ if len(spss) > 1 {
+ copy(spss[idx:], spss[idx+1:])
+ }
+ spss[len(spss)-1] = nil
+ spss = spss[:len(spss)-1]
+
+ p.spanProcessors.Store(&spss)
+}
+
+// ForceFlush immediately exports all spans that have not yet been exported for
+// all the registered span processors.
+func (p *TracerProvider) ForceFlush(ctx context.Context) error {
+ spss := p.getSpanProcessors()
+ if len(spss) == 0 {
+ return nil
+ }
+
+ for _, sps := range spss {
+ select {
+ case <-ctx.Done():
+ return ctx.Err()
+ default:
+ }
+
+ if err := sps.sp.ForceFlush(ctx); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Shutdown shuts down TracerProvider. All registered span processors are shut down
+// in the order they were registered and any held computational resources are released.
+// After Shutdown is called, all methods are no-ops.
+func (p *TracerProvider) Shutdown(ctx context.Context) error {
+ // This check prevents deadlocks in case of recursive shutdown.
+ if p.isShutdown.Load() {
+ return nil
+ }
+ p.mu.Lock()
+ defer p.mu.Unlock()
+ // This check prevents calls after a shutdown has already been done concurrently.
+ if !p.isShutdown.CompareAndSwap(false, true) { // did toggle?
+ return nil
+ }
+
+ var retErr error
+ for _, sps := range p.getSpanProcessors() {
+ select {
+ case <-ctx.Done():
+ return ctx.Err()
+ default:
+ }
+
+ var err error
+ sps.state.Do(func() {
+ err = sps.sp.Shutdown(ctx)
+ })
+ if err != nil {
+ if retErr == nil {
+ retErr = err
+ } else {
+ // Poor man's list of errors
+ retErr = fmt.Errorf("%w; %w", retErr, err)
+ }
+ }
+ }
+ p.spanProcessors.Store(&spanProcessorStates{})
+ return retErr
+}
+
+func (p *TracerProvider) getSpanProcessors() spanProcessorStates {
+ return *(p.spanProcessors.Load())
+}
+
+// TracerProviderOption configures a TracerProvider.
+type TracerProviderOption interface {
+ apply(tracerProviderConfig) tracerProviderConfig
+}
+
+type traceProviderOptionFunc func(tracerProviderConfig) tracerProviderConfig
+
+func (fn traceProviderOptionFunc) apply(cfg tracerProviderConfig) tracerProviderConfig {
+ return fn(cfg)
+}
+
+// WithSyncer registers the exporter with the TracerProvider using a
+// SimpleSpanProcessor.
+//
+// This is not recommended for production use. The synchronous nature of the
+// SimpleSpanProcessor that will wrap the exporter make it good for testing,
+// debugging, or showing examples of other feature, but it will be slow and
+// have a high computation resource usage overhead. The WithBatcher option is
+// recommended for production use instead.
+func WithSyncer(e SpanExporter) TracerProviderOption {
+ return WithSpanProcessor(NewSimpleSpanProcessor(e))
+}
+
+// WithBatcher registers the exporter with the TracerProvider using a
+// BatchSpanProcessor configured with the passed opts.
+func WithBatcher(e SpanExporter, opts ...BatchSpanProcessorOption) TracerProviderOption {
+ return WithSpanProcessor(NewBatchSpanProcessor(e, opts...))
+}
+
+// WithSpanProcessor registers the SpanProcessor with a TracerProvider.
+func WithSpanProcessor(sp SpanProcessor) TracerProviderOption {
+ return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig {
+ cfg.processors = append(cfg.processors, sp)
+ return cfg
+ })
+}
+
+// WithResource returns a TracerProviderOption that will configure the
+// Resource r as a TracerProvider's Resource. The configured Resource is
+// referenced by all the Tracers the TracerProvider creates. It represents the
+// entity producing telemetry.
+//
+// If this option is not used, the TracerProvider will use the
+// resource.Default() Resource by default.
+func WithResource(r *resource.Resource) TracerProviderOption {
+ return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig {
+ var err error
+ cfg.resource, err = resource.Merge(resource.Environment(), r)
+ if err != nil {
+ otel.Handle(err)
+ }
+ return cfg
+ })
+}
+
+// WithIDGenerator returns a TracerProviderOption that will configure the
+// IDGenerator g as a TracerProvider's IDGenerator. The configured IDGenerator
+// is used by the Tracers the TracerProvider creates to generate new Span and
+// Trace IDs.
+//
+// If this option is not used, the TracerProvider will use a random number
+// IDGenerator by default.
+func WithIDGenerator(g IDGenerator) TracerProviderOption {
+ return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig {
+ if g != nil {
+ cfg.idGenerator = g
+ }
+ return cfg
+ })
+}
+
+// WithSampler returns a TracerProviderOption that will configure the Sampler
+// s as a TracerProvider's Sampler. The configured Sampler is used by the
+// Tracers the TracerProvider creates to make their sampling decisions for the
+// Spans they create.
+//
+// This option overrides the Sampler configured through the OTEL_TRACES_SAMPLER
+// and OTEL_TRACES_SAMPLER_ARG environment variables. If this option is not used
+// and the sampler is not configured through environment variables or the environment
+// contains invalid/unsupported configuration, the TracerProvider will use a
+// ParentBased(AlwaysSample) Sampler by default.
+func WithSampler(s Sampler) TracerProviderOption {
+ return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig {
+ if s != nil {
+ cfg.sampler = s
+ }
+ return cfg
+ })
+}
+
+// WithSpanLimits returns a TracerProviderOption that configures a
+// TracerProvider to use the SpanLimits sl. These SpanLimits bound any Span
+// created by a Tracer from the TracerProvider.
+//
+// If any field of sl is zero or negative it will be replaced with the default
+// value for that field.
+//
+// If this or WithRawSpanLimits are not provided, the TracerProvider will use
+// the limits defined by environment variables, or the defaults if unset.
+// Refer to the NewSpanLimits documentation for information about this
+// relationship.
+//
+// Deprecated: Use WithRawSpanLimits instead which allows setting unlimited
+// and zero limits. This option will be kept until the next major version
+// incremented release.
+func WithSpanLimits(sl SpanLimits) TracerProviderOption {
+ if sl.AttributeValueLengthLimit <= 0 {
+ sl.AttributeValueLengthLimit = DefaultAttributeValueLengthLimit
+ }
+ if sl.AttributeCountLimit <= 0 {
+ sl.AttributeCountLimit = DefaultAttributeCountLimit
+ }
+ if sl.EventCountLimit <= 0 {
+ sl.EventCountLimit = DefaultEventCountLimit
+ }
+ if sl.AttributePerEventCountLimit <= 0 {
+ sl.AttributePerEventCountLimit = DefaultAttributePerEventCountLimit
+ }
+ if sl.LinkCountLimit <= 0 {
+ sl.LinkCountLimit = DefaultLinkCountLimit
+ }
+ if sl.AttributePerLinkCountLimit <= 0 {
+ sl.AttributePerLinkCountLimit = DefaultAttributePerLinkCountLimit
+ }
+ return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig {
+ cfg.spanLimits = sl
+ return cfg
+ })
+}
+
+// WithRawSpanLimits returns a TracerProviderOption that configures a
+// TracerProvider to use these limits. These limits bound any Span created by
+// a Tracer from the TracerProvider.
+//
+// The limits will be used as-is. Zero or negative values will not be changed
+// to the default value like WithSpanLimits does. Setting a limit to zero will
+// effectively disable the related resource it limits and setting to a
+// negative value will mean that resource is unlimited. Consequentially, this
+// means that the zero-value SpanLimits will disable all span resources.
+// Because of this, limits should be constructed using NewSpanLimits and
+// updated accordingly.
+//
+// If this or WithSpanLimits are not provided, the TracerProvider will use the
+// limits defined by environment variables, or the defaults if unset. Refer to
+// the NewSpanLimits documentation for information about this relationship.
+func WithRawSpanLimits(limits SpanLimits) TracerProviderOption {
+ return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig {
+ cfg.spanLimits = limits
+ return cfg
+ })
+}
+
+func applyTracerProviderEnvConfigs(cfg tracerProviderConfig) tracerProviderConfig {
+ for _, opt := range tracerProviderOptionsFromEnv() {
+ cfg = opt.apply(cfg)
+ }
+
+ return cfg
+}
+
+func tracerProviderOptionsFromEnv() []TracerProviderOption {
+ var opts []TracerProviderOption
+
+ sampler, err := samplerFromEnv()
+ if err != nil {
+ otel.Handle(err)
+ }
+
+ if sampler != nil {
+ opts = append(opts, WithSampler(sampler))
+ }
+
+ return opts
+}
+
+// ensureValidTracerProviderConfig ensures that given TracerProviderConfig is valid.
+func ensureValidTracerProviderConfig(cfg tracerProviderConfig) tracerProviderConfig {
+ if cfg.sampler == nil {
+ cfg.sampler = ParentBased(AlwaysSample())
+ }
+ if cfg.idGenerator == nil {
+ cfg.idGenerator = defaultIDGenerator()
+ }
+ if cfg.resource == nil {
+ cfg.resource = resource.Default()
+ }
+ return cfg
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go b/vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go
new file mode 100644
index 00000000..9b672a1d
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go
@@ -0,0 +1,96 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "errors"
+ "os"
+ "strconv"
+ "strings"
+)
+
+const (
+ tracesSamplerKey = "OTEL_TRACES_SAMPLER"
+ tracesSamplerArgKey = "OTEL_TRACES_SAMPLER_ARG"
+
+ samplerAlwaysOn = "always_on"
+ samplerAlwaysOff = "always_off"
+ samplerTraceIDRatio = "traceidratio"
+ samplerParentBasedAlwaysOn = "parentbased_always_on"
+ samplerParsedBasedAlwaysOff = "parentbased_always_off"
+ samplerParentBasedTraceIDRatio = "parentbased_traceidratio"
+)
+
+type errUnsupportedSampler string
+
+func (e errUnsupportedSampler) Error() string {
+ return "unsupported sampler: " + string(e)
+}
+
+var (
+ errNegativeTraceIDRatio = errors.New("invalid trace ID ratio: less than 0.0")
+ errGreaterThanOneTraceIDRatio = errors.New("invalid trace ID ratio: greater than 1.0")
+)
+
+type samplerArgParseError struct {
+ parseErr error
+}
+
+func (e samplerArgParseError) Error() string {
+ return "parsing sampler argument: " + e.parseErr.Error()
+}
+
+func (e samplerArgParseError) Unwrap() error {
+ return e.parseErr
+}
+
+func samplerFromEnv() (Sampler, error) {
+ sampler, ok := os.LookupEnv(tracesSamplerKey)
+ if !ok {
+ return nil, nil
+ }
+
+ sampler = strings.ToLower(strings.TrimSpace(sampler))
+ samplerArg, hasSamplerArg := os.LookupEnv(tracesSamplerArgKey)
+ samplerArg = strings.TrimSpace(samplerArg)
+
+ switch sampler {
+ case samplerAlwaysOn:
+ return AlwaysSample(), nil
+ case samplerAlwaysOff:
+ return NeverSample(), nil
+ case samplerTraceIDRatio:
+ if !hasSamplerArg {
+ return TraceIDRatioBased(1.0), nil
+ }
+ return parseTraceIDRatio(samplerArg)
+ case samplerParentBasedAlwaysOn:
+ return ParentBased(AlwaysSample()), nil
+ case samplerParsedBasedAlwaysOff:
+ return ParentBased(NeverSample()), nil
+ case samplerParentBasedTraceIDRatio:
+ if !hasSamplerArg {
+ return ParentBased(TraceIDRatioBased(1.0)), nil
+ }
+ ratio, err := parseTraceIDRatio(samplerArg)
+ return ParentBased(ratio), err
+ default:
+ return nil, errUnsupportedSampler(sampler)
+ }
+}
+
+func parseTraceIDRatio(arg string) (Sampler, error) {
+ v, err := strconv.ParseFloat(arg, 64)
+ if err != nil {
+ return TraceIDRatioBased(1.0), samplerArgParseError{err}
+ }
+ if v < 0.0 {
+ return TraceIDRatioBased(1.0), errNegativeTraceIDRatio
+ }
+ if v > 1.0 {
+ return TraceIDRatioBased(1.0), errGreaterThanOneTraceIDRatio
+ }
+
+ return TraceIDRatioBased(v), nil
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go b/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
new file mode 100644
index 00000000..ebb6df6c
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go
@@ -0,0 +1,282 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "context"
+ "encoding/binary"
+ "fmt"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/trace"
+)
+
+// Sampler decides whether a trace should be sampled and exported.
+type Sampler interface {
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // ShouldSample returns a SamplingResult based on a decision made from the
+ // passed parameters.
+ ShouldSample(parameters SamplingParameters) SamplingResult
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Description returns information describing the Sampler.
+ Description() string
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+}
+
+// SamplingParameters contains the values passed to a Sampler.
+type SamplingParameters struct {
+ ParentContext context.Context
+ TraceID trace.TraceID
+ Name string
+ Kind trace.SpanKind
+ Attributes []attribute.KeyValue
+ Links []trace.Link
+}
+
+// SamplingDecision indicates whether a span is dropped, recorded and/or sampled.
+type SamplingDecision uint8
+
+// Valid sampling decisions.
+const (
+ // Drop will not record the span and all attributes/events will be dropped.
+ Drop SamplingDecision = iota
+
+ // Record indicates the span's `IsRecording() == true`, but `Sampled` flag
+ // *must not* be set.
+ RecordOnly
+
+ // RecordAndSample has span's `IsRecording() == true` and `Sampled` flag
+ // *must* be set.
+ RecordAndSample
+)
+
+// SamplingResult conveys a SamplingDecision, set of Attributes and a Tracestate.
+type SamplingResult struct {
+ Decision SamplingDecision
+ Attributes []attribute.KeyValue
+ Tracestate trace.TraceState
+}
+
+type traceIDRatioSampler struct {
+ traceIDUpperBound uint64
+ description string
+}
+
+func (ts traceIDRatioSampler) ShouldSample(p SamplingParameters) SamplingResult {
+ psc := trace.SpanContextFromContext(p.ParentContext)
+ x := binary.BigEndian.Uint64(p.TraceID[8:16]) >> 1
+ if x < ts.traceIDUpperBound {
+ return SamplingResult{
+ Decision: RecordAndSample,
+ Tracestate: psc.TraceState(),
+ }
+ }
+ return SamplingResult{
+ Decision: Drop,
+ Tracestate: psc.TraceState(),
+ }
+}
+
+func (ts traceIDRatioSampler) Description() string {
+ return ts.description
+}
+
+// TraceIDRatioBased samples a given fraction of traces. Fractions >= 1 will
+// always sample. Fractions < 0 are treated as zero. To respect the
+// parent trace's `SampledFlag`, the `TraceIDRatioBased` sampler should be used
+// as a delegate of a `Parent` sampler.
+//
+//nolint:revive // revive complains about stutter of `trace.TraceIDRatioBased`
+func TraceIDRatioBased(fraction float64) Sampler {
+ if fraction >= 1 {
+ return AlwaysSample()
+ }
+
+ if fraction <= 0 {
+ fraction = 0
+ }
+
+ return &traceIDRatioSampler{
+ traceIDUpperBound: uint64(fraction * (1 << 63)),
+ description: fmt.Sprintf("TraceIDRatioBased{%g}", fraction),
+ }
+}
+
+type alwaysOnSampler struct{}
+
+func (as alwaysOnSampler) ShouldSample(p SamplingParameters) SamplingResult {
+ return SamplingResult{
+ Decision: RecordAndSample,
+ Tracestate: trace.SpanContextFromContext(p.ParentContext).TraceState(),
+ }
+}
+
+func (as alwaysOnSampler) Description() string {
+ return "AlwaysOnSampler"
+}
+
+// AlwaysSample returns a Sampler that samples every trace.
+// Be careful about using this sampler in a production application with
+// significant traffic: a new trace will be started and exported for every
+// request.
+func AlwaysSample() Sampler {
+ return alwaysOnSampler{}
+}
+
+type alwaysOffSampler struct{}
+
+func (as alwaysOffSampler) ShouldSample(p SamplingParameters) SamplingResult {
+ return SamplingResult{
+ Decision: Drop,
+ Tracestate: trace.SpanContextFromContext(p.ParentContext).TraceState(),
+ }
+}
+
+func (as alwaysOffSampler) Description() string {
+ return "AlwaysOffSampler"
+}
+
+// NeverSample returns a Sampler that samples no traces.
+func NeverSample() Sampler {
+ return alwaysOffSampler{}
+}
+
+// ParentBased returns a sampler decorator which behaves differently,
+// based on the parent of the span. If the span has no parent,
+// the decorated sampler is used to make sampling decision. If the span has
+// a parent, depending on whether the parent is remote and whether it
+// is sampled, one of the following samplers will apply:
+// - remoteParentSampled(Sampler) (default: AlwaysOn)
+// - remoteParentNotSampled(Sampler) (default: AlwaysOff)
+// - localParentSampled(Sampler) (default: AlwaysOn)
+// - localParentNotSampled(Sampler) (default: AlwaysOff)
+func ParentBased(root Sampler, samplers ...ParentBasedSamplerOption) Sampler {
+ return parentBased{
+ root: root,
+ config: configureSamplersForParentBased(samplers),
+ }
+}
+
+type parentBased struct {
+ root Sampler
+ config samplerConfig
+}
+
+func configureSamplersForParentBased(samplers []ParentBasedSamplerOption) samplerConfig {
+ c := samplerConfig{
+ remoteParentSampled: AlwaysSample(),
+ remoteParentNotSampled: NeverSample(),
+ localParentSampled: AlwaysSample(),
+ localParentNotSampled: NeverSample(),
+ }
+
+ for _, so := range samplers {
+ c = so.apply(c)
+ }
+
+ return c
+}
+
+// samplerConfig is a group of options for parentBased sampler.
+type samplerConfig struct {
+ remoteParentSampled, remoteParentNotSampled Sampler
+ localParentSampled, localParentNotSampled Sampler
+}
+
+// ParentBasedSamplerOption configures the sampler for a particular sampling case.
+type ParentBasedSamplerOption interface {
+ apply(samplerConfig) samplerConfig
+}
+
+// WithRemoteParentSampled sets the sampler for the case of sampled remote parent.
+func WithRemoteParentSampled(s Sampler) ParentBasedSamplerOption {
+ return remoteParentSampledOption{s}
+}
+
+type remoteParentSampledOption struct {
+ s Sampler
+}
+
+func (o remoteParentSampledOption) apply(config samplerConfig) samplerConfig {
+ config.remoteParentSampled = o.s
+ return config
+}
+
+// WithRemoteParentNotSampled sets the sampler for the case of remote parent
+// which is not sampled.
+func WithRemoteParentNotSampled(s Sampler) ParentBasedSamplerOption {
+ return remoteParentNotSampledOption{s}
+}
+
+type remoteParentNotSampledOption struct {
+ s Sampler
+}
+
+func (o remoteParentNotSampledOption) apply(config samplerConfig) samplerConfig {
+ config.remoteParentNotSampled = o.s
+ return config
+}
+
+// WithLocalParentSampled sets the sampler for the case of sampled local parent.
+func WithLocalParentSampled(s Sampler) ParentBasedSamplerOption {
+ return localParentSampledOption{s}
+}
+
+type localParentSampledOption struct {
+ s Sampler
+}
+
+func (o localParentSampledOption) apply(config samplerConfig) samplerConfig {
+ config.localParentSampled = o.s
+ return config
+}
+
+// WithLocalParentNotSampled sets the sampler for the case of local parent
+// which is not sampled.
+func WithLocalParentNotSampled(s Sampler) ParentBasedSamplerOption {
+ return localParentNotSampledOption{s}
+}
+
+type localParentNotSampledOption struct {
+ s Sampler
+}
+
+func (o localParentNotSampledOption) apply(config samplerConfig) samplerConfig {
+ config.localParentNotSampled = o.s
+ return config
+}
+
+func (pb parentBased) ShouldSample(p SamplingParameters) SamplingResult {
+ psc := trace.SpanContextFromContext(p.ParentContext)
+ if psc.IsValid() {
+ if psc.IsRemote() {
+ if psc.IsSampled() {
+ return pb.config.remoteParentSampled.ShouldSample(p)
+ }
+ return pb.config.remoteParentNotSampled.ShouldSample(p)
+ }
+
+ if psc.IsSampled() {
+ return pb.config.localParentSampled.ShouldSample(p)
+ }
+ return pb.config.localParentNotSampled.ShouldSample(p)
+ }
+ return pb.root.ShouldSample(p)
+}
+
+func (pb parentBased) Description() string {
+ return fmt.Sprintf("ParentBased{root:%s,remoteParentSampled:%s,"+
+ "remoteParentNotSampled:%s,localParentSampled:%s,localParentNotSampled:%s}",
+ pb.root.Description(),
+ pb.config.remoteParentSampled.Description(),
+ pb.config.remoteParentNotSampled.Description(),
+ pb.config.localParentSampled.Description(),
+ pb.config.localParentNotSampled.Description(),
+ )
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go
new file mode 100644
index 00000000..554111bb
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go
@@ -0,0 +1,121 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "context"
+ "sync"
+
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/internal/global"
+)
+
+// simpleSpanProcessor is a SpanProcessor that synchronously sends all
+// completed Spans to a trace.Exporter immediately.
+type simpleSpanProcessor struct {
+ exporterMu sync.Mutex
+ exporter SpanExporter
+ stopOnce sync.Once
+}
+
+var _ SpanProcessor = (*simpleSpanProcessor)(nil)
+
+// NewSimpleSpanProcessor returns a new SpanProcessor that will synchronously
+// send completed spans to the exporter immediately.
+//
+// This SpanProcessor is not recommended for production use. The synchronous
+// nature of this SpanProcessor makes it good for testing, debugging, or showing
+// examples of other features, but it will be slow and have a high computation
+// resource usage overhead. The BatchSpanProcessor is recommended for production
+// use instead.
+func NewSimpleSpanProcessor(exporter SpanExporter) SpanProcessor {
+ ssp := &simpleSpanProcessor{
+ exporter: exporter,
+ }
+ global.Warn("SimpleSpanProcessor is not recommended for production use, consider using BatchSpanProcessor instead.")
+
+ return ssp
+}
+
+// OnStart does nothing.
+func (ssp *simpleSpanProcessor) OnStart(context.Context, ReadWriteSpan) {}
+
+// OnEnd immediately exports a ReadOnlySpan.
+func (ssp *simpleSpanProcessor) OnEnd(s ReadOnlySpan) {
+ ssp.exporterMu.Lock()
+ defer ssp.exporterMu.Unlock()
+
+ if ssp.exporter != nil && s.SpanContext().TraceFlags().IsSampled() {
+ if err := ssp.exporter.ExportSpans(context.Background(), []ReadOnlySpan{s}); err != nil {
+ otel.Handle(err)
+ }
+ }
+}
+
+// Shutdown shuts down the exporter this SimpleSpanProcessor exports to.
+func (ssp *simpleSpanProcessor) Shutdown(ctx context.Context) error {
+ var err error
+ ssp.stopOnce.Do(func() {
+ stopFunc := func(exp SpanExporter) (<-chan error, func()) {
+ done := make(chan error)
+ return done, func() { done <- exp.Shutdown(ctx) }
+ }
+
+ // The exporter field of the simpleSpanProcessor needs to be zeroed to
+ // signal it is shut down, meaning all subsequent calls to OnEnd will
+ // be gracefully ignored. This needs to be done synchronously to avoid
+ // any race condition.
+ //
+ // A closure is used to keep reference to the exporter and then the
+ // field is zeroed. This ensures the simpleSpanProcessor is shut down
+ // before the exporter. This order is important as it avoids a potential
+ // deadlock. If the exporter shut down operation generates a span, that
+ // span would need to be exported. Meaning, OnEnd would be called and
+ // try acquiring the lock that is held here.
+ ssp.exporterMu.Lock()
+ done, shutdown := stopFunc(ssp.exporter)
+ ssp.exporter = nil
+ ssp.exporterMu.Unlock()
+
+ go shutdown()
+
+ // Wait for the exporter to shut down or the deadline to expire.
+ select {
+ case err = <-done:
+ case <-ctx.Done():
+ // It is possible for the exporter to have immediately shut down and
+ // the context to be done simultaneously. In that case this outer
+ // select statement will randomly choose a case. This will result in
+ // a different returned error for similar scenarios. Instead, double
+ // check if the exporter shut down at the same time and return that
+ // error if so. This will ensure consistency as well as ensure
+ // the caller knows the exporter shut down successfully (they can
+ // already determine if the deadline is expired given they passed
+ // the context).
+ select {
+ case err = <-done:
+ default:
+ err = ctx.Err()
+ }
+ }
+ })
+ return err
+}
+
+// ForceFlush does nothing as there is no data to flush.
+func (ssp *simpleSpanProcessor) ForceFlush(context.Context) error {
+ return nil
+}
+
+// MarshalLog is the marshaling function used by the logging system to represent
+// this Span Processor.
+func (ssp *simpleSpanProcessor) MarshalLog() interface{} {
+ return struct {
+ Type string
+ Exporter SpanExporter
+ }{
+ Type: "SimpleSpanProcessor",
+ Exporter: ssp.exporter,
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go b/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go
new file mode 100644
index 00000000..d511d0f2
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go
@@ -0,0 +1,133 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "time"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/sdk/instrumentation"
+ "go.opentelemetry.io/otel/sdk/resource"
+ "go.opentelemetry.io/otel/trace"
+)
+
+// snapshot is an record of a spans state at a particular checkpointed time.
+// It is used as a read-only representation of that state.
+type snapshot struct {
+ name string
+ spanContext trace.SpanContext
+ parent trace.SpanContext
+ spanKind trace.SpanKind
+ startTime time.Time
+ endTime time.Time
+ attributes []attribute.KeyValue
+ events []Event
+ links []Link
+ status Status
+ childSpanCount int
+ droppedAttributeCount int
+ droppedEventCount int
+ droppedLinkCount int
+ resource *resource.Resource
+ instrumentationScope instrumentation.Scope
+}
+
+var _ ReadOnlySpan = snapshot{}
+
+func (s snapshot) private() {}
+
+// Name returns the name of the span.
+func (s snapshot) Name() string {
+ return s.name
+}
+
+// SpanContext returns the unique SpanContext that identifies the span.
+func (s snapshot) SpanContext() trace.SpanContext {
+ return s.spanContext
+}
+
+// Parent returns the unique SpanContext that identifies the parent of the
+// span if one exists. If the span has no parent the returned SpanContext
+// will be invalid.
+func (s snapshot) Parent() trace.SpanContext {
+ return s.parent
+}
+
+// SpanKind returns the role the span plays in a Trace.
+func (s snapshot) SpanKind() trace.SpanKind {
+ return s.spanKind
+}
+
+// StartTime returns the time the span started recording.
+func (s snapshot) StartTime() time.Time {
+ return s.startTime
+}
+
+// EndTime returns the time the span stopped recording. It will be zero if
+// the span has not ended.
+func (s snapshot) EndTime() time.Time {
+ return s.endTime
+}
+
+// Attributes returns the defining attributes of the span.
+func (s snapshot) Attributes() []attribute.KeyValue {
+ return s.attributes
+}
+
+// Links returns all the links the span has to other spans.
+func (s snapshot) Links() []Link {
+ return s.links
+}
+
+// Events returns all the events that occurred within in the spans
+// lifetime.
+func (s snapshot) Events() []Event {
+ return s.events
+}
+
+// Status returns the spans status.
+func (s snapshot) Status() Status {
+ return s.status
+}
+
+// InstrumentationScope returns information about the instrumentation
+// scope that created the span.
+func (s snapshot) InstrumentationScope() instrumentation.Scope {
+ return s.instrumentationScope
+}
+
+// InstrumentationLibrary returns information about the instrumentation
+// library that created the span.
+func (s snapshot) InstrumentationLibrary() instrumentation.Library { //nolint:staticcheck // This method needs to be define for backwards compatibility
+ return s.instrumentationScope
+}
+
+// Resource returns information about the entity that produced the span.
+func (s snapshot) Resource() *resource.Resource {
+ return s.resource
+}
+
+// DroppedAttributes returns the number of attributes dropped by the span
+// due to limits being reached.
+func (s snapshot) DroppedAttributes() int {
+ return s.droppedAttributeCount
+}
+
+// DroppedLinks returns the number of links dropped by the span due to limits
+// being reached.
+func (s snapshot) DroppedLinks() int {
+ return s.droppedLinkCount
+}
+
+// DroppedEvents returns the number of events dropped by the span due to
+// limits being reached.
+func (s snapshot) DroppedEvents() int {
+ return s.droppedEventCount
+}
+
+// ChildSpanCount returns the count of spans that consider the span a
+// direct parent.
+func (s snapshot) ChildSpanCount() int {
+ return s.childSpanCount
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go
new file mode 100644
index 00000000..8f4fc385
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go
@@ -0,0 +1,937 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "context"
+ "fmt"
+ "reflect"
+ "runtime"
+ rt "runtime/trace"
+ "slices"
+ "strings"
+ "sync"
+ "time"
+ "unicode/utf8"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/codes"
+ "go.opentelemetry.io/otel/internal/global"
+ "go.opentelemetry.io/otel/sdk/instrumentation"
+ "go.opentelemetry.io/otel/sdk/resource"
+ semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
+ "go.opentelemetry.io/otel/trace"
+ "go.opentelemetry.io/otel/trace/embedded"
+)
+
+// ReadOnlySpan allows reading information from the data structure underlying a
+// trace.Span. It is used in places where reading information from a span is
+// necessary but changing the span isn't necessary or allowed.
+//
+// Warning: methods may be added to this interface in minor releases.
+type ReadOnlySpan interface {
+ // Name returns the name of the span.
+ Name() string
+ // SpanContext returns the unique SpanContext that identifies the span.
+ SpanContext() trace.SpanContext
+ // Parent returns the unique SpanContext that identifies the parent of the
+ // span if one exists. If the span has no parent the returned SpanContext
+ // will be invalid.
+ Parent() trace.SpanContext
+ // SpanKind returns the role the span plays in a Trace.
+ SpanKind() trace.SpanKind
+ // StartTime returns the time the span started recording.
+ StartTime() time.Time
+ // EndTime returns the time the span stopped recording. It will be zero if
+ // the span has not ended.
+ EndTime() time.Time
+ // Attributes returns the defining attributes of the span.
+ // The order of the returned attributes is not guaranteed to be stable across invocations.
+ Attributes() []attribute.KeyValue
+ // Links returns all the links the span has to other spans.
+ Links() []Link
+ // Events returns all the events that occurred within in the spans
+ // lifetime.
+ Events() []Event
+ // Status returns the spans status.
+ Status() Status
+ // InstrumentationScope returns information about the instrumentation
+ // scope that created the span.
+ InstrumentationScope() instrumentation.Scope
+ // InstrumentationLibrary returns information about the instrumentation
+ // library that created the span.
+ // Deprecated: please use InstrumentationScope instead.
+ InstrumentationLibrary() instrumentation.Library //nolint:staticcheck // This method needs to be define for backwards compatibility
+ // Resource returns information about the entity that produced the span.
+ Resource() *resource.Resource
+ // DroppedAttributes returns the number of attributes dropped by the span
+ // due to limits being reached.
+ DroppedAttributes() int
+ // DroppedLinks returns the number of links dropped by the span due to
+ // limits being reached.
+ DroppedLinks() int
+ // DroppedEvents returns the number of events dropped by the span due to
+ // limits being reached.
+ DroppedEvents() int
+ // ChildSpanCount returns the count of spans that consider the span a
+ // direct parent.
+ ChildSpanCount() int
+
+ // A private method to prevent users implementing the
+ // interface and so future additions to it will not
+ // violate compatibility.
+ private()
+}
+
+// ReadWriteSpan exposes the same methods as trace.Span and in addition allows
+// reading information from the underlying data structure.
+// This interface exposes the union of the methods of trace.Span (which is a
+// "write-only" span) and ReadOnlySpan. New methods for writing or reading span
+// information should be added under trace.Span or ReadOnlySpan, respectively.
+//
+// Warning: methods may be added to this interface in minor releases.
+type ReadWriteSpan interface {
+ trace.Span
+ ReadOnlySpan
+}
+
+// recordingSpan is an implementation of the OpenTelemetry Span API
+// representing the individual component of a trace that is sampled.
+type recordingSpan struct {
+ embedded.Span
+
+ // mu protects the contents of this span.
+ mu sync.Mutex
+
+ // parent holds the parent span of this span as a trace.SpanContext.
+ parent trace.SpanContext
+
+ // spanKind represents the kind of this span as a trace.SpanKind.
+ spanKind trace.SpanKind
+
+ // name is the name of this span.
+ name string
+
+ // startTime is the time at which this span was started.
+ startTime time.Time
+
+ // endTime is the time at which this span was ended. It contains the zero
+ // value of time.Time until the span is ended.
+ endTime time.Time
+
+ // status is the status of this span.
+ status Status
+
+ // childSpanCount holds the number of child spans created for this span.
+ childSpanCount int
+
+ // spanContext holds the SpanContext of this span.
+ spanContext trace.SpanContext
+
+ // attributes is a collection of user provided key/values. The collection
+ // is constrained by a configurable maximum held by the parent
+ // TracerProvider. When additional attributes are added after this maximum
+ // is reached these attributes the user is attempting to add are dropped.
+ // This dropped number of attributes is tracked and reported in the
+ // ReadOnlySpan exported when the span ends.
+ attributes []attribute.KeyValue
+ droppedAttributes int
+ logDropAttrsOnce sync.Once
+
+ // events are stored in FIFO queue capped by configured limit.
+ events evictedQueue[Event]
+
+ // links are stored in FIFO queue capped by configured limit.
+ links evictedQueue[Link]
+
+ // executionTracerTaskEnd ends the execution tracer span.
+ executionTracerTaskEnd func()
+
+ // tracer is the SDK tracer that created this span.
+ tracer *tracer
+}
+
+var (
+ _ ReadWriteSpan = (*recordingSpan)(nil)
+ _ runtimeTracer = (*recordingSpan)(nil)
+)
+
+// SpanContext returns the SpanContext of this span.
+func (s *recordingSpan) SpanContext() trace.SpanContext {
+ if s == nil {
+ return trace.SpanContext{}
+ }
+ return s.spanContext
+}
+
+// IsRecording returns if this span is being recorded. If this span has ended
+// this will return false.
+func (s *recordingSpan) IsRecording() bool {
+ if s == nil {
+ return false
+ }
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ return s.isRecording()
+}
+
+// isRecording returns if this span is being recorded. If this span has ended
+// this will return false.
+//
+// This method assumes s.mu.Lock is held by the caller.
+func (s *recordingSpan) isRecording() bool {
+ if s == nil {
+ return false
+ }
+ return s.endTime.IsZero()
+}
+
+// SetStatus sets the status of the Span in the form of a code and a
+// description, overriding previous values set. The description is only
+// included in the set status when the code is for an error. If this span is
+// not being recorded than this method does nothing.
+func (s *recordingSpan) SetStatus(code codes.Code, description string) {
+ if s == nil {
+ return
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if !s.isRecording() {
+ return
+ }
+ if s.status.Code > code {
+ return
+ }
+
+ status := Status{Code: code}
+ if code == codes.Error {
+ status.Description = description
+ }
+
+ s.status = status
+}
+
+// SetAttributes sets attributes of this span.
+//
+// If a key from attributes already exists the value associated with that key
+// will be overwritten with the value contained in attributes.
+//
+// If this span is not being recorded than this method does nothing.
+//
+// If adding attributes to the span would exceed the maximum amount of
+// attributes the span is configured to have, the last added attributes will
+// be dropped.
+func (s *recordingSpan) SetAttributes(attributes ...attribute.KeyValue) {
+ if s == nil || len(attributes) == 0 {
+ return
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if !s.isRecording() {
+ return
+ }
+
+ limit := s.tracer.provider.spanLimits.AttributeCountLimit
+ if limit == 0 {
+ // No attributes allowed.
+ s.addDroppedAttr(len(attributes))
+ return
+ }
+
+ // If adding these attributes could exceed the capacity of s perform a
+ // de-duplication and truncation while adding to avoid over allocation.
+ if limit > 0 && len(s.attributes)+len(attributes) > limit {
+ s.addOverCapAttrs(limit, attributes)
+ return
+ }
+
+ // Otherwise, add without deduplication. When attributes are read they
+ // will be deduplicated, optimizing the operation.
+ s.attributes = slices.Grow(s.attributes, len(attributes))
+ for _, a := range attributes {
+ if !a.Valid() {
+ // Drop all invalid attributes.
+ s.addDroppedAttr(1)
+ continue
+ }
+ a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a)
+ s.attributes = append(s.attributes, a)
+ }
+}
+
+// Declared as a var so tests can override.
+var logDropAttrs = func() {
+ global.Warn("limit reached: dropping trace Span attributes")
+}
+
+// addDroppedAttr adds incr to the count of dropped attributes.
+//
+// The first, and only the first, time this method is called a warning will be
+// logged.
+//
+// This method assumes s.mu.Lock is held by the caller.
+func (s *recordingSpan) addDroppedAttr(incr int) {
+ s.droppedAttributes += incr
+ s.logDropAttrsOnce.Do(logDropAttrs)
+}
+
+// addOverCapAttrs adds the attributes attrs to the span s while
+// de-duplicating the attributes of s and attrs and dropping attributes that
+// exceed the limit.
+//
+// This method assumes s.mu.Lock is held by the caller.
+//
+// This method should only be called when there is a possibility that adding
+// attrs to s will exceed the limit. Otherwise, attrs should be added to s
+// without checking for duplicates and all retrieval methods of the attributes
+// for s will de-duplicate as needed.
+//
+// This method assumes limit is a value > 0. The argument should be validated
+// by the caller.
+func (s *recordingSpan) addOverCapAttrs(limit int, attrs []attribute.KeyValue) {
+ // In order to not allocate more capacity to s.attributes than needed,
+ // prune and truncate this addition of attributes while adding.
+
+ // Do not set a capacity when creating this map. Benchmark testing has
+ // showed this to only add unused memory allocations in general use.
+ exists := make(map[attribute.Key]int, len(s.attributes))
+ s.dedupeAttrsFromRecord(exists)
+
+ // Now that s.attributes is deduplicated, adding unique attributes up to
+ // the capacity of s will not over allocate s.attributes.
+
+ // max size = limit
+ maxCap := min(len(attrs)+len(s.attributes), limit)
+ if cap(s.attributes) < maxCap {
+ s.attributes = slices.Grow(s.attributes, maxCap-cap(s.attributes))
+ }
+ for _, a := range attrs {
+ if !a.Valid() {
+ // Drop all invalid attributes.
+ s.addDroppedAttr(1)
+ continue
+ }
+
+ if idx, ok := exists[a.Key]; ok {
+ // Perform all updates before dropping, even when at capacity.
+ a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a)
+ s.attributes[idx] = a
+ continue
+ }
+
+ if len(s.attributes) >= limit {
+ // Do not just drop all of the remaining attributes, make sure
+ // updates are checked and performed.
+ s.addDroppedAttr(1)
+ } else {
+ a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a)
+ s.attributes = append(s.attributes, a)
+ exists[a.Key] = len(s.attributes) - 1
+ }
+ }
+}
+
+// truncateAttr returns a truncated version of attr. Only string and string
+// slice attribute values are truncated. String values are truncated to at
+// most a length of limit. Each string slice value is truncated in this fashion
+// (the slice length itself is unaffected).
+//
+// No truncation is performed for a negative limit.
+func truncateAttr(limit int, attr attribute.KeyValue) attribute.KeyValue {
+ if limit < 0 {
+ return attr
+ }
+ switch attr.Value.Type() {
+ case attribute.STRING:
+ v := attr.Value.AsString()
+ return attr.Key.String(truncate(limit, v))
+ case attribute.STRINGSLICE:
+ v := attr.Value.AsStringSlice()
+ for i := range v {
+ v[i] = truncate(limit, v[i])
+ }
+ return attr.Key.StringSlice(v)
+ }
+ return attr
+}
+
+// truncate returns a truncated version of s such that it contains less than
+// the limit number of characters. Truncation is applied by returning the limit
+// number of valid characters contained in s.
+//
+// If limit is negative, it returns the original string.
+//
+// UTF-8 is supported. When truncating, all invalid characters are dropped
+// before applying truncation.
+//
+// If s already contains less than the limit number of bytes, it is returned
+// unchanged. No invalid characters are removed.
+func truncate(limit int, s string) string {
+ // This prioritize performance in the following order based on the most
+ // common expected use-cases.
+ //
+ // - Short values less than the default limit (128).
+ // - Strings with valid encodings that exceed the limit.
+ // - No limit.
+ // - Strings with invalid encodings that exceed the limit.
+ if limit < 0 || len(s) <= limit {
+ return s
+ }
+
+ // Optimistically, assume all valid UTF-8.
+ var b strings.Builder
+ count := 0
+ for i, c := range s {
+ if c != utf8.RuneError {
+ count++
+ if count > limit {
+ return s[:i]
+ }
+ continue
+ }
+
+ _, size := utf8.DecodeRuneInString(s[i:])
+ if size == 1 {
+ // Invalid encoding.
+ b.Grow(len(s) - 1)
+ _, _ = b.WriteString(s[:i])
+ s = s[i:]
+ break
+ }
+ }
+
+ // Fast-path, no invalid input.
+ if b.Cap() == 0 {
+ return s
+ }
+
+ // Truncate while validating UTF-8.
+ for i := 0; i < len(s) && count < limit; {
+ c := s[i]
+ if c < utf8.RuneSelf {
+ // Optimization for single byte runes (common case).
+ _ = b.WriteByte(c)
+ i++
+ count++
+ continue
+ }
+
+ _, size := utf8.DecodeRuneInString(s[i:])
+ if size == 1 {
+ // We checked for all 1-byte runes above, this is a RuneError.
+ i++
+ continue
+ }
+
+ _, _ = b.WriteString(s[i : i+size])
+ i += size
+ count++
+ }
+
+ return b.String()
+}
+
+// End ends the span. This method does nothing if the span is already ended or
+// is not being recorded.
+//
+// The only SpanEndOption currently supported are [trace.WithTimestamp], and
+// [trace.WithStackTrace].
+//
+// If this method is called while panicking an error event is added to the
+// Span before ending it and the panic is continued.
+func (s *recordingSpan) End(options ...trace.SpanEndOption) {
+ // Do not start by checking if the span is being recorded which requires
+ // acquiring a lock. Make a minimal check that the span is not nil.
+ if s == nil {
+ return
+ }
+
+ // Store the end time as soon as possible to avoid artificially increasing
+ // the span's duration in case some operation below takes a while.
+ et := monotonicEndTime(s.startTime)
+
+ // Lock the span now that we have an end time and see if we need to do any more processing.
+ s.mu.Lock()
+ if !s.isRecording() {
+ s.mu.Unlock()
+ return
+ }
+
+ config := trace.NewSpanEndConfig(options...)
+ if recovered := recover(); recovered != nil {
+ // Record but don't stop the panic.
+ defer panic(recovered)
+ opts := []trace.EventOption{
+ trace.WithAttributes(
+ semconv.ExceptionType(typeStr(recovered)),
+ semconv.ExceptionMessage(fmt.Sprint(recovered)),
+ ),
+ }
+
+ if config.StackTrace() {
+ opts = append(opts, trace.WithAttributes(
+ semconv.ExceptionStacktrace(recordStackTrace()),
+ ))
+ }
+
+ s.addEvent(semconv.ExceptionEventName, opts...)
+ }
+
+ if s.executionTracerTaskEnd != nil {
+ s.mu.Unlock()
+ s.executionTracerTaskEnd()
+ s.mu.Lock()
+ }
+
+ // Setting endTime to non-zero marks the span as ended and not recording.
+ if config.Timestamp().IsZero() {
+ s.endTime = et
+ } else {
+ s.endTime = config.Timestamp()
+ }
+ s.mu.Unlock()
+
+ sps := s.tracer.provider.getSpanProcessors()
+ if len(sps) == 0 {
+ return
+ }
+ snap := s.snapshot()
+ for _, sp := range sps {
+ sp.sp.OnEnd(snap)
+ }
+}
+
+// monotonicEndTime returns the end time at present but offset from start,
+// monotonically.
+//
+// The monotonic clock is used in subtractions hence the duration since start
+// added back to start gives end as a monotonic time. See
+// https://golang.org/pkg/time/#hdr-Monotonic_Clocks
+func monotonicEndTime(start time.Time) time.Time {
+ return start.Add(time.Since(start))
+}
+
+// RecordError will record err as a span event for this span. An additional call to
+// SetStatus is required if the Status of the Span should be set to Error, this method
+// does not change the Span status. If this span is not being recorded or err is nil
+// than this method does nothing.
+func (s *recordingSpan) RecordError(err error, opts ...trace.EventOption) {
+ if s == nil || err == nil {
+ return
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if !s.isRecording() {
+ return
+ }
+
+ opts = append(opts, trace.WithAttributes(
+ semconv.ExceptionType(typeStr(err)),
+ semconv.ExceptionMessage(err.Error()),
+ ))
+
+ c := trace.NewEventConfig(opts...)
+ if c.StackTrace() {
+ opts = append(opts, trace.WithAttributes(
+ semconv.ExceptionStacktrace(recordStackTrace()),
+ ))
+ }
+
+ s.addEvent(semconv.ExceptionEventName, opts...)
+}
+
+func typeStr(i interface{}) string {
+ t := reflect.TypeOf(i)
+ if t.PkgPath() == "" && t.Name() == "" {
+ // Likely a builtin type.
+ return t.String()
+ }
+ return fmt.Sprintf("%s.%s", t.PkgPath(), t.Name())
+}
+
+func recordStackTrace() string {
+ stackTrace := make([]byte, 2048)
+ n := runtime.Stack(stackTrace, false)
+
+ return string(stackTrace[0:n])
+}
+
+// AddEvent adds an event with the provided name and options. If this span is
+// not being recorded then this method does nothing.
+func (s *recordingSpan) AddEvent(name string, o ...trace.EventOption) {
+ if s == nil {
+ return
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if !s.isRecording() {
+ return
+ }
+ s.addEvent(name, o...)
+}
+
+// addEvent adds an event with the provided name and options.
+//
+// This method assumes s.mu.Lock is held by the caller.
+func (s *recordingSpan) addEvent(name string, o ...trace.EventOption) {
+ c := trace.NewEventConfig(o...)
+ e := Event{Name: name, Attributes: c.Attributes(), Time: c.Timestamp()}
+
+ // Discard attributes over limit.
+ limit := s.tracer.provider.spanLimits.AttributePerEventCountLimit
+ if limit == 0 {
+ // Drop all attributes.
+ e.DroppedAttributeCount = len(e.Attributes)
+ e.Attributes = nil
+ } else if limit > 0 && len(e.Attributes) > limit {
+ // Drop over capacity.
+ e.DroppedAttributeCount = len(e.Attributes) - limit
+ e.Attributes = e.Attributes[:limit]
+ }
+
+ s.events.add(e)
+}
+
+// SetName sets the name of this span. If this span is not being recorded than
+// this method does nothing.
+func (s *recordingSpan) SetName(name string) {
+ if s == nil {
+ return
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if !s.isRecording() {
+ return
+ }
+ s.name = name
+}
+
+// Name returns the name of this span.
+func (s *recordingSpan) Name() string {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.name
+}
+
+// Name returns the SpanContext of this span's parent span.
+func (s *recordingSpan) Parent() trace.SpanContext {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.parent
+}
+
+// SpanKind returns the SpanKind of this span.
+func (s *recordingSpan) SpanKind() trace.SpanKind {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.spanKind
+}
+
+// StartTime returns the time this span started.
+func (s *recordingSpan) StartTime() time.Time {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.startTime
+}
+
+// EndTime returns the time this span ended. For spans that have not yet
+// ended, the returned value will be the zero value of time.Time.
+func (s *recordingSpan) EndTime() time.Time {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.endTime
+}
+
+// Attributes returns the attributes of this span.
+//
+// The order of the returned attributes is not guaranteed to be stable.
+func (s *recordingSpan) Attributes() []attribute.KeyValue {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ s.dedupeAttrs()
+ return s.attributes
+}
+
+// dedupeAttrs deduplicates the attributes of s to fit capacity.
+//
+// This method assumes s.mu.Lock is held by the caller.
+func (s *recordingSpan) dedupeAttrs() {
+ // Do not set a capacity when creating this map. Benchmark testing has
+ // showed this to only add unused memory allocations in general use.
+ exists := make(map[attribute.Key]int, len(s.attributes))
+ s.dedupeAttrsFromRecord(exists)
+}
+
+// dedupeAttrsFromRecord deduplicates the attributes of s to fit capacity
+// using record as the record of unique attribute keys to their index.
+//
+// This method assumes s.mu.Lock is held by the caller.
+func (s *recordingSpan) dedupeAttrsFromRecord(record map[attribute.Key]int) {
+ // Use the fact that slices share the same backing array.
+ unique := s.attributes[:0]
+ for _, a := range s.attributes {
+ if idx, ok := record[a.Key]; ok {
+ unique[idx] = a
+ } else {
+ unique = append(unique, a)
+ record[a.Key] = len(unique) - 1
+ }
+ }
+ clear(s.attributes[len(unique):]) // Erase unneeded elements to let GC collect objects.
+ s.attributes = unique
+}
+
+// Links returns the links of this span.
+func (s *recordingSpan) Links() []Link {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if len(s.links.queue) == 0 {
+ return []Link{}
+ }
+ return s.links.copy()
+}
+
+// Events returns the events of this span.
+func (s *recordingSpan) Events() []Event {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if len(s.events.queue) == 0 {
+ return []Event{}
+ }
+ return s.events.copy()
+}
+
+// Status returns the status of this span.
+func (s *recordingSpan) Status() Status {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.status
+}
+
+// InstrumentationScope returns the instrumentation.Scope associated with
+// the Tracer that created this span.
+func (s *recordingSpan) InstrumentationScope() instrumentation.Scope {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.tracer.instrumentationScope
+}
+
+// InstrumentationLibrary returns the instrumentation.Library associated with
+// the Tracer that created this span.
+func (s *recordingSpan) InstrumentationLibrary() instrumentation.Library { //nolint:staticcheck // This method needs to be define for backwards compatibility
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.tracer.instrumentationScope
+}
+
+// Resource returns the Resource associated with the Tracer that created this
+// span.
+func (s *recordingSpan) Resource() *resource.Resource {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.tracer.provider.resource
+}
+
+func (s *recordingSpan) AddLink(link trace.Link) {
+ if s == nil {
+ return
+ }
+ if !link.SpanContext.IsValid() && len(link.Attributes) == 0 &&
+ link.SpanContext.TraceState().Len() == 0 {
+ return
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if !s.isRecording() {
+ return
+ }
+
+ l := Link{SpanContext: link.SpanContext, Attributes: link.Attributes}
+
+ // Discard attributes over limit.
+ limit := s.tracer.provider.spanLimits.AttributePerLinkCountLimit
+ if limit == 0 {
+ // Drop all attributes.
+ l.DroppedAttributeCount = len(l.Attributes)
+ l.Attributes = nil
+ } else if limit > 0 && len(l.Attributes) > limit {
+ l.DroppedAttributeCount = len(l.Attributes) - limit
+ l.Attributes = l.Attributes[:limit]
+ }
+
+ s.links.add(l)
+}
+
+// DroppedAttributes returns the number of attributes dropped by the span
+// due to limits being reached.
+func (s *recordingSpan) DroppedAttributes() int {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.droppedAttributes
+}
+
+// DroppedLinks returns the number of links dropped by the span due to limits
+// being reached.
+func (s *recordingSpan) DroppedLinks() int {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.links.droppedCount
+}
+
+// DroppedEvents returns the number of events dropped by the span due to
+// limits being reached.
+func (s *recordingSpan) DroppedEvents() int {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.events.droppedCount
+}
+
+// ChildSpanCount returns the count of spans that consider the span a
+// direct parent.
+func (s *recordingSpan) ChildSpanCount() int {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.childSpanCount
+}
+
+// TracerProvider returns a trace.TracerProvider that can be used to generate
+// additional Spans on the same telemetry pipeline as the current Span.
+func (s *recordingSpan) TracerProvider() trace.TracerProvider {
+ return s.tracer.provider
+}
+
+// snapshot creates a read-only copy of the current state of the span.
+func (s *recordingSpan) snapshot() ReadOnlySpan {
+ var sd snapshot
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ sd.endTime = s.endTime
+ sd.instrumentationScope = s.tracer.instrumentationScope
+ sd.name = s.name
+ sd.parent = s.parent
+ sd.resource = s.tracer.provider.resource
+ sd.spanContext = s.spanContext
+ sd.spanKind = s.spanKind
+ sd.startTime = s.startTime
+ sd.status = s.status
+ sd.childSpanCount = s.childSpanCount
+
+ if len(s.attributes) > 0 {
+ s.dedupeAttrs()
+ sd.attributes = s.attributes
+ }
+ sd.droppedAttributeCount = s.droppedAttributes
+ if len(s.events.queue) > 0 {
+ sd.events = s.events.copy()
+ sd.droppedEventCount = s.events.droppedCount
+ }
+ if len(s.links.queue) > 0 {
+ sd.links = s.links.copy()
+ sd.droppedLinkCount = s.links.droppedCount
+ }
+ return &sd
+}
+
+func (s *recordingSpan) addChild() {
+ if s == nil {
+ return
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if !s.isRecording() {
+ return
+ }
+ s.childSpanCount++
+}
+
+func (*recordingSpan) private() {}
+
+// runtimeTrace starts a "runtime/trace".Task for the span and returns a
+// context containing the task.
+func (s *recordingSpan) runtimeTrace(ctx context.Context) context.Context {
+ if !rt.IsEnabled() {
+ // Avoid additional overhead if runtime/trace is not enabled.
+ return ctx
+ }
+ nctx, task := rt.NewTask(ctx, s.name)
+
+ s.mu.Lock()
+ s.executionTracerTaskEnd = task.End
+ s.mu.Unlock()
+
+ return nctx
+}
+
+// nonRecordingSpan is a minimal implementation of the OpenTelemetry Span API
+// that wraps a SpanContext. It performs no operations other than to return
+// the wrapped SpanContext or TracerProvider that created it.
+type nonRecordingSpan struct {
+ embedded.Span
+
+ // tracer is the SDK tracer that created this span.
+ tracer *tracer
+ sc trace.SpanContext
+}
+
+var _ trace.Span = nonRecordingSpan{}
+
+// SpanContext returns the wrapped SpanContext.
+func (s nonRecordingSpan) SpanContext() trace.SpanContext { return s.sc }
+
+// IsRecording always returns false.
+func (nonRecordingSpan) IsRecording() bool { return false }
+
+// SetStatus does nothing.
+func (nonRecordingSpan) SetStatus(codes.Code, string) {}
+
+// SetError does nothing.
+func (nonRecordingSpan) SetError(bool) {}
+
+// SetAttributes does nothing.
+func (nonRecordingSpan) SetAttributes(...attribute.KeyValue) {}
+
+// End does nothing.
+func (nonRecordingSpan) End(...trace.SpanEndOption) {}
+
+// RecordError does nothing.
+func (nonRecordingSpan) RecordError(error, ...trace.EventOption) {}
+
+// AddEvent does nothing.
+func (nonRecordingSpan) AddEvent(string, ...trace.EventOption) {}
+
+// AddLink does nothing.
+func (nonRecordingSpan) AddLink(trace.Link) {}
+
+// SetName does nothing.
+func (nonRecordingSpan) SetName(string) {}
+
+// TracerProvider returns the trace.TracerProvider that provided the Tracer
+// that created this span.
+func (s nonRecordingSpan) TracerProvider() trace.TracerProvider { return s.tracer.provider }
+
+func isRecording(s SamplingResult) bool {
+ return s.Decision == RecordOnly || s.Decision == RecordAndSample
+}
+
+func isSampled(s SamplingResult) bool {
+ return s.Decision == RecordAndSample
+}
+
+// Status is the classified state of a Span.
+type Status struct {
+ // Code is an identifier of a Spans state classification.
+ Code codes.Code
+ // Description is a user hint about why that status was set. It is only
+ // applicable when Code is Error.
+ Description string
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go
new file mode 100644
index 00000000..6bdda3d9
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go
@@ -0,0 +1,36 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import "context"
+
+// SpanExporter handles the delivery of spans to external receivers. This is
+// the final component in the trace export pipeline.
+type SpanExporter interface {
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // ExportSpans exports a batch of spans.
+ //
+ // This function is called synchronously, so there is no concurrency
+ // safety requirement. However, due to the synchronous calling pattern,
+ // it is critical that all timeouts and cancellations contained in the
+ // passed context must be honored.
+ //
+ // Any retry logic must be contained in this function. The SDK that
+ // calls this function will not implement any retry logic. All errors
+ // returned by this function are considered unrecoverable and will be
+ // reported to a configured error Handler.
+ ExportSpans(ctx context.Context, spans []ReadOnlySpan) error
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Shutdown notifies the exporter of a pending halt to operations. The
+ // exporter is expected to perform any cleanup or synchronization it
+ // requires while honoring all timeouts and cancellations contained in
+ // the passed context.
+ Shutdown(ctx context.Context) error
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
new file mode 100644
index 00000000..bec5e209
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go
@@ -0,0 +1,114 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import "go.opentelemetry.io/otel/sdk/internal/env"
+
+const (
+ // DefaultAttributeValueLengthLimit is the default maximum allowed
+ // attribute value length, unlimited.
+ DefaultAttributeValueLengthLimit = -1
+
+ // DefaultAttributeCountLimit is the default maximum number of attributes
+ // a span can have.
+ DefaultAttributeCountLimit = 128
+
+ // DefaultEventCountLimit is the default maximum number of events a span
+ // can have.
+ DefaultEventCountLimit = 128
+
+ // DefaultLinkCountLimit is the default maximum number of links a span can
+ // have.
+ DefaultLinkCountLimit = 128
+
+ // DefaultAttributePerEventCountLimit is the default maximum number of
+ // attributes a span event can have.
+ DefaultAttributePerEventCountLimit = 128
+
+ // DefaultAttributePerLinkCountLimit is the default maximum number of
+ // attributes a span link can have.
+ DefaultAttributePerLinkCountLimit = 128
+)
+
+// SpanLimits represents the limits of a span.
+type SpanLimits struct {
+ // AttributeValueLengthLimit is the maximum allowed attribute value length.
+ //
+ // This limit only applies to string and string slice attribute values.
+ // Any string longer than this value will be truncated to this length.
+ //
+ // Setting this to a negative value means no limit is applied.
+ AttributeValueLengthLimit int
+
+ // AttributeCountLimit is the maximum allowed span attribute count. Any
+ // attribute added to a span once this limit is reached will be dropped.
+ //
+ // Setting this to zero means no attributes will be recorded.
+ //
+ // Setting this to a negative value means no limit is applied.
+ AttributeCountLimit int
+
+ // EventCountLimit is the maximum allowed span event count. Any event
+ // added to a span once this limit is reached means it will be added but
+ // the oldest event will be dropped.
+ //
+ // Setting this to zero means no events we be recorded.
+ //
+ // Setting this to a negative value means no limit is applied.
+ EventCountLimit int
+
+ // LinkCountLimit is the maximum allowed span link count. Any link added
+ // to a span once this limit is reached means it will be added but the
+ // oldest link will be dropped.
+ //
+ // Setting this to zero means no links we be recorded.
+ //
+ // Setting this to a negative value means no limit is applied.
+ LinkCountLimit int
+
+ // AttributePerEventCountLimit is the maximum number of attributes allowed
+ // per span event. Any attribute added after this limit reached will be
+ // dropped.
+ //
+ // Setting this to zero means no attributes will be recorded for events.
+ //
+ // Setting this to a negative value means no limit is applied.
+ AttributePerEventCountLimit int
+
+ // AttributePerLinkCountLimit is the maximum number of attributes allowed
+ // per span link. Any attribute added after this limit reached will be
+ // dropped.
+ //
+ // Setting this to zero means no attributes will be recorded for links.
+ //
+ // Setting this to a negative value means no limit is applied.
+ AttributePerLinkCountLimit int
+}
+
+// NewSpanLimits returns a SpanLimits with all limits set to the value their
+// corresponding environment variable holds, or the default if unset.
+//
+// • AttributeValueLengthLimit: OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT
+// (default: unlimited)
+//
+// • AttributeCountLimit: OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT (default: 128)
+//
+// • EventCountLimit: OTEL_SPAN_EVENT_COUNT_LIMIT (default: 128)
+//
+// • AttributePerEventCountLimit: OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT (default:
+// 128)
+//
+// • LinkCountLimit: OTEL_SPAN_LINK_COUNT_LIMIT (default: 128)
+//
+// • AttributePerLinkCountLimit: OTEL_LINK_ATTRIBUTE_COUNT_LIMIT (default: 128)
+func NewSpanLimits() SpanLimits {
+ return SpanLimits{
+ AttributeValueLengthLimit: env.SpanAttributeValueLength(DefaultAttributeValueLengthLimit),
+ AttributeCountLimit: env.SpanAttributeCount(DefaultAttributeCountLimit),
+ EventCountLimit: env.SpanEventCount(DefaultEventCountLimit),
+ LinkCountLimit: env.SpanLinkCount(DefaultLinkCountLimit),
+ AttributePerEventCountLimit: env.SpanEventAttributeCount(DefaultAttributePerEventCountLimit),
+ AttributePerLinkCountLimit: env.SpanLinkAttributeCount(DefaultAttributePerLinkCountLimit),
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go
new file mode 100644
index 00000000..af7f9177
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go
@@ -0,0 +1,61 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "context"
+ "sync"
+)
+
+// SpanProcessor is a processing pipeline for spans in the trace signal.
+// SpanProcessors registered with a TracerProvider and are called at the start
+// and end of a Span's lifecycle, and are called in the order they are
+// registered.
+type SpanProcessor interface {
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // OnStart is called when a span is started. It is called synchronously
+ // and should not block.
+ OnStart(parent context.Context, s ReadWriteSpan)
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // OnEnd is called when span is finished. It is called synchronously and
+ // hence not block.
+ OnEnd(s ReadOnlySpan)
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // Shutdown is called when the SDK shuts down. Any cleanup or release of
+ // resources held by the processor should be done in this call.
+ //
+ // Calls to OnStart, OnEnd, or ForceFlush after this has been called
+ // should be ignored.
+ //
+ // All timeouts and cancellations contained in ctx must be honored, this
+ // should not block indefinitely.
+ Shutdown(ctx context.Context) error
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+
+ // ForceFlush exports all ended spans to the configured Exporter that have not yet
+ // been exported. It should only be called when absolutely necessary, such as when
+ // using a FaaS provider that may suspend the process after an invocation, but before
+ // the Processor can export the completed spans.
+ ForceFlush(ctx context.Context) error
+ // DO NOT CHANGE: any modification will not be backwards compatible and
+ // must never be done outside of a new major release.
+}
+
+type spanProcessorState struct {
+ sp SpanProcessor
+ state sync.Once
+}
+
+func newSpanProcessorState(sp SpanProcessor) *spanProcessorState {
+ return &spanProcessorState{sp: sp}
+}
+
+type spanProcessorStates []*spanProcessorState
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go b/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
new file mode 100644
index 00000000..43419d3b
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go
@@ -0,0 +1,153 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+import (
+ "context"
+ "time"
+
+ "go.opentelemetry.io/otel/sdk/instrumentation"
+ "go.opentelemetry.io/otel/trace"
+ "go.opentelemetry.io/otel/trace/embedded"
+)
+
+type tracer struct {
+ embedded.Tracer
+
+ provider *TracerProvider
+ instrumentationScope instrumentation.Scope
+}
+
+var _ trace.Tracer = &tracer{}
+
+// Start starts a Span and returns it along with a context containing it.
+//
+// The Span is created with the provided name and as a child of any existing
+// span context found in the passed context. The created Span will be
+// configured appropriately by any SpanOption passed.
+func (tr *tracer) Start(ctx context.Context, name string, options ...trace.SpanStartOption) (context.Context, trace.Span) {
+ config := trace.NewSpanStartConfig(options...)
+
+ if ctx == nil {
+ // Prevent trace.ContextWithSpan from panicking.
+ ctx = context.Background()
+ }
+
+ // For local spans created by this SDK, track child span count.
+ if p := trace.SpanFromContext(ctx); p != nil {
+ if sdkSpan, ok := p.(*recordingSpan); ok {
+ sdkSpan.addChild()
+ }
+ }
+
+ s := tr.newSpan(ctx, name, &config)
+ if rw, ok := s.(ReadWriteSpan); ok && s.IsRecording() {
+ sps := tr.provider.getSpanProcessors()
+ for _, sp := range sps {
+ sp.sp.OnStart(ctx, rw)
+ }
+ }
+ if rtt, ok := s.(runtimeTracer); ok {
+ ctx = rtt.runtimeTrace(ctx)
+ }
+
+ return trace.ContextWithSpan(ctx, s), s
+}
+
+type runtimeTracer interface {
+ // runtimeTrace starts a "runtime/trace".Task for the span and
+ // returns a context containing the task.
+ runtimeTrace(ctx context.Context) context.Context
+}
+
+// newSpan returns a new configured span.
+func (tr *tracer) newSpan(ctx context.Context, name string, config *trace.SpanConfig) trace.Span {
+ // If told explicitly to make this a new root use a zero value SpanContext
+ // as a parent which contains an invalid trace ID and is not remote.
+ var psc trace.SpanContext
+ if config.NewRoot() {
+ ctx = trace.ContextWithSpanContext(ctx, psc)
+ } else {
+ psc = trace.SpanContextFromContext(ctx)
+ }
+
+ // If there is a valid parent trace ID, use it to ensure the continuity of
+ // the trace. Always generate a new span ID so other components can rely
+ // on a unique span ID, even if the Span is non-recording.
+ var tid trace.TraceID
+ var sid trace.SpanID
+ if !psc.TraceID().IsValid() {
+ tid, sid = tr.provider.idGenerator.NewIDs(ctx)
+ } else {
+ tid = psc.TraceID()
+ sid = tr.provider.idGenerator.NewSpanID(ctx, tid)
+ }
+
+ samplingResult := tr.provider.sampler.ShouldSample(SamplingParameters{
+ ParentContext: ctx,
+ TraceID: tid,
+ Name: name,
+ Kind: config.SpanKind(),
+ Attributes: config.Attributes(),
+ Links: config.Links(),
+ })
+
+ scc := trace.SpanContextConfig{
+ TraceID: tid,
+ SpanID: sid,
+ TraceState: samplingResult.Tracestate,
+ }
+ if isSampled(samplingResult) {
+ scc.TraceFlags = psc.TraceFlags() | trace.FlagsSampled
+ } else {
+ scc.TraceFlags = psc.TraceFlags() &^ trace.FlagsSampled
+ }
+ sc := trace.NewSpanContext(scc)
+
+ if !isRecording(samplingResult) {
+ return tr.newNonRecordingSpan(sc)
+ }
+ return tr.newRecordingSpan(psc, sc, name, samplingResult, config)
+}
+
+// newRecordingSpan returns a new configured recordingSpan.
+func (tr *tracer) newRecordingSpan(psc, sc trace.SpanContext, name string, sr SamplingResult, config *trace.SpanConfig) *recordingSpan {
+ startTime := config.Timestamp()
+ if startTime.IsZero() {
+ startTime = time.Now()
+ }
+
+ s := &recordingSpan{
+ // Do not pre-allocate the attributes slice here! Doing so will
+ // allocate memory that is likely never going to be used, or if used,
+ // will be over-sized. The default Go compiler has been tested to
+ // dynamically allocate needed space very well. Benchmarking has shown
+ // it to be more performant than what we can predetermine here,
+ // especially for the common use case of few to no added
+ // attributes.
+
+ parent: psc,
+ spanContext: sc,
+ spanKind: trace.ValidateSpanKind(config.SpanKind()),
+ name: name,
+ startTime: startTime,
+ events: newEvictedQueueEvent(tr.provider.spanLimits.EventCountLimit),
+ links: newEvictedQueueLink(tr.provider.spanLimits.LinkCountLimit),
+ tracer: tr,
+ }
+
+ for _, l := range config.Links() {
+ s.AddLink(l)
+ }
+
+ s.SetAttributes(sr.Attributes...)
+ s.SetAttributes(config.Attributes()...)
+
+ return s
+}
+
+// newNonRecordingSpan returns a new configured nonRecordingSpan.
+func (tr *tracer) newNonRecordingSpan(sc trace.SpanContext) nonRecordingSpan {
+ return nonRecordingSpan{tracer: tr, sc: sc}
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/version.go b/vendor/go.opentelemetry.io/otel/sdk/trace/version.go
new file mode 100644
index 00000000..b84dd2c5
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/trace/version.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/sdk/trace"
+
+// version is the current release version of the metric SDK in use.
+func version() string {
+ return "1.16.0-rc.1"
+}
diff --git a/vendor/go.opentelemetry.io/otel/sdk/version.go b/vendor/go.opentelemetry.io/otel/sdk/version.go
new file mode 100644
index 00000000..6b403851
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/sdk/version.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package sdk // import "go.opentelemetry.io/otel/sdk"
+
+// Version is the current release version of the OpenTelemetry SDK in use.
+func Version() string {
+ return "1.34.0"
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/README.md
new file mode 100644
index 00000000..87b842c5
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/README.md
@@ -0,0 +1,3 @@
+# Semconv v1.17.0
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.17.0)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/doc.go
new file mode 100644
index 00000000..e087c9c0
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/doc.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package semconv implements OpenTelemetry semantic conventions.
+//
+// OpenTelemetry semantic conventions are agreed standardized naming
+// patterns for OpenTelemetry things. This package represents the conventions
+// as of the v1.17.0 version of the OpenTelemetry specification.
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0"
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/event.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/event.go
new file mode 100644
index 00000000..c7b804bb
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/event.go
@@ -0,0 +1,188 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0"
+
+import "go.opentelemetry.io/otel/attribute"
+
+// This semantic convention defines the attributes used to represent a feature
+// flag evaluation as an event.
+const (
+ // FeatureFlagKeyKey is the attribute Key conforming to the
+ // "feature_flag.key" semantic conventions. It represents the unique
+ // identifier of the feature flag.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'logo-color'
+ FeatureFlagKeyKey = attribute.Key("feature_flag.key")
+
+ // FeatureFlagProviderNameKey is the attribute Key conforming to the
+ // "feature_flag.provider_name" semantic conventions. It represents the
+ // name of the service provider that performs the flag evaluation.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: stable
+ // Examples: 'Flag Manager'
+ FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name")
+
+ // FeatureFlagVariantKey is the attribute Key conforming to the
+ // "feature_flag.variant" semantic conventions. It represents the sHOULD be
+ // a semantic identifier for a value. If one is unavailable, a stringified
+ // version of the value can be used.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: stable
+ // Examples: 'red', 'true', 'on'
+ // Note: A semantic identifier, commonly referred to as a variant, provides
+ // a means
+ // for referring to a value without including the value itself. This can
+ // provide additional context for understanding the meaning behind a value.
+ // For example, the variant `red` maybe be used for the value `#c05543`.
+ //
+ // A stringified version of the value can be used in situations where a
+ // semantic identifier is unavailable. String representation of the value
+ // should be determined by the implementer.
+ FeatureFlagVariantKey = attribute.Key("feature_flag.variant")
+)
+
+// FeatureFlagKey returns an attribute KeyValue conforming to the
+// "feature_flag.key" semantic conventions. It represents the unique identifier
+// of the feature flag.
+func FeatureFlagKey(val string) attribute.KeyValue {
+ return FeatureFlagKeyKey.String(val)
+}
+
+// FeatureFlagProviderName returns an attribute KeyValue conforming to the
+// "feature_flag.provider_name" semantic conventions. It represents the name of
+// the service provider that performs the flag evaluation.
+func FeatureFlagProviderName(val string) attribute.KeyValue {
+ return FeatureFlagProviderNameKey.String(val)
+}
+
+// FeatureFlagVariant returns an attribute KeyValue conforming to the
+// "feature_flag.variant" semantic conventions. It represents the sHOULD be a
+// semantic identifier for a value. If one is unavailable, a stringified
+// version of the value can be used.
+func FeatureFlagVariant(val string) attribute.KeyValue {
+ return FeatureFlagVariantKey.String(val)
+}
+
+// RPC received/sent message.
+const (
+ // MessageTypeKey is the attribute Key conforming to the "message.type"
+ // semantic conventions. It represents the whether this is a received or
+ // sent message.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ MessageTypeKey = attribute.Key("message.type")
+
+ // MessageIDKey is the attribute Key conforming to the "message.id"
+ // semantic conventions. It represents the mUST be calculated as two
+ // different counters starting from `1` one for sent messages and one for
+ // received message.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Note: This way we guarantee that the values will be consistent between
+ // different implementations.
+ MessageIDKey = attribute.Key("message.id")
+
+ // MessageCompressedSizeKey is the attribute Key conforming to the
+ // "message.compressed_size" semantic conventions. It represents the
+ // compressed size of the message in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ MessageCompressedSizeKey = attribute.Key("message.compressed_size")
+
+ // MessageUncompressedSizeKey is the attribute Key conforming to the
+ // "message.uncompressed_size" semantic conventions. It represents the
+ // uncompressed size of the message in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size")
+)
+
+var (
+ // sent
+ MessageTypeSent = MessageTypeKey.String("SENT")
+ // received
+ MessageTypeReceived = MessageTypeKey.String("RECEIVED")
+)
+
+// MessageID returns an attribute KeyValue conforming to the "message.id"
+// semantic conventions. It represents the mUST be calculated as two different
+// counters starting from `1` one for sent messages and one for received
+// message.
+func MessageID(val int) attribute.KeyValue {
+ return MessageIDKey.Int(val)
+}
+
+// MessageCompressedSize returns an attribute KeyValue conforming to the
+// "message.compressed_size" semantic conventions. It represents the compressed
+// size of the message in bytes.
+func MessageCompressedSize(val int) attribute.KeyValue {
+ return MessageCompressedSizeKey.Int(val)
+}
+
+// MessageUncompressedSize returns an attribute KeyValue conforming to the
+// "message.uncompressed_size" semantic conventions. It represents the
+// uncompressed size of the message in bytes.
+func MessageUncompressedSize(val int) attribute.KeyValue {
+ return MessageUncompressedSizeKey.Int(val)
+}
+
+// The attributes used to report a single exception associated with a span.
+const (
+ // ExceptionEscapedKey is the attribute Key conforming to the
+ // "exception.escaped" semantic conventions. It represents the sHOULD be
+ // set to true if the exception event is recorded at a point where it is
+ // known that the exception is escaping the scope of the span.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Note: An exception is considered to have escaped (or left) the scope of
+ // a span,
+ // if that span is ended while the exception is still logically "in
+ // flight".
+ // This may be actually "in flight" in some languages (e.g. if the
+ // exception
+ // is passed to a Context manager's `__exit__` method in Python) but will
+ // usually be caught at the point of recording the exception in most
+ // languages.
+ //
+ // It is usually not possible to determine at the point where an exception
+ // is thrown
+ // whether it will escape the scope of a span.
+ // However, it is trivial to know that an exception
+ // will escape, if one checks for an active exception just before ending
+ // the span,
+ // as done in the [example above](#recording-an-exception).
+ //
+ // It follows that an exception may still escape the scope of the span
+ // even if the `exception.escaped` attribute was not set or set to false,
+ // since the event might have been recorded at a time where it was not
+ // clear whether the exception will escape.
+ ExceptionEscapedKey = attribute.Key("exception.escaped")
+)
+
+// ExceptionEscaped returns an attribute KeyValue conforming to the
+// "exception.escaped" semantic conventions. It represents the sHOULD be set to
+// true if the exception event is recorded at a point where it is known that
+// the exception is escaping the scope of the span.
+func ExceptionEscaped(val bool) attribute.KeyValue {
+ return ExceptionEscapedKey.Bool(val)
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/exception.go
new file mode 100644
index 00000000..137acc67
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/exception.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0"
+
+const (
+ // ExceptionEventName is the name of the Span event representing an exception.
+ ExceptionEventName = "exception"
+)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/http.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/http.go
new file mode 100644
index 00000000..d318221e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/http.go
@@ -0,0 +1,10 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0"
+
+// HTTP scheme attributes.
+var (
+ HTTPSchemeHTTP = HTTPSchemeKey.String("http")
+ HTTPSchemeHTTPS = HTTPSchemeKey.String("https")
+)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/resource.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/resource.go
new file mode 100644
index 00000000..7e365e82
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/resource.go
@@ -0,0 +1,1999 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0"
+
+import "go.opentelemetry.io/otel/attribute"
+
+// The web browser in which the application represented by the resource is
+// running. The `browser.*` attributes MUST be used only for resources that
+// represent applications running in a web browser (regardless of whether
+// running on a mobile or desktop device).
+const (
+ // BrowserBrandsKey is the attribute Key conforming to the "browser.brands"
+ // semantic conventions. It represents the array of brand name and version
+ // separated by a space
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99'
+ // Note: This value is intended to be taken from the [UA client hints
+ // API](https://wicg.github.io/ua-client-hints/#interface)
+ // (`navigator.userAgentData.brands`).
+ BrowserBrandsKey = attribute.Key("browser.brands")
+
+ // BrowserPlatformKey is the attribute Key conforming to the
+ // "browser.platform" semantic conventions. It represents the platform on
+ // which the browser is running
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Windows', 'macOS', 'Android'
+ // Note: This value is intended to be taken from the [UA client hints
+ // API](https://wicg.github.io/ua-client-hints/#interface)
+ // (`navigator.userAgentData.platform`). If unavailable, the legacy
+ // `navigator.platform` API SHOULD NOT be used instead and this attribute
+ // SHOULD be left unset in order for the values to be consistent.
+ // The list of possible values is defined in the [W3C User-Agent Client
+ // Hints
+ // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform).
+ // Note that some (but not all) of these values can overlap with values in
+ // the [`os.type` and `os.name` attributes](./os.md). However, for
+ // consistency, the values in the `browser.platform` attribute should
+ // capture the exact value that the user agent provides.
+ BrowserPlatformKey = attribute.Key("browser.platform")
+
+ // BrowserMobileKey is the attribute Key conforming to the "browser.mobile"
+ // semantic conventions. It represents a boolean that is true if the
+ // browser is running on a mobile device
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Note: This value is intended to be taken from the [UA client hints
+ // API](https://wicg.github.io/ua-client-hints/#interface)
+ // (`navigator.userAgentData.mobile`). If unavailable, this attribute
+ // SHOULD be left unset.
+ BrowserMobileKey = attribute.Key("browser.mobile")
+
+ // BrowserUserAgentKey is the attribute Key conforming to the
+ // "browser.user_agent" semantic conventions. It represents the full
+ // user-agent string provided by the browser
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
+ // AppleWebKit/537.36 (KHTML, '
+ // 'like Gecko) Chrome/95.0.4638.54 Safari/537.36'
+ // Note: The user-agent value SHOULD be provided only from browsers that do
+ // not have a mechanism to retrieve brands and platform individually from
+ // the User-Agent Client Hints API. To retrieve the value, the legacy
+ // `navigator.userAgent` API can be used.
+ BrowserUserAgentKey = attribute.Key("browser.user_agent")
+
+ // BrowserLanguageKey is the attribute Key conforming to the
+ // "browser.language" semantic conventions. It represents the preferred
+ // language of the user using the browser
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'en', 'en-US', 'fr', 'fr-FR'
+ // Note: This value is intended to be taken from the Navigator API
+ // `navigator.language`.
+ BrowserLanguageKey = attribute.Key("browser.language")
+)
+
+// BrowserBrands returns an attribute KeyValue conforming to the
+// "browser.brands" semantic conventions. It represents the array of brand name
+// and version separated by a space
+func BrowserBrands(val ...string) attribute.KeyValue {
+ return BrowserBrandsKey.StringSlice(val)
+}
+
+// BrowserPlatform returns an attribute KeyValue conforming to the
+// "browser.platform" semantic conventions. It represents the platform on which
+// the browser is running
+func BrowserPlatform(val string) attribute.KeyValue {
+ return BrowserPlatformKey.String(val)
+}
+
+// BrowserMobile returns an attribute KeyValue conforming to the
+// "browser.mobile" semantic conventions. It represents a boolean that is true
+// if the browser is running on a mobile device
+func BrowserMobile(val bool) attribute.KeyValue {
+ return BrowserMobileKey.Bool(val)
+}
+
+// BrowserUserAgent returns an attribute KeyValue conforming to the
+// "browser.user_agent" semantic conventions. It represents the full user-agent
+// string provided by the browser
+func BrowserUserAgent(val string) attribute.KeyValue {
+ return BrowserUserAgentKey.String(val)
+}
+
+// BrowserLanguage returns an attribute KeyValue conforming to the
+// "browser.language" semantic conventions. It represents the preferred
+// language of the user using the browser
+func BrowserLanguage(val string) attribute.KeyValue {
+ return BrowserLanguageKey.String(val)
+}
+
+// A cloud environment (e.g. GCP, Azure, AWS)
+const (
+ // CloudProviderKey is the attribute Key conforming to the "cloud.provider"
+ // semantic conventions. It represents the name of the cloud provider.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ CloudProviderKey = attribute.Key("cloud.provider")
+
+ // CloudAccountIDKey is the attribute Key conforming to the
+ // "cloud.account.id" semantic conventions. It represents the cloud account
+ // ID the resource is assigned to.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '111111111111', 'opentelemetry'
+ CloudAccountIDKey = attribute.Key("cloud.account.id")
+
+ // CloudRegionKey is the attribute Key conforming to the "cloud.region"
+ // semantic conventions. It represents the geographical region the resource
+ // is running.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'us-central1', 'us-east-1'
+ // Note: Refer to your provider's docs to see the available regions, for
+ // example [Alibaba Cloud
+ // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS
+ // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/),
+ // [Azure
+ // regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/),
+ // [Google Cloud regions](https://cloud.google.com/about/locations), or
+ // [Tencent Cloud
+ // regions](https://intl.cloud.tencent.com/document/product/213/6091).
+ CloudRegionKey = attribute.Key("cloud.region")
+
+ // CloudAvailabilityZoneKey is the attribute Key conforming to the
+ // "cloud.availability_zone" semantic conventions. It represents the cloud
+ // regions often have multiple, isolated locations known as zones to
+ // increase availability. Availability zone represents the zone where the
+ // resource is running.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'us-east-1c'
+ // Note: Availability zones are called "zones" on Alibaba Cloud and Google
+ // Cloud.
+ CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
+
+ // CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
+ // semantic conventions. It represents the cloud platform in use.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Note: The prefix of the service SHOULD match the one specified in
+ // `cloud.provider`.
+ CloudPlatformKey = attribute.Key("cloud.platform")
+)
+
+var (
+ // Alibaba Cloud
+ CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
+ // Amazon Web Services
+ CloudProviderAWS = CloudProviderKey.String("aws")
+ // Microsoft Azure
+ CloudProviderAzure = CloudProviderKey.String("azure")
+ // Google Cloud Platform
+ CloudProviderGCP = CloudProviderKey.String("gcp")
+ // IBM Cloud
+ CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud")
+ // Tencent Cloud
+ CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
+)
+
+var (
+ // Alibaba Cloud Elastic Compute Service
+ CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
+ // Alibaba Cloud Function Compute
+ CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc")
+ // Red Hat OpenShift on Alibaba Cloud
+ CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift")
+ // AWS Elastic Compute Cloud
+ CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
+ // AWS Elastic Container Service
+ CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
+ // AWS Elastic Kubernetes Service
+ CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
+ // AWS Lambda
+ CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
+ // AWS Elastic Beanstalk
+ CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
+ // AWS App Runner
+ CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
+ // Red Hat OpenShift on AWS (ROSA)
+ CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift")
+ // Azure Virtual Machines
+ CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm")
+ // Azure Container Instances
+ CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances")
+ // Azure Kubernetes Service
+ CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks")
+ // Azure Functions
+ CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions")
+ // Azure App Service
+ CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service")
+ // Azure Red Hat OpenShift
+ CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift")
+ // Google Cloud Compute Engine (GCE)
+ CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
+ // Google Cloud Run
+ CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
+ // Google Cloud Kubernetes Engine (GKE)
+ CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
+ // Google Cloud Functions (GCF)
+ CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
+ // Google Cloud App Engine (GAE)
+ CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
+ // Red Hat OpenShift on Google Cloud
+ CloudPlatformGoogleCloudOpenshift = CloudPlatformKey.String("google_cloud_openshift")
+ // Red Hat OpenShift on IBM Cloud
+ CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift")
+ // Tencent Cloud Cloud Virtual Machine (CVM)
+ CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm")
+ // Tencent Cloud Elastic Kubernetes Service (EKS)
+ CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
+ // Tencent Cloud Serverless Cloud Function (SCF)
+ CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf")
+)
+
+// CloudAccountID returns an attribute KeyValue conforming to the
+// "cloud.account.id" semantic conventions. It represents the cloud account ID
+// the resource is assigned to.
+func CloudAccountID(val string) attribute.KeyValue {
+ return CloudAccountIDKey.String(val)
+}
+
+// CloudRegion returns an attribute KeyValue conforming to the
+// "cloud.region" semantic conventions. It represents the geographical region
+// the resource is running.
+func CloudRegion(val string) attribute.KeyValue {
+ return CloudRegionKey.String(val)
+}
+
+// CloudAvailabilityZone returns an attribute KeyValue conforming to the
+// "cloud.availability_zone" semantic conventions. It represents the cloud
+// regions often have multiple, isolated locations known as zones to increase
+// availability. Availability zone represents the zone where the resource is
+// running.
+func CloudAvailabilityZone(val string) attribute.KeyValue {
+ return CloudAvailabilityZoneKey.String(val)
+}
+
+// Resources used by AWS Elastic Container Service (ECS).
+const (
+ // AWSECSContainerARNKey is the attribute Key conforming to the
+ // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
+ // Resource Name (ARN) of an [ECS container
+ // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples:
+ // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9'
+ AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn")
+
+ // AWSECSClusterARNKey is the attribute Key conforming to the
+ // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
+ // [ECS
+ // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
+ AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn")
+
+ // AWSECSLaunchtypeKey is the attribute Key conforming to the
+ // "aws.ecs.launchtype" semantic conventions. It represents the [launch
+ // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
+ // for an ECS task.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype")
+
+ // AWSECSTaskARNKey is the attribute Key conforming to the
+ // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an
+ // [ECS task
+ // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples:
+ // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b'
+ AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn")
+
+ // AWSECSTaskFamilyKey is the attribute Key conforming to the
+ // "aws.ecs.task.family" semantic conventions. It represents the task
+ // definition family this task definition is a member of.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry-family'
+ AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family")
+
+ // AWSECSTaskRevisionKey is the attribute Key conforming to the
+ // "aws.ecs.task.revision" semantic conventions. It represents the revision
+ // for this task definition.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '8', '26'
+ AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision")
+)
+
+var (
+ // ec2
+ AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2")
+ // fargate
+ AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate")
+)
+
+// AWSECSContainerARN returns an attribute KeyValue conforming to the
+// "aws.ecs.container.arn" semantic conventions. It represents the Amazon
+// Resource Name (ARN) of an [ECS container
+// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
+func AWSECSContainerARN(val string) attribute.KeyValue {
+ return AWSECSContainerARNKey.String(val)
+}
+
+// AWSECSClusterARN returns an attribute KeyValue conforming to the
+// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS
+// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
+func AWSECSClusterARN(val string) attribute.KeyValue {
+ return AWSECSClusterARNKey.String(val)
+}
+
+// AWSECSTaskARN returns an attribute KeyValue conforming to the
+// "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS
+// task
+// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).
+func AWSECSTaskARN(val string) attribute.KeyValue {
+ return AWSECSTaskARNKey.String(val)
+}
+
+// AWSECSTaskFamily returns an attribute KeyValue conforming to the
+// "aws.ecs.task.family" semantic conventions. It represents the task
+// definition family this task definition is a member of.
+func AWSECSTaskFamily(val string) attribute.KeyValue {
+ return AWSECSTaskFamilyKey.String(val)
+}
+
+// AWSECSTaskRevision returns an attribute KeyValue conforming to the
+// "aws.ecs.task.revision" semantic conventions. It represents the revision for
+// this task definition.
+func AWSECSTaskRevision(val string) attribute.KeyValue {
+ return AWSECSTaskRevisionKey.String(val)
+}
+
+// Resources used by AWS Elastic Kubernetes Service (EKS).
+const (
+ // AWSEKSClusterARNKey is the attribute Key conforming to the
+ // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an
+ // EKS cluster.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
+ AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn")
+)
+
+// AWSEKSClusterARN returns an attribute KeyValue conforming to the
+// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
+// cluster.
+func AWSEKSClusterARN(val string) attribute.KeyValue {
+ return AWSEKSClusterARNKey.String(val)
+}
+
+// Resources specific to Amazon Web Services.
+const (
+ // AWSLogGroupNamesKey is the attribute Key conforming to the
+ // "aws.log.group.names" semantic conventions. It represents the name(s) of
+ // the AWS log group(s) an application is writing to.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '/aws/lambda/my-function', 'opentelemetry-service'
+ // Note: Multiple log groups must be supported for cases like
+ // multi-container applications, where a single application has sidecar
+ // containers, and each write to their own log group.
+ AWSLogGroupNamesKey = attribute.Key("aws.log.group.names")
+
+ // AWSLogGroupARNsKey is the attribute Key conforming to the
+ // "aws.log.group.arns" semantic conventions. It represents the Amazon
+ // Resource Name(s) (ARN) of the AWS log group(s).
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples:
+ // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*'
+ // Note: See the [log group ARN format
+ // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
+ AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns")
+
+ // AWSLogStreamNamesKey is the attribute Key conforming to the
+ // "aws.log.stream.names" semantic conventions. It represents the name(s)
+ // of the AWS log stream(s) an application is writing to.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
+ AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names")
+
+ // AWSLogStreamARNsKey is the attribute Key conforming to the
+ // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of
+ // the AWS log stream(s).
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples:
+ // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
+ // Note: See the [log stream ARN format
+ // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
+ // One log group can contain several log streams, so these ARNs necessarily
+ // identify both a log group and a log stream.
+ AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns")
+)
+
+// AWSLogGroupNames returns an attribute KeyValue conforming to the
+// "aws.log.group.names" semantic conventions. It represents the name(s) of the
+// AWS log group(s) an application is writing to.
+func AWSLogGroupNames(val ...string) attribute.KeyValue {
+ return AWSLogGroupNamesKey.StringSlice(val)
+}
+
+// AWSLogGroupARNs returns an attribute KeyValue conforming to the
+// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
+// Name(s) (ARN) of the AWS log group(s).
+func AWSLogGroupARNs(val ...string) attribute.KeyValue {
+ return AWSLogGroupARNsKey.StringSlice(val)
+}
+
+// AWSLogStreamNames returns an attribute KeyValue conforming to the
+// "aws.log.stream.names" semantic conventions. It represents the name(s) of
+// the AWS log stream(s) an application is writing to.
+func AWSLogStreamNames(val ...string) attribute.KeyValue {
+ return AWSLogStreamNamesKey.StringSlice(val)
+}
+
+// AWSLogStreamARNs returns an attribute KeyValue conforming to the
+// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
+// AWS log stream(s).
+func AWSLogStreamARNs(val ...string) attribute.KeyValue {
+ return AWSLogStreamARNsKey.StringSlice(val)
+}
+
+// A container instance.
+const (
+ // ContainerNameKey is the attribute Key conforming to the "container.name"
+ // semantic conventions. It represents the container name used by container
+ // runtime.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry-autoconf'
+ ContainerNameKey = attribute.Key("container.name")
+
+ // ContainerIDKey is the attribute Key conforming to the "container.id"
+ // semantic conventions. It represents the container ID. Usually a UUID, as
+ // for example used to [identify Docker
+ // containers](https://docs.docker.com/engine/reference/run/#container-identification).
+ // The UUID might be abbreviated.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'a3bf90e006b2'
+ ContainerIDKey = attribute.Key("container.id")
+
+ // ContainerRuntimeKey is the attribute Key conforming to the
+ // "container.runtime" semantic conventions. It represents the container
+ // runtime managing this container.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'docker', 'containerd', 'rkt'
+ ContainerRuntimeKey = attribute.Key("container.runtime")
+
+ // ContainerImageNameKey is the attribute Key conforming to the
+ // "container.image.name" semantic conventions. It represents the name of
+ // the image the container was built on.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'gcr.io/opentelemetry/operator'
+ ContainerImageNameKey = attribute.Key("container.image.name")
+
+ // ContainerImageTagKey is the attribute Key conforming to the
+ // "container.image.tag" semantic conventions. It represents the container
+ // image tag.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '0.1'
+ ContainerImageTagKey = attribute.Key("container.image.tag")
+)
+
+// ContainerName returns an attribute KeyValue conforming to the
+// "container.name" semantic conventions. It represents the container name used
+// by container runtime.
+func ContainerName(val string) attribute.KeyValue {
+ return ContainerNameKey.String(val)
+}
+
+// ContainerID returns an attribute KeyValue conforming to the
+// "container.id" semantic conventions. It represents the container ID. Usually
+// a UUID, as for example used to [identify Docker
+// containers](https://docs.docker.com/engine/reference/run/#container-identification).
+// The UUID might be abbreviated.
+func ContainerID(val string) attribute.KeyValue {
+ return ContainerIDKey.String(val)
+}
+
+// ContainerRuntime returns an attribute KeyValue conforming to the
+// "container.runtime" semantic conventions. It represents the container
+// runtime managing this container.
+func ContainerRuntime(val string) attribute.KeyValue {
+ return ContainerRuntimeKey.String(val)
+}
+
+// ContainerImageName returns an attribute KeyValue conforming to the
+// "container.image.name" semantic conventions. It represents the name of the
+// image the container was built on.
+func ContainerImageName(val string) attribute.KeyValue {
+ return ContainerImageNameKey.String(val)
+}
+
+// ContainerImageTag returns an attribute KeyValue conforming to the
+// "container.image.tag" semantic conventions. It represents the container
+// image tag.
+func ContainerImageTag(val string) attribute.KeyValue {
+ return ContainerImageTagKey.String(val)
+}
+
+// The software deployment.
+const (
+ // DeploymentEnvironmentKey is the attribute Key conforming to the
+ // "deployment.environment" semantic conventions. It represents the name of
+ // the [deployment
+ // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka
+ // deployment tier).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'staging', 'production'
+ DeploymentEnvironmentKey = attribute.Key("deployment.environment")
+)
+
+// DeploymentEnvironment returns an attribute KeyValue conforming to the
+// "deployment.environment" semantic conventions. It represents the name of the
+// [deployment
+// environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka
+// deployment tier).
+func DeploymentEnvironment(val string) attribute.KeyValue {
+ return DeploymentEnvironmentKey.String(val)
+}
+
+// The device on which the process represented by this resource is running.
+const (
+ // DeviceIDKey is the attribute Key conforming to the "device.id" semantic
+ // conventions. It represents a unique identifier representing the device
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092'
+ // Note: The device identifier MUST only be defined using the values
+ // outlined below. This value is not an advertising identifier and MUST NOT
+ // be used as such. On iOS (Swift or Objective-C), this value MUST be equal
+ // to the [vendor
+ // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
+ // On Android (Java or Kotlin), this value MUST be equal to the Firebase
+ // Installation ID or a globally unique UUID which is persisted across
+ // sessions in your application. More information can be found
+ // [here](https://developer.android.com/training/articles/user-data-ids) on
+ // best practices and exact implementation details. Caution should be taken
+ // when storing personal data or anything which can identify a user. GDPR
+ // and data protection laws may apply, ensure you do your own due
+ // diligence.
+ DeviceIDKey = attribute.Key("device.id")
+
+ // DeviceModelIdentifierKey is the attribute Key conforming to the
+ // "device.model.identifier" semantic conventions. It represents the model
+ // identifier for the device
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'iPhone3,4', 'SM-G920F'
+ // Note: It's recommended this value represents a machine readable version
+ // of the model identifier rather than the market or consumer-friendly name
+ // of the device.
+ DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
+
+ // DeviceModelNameKey is the attribute Key conforming to the
+ // "device.model.name" semantic conventions. It represents the marketing
+ // name for the device model
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6'
+ // Note: It's recommended this value represents a human readable version of
+ // the device model rather than a machine readable alternative.
+ DeviceModelNameKey = attribute.Key("device.model.name")
+
+ // DeviceManufacturerKey is the attribute Key conforming to the
+ // "device.manufacturer" semantic conventions. It represents the name of
+ // the device manufacturer
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Apple', 'Samsung'
+ // Note: The Android OS provides this field via
+ // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER).
+ // iOS apps SHOULD hardcode the value `Apple`.
+ DeviceManufacturerKey = attribute.Key("device.manufacturer")
+)
+
+// DeviceID returns an attribute KeyValue conforming to the "device.id"
+// semantic conventions. It represents a unique identifier representing the
+// device
+func DeviceID(val string) attribute.KeyValue {
+ return DeviceIDKey.String(val)
+}
+
+// DeviceModelIdentifier returns an attribute KeyValue conforming to the
+// "device.model.identifier" semantic conventions. It represents the model
+// identifier for the device
+func DeviceModelIdentifier(val string) attribute.KeyValue {
+ return DeviceModelIdentifierKey.String(val)
+}
+
+// DeviceModelName returns an attribute KeyValue conforming to the
+// "device.model.name" semantic conventions. It represents the marketing name
+// for the device model
+func DeviceModelName(val string) attribute.KeyValue {
+ return DeviceModelNameKey.String(val)
+}
+
+// DeviceManufacturer returns an attribute KeyValue conforming to the
+// "device.manufacturer" semantic conventions. It represents the name of the
+// device manufacturer
+func DeviceManufacturer(val string) attribute.KeyValue {
+ return DeviceManufacturerKey.String(val)
+}
+
+// A serverless instance.
+const (
+ // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
+ // conventions. It represents the name of the single function that this
+ // runtime instance executes.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'my-function', 'myazurefunctionapp/some-function-name'
+ // Note: This is the name of the function as configured/deployed on the
+ // FaaS
+ // platform and is usually different from the name of the callback
+ // function (which may be stored in the
+ // [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes)
+ // span attributes).
+ //
+ // For some cloud providers, the above definition is ambiguous. The
+ // following
+ // definition of function name MUST be used for this attribute
+ // (and consequently the span name) for the listed cloud
+ // providers/products:
+ //
+ // * **Azure:** The full name `/`, i.e., function app name
+ // followed by a forward slash followed by the function name (this form
+ // can also be seen in the resource JSON for the function).
+ // This means that a span attribute MUST be used, as an Azure function
+ // app can host multiple functions that would usually share
+ // a TracerProvider (see also the `faas.id` attribute).
+ FaaSNameKey = attribute.Key("faas.name")
+
+ // FaaSIDKey is the attribute Key conforming to the "faas.id" semantic
+ // conventions. It represents the unique ID of the single function that
+ // this runtime instance executes.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'arn:aws:lambda:us-west-2:123456789012:function:my-function'
+ // Note: On some cloud providers, it may not be possible to determine the
+ // full ID at startup,
+ // so consider setting `faas.id` as a span attribute instead.
+ //
+ // The exact value to use for `faas.id` depends on the cloud provider:
+ //
+ // * **AWS Lambda:** The function
+ // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
+ // Take care not to use the "invoked ARN" directly but replace any
+ // [alias
+ // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
+ // with the resolved function version, as the same runtime instance may
+ // be invokable with
+ // multiple different aliases.
+ // * **GCP:** The [URI of the
+ // resource](https://cloud.google.com/iam/docs/full-resource-names)
+ // * **Azure:** The [Fully Qualified Resource
+ // ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id)
+ // of the invoked function,
+ // *not* the function app, having the form
+ // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`.
+ // This means that a span attribute MUST be used, as an Azure function
+ // app can host multiple functions that would usually share
+ // a TracerProvider.
+ FaaSIDKey = attribute.Key("faas.id")
+
+ // FaaSVersionKey is the attribute Key conforming to the "faas.version"
+ // semantic conventions. It represents the immutable version of the
+ // function being executed.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '26', 'pinkfroid-00002'
+ // Note: Depending on the cloud provider and platform, use:
+ //
+ // * **AWS Lambda:** The [function
+ // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
+ // (an integer represented as a decimal string).
+ // * **Google Cloud Run:** The
+ // [revision](https://cloud.google.com/run/docs/managing/revisions)
+ // (i.e., the function name plus the revision suffix).
+ // * **Google Cloud Functions:** The value of the
+ // [`K_REVISION` environment
+ // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
+ // * **Azure Functions:** Not applicable. Do not set this attribute.
+ FaaSVersionKey = attribute.Key("faas.version")
+
+ // FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
+ // semantic conventions. It represents the execution environment ID as a
+ // string, that will be potentially reused for other invocations to the
+ // same function/function version.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de'
+ // Note: * **AWS Lambda:** Use the (full) log stream name.
+ FaaSInstanceKey = attribute.Key("faas.instance")
+
+ // FaaSMaxMemoryKey is the attribute Key conforming to the
+ // "faas.max_memory" semantic conventions. It represents the amount of
+ // memory available to the serverless function in MiB.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 128
+ // Note: It's recommended to set this attribute since e.g. too little
+ // memory can easily stop a Java AWS Lambda function from working
+ // correctly. On AWS Lambda, the environment variable
+ // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.
+ FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
+)
+
+// FaaSName returns an attribute KeyValue conforming to the "faas.name"
+// semantic conventions. It represents the name of the single function that
+// this runtime instance executes.
+func FaaSName(val string) attribute.KeyValue {
+ return FaaSNameKey.String(val)
+}
+
+// FaaSID returns an attribute KeyValue conforming to the "faas.id" semantic
+// conventions. It represents the unique ID of the single function that this
+// runtime instance executes.
+func FaaSID(val string) attribute.KeyValue {
+ return FaaSIDKey.String(val)
+}
+
+// FaaSVersion returns an attribute KeyValue conforming to the
+// "faas.version" semantic conventions. It represents the immutable version of
+// the function being executed.
+func FaaSVersion(val string) attribute.KeyValue {
+ return FaaSVersionKey.String(val)
+}
+
+// FaaSInstance returns an attribute KeyValue conforming to the
+// "faas.instance" semantic conventions. It represents the execution
+// environment ID as a string, that will be potentially reused for other
+// invocations to the same function/function version.
+func FaaSInstance(val string) attribute.KeyValue {
+ return FaaSInstanceKey.String(val)
+}
+
+// FaaSMaxMemory returns an attribute KeyValue conforming to the
+// "faas.max_memory" semantic conventions. It represents the amount of memory
+// available to the serverless function in MiB.
+func FaaSMaxMemory(val int) attribute.KeyValue {
+ return FaaSMaxMemoryKey.Int(val)
+}
+
+// A host is defined as a general computing instance.
+const (
+ // HostIDKey is the attribute Key conforming to the "host.id" semantic
+ // conventions. It represents the unique host ID. For Cloud, this must be
+ // the instance_id assigned by the cloud provider. For non-containerized
+ // Linux systems, the `machine-id` located in `/etc/machine-id` or
+ // `/var/lib/dbus/machine-id` may be used.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'fdbf79e8af94cb7f9e8df36789187052'
+ HostIDKey = attribute.Key("host.id")
+
+ // HostNameKey is the attribute Key conforming to the "host.name" semantic
+ // conventions. It represents the name of the host. On Unix systems, it may
+ // contain what the hostname command returns, or the fully qualified
+ // hostname, or another name specified by the user.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry-test'
+ HostNameKey = attribute.Key("host.name")
+
+ // HostTypeKey is the attribute Key conforming to the "host.type" semantic
+ // conventions. It represents the type of host. For Cloud, this must be the
+ // machine type.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'n1-standard-1'
+ HostTypeKey = attribute.Key("host.type")
+
+ // HostArchKey is the attribute Key conforming to the "host.arch" semantic
+ // conventions. It represents the CPU architecture the host system is
+ // running on.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ HostArchKey = attribute.Key("host.arch")
+
+ // HostImageNameKey is the attribute Key conforming to the
+ // "host.image.name" semantic conventions. It represents the name of the VM
+ // image or OS install the host was instantiated from.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905'
+ HostImageNameKey = attribute.Key("host.image.name")
+
+ // HostImageIDKey is the attribute Key conforming to the "host.image.id"
+ // semantic conventions. It represents the vM image ID. For Cloud, this
+ // value is from the provider.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'ami-07b06b442921831e5'
+ HostImageIDKey = attribute.Key("host.image.id")
+
+ // HostImageVersionKey is the attribute Key conforming to the
+ // "host.image.version" semantic conventions. It represents the version
+ // string of the VM image as defined in [Version
+ // Attributes](README.md#version-attributes).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '0.1'
+ HostImageVersionKey = attribute.Key("host.image.version")
+)
+
+var (
+ // AMD64
+ HostArchAMD64 = HostArchKey.String("amd64")
+ // ARM32
+ HostArchARM32 = HostArchKey.String("arm32")
+ // ARM64
+ HostArchARM64 = HostArchKey.String("arm64")
+ // Itanium
+ HostArchIA64 = HostArchKey.String("ia64")
+ // 32-bit PowerPC
+ HostArchPPC32 = HostArchKey.String("ppc32")
+ // 64-bit PowerPC
+ HostArchPPC64 = HostArchKey.String("ppc64")
+ // IBM z/Architecture
+ HostArchS390x = HostArchKey.String("s390x")
+ // 32-bit x86
+ HostArchX86 = HostArchKey.String("x86")
+)
+
+// HostID returns an attribute KeyValue conforming to the "host.id" semantic
+// conventions. It represents the unique host ID. For Cloud, this must be the
+// instance_id assigned by the cloud provider. For non-containerized Linux
+// systems, the `machine-id` located in `/etc/machine-id` or
+// `/var/lib/dbus/machine-id` may be used.
+func HostID(val string) attribute.KeyValue {
+ return HostIDKey.String(val)
+}
+
+// HostName returns an attribute KeyValue conforming to the "host.name"
+// semantic conventions. It represents the name of the host. On Unix systems,
+// it may contain what the hostname command returns, or the fully qualified
+// hostname, or another name specified by the user.
+func HostName(val string) attribute.KeyValue {
+ return HostNameKey.String(val)
+}
+
+// HostType returns an attribute KeyValue conforming to the "host.type"
+// semantic conventions. It represents the type of host. For Cloud, this must
+// be the machine type.
+func HostType(val string) attribute.KeyValue {
+ return HostTypeKey.String(val)
+}
+
+// HostImageName returns an attribute KeyValue conforming to the
+// "host.image.name" semantic conventions. It represents the name of the VM
+// image or OS install the host was instantiated from.
+func HostImageName(val string) attribute.KeyValue {
+ return HostImageNameKey.String(val)
+}
+
+// HostImageID returns an attribute KeyValue conforming to the
+// "host.image.id" semantic conventions. It represents the vM image ID. For
+// Cloud, this value is from the provider.
+func HostImageID(val string) attribute.KeyValue {
+ return HostImageIDKey.String(val)
+}
+
+// HostImageVersion returns an attribute KeyValue conforming to the
+// "host.image.version" semantic conventions. It represents the version string
+// of the VM image as defined in [Version
+// Attributes](README.md#version-attributes).
+func HostImageVersion(val string) attribute.KeyValue {
+ return HostImageVersionKey.String(val)
+}
+
+// A Kubernetes Cluster.
+const (
+ // K8SClusterNameKey is the attribute Key conforming to the
+ // "k8s.cluster.name" semantic conventions. It represents the name of the
+ // cluster.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry-cluster'
+ K8SClusterNameKey = attribute.Key("k8s.cluster.name")
+)
+
+// K8SClusterName returns an attribute KeyValue conforming to the
+// "k8s.cluster.name" semantic conventions. It represents the name of the
+// cluster.
+func K8SClusterName(val string) attribute.KeyValue {
+ return K8SClusterNameKey.String(val)
+}
+
+// A Kubernetes Node object.
+const (
+ // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
+ // semantic conventions. It represents the name of the Node.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'node-1'
+ K8SNodeNameKey = attribute.Key("k8s.node.name")
+
+ // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid"
+ // semantic conventions. It represents the UID of the Node.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2'
+ K8SNodeUIDKey = attribute.Key("k8s.node.uid")
+)
+
+// K8SNodeName returns an attribute KeyValue conforming to the
+// "k8s.node.name" semantic conventions. It represents the name of the Node.
+func K8SNodeName(val string) attribute.KeyValue {
+ return K8SNodeNameKey.String(val)
+}
+
+// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
+// semantic conventions. It represents the UID of the Node.
+func K8SNodeUID(val string) attribute.KeyValue {
+ return K8SNodeUIDKey.String(val)
+}
+
+// A Kubernetes Namespace.
+const (
+ // K8SNamespaceNameKey is the attribute Key conforming to the
+ // "k8s.namespace.name" semantic conventions. It represents the name of the
+ // namespace that the pod is running in.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'default'
+ K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
+)
+
+// K8SNamespaceName returns an attribute KeyValue conforming to the
+// "k8s.namespace.name" semantic conventions. It represents the name of the
+// namespace that the pod is running in.
+func K8SNamespaceName(val string) attribute.KeyValue {
+ return K8SNamespaceNameKey.String(val)
+}
+
+// A Kubernetes Pod object.
+const (
+ // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid"
+ // semantic conventions. It represents the UID of the Pod.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SPodUIDKey = attribute.Key("k8s.pod.uid")
+
+ // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name"
+ // semantic conventions. It represents the name of the Pod.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry-pod-autoconf'
+ K8SPodNameKey = attribute.Key("k8s.pod.name")
+)
+
+// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
+// semantic conventions. It represents the UID of the Pod.
+func K8SPodUID(val string) attribute.KeyValue {
+ return K8SPodUIDKey.String(val)
+}
+
+// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
+// semantic conventions. It represents the name of the Pod.
+func K8SPodName(val string) attribute.KeyValue {
+ return K8SPodNameKey.String(val)
+}
+
+// A container in a
+// [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates).
+const (
+ // K8SContainerNameKey is the attribute Key conforming to the
+ // "k8s.container.name" semantic conventions. It represents the name of the
+ // Container from Pod specification, must be unique within a Pod. Container
+ // runtime usually uses different globally unique name (`container.name`).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'redis'
+ K8SContainerNameKey = attribute.Key("k8s.container.name")
+
+ // K8SContainerRestartCountKey is the attribute Key conforming to the
+ // "k8s.container.restart_count" semantic conventions. It represents the
+ // number of times the container was restarted. This attribute can be used
+ // to identify a particular container (running or stopped) within a
+ // container spec.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 0, 2
+ K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
+)
+
+// K8SContainerName returns an attribute KeyValue conforming to the
+// "k8s.container.name" semantic conventions. It represents the name of the
+// Container from Pod specification, must be unique within a Pod. Container
+// runtime usually uses different globally unique name (`container.name`).
+func K8SContainerName(val string) attribute.KeyValue {
+ return K8SContainerNameKey.String(val)
+}
+
+// K8SContainerRestartCount returns an attribute KeyValue conforming to the
+// "k8s.container.restart_count" semantic conventions. It represents the number
+// of times the container was restarted. This attribute can be used to identify
+// a particular container (running or stopped) within a container spec.
+func K8SContainerRestartCount(val int) attribute.KeyValue {
+ return K8SContainerRestartCountKey.Int(val)
+}
+
+// A Kubernetes ReplicaSet object.
+const (
+ // K8SReplicaSetUIDKey is the attribute Key conforming to the
+ // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
+ // ReplicaSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
+
+ // K8SReplicaSetNameKey is the attribute Key conforming to the
+ // "k8s.replicaset.name" semantic conventions. It represents the name of
+ // the ReplicaSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry'
+ K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
+)
+
+// K8SReplicaSetUID returns an attribute KeyValue conforming to the
+// "k8s.replicaset.uid" semantic conventions. It represents the UID of the
+// ReplicaSet.
+func K8SReplicaSetUID(val string) attribute.KeyValue {
+ return K8SReplicaSetUIDKey.String(val)
+}
+
+// K8SReplicaSetName returns an attribute KeyValue conforming to the
+// "k8s.replicaset.name" semantic conventions. It represents the name of the
+// ReplicaSet.
+func K8SReplicaSetName(val string) attribute.KeyValue {
+ return K8SReplicaSetNameKey.String(val)
+}
+
+// A Kubernetes Deployment object.
+const (
+ // K8SDeploymentUIDKey is the attribute Key conforming to the
+ // "k8s.deployment.uid" semantic conventions. It represents the UID of the
+ // Deployment.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
+
+ // K8SDeploymentNameKey is the attribute Key conforming to the
+ // "k8s.deployment.name" semantic conventions. It represents the name of
+ // the Deployment.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry'
+ K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
+)
+
+// K8SDeploymentUID returns an attribute KeyValue conforming to the
+// "k8s.deployment.uid" semantic conventions. It represents the UID of the
+// Deployment.
+func K8SDeploymentUID(val string) attribute.KeyValue {
+ return K8SDeploymentUIDKey.String(val)
+}
+
+// K8SDeploymentName returns an attribute KeyValue conforming to the
+// "k8s.deployment.name" semantic conventions. It represents the name of the
+// Deployment.
+func K8SDeploymentName(val string) attribute.KeyValue {
+ return K8SDeploymentNameKey.String(val)
+}
+
+// A Kubernetes StatefulSet object.
+const (
+ // K8SStatefulSetUIDKey is the attribute Key conforming to the
+ // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
+ // StatefulSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
+
+ // K8SStatefulSetNameKey is the attribute Key conforming to the
+ // "k8s.statefulset.name" semantic conventions. It represents the name of
+ // the StatefulSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry'
+ K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
+)
+
+// K8SStatefulSetUID returns an attribute KeyValue conforming to the
+// "k8s.statefulset.uid" semantic conventions. It represents the UID of the
+// StatefulSet.
+func K8SStatefulSetUID(val string) attribute.KeyValue {
+ return K8SStatefulSetUIDKey.String(val)
+}
+
+// K8SStatefulSetName returns an attribute KeyValue conforming to the
+// "k8s.statefulset.name" semantic conventions. It represents the name of the
+// StatefulSet.
+func K8SStatefulSetName(val string) attribute.KeyValue {
+ return K8SStatefulSetNameKey.String(val)
+}
+
+// A Kubernetes DaemonSet object.
+const (
+ // K8SDaemonSetUIDKey is the attribute Key conforming to the
+ // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
+ // DaemonSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
+
+ // K8SDaemonSetNameKey is the attribute Key conforming to the
+ // "k8s.daemonset.name" semantic conventions. It represents the name of the
+ // DaemonSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry'
+ K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
+)
+
+// K8SDaemonSetUID returns an attribute KeyValue conforming to the
+// "k8s.daemonset.uid" semantic conventions. It represents the UID of the
+// DaemonSet.
+func K8SDaemonSetUID(val string) attribute.KeyValue {
+ return K8SDaemonSetUIDKey.String(val)
+}
+
+// K8SDaemonSetName returns an attribute KeyValue conforming to the
+// "k8s.daemonset.name" semantic conventions. It represents the name of the
+// DaemonSet.
+func K8SDaemonSetName(val string) attribute.KeyValue {
+ return K8SDaemonSetNameKey.String(val)
+}
+
+// A Kubernetes Job object.
+const (
+ // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid"
+ // semantic conventions. It represents the UID of the Job.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SJobUIDKey = attribute.Key("k8s.job.uid")
+
+ // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name"
+ // semantic conventions. It represents the name of the Job.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry'
+ K8SJobNameKey = attribute.Key("k8s.job.name")
+)
+
+// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
+// semantic conventions. It represents the UID of the Job.
+func K8SJobUID(val string) attribute.KeyValue {
+ return K8SJobUIDKey.String(val)
+}
+
+// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
+// semantic conventions. It represents the name of the Job.
+func K8SJobName(val string) attribute.KeyValue {
+ return K8SJobNameKey.String(val)
+}
+
+// A Kubernetes CronJob object.
+const (
+ // K8SCronJobUIDKey is the attribute Key conforming to the
+ // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
+ // CronJob.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
+
+ // K8SCronJobNameKey is the attribute Key conforming to the
+ // "k8s.cronjob.name" semantic conventions. It represents the name of the
+ // CronJob.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry'
+ K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
+)
+
+// K8SCronJobUID returns an attribute KeyValue conforming to the
+// "k8s.cronjob.uid" semantic conventions. It represents the UID of the
+// CronJob.
+func K8SCronJobUID(val string) attribute.KeyValue {
+ return K8SCronJobUIDKey.String(val)
+}
+
+// K8SCronJobName returns an attribute KeyValue conforming to the
+// "k8s.cronjob.name" semantic conventions. It represents the name of the
+// CronJob.
+func K8SCronJobName(val string) attribute.KeyValue {
+ return K8SCronJobNameKey.String(val)
+}
+
+// The operating system (OS) on which the process represented by this resource
+// is running.
+const (
+ // OSTypeKey is the attribute Key conforming to the "os.type" semantic
+ // conventions. It represents the operating system type.
+ //
+ // Type: Enum
+ // RequirementLevel: Required
+ // Stability: stable
+ OSTypeKey = attribute.Key("os.type")
+
+ // OSDescriptionKey is the attribute Key conforming to the "os.description"
+ // semantic conventions. It represents the human readable (not intended to
+ // be parsed) OS version information, like e.g. reported by `ver` or
+ // `lsb_release -a` commands.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1
+ // LTS'
+ OSDescriptionKey = attribute.Key("os.description")
+
+ // OSNameKey is the attribute Key conforming to the "os.name" semantic
+ // conventions. It represents the human readable operating system name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'iOS', 'Android', 'Ubuntu'
+ OSNameKey = attribute.Key("os.name")
+
+ // OSVersionKey is the attribute Key conforming to the "os.version"
+ // semantic conventions. It represents the version string of the operating
+ // system as defined in [Version
+ // Attributes](../../resource/semantic_conventions/README.md#version-attributes).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '14.2.1', '18.04.1'
+ OSVersionKey = attribute.Key("os.version")
+)
+
+var (
+ // Microsoft Windows
+ OSTypeWindows = OSTypeKey.String("windows")
+ // Linux
+ OSTypeLinux = OSTypeKey.String("linux")
+ // Apple Darwin
+ OSTypeDarwin = OSTypeKey.String("darwin")
+ // FreeBSD
+ OSTypeFreeBSD = OSTypeKey.String("freebsd")
+ // NetBSD
+ OSTypeNetBSD = OSTypeKey.String("netbsd")
+ // OpenBSD
+ OSTypeOpenBSD = OSTypeKey.String("openbsd")
+ // DragonFly BSD
+ OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
+ // HP-UX (Hewlett Packard Unix)
+ OSTypeHPUX = OSTypeKey.String("hpux")
+ // AIX (Advanced Interactive eXecutive)
+ OSTypeAIX = OSTypeKey.String("aix")
+ // SunOS, Oracle Solaris
+ OSTypeSolaris = OSTypeKey.String("solaris")
+ // IBM z/OS
+ OSTypeZOS = OSTypeKey.String("z_os")
+)
+
+// OSDescription returns an attribute KeyValue conforming to the
+// "os.description" semantic conventions. It represents the human readable (not
+// intended to be parsed) OS version information, like e.g. reported by `ver`
+// or `lsb_release -a` commands.
+func OSDescription(val string) attribute.KeyValue {
+ return OSDescriptionKey.String(val)
+}
+
+// OSName returns an attribute KeyValue conforming to the "os.name" semantic
+// conventions. It represents the human readable operating system name.
+func OSName(val string) attribute.KeyValue {
+ return OSNameKey.String(val)
+}
+
+// OSVersion returns an attribute KeyValue conforming to the "os.version"
+// semantic conventions. It represents the version string of the operating
+// system as defined in [Version
+// Attributes](../../resource/semantic_conventions/README.md#version-attributes).
+func OSVersion(val string) attribute.KeyValue {
+ return OSVersionKey.String(val)
+}
+
+// An operating system process.
+const (
+ // ProcessPIDKey is the attribute Key conforming to the "process.pid"
+ // semantic conventions. It represents the process identifier (PID).
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 1234
+ ProcessPIDKey = attribute.Key("process.pid")
+
+ // ProcessParentPIDKey is the attribute Key conforming to the
+ // "process.parent_pid" semantic conventions. It represents the parent
+ // Process identifier (PID).
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 111
+ ProcessParentPIDKey = attribute.Key("process.parent_pid")
+
+ // ProcessExecutableNameKey is the attribute Key conforming to the
+ // "process.executable.name" semantic conventions. It represents the name
+ // of the process executable. On Linux based systems, can be set to the
+ // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name
+ // of `GetProcessImageFileNameW`.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (See alternative attributes
+ // below.)
+ // Stability: stable
+ // Examples: 'otelcol'
+ ProcessExecutableNameKey = attribute.Key("process.executable.name")
+
+ // ProcessExecutablePathKey is the attribute Key conforming to the
+ // "process.executable.path" semantic conventions. It represents the full
+ // path to the process executable. On Linux based systems, can be set to
+ // the target of `proc/[pid]/exe`. On Windows, can be set to the result of
+ // `GetProcessImageFileNameW`.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (See alternative attributes
+ // below.)
+ // Stability: stable
+ // Examples: '/usr/bin/cmd/otelcol'
+ ProcessExecutablePathKey = attribute.Key("process.executable.path")
+
+ // ProcessCommandKey is the attribute Key conforming to the
+ // "process.command" semantic conventions. It represents the command used
+ // to launch the process (i.e. the command name). On Linux based systems,
+ // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can
+ // be set to the first parameter extracted from `GetCommandLineW`.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (See alternative attributes
+ // below.)
+ // Stability: stable
+ // Examples: 'cmd/otelcol'
+ ProcessCommandKey = attribute.Key("process.command")
+
+ // ProcessCommandLineKey is the attribute Key conforming to the
+ // "process.command_line" semantic conventions. It represents the full
+ // command used to launch the process as a single string representing the
+ // full command. On Windows, can be set to the result of `GetCommandLineW`.
+ // Do not set this if you have to assemble it just for monitoring; use
+ // `process.command_args` instead.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (See alternative attributes
+ // below.)
+ // Stability: stable
+ // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"'
+ ProcessCommandLineKey = attribute.Key("process.command_line")
+
+ // ProcessCommandArgsKey is the attribute Key conforming to the
+ // "process.command_args" semantic conventions. It represents the all the
+ // command arguments (including the command/executable itself) as received
+ // by the process. On Linux-based systems (and some other Unixoid systems
+ // supporting procfs), can be set according to the list of null-delimited
+ // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
+ // this would be the full argv vector passed to `main`.
+ //
+ // Type: string[]
+ // RequirementLevel: ConditionallyRequired (See alternative attributes
+ // below.)
+ // Stability: stable
+ // Examples: 'cmd/otecol', '--config=config.yaml'
+ ProcessCommandArgsKey = attribute.Key("process.command_args")
+
+ // ProcessOwnerKey is the attribute Key conforming to the "process.owner"
+ // semantic conventions. It represents the username of the user that owns
+ // the process.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'root'
+ ProcessOwnerKey = attribute.Key("process.owner")
+)
+
+// ProcessPID returns an attribute KeyValue conforming to the "process.pid"
+// semantic conventions. It represents the process identifier (PID).
+func ProcessPID(val int) attribute.KeyValue {
+ return ProcessPIDKey.Int(val)
+}
+
+// ProcessParentPID returns an attribute KeyValue conforming to the
+// "process.parent_pid" semantic conventions. It represents the parent Process
+// identifier (PID).
+func ProcessParentPID(val int) attribute.KeyValue {
+ return ProcessParentPIDKey.Int(val)
+}
+
+// ProcessExecutableName returns an attribute KeyValue conforming to the
+// "process.executable.name" semantic conventions. It represents the name of
+// the process executable. On Linux based systems, can be set to the `Name` in
+// `proc/[pid]/status`. On Windows, can be set to the base name of
+// `GetProcessImageFileNameW`.
+func ProcessExecutableName(val string) attribute.KeyValue {
+ return ProcessExecutableNameKey.String(val)
+}
+
+// ProcessExecutablePath returns an attribute KeyValue conforming to the
+// "process.executable.path" semantic conventions. It represents the full path
+// to the process executable. On Linux based systems, can be set to the target
+// of `proc/[pid]/exe`. On Windows, can be set to the result of
+// `GetProcessImageFileNameW`.
+func ProcessExecutablePath(val string) attribute.KeyValue {
+ return ProcessExecutablePathKey.String(val)
+}
+
+// ProcessCommand returns an attribute KeyValue conforming to the
+// "process.command" semantic conventions. It represents the command used to
+// launch the process (i.e. the command name). On Linux based systems, can be
+// set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to
+// the first parameter extracted from `GetCommandLineW`.
+func ProcessCommand(val string) attribute.KeyValue {
+ return ProcessCommandKey.String(val)
+}
+
+// ProcessCommandLine returns an attribute KeyValue conforming to the
+// "process.command_line" semantic conventions. It represents the full command
+// used to launch the process as a single string representing the full command.
+// On Windows, can be set to the result of `GetCommandLineW`. Do not set this
+// if you have to assemble it just for monitoring; use `process.command_args`
+// instead.
+func ProcessCommandLine(val string) attribute.KeyValue {
+ return ProcessCommandLineKey.String(val)
+}
+
+// ProcessCommandArgs returns an attribute KeyValue conforming to the
+// "process.command_args" semantic conventions. It represents the all the
+// command arguments (including the command/executable itself) as received by
+// the process. On Linux-based systems (and some other Unixoid systems
+// supporting procfs), can be set according to the list of null-delimited
+// strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
+// this would be the full argv vector passed to `main`.
+func ProcessCommandArgs(val ...string) attribute.KeyValue {
+ return ProcessCommandArgsKey.StringSlice(val)
+}
+
+// ProcessOwner returns an attribute KeyValue conforming to the
+// "process.owner" semantic conventions. It represents the username of the user
+// that owns the process.
+func ProcessOwner(val string) attribute.KeyValue {
+ return ProcessOwnerKey.String(val)
+}
+
+// The single (language) runtime instance which is monitored.
+const (
+ // ProcessRuntimeNameKey is the attribute Key conforming to the
+ // "process.runtime.name" semantic conventions. It represents the name of
+ // the runtime of this process. For compiled native binaries, this SHOULD
+ // be the name of the compiler.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'OpenJDK Runtime Environment'
+ ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
+
+ // ProcessRuntimeVersionKey is the attribute Key conforming to the
+ // "process.runtime.version" semantic conventions. It represents the
+ // version of the runtime of this process, as returned by the runtime
+ // without modification.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '14.0.2'
+ ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
+
+ // ProcessRuntimeDescriptionKey is the attribute Key conforming to the
+ // "process.runtime.description" semantic conventions. It represents an
+ // additional description about the runtime of the process, for example a
+ // specific vendor customization of the runtime environment.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0'
+ ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
+)
+
+// ProcessRuntimeName returns an attribute KeyValue conforming to the
+// "process.runtime.name" semantic conventions. It represents the name of the
+// runtime of this process. For compiled native binaries, this SHOULD be the
+// name of the compiler.
+func ProcessRuntimeName(val string) attribute.KeyValue {
+ return ProcessRuntimeNameKey.String(val)
+}
+
+// ProcessRuntimeVersion returns an attribute KeyValue conforming to the
+// "process.runtime.version" semantic conventions. It represents the version of
+// the runtime of this process, as returned by the runtime without
+// modification.
+func ProcessRuntimeVersion(val string) attribute.KeyValue {
+ return ProcessRuntimeVersionKey.String(val)
+}
+
+// ProcessRuntimeDescription returns an attribute KeyValue conforming to the
+// "process.runtime.description" semantic conventions. It represents an
+// additional description about the runtime of the process, for example a
+// specific vendor customization of the runtime environment.
+func ProcessRuntimeDescription(val string) attribute.KeyValue {
+ return ProcessRuntimeDescriptionKey.String(val)
+}
+
+// A service instance.
+const (
+ // ServiceNameKey is the attribute Key conforming to the "service.name"
+ // semantic conventions. It represents the logical name of the service.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'shoppingcart'
+ // Note: MUST be the same for all instances of horizontally scaled
+ // services. If the value was not specified, SDKs MUST fallback to
+ // `unknown_service:` concatenated with
+ // [`process.executable.name`](process.md#process), e.g.
+ // `unknown_service:bash`. If `process.executable.name` is not available,
+ // the value MUST be set to `unknown_service`.
+ ServiceNameKey = attribute.Key("service.name")
+
+ // ServiceNamespaceKey is the attribute Key conforming to the
+ // "service.namespace" semantic conventions. It represents a namespace for
+ // `service.name`.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Shop'
+ // Note: A string value having a meaning that helps to distinguish a group
+ // of services, for example the team name that owns a group of services.
+ // `service.name` is expected to be unique within the same namespace. If
+ // `service.namespace` is not specified in the Resource then `service.name`
+ // is expected to be unique for all services that have no explicit
+ // namespace defined (so the empty/unspecified namespace is simply one more
+ // valid namespace). Zero-length namespace string is assumed equal to
+ // unspecified namespace.
+ ServiceNamespaceKey = attribute.Key("service.namespace")
+
+ // ServiceInstanceIDKey is the attribute Key conforming to the
+ // "service.instance.id" semantic conventions. It represents the string ID
+ // of the service instance.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '627cc493-f310-47de-96bd-71410b7dec09'
+ // Note: MUST be unique for each instance of the same
+ // `service.namespace,service.name` pair (in other words
+ // `service.namespace,service.name,service.instance.id` triplet MUST be
+ // globally unique). The ID helps to distinguish instances of the same
+ // service that exist at the same time (e.g. instances of a horizontally
+ // scaled service). It is preferable for the ID to be persistent and stay
+ // the same for the lifetime of the service instance, however it is
+ // acceptable that the ID is ephemeral and changes during important
+ // lifetime events for the service (e.g. service restarts). If the service
+ // has no inherent unique ID that can be used as the value of this
+ // attribute it is recommended to generate a random Version 1 or Version 4
+ // RFC 4122 UUID (services aiming for reproducible UUIDs may also use
+ // Version 5, see RFC 4122 for more recommendations).
+ ServiceInstanceIDKey = attribute.Key("service.instance.id")
+
+ // ServiceVersionKey is the attribute Key conforming to the
+ // "service.version" semantic conventions. It represents the version string
+ // of the service API or implementation.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '2.0.0'
+ ServiceVersionKey = attribute.Key("service.version")
+)
+
+// ServiceName returns an attribute KeyValue conforming to the
+// "service.name" semantic conventions. It represents the logical name of the
+// service.
+func ServiceName(val string) attribute.KeyValue {
+ return ServiceNameKey.String(val)
+}
+
+// ServiceNamespace returns an attribute KeyValue conforming to the
+// "service.namespace" semantic conventions. It represents a namespace for
+// `service.name`.
+func ServiceNamespace(val string) attribute.KeyValue {
+ return ServiceNamespaceKey.String(val)
+}
+
+// ServiceInstanceID returns an attribute KeyValue conforming to the
+// "service.instance.id" semantic conventions. It represents the string ID of
+// the service instance.
+func ServiceInstanceID(val string) attribute.KeyValue {
+ return ServiceInstanceIDKey.String(val)
+}
+
+// ServiceVersion returns an attribute KeyValue conforming to the
+// "service.version" semantic conventions. It represents the version string of
+// the service API or implementation.
+func ServiceVersion(val string) attribute.KeyValue {
+ return ServiceVersionKey.String(val)
+}
+
+// The telemetry SDK used to capture data recorded by the instrumentation
+// libraries.
+const (
+ // TelemetrySDKNameKey is the attribute Key conforming to the
+ // "telemetry.sdk.name" semantic conventions. It represents the name of the
+ // telemetry SDK as defined above.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'opentelemetry'
+ TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
+
+ // TelemetrySDKLanguageKey is the attribute Key conforming to the
+ // "telemetry.sdk.language" semantic conventions. It represents the
+ // language of the telemetry SDK.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
+
+ // TelemetrySDKVersionKey is the attribute Key conforming to the
+ // "telemetry.sdk.version" semantic conventions. It represents the version
+ // string of the telemetry SDK.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '1.2.3'
+ TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
+
+ // TelemetryAutoVersionKey is the attribute Key conforming to the
+ // "telemetry.auto.version" semantic conventions. It represents the version
+ // string of the auto instrumentation agent, if used.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '1.2.3'
+ TelemetryAutoVersionKey = attribute.Key("telemetry.auto.version")
+)
+
+var (
+ // cpp
+ TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
+ // dotnet
+ TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
+ // erlang
+ TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
+ // go
+ TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
+ // java
+ TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
+ // nodejs
+ TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
+ // php
+ TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
+ // python
+ TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
+ // ruby
+ TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
+ // webjs
+ TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs")
+ // swift
+ TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
+)
+
+// TelemetrySDKName returns an attribute KeyValue conforming to the
+// "telemetry.sdk.name" semantic conventions. It represents the name of the
+// telemetry SDK as defined above.
+func TelemetrySDKName(val string) attribute.KeyValue {
+ return TelemetrySDKNameKey.String(val)
+}
+
+// TelemetrySDKVersion returns an attribute KeyValue conforming to the
+// "telemetry.sdk.version" semantic conventions. It represents the version
+// string of the telemetry SDK.
+func TelemetrySDKVersion(val string) attribute.KeyValue {
+ return TelemetrySDKVersionKey.String(val)
+}
+
+// TelemetryAutoVersion returns an attribute KeyValue conforming to the
+// "telemetry.auto.version" semantic conventions. It represents the version
+// string of the auto instrumentation agent, if used.
+func TelemetryAutoVersion(val string) attribute.KeyValue {
+ return TelemetryAutoVersionKey.String(val)
+}
+
+// Resource describing the packaged software running the application code. Web
+// engines are typically executed using process.runtime.
+const (
+ // WebEngineNameKey is the attribute Key conforming to the "webengine.name"
+ // semantic conventions. It represents the name of the web engine.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'WildFly'
+ WebEngineNameKey = attribute.Key("webengine.name")
+
+ // WebEngineVersionKey is the attribute Key conforming to the
+ // "webengine.version" semantic conventions. It represents the version of
+ // the web engine.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '21.0.0'
+ WebEngineVersionKey = attribute.Key("webengine.version")
+
+ // WebEngineDescriptionKey is the attribute Key conforming to the
+ // "webengine.description" semantic conventions. It represents the
+ // additional description of the web engine (e.g. detailed version and
+ // edition information).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -
+ // 2.2.2.Final'
+ WebEngineDescriptionKey = attribute.Key("webengine.description")
+)
+
+// WebEngineName returns an attribute KeyValue conforming to the
+// "webengine.name" semantic conventions. It represents the name of the web
+// engine.
+func WebEngineName(val string) attribute.KeyValue {
+ return WebEngineNameKey.String(val)
+}
+
+// WebEngineVersion returns an attribute KeyValue conforming to the
+// "webengine.version" semantic conventions. It represents the version of the
+// web engine.
+func WebEngineVersion(val string) attribute.KeyValue {
+ return WebEngineVersionKey.String(val)
+}
+
+// WebEngineDescription returns an attribute KeyValue conforming to the
+// "webengine.description" semantic conventions. It represents the additional
+// description of the web engine (e.g. detailed version and edition
+// information).
+func WebEngineDescription(val string) attribute.KeyValue {
+ return WebEngineDescriptionKey.String(val)
+}
+
+// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's
+// concepts.
+const (
+ // OtelScopeNameKey is the attribute Key conforming to the
+ // "otel.scope.name" semantic conventions. It represents the name of the
+ // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'io.opentelemetry.contrib.mongodb'
+ OtelScopeNameKey = attribute.Key("otel.scope.name")
+
+ // OtelScopeVersionKey is the attribute Key conforming to the
+ // "otel.scope.version" semantic conventions. It represents the version of
+ // the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '1.0.0'
+ OtelScopeVersionKey = attribute.Key("otel.scope.version")
+)
+
+// OtelScopeName returns an attribute KeyValue conforming to the
+// "otel.scope.name" semantic conventions. It represents the name of the
+// instrumentation scope - (`InstrumentationScope.Name` in OTLP).
+func OtelScopeName(val string) attribute.KeyValue {
+ return OtelScopeNameKey.String(val)
+}
+
+// OtelScopeVersion returns an attribute KeyValue conforming to the
+// "otel.scope.version" semantic conventions. It represents the version of the
+// instrumentation scope - (`InstrumentationScope.Version` in OTLP).
+func OtelScopeVersion(val string) attribute.KeyValue {
+ return OtelScopeVersionKey.String(val)
+}
+
+// Span attributes used by non-OTLP exporters to represent OpenTelemetry
+// Scope's concepts.
+const (
+ // OtelLibraryNameKey is the attribute Key conforming to the
+ // "otel.library.name" semantic conventions. It represents the deprecated,
+ // use the `otel.scope.name` attribute.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: deprecated
+ // Examples: 'io.opentelemetry.contrib.mongodb'
+ OtelLibraryNameKey = attribute.Key("otel.library.name")
+
+ // OtelLibraryVersionKey is the attribute Key conforming to the
+ // "otel.library.version" semantic conventions. It represents the
+ // deprecated, use the `otel.scope.version` attribute.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: deprecated
+ // Examples: '1.0.0'
+ OtelLibraryVersionKey = attribute.Key("otel.library.version")
+)
+
+// OtelLibraryName returns an attribute KeyValue conforming to the
+// "otel.library.name" semantic conventions. It represents the deprecated, use
+// the `otel.scope.name` attribute.
+func OtelLibraryName(val string) attribute.KeyValue {
+ return OtelLibraryNameKey.String(val)
+}
+
+// OtelLibraryVersion returns an attribute KeyValue conforming to the
+// "otel.library.version" semantic conventions. It represents the deprecated,
+// use the `otel.scope.version` attribute.
+func OtelLibraryVersion(val string) attribute.KeyValue {
+ return OtelLibraryVersionKey.String(val)
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/schema.go
new file mode 100644
index 00000000..634a1dce
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/schema.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0"
+
+// SchemaURL is the schema URL that matches the version of the semantic conventions
+// that this package defines. Semconv packages starting from v1.4.0 must declare
+// non-empty schema URL in the form https://opentelemetry.io/schemas/
+const SchemaURL = "https://opentelemetry.io/schemas/1.17.0"
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/trace.go b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/trace.go
new file mode 100644
index 00000000..21497bb6
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.17.0/trace.go
@@ -0,0 +1,3364 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.17.0"
+
+import "go.opentelemetry.io/otel/attribute"
+
+// The shared attributes used to report a single exception associated with a
+// span or log.
+const (
+ // ExceptionTypeKey is the attribute Key conforming to the "exception.type"
+ // semantic conventions. It represents the type of the exception (its
+ // fully-qualified class name, if applicable). The dynamic type of the
+ // exception should be preferred over the static type in languages that
+ // support it.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'java.net.ConnectException', 'OSError'
+ ExceptionTypeKey = attribute.Key("exception.type")
+
+ // ExceptionMessageKey is the attribute Key conforming to the
+ // "exception.message" semantic conventions. It represents the exception
+ // message.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Division by zero', "Can't convert 'int' object to str
+ // implicitly"
+ ExceptionMessageKey = attribute.Key("exception.message")
+
+ // ExceptionStacktraceKey is the attribute Key conforming to the
+ // "exception.stacktrace" semantic conventions. It represents a stacktrace
+ // as a string in the natural representation for the language runtime. The
+ // representation is to be determined and documented by each language SIG.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test
+ // exception\\n at '
+ // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
+ // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
+ // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
+ ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
+)
+
+// ExceptionType returns an attribute KeyValue conforming to the
+// "exception.type" semantic conventions. It represents the type of the
+// exception (its fully-qualified class name, if applicable). The dynamic type
+// of the exception should be preferred over the static type in languages that
+// support it.
+func ExceptionType(val string) attribute.KeyValue {
+ return ExceptionTypeKey.String(val)
+}
+
+// ExceptionMessage returns an attribute KeyValue conforming to the
+// "exception.message" semantic conventions. It represents the exception
+// message.
+func ExceptionMessage(val string) attribute.KeyValue {
+ return ExceptionMessageKey.String(val)
+}
+
+// ExceptionStacktrace returns an attribute KeyValue conforming to the
+// "exception.stacktrace" semantic conventions. It represents a stacktrace as a
+// string in the natural representation for the language runtime. The
+// representation is to be determined and documented by each language SIG.
+func ExceptionStacktrace(val string) attribute.KeyValue {
+ return ExceptionStacktraceKey.String(val)
+}
+
+// Attributes for Events represented using Log Records.
+const (
+ // EventNameKey is the attribute Key conforming to the "event.name"
+ // semantic conventions. It represents the name identifies the event.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'click', 'exception'
+ EventNameKey = attribute.Key("event.name")
+
+ // EventDomainKey is the attribute Key conforming to the "event.domain"
+ // semantic conventions. It represents the domain identifies the business
+ // context for the events.
+ //
+ // Type: Enum
+ // RequirementLevel: Required
+ // Stability: stable
+ // Note: Events across different domains may have same `event.name`, yet be
+ // unrelated events.
+ EventDomainKey = attribute.Key("event.domain")
+)
+
+var (
+ // Events from browser apps
+ EventDomainBrowser = EventDomainKey.String("browser")
+ // Events from mobile apps
+ EventDomainDevice = EventDomainKey.String("device")
+ // Events from Kubernetes
+ EventDomainK8S = EventDomainKey.String("k8s")
+)
+
+// EventName returns an attribute KeyValue conforming to the "event.name"
+// semantic conventions. It represents the name identifies the event.
+func EventName(val string) attribute.KeyValue {
+ return EventNameKey.String(val)
+}
+
+// Span attributes used by AWS Lambda (in addition to general `faas`
+// attributes).
+const (
+ // AWSLambdaInvokedARNKey is the attribute Key conforming to the
+ // "aws.lambda.invoked_arn" semantic conventions. It represents the full
+ // invoked ARN as provided on the `Context` passed to the function
+ // (`Lambda-Runtime-Invoked-Function-ARN` header on the
+ // `/runtime/invocation/next` applicable).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'
+ // Note: This may be different from `faas.id` if an alias is involved.
+ AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
+)
+
+// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
+// "aws.lambda.invoked_arn" semantic conventions. It represents the full
+// invoked ARN as provided on the `Context` passed to the function
+// (`Lambda-Runtime-Invoked-Function-ARN` header on the
+// `/runtime/invocation/next` applicable).
+func AWSLambdaInvokedARN(val string) attribute.KeyValue {
+ return AWSLambdaInvokedARNKey.String(val)
+}
+
+// Attributes for CloudEvents. CloudEvents is a specification on how to define
+// event data in a standard way. These attributes can be attached to spans when
+// performing operations with CloudEvents, regardless of the protocol being
+// used.
+const (
+ // CloudeventsEventIDKey is the attribute Key conforming to the
+ // "cloudevents.event_id" semantic conventions. It represents the
+ // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
+ // uniquely identifies the event.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001'
+ CloudeventsEventIDKey = attribute.Key("cloudevents.event_id")
+
+ // CloudeventsEventSourceKey is the attribute Key conforming to the
+ // "cloudevents.event_source" semantic conventions. It represents the
+ // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
+ // identifies the context in which an event happened.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'https://github.com/cloudevents',
+ // '/cloudevents/spec/pull/123', 'my-service'
+ CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source")
+
+ // CloudeventsEventSpecVersionKey is the attribute Key conforming to the
+ // "cloudevents.event_spec_version" semantic conventions. It represents the
+ // [version of the CloudEvents
+ // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
+ // which the event uses.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '1.0'
+ CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
+
+ // CloudeventsEventTypeKey is the attribute Key conforming to the
+ // "cloudevents.event_type" semantic conventions. It represents the
+ // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
+ // contains a value describing the type of event related to the originating
+ // occurrence.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'com.github.pull_request.opened',
+ // 'com.example.object.deleted.v2'
+ CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type")
+
+ // CloudeventsEventSubjectKey is the attribute Key conforming to the
+ // "cloudevents.event_subject" semantic conventions. It represents the
+ // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
+ // of the event in the context of the event producer (identified by
+ // source).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'mynewfile.jpg'
+ CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
+)
+
+// CloudeventsEventID returns an attribute KeyValue conforming to the
+// "cloudevents.event_id" semantic conventions. It represents the
+// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
+// uniquely identifies the event.
+func CloudeventsEventID(val string) attribute.KeyValue {
+ return CloudeventsEventIDKey.String(val)
+}
+
+// CloudeventsEventSource returns an attribute KeyValue conforming to the
+// "cloudevents.event_source" semantic conventions. It represents the
+// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
+// identifies the context in which an event happened.
+func CloudeventsEventSource(val string) attribute.KeyValue {
+ return CloudeventsEventSourceKey.String(val)
+}
+
+// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to
+// the "cloudevents.event_spec_version" semantic conventions. It represents the
+// [version of the CloudEvents
+// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
+// which the event uses.
+func CloudeventsEventSpecVersion(val string) attribute.KeyValue {
+ return CloudeventsEventSpecVersionKey.String(val)
+}
+
+// CloudeventsEventType returns an attribute KeyValue conforming to the
+// "cloudevents.event_type" semantic conventions. It represents the
+// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
+// contains a value describing the type of event related to the originating
+// occurrence.
+func CloudeventsEventType(val string) attribute.KeyValue {
+ return CloudeventsEventTypeKey.String(val)
+}
+
+// CloudeventsEventSubject returns an attribute KeyValue conforming to the
+// "cloudevents.event_subject" semantic conventions. It represents the
+// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
+// of the event in the context of the event producer (identified by source).
+func CloudeventsEventSubject(val string) attribute.KeyValue {
+ return CloudeventsEventSubjectKey.String(val)
+}
+
+// Semantic conventions for the OpenTracing Shim
+const (
+ // OpentracingRefTypeKey is the attribute Key conforming to the
+ // "opentracing.ref_type" semantic conventions. It represents the
+ // parent-child Reference type
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Note: The causal relationship between a child Span and a parent Span.
+ OpentracingRefTypeKey = attribute.Key("opentracing.ref_type")
+)
+
+var (
+ // The parent Span depends on the child Span in some capacity
+ OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of")
+ // The parent Span does not depend in any way on the result of the child Span
+ OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from")
+)
+
+// The attributes used to perform database client calls.
+const (
+ // DBSystemKey is the attribute Key conforming to the "db.system" semantic
+ // conventions. It represents an identifier for the database management
+ // system (DBMS) product being used. See below for a list of well-known
+ // identifiers.
+ //
+ // Type: Enum
+ // RequirementLevel: Required
+ // Stability: stable
+ DBSystemKey = attribute.Key("db.system")
+
+ // DBConnectionStringKey is the attribute Key conforming to the
+ // "db.connection_string" semantic conventions. It represents the
+ // connection string used to connect to the database. It is recommended to
+ // remove embedded credentials.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;'
+ DBConnectionStringKey = attribute.Key("db.connection_string")
+
+ // DBUserKey is the attribute Key conforming to the "db.user" semantic
+ // conventions. It represents the username for accessing the database.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'readonly_user', 'reporting_user'
+ DBUserKey = attribute.Key("db.user")
+
+ // DBJDBCDriverClassnameKey is the attribute Key conforming to the
+ // "db.jdbc.driver_classname" semantic conventions. It represents the
+ // fully-qualified class name of the [Java Database Connectivity
+ // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/)
+ // driver used to connect.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'org.postgresql.Driver',
+ // 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
+ DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname")
+
+ // DBNameKey is the attribute Key conforming to the "db.name" semantic
+ // conventions. It represents the this attribute is used to report the name
+ // of the database being accessed. For commands that switch the database,
+ // this should be set to the target database (even if the command fails).
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (If applicable.)
+ // Stability: stable
+ // Examples: 'customers', 'main'
+ // Note: In some SQL databases, the database name to be used is called
+ // "schema name". In case there are multiple layers that could be
+ // considered for database name (e.g. Oracle instance name and schema
+ // name), the database name to be used is the more specific layer (e.g.
+ // Oracle schema name).
+ DBNameKey = attribute.Key("db.name")
+
+ // DBStatementKey is the attribute Key conforming to the "db.statement"
+ // semantic conventions. It represents the database statement being
+ // executed.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (If applicable and not
+ // explicitly disabled via instrumentation configuration.)
+ // Stability: stable
+ // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"'
+ // Note: The value may be sanitized to exclude sensitive information.
+ DBStatementKey = attribute.Key("db.statement")
+
+ // DBOperationKey is the attribute Key conforming to the "db.operation"
+ // semantic conventions. It represents the name of the operation being
+ // executed, e.g. the [MongoDB command
+ // name](https://docs.mongodb.com/manual/reference/command/#database-operations)
+ // such as `findAndModify`, or the SQL keyword.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (If `db.statement` is not
+ // applicable.)
+ // Stability: stable
+ // Examples: 'findAndModify', 'HMSET', 'SELECT'
+ // Note: When setting this to an SQL keyword, it is not recommended to
+ // attempt any client-side parsing of `db.statement` just to get this
+ // property, but it should be set if the operation name is provided by the
+ // library being instrumented. If the SQL statement has an ambiguous
+ // operation, or performs more than one operation, this value may be
+ // omitted.
+ DBOperationKey = attribute.Key("db.operation")
+)
+
+var (
+ // Some other SQL database. Fallback only. See notes
+ DBSystemOtherSQL = DBSystemKey.String("other_sql")
+ // Microsoft SQL Server
+ DBSystemMSSQL = DBSystemKey.String("mssql")
+ // MySQL
+ DBSystemMySQL = DBSystemKey.String("mysql")
+ // Oracle Database
+ DBSystemOracle = DBSystemKey.String("oracle")
+ // IBM DB2
+ DBSystemDB2 = DBSystemKey.String("db2")
+ // PostgreSQL
+ DBSystemPostgreSQL = DBSystemKey.String("postgresql")
+ // Amazon Redshift
+ DBSystemRedshift = DBSystemKey.String("redshift")
+ // Apache Hive
+ DBSystemHive = DBSystemKey.String("hive")
+ // Cloudscape
+ DBSystemCloudscape = DBSystemKey.String("cloudscape")
+ // HyperSQL DataBase
+ DBSystemHSQLDB = DBSystemKey.String("hsqldb")
+ // Progress Database
+ DBSystemProgress = DBSystemKey.String("progress")
+ // SAP MaxDB
+ DBSystemMaxDB = DBSystemKey.String("maxdb")
+ // SAP HANA
+ DBSystemHanaDB = DBSystemKey.String("hanadb")
+ // Ingres
+ DBSystemIngres = DBSystemKey.String("ingres")
+ // FirstSQL
+ DBSystemFirstSQL = DBSystemKey.String("firstsql")
+ // EnterpriseDB
+ DBSystemEDB = DBSystemKey.String("edb")
+ // InterSystems Caché
+ DBSystemCache = DBSystemKey.String("cache")
+ // Adabas (Adaptable Database System)
+ DBSystemAdabas = DBSystemKey.String("adabas")
+ // Firebird
+ DBSystemFirebird = DBSystemKey.String("firebird")
+ // Apache Derby
+ DBSystemDerby = DBSystemKey.String("derby")
+ // FileMaker
+ DBSystemFilemaker = DBSystemKey.String("filemaker")
+ // Informix
+ DBSystemInformix = DBSystemKey.String("informix")
+ // InstantDB
+ DBSystemInstantDB = DBSystemKey.String("instantdb")
+ // InterBase
+ DBSystemInterbase = DBSystemKey.String("interbase")
+ // MariaDB
+ DBSystemMariaDB = DBSystemKey.String("mariadb")
+ // Netezza
+ DBSystemNetezza = DBSystemKey.String("netezza")
+ // Pervasive PSQL
+ DBSystemPervasive = DBSystemKey.String("pervasive")
+ // PointBase
+ DBSystemPointbase = DBSystemKey.String("pointbase")
+ // SQLite
+ DBSystemSqlite = DBSystemKey.String("sqlite")
+ // Sybase
+ DBSystemSybase = DBSystemKey.String("sybase")
+ // Teradata
+ DBSystemTeradata = DBSystemKey.String("teradata")
+ // Vertica
+ DBSystemVertica = DBSystemKey.String("vertica")
+ // H2
+ DBSystemH2 = DBSystemKey.String("h2")
+ // ColdFusion IMQ
+ DBSystemColdfusion = DBSystemKey.String("coldfusion")
+ // Apache Cassandra
+ DBSystemCassandra = DBSystemKey.String("cassandra")
+ // Apache HBase
+ DBSystemHBase = DBSystemKey.String("hbase")
+ // MongoDB
+ DBSystemMongoDB = DBSystemKey.String("mongodb")
+ // Redis
+ DBSystemRedis = DBSystemKey.String("redis")
+ // Couchbase
+ DBSystemCouchbase = DBSystemKey.String("couchbase")
+ // CouchDB
+ DBSystemCouchDB = DBSystemKey.String("couchdb")
+ // Microsoft Azure Cosmos DB
+ DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
+ // Amazon DynamoDB
+ DBSystemDynamoDB = DBSystemKey.String("dynamodb")
+ // Neo4j
+ DBSystemNeo4j = DBSystemKey.String("neo4j")
+ // Apache Geode
+ DBSystemGeode = DBSystemKey.String("geode")
+ // Elasticsearch
+ DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
+ // Memcached
+ DBSystemMemcached = DBSystemKey.String("memcached")
+ // CockroachDB
+ DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
+ // OpenSearch
+ DBSystemOpensearch = DBSystemKey.String("opensearch")
+ // ClickHouse
+ DBSystemClickhouse = DBSystemKey.String("clickhouse")
+)
+
+// DBConnectionString returns an attribute KeyValue conforming to the
+// "db.connection_string" semantic conventions. It represents the connection
+// string used to connect to the database. It is recommended to remove embedded
+// credentials.
+func DBConnectionString(val string) attribute.KeyValue {
+ return DBConnectionStringKey.String(val)
+}
+
+// DBUser returns an attribute KeyValue conforming to the "db.user" semantic
+// conventions. It represents the username for accessing the database.
+func DBUser(val string) attribute.KeyValue {
+ return DBUserKey.String(val)
+}
+
+// DBJDBCDriverClassname returns an attribute KeyValue conforming to the
+// "db.jdbc.driver_classname" semantic conventions. It represents the
+// fully-qualified class name of the [Java Database Connectivity
+// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver
+// used to connect.
+func DBJDBCDriverClassname(val string) attribute.KeyValue {
+ return DBJDBCDriverClassnameKey.String(val)
+}
+
+// DBName returns an attribute KeyValue conforming to the "db.name" semantic
+// conventions. It represents the this attribute is used to report the name of
+// the database being accessed. For commands that switch the database, this
+// should be set to the target database (even if the command fails).
+func DBName(val string) attribute.KeyValue {
+ return DBNameKey.String(val)
+}
+
+// DBStatement returns an attribute KeyValue conforming to the
+// "db.statement" semantic conventions. It represents the database statement
+// being executed.
+func DBStatement(val string) attribute.KeyValue {
+ return DBStatementKey.String(val)
+}
+
+// DBOperation returns an attribute KeyValue conforming to the
+// "db.operation" semantic conventions. It represents the name of the operation
+// being executed, e.g. the [MongoDB command
+// name](https://docs.mongodb.com/manual/reference/command/#database-operations)
+// such as `findAndModify`, or the SQL keyword.
+func DBOperation(val string) attribute.KeyValue {
+ return DBOperationKey.String(val)
+}
+
+// Connection-level attributes for Microsoft SQL Server
+const (
+ // DBMSSQLInstanceNameKey is the attribute Key conforming to the
+ // "db.mssql.instance_name" semantic conventions. It represents the
+ // Microsoft SQL Server [instance
+ // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
+ // connecting to. This name is used to determine the port of a named
+ // instance.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'MSSQLSERVER'
+ // Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no
+ // longer required (but still recommended if non-standard).
+ DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name")
+)
+
+// DBMSSQLInstanceName returns an attribute KeyValue conforming to the
+// "db.mssql.instance_name" semantic conventions. It represents the Microsoft
+// SQL Server [instance
+// name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15)
+// connecting to. This name is used to determine the port of a named instance.
+func DBMSSQLInstanceName(val string) attribute.KeyValue {
+ return DBMSSQLInstanceNameKey.String(val)
+}
+
+// Call-level attributes for Cassandra
+const (
+ // DBCassandraPageSizeKey is the attribute Key conforming to the
+ // "db.cassandra.page_size" semantic conventions. It represents the fetch
+ // size used for paging, i.e. how many rows will be returned at once.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 5000
+ DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
+
+ // DBCassandraConsistencyLevelKey is the attribute Key conforming to the
+ // "db.cassandra.consistency_level" semantic conventions. It represents the
+ // consistency level of the query. Based on consistency values from
+ // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
+
+ // DBCassandraTableKey is the attribute Key conforming to the
+ // "db.cassandra.table" semantic conventions. It represents the name of the
+ // primary table that the operation is acting upon, including the keyspace
+ // name (if applicable).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: stable
+ // Examples: 'mytable'
+ // Note: This mirrors the db.sql.table attribute but references cassandra
+ // rather than sql. It is not recommended to attempt any client-side
+ // parsing of `db.statement` just to get this property, but it should be
+ // set if it is provided by the library being instrumented. If the
+ // operation is acting upon an anonymous table, or more than one table,
+ // this value MUST NOT be set.
+ DBCassandraTableKey = attribute.Key("db.cassandra.table")
+
+ // DBCassandraIdempotenceKey is the attribute Key conforming to the
+ // "db.cassandra.idempotence" semantic conventions. It represents the
+ // whether or not the query is idempotent.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
+
+ // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming
+ // to the "db.cassandra.speculative_execution_count" semantic conventions.
+ // It represents the number of times a query was speculatively executed.
+ // Not set or `0` if the query was not executed speculatively.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 0, 2
+ DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
+
+ // DBCassandraCoordinatorIDKey is the attribute Key conforming to the
+ // "db.cassandra.coordinator.id" semantic conventions. It represents the ID
+ // of the coordinating node for a query.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
+ DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
+
+ // DBCassandraCoordinatorDCKey is the attribute Key conforming to the
+ // "db.cassandra.coordinator.dc" semantic conventions. It represents the
+ // data center of the coordinating node for a query.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'us-west-2'
+ DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
+)
+
+var (
+ // all
+ DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
+ // each_quorum
+ DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
+ // quorum
+ DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
+ // local_quorum
+ DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
+ // one
+ DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
+ // two
+ DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
+ // three
+ DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
+ // local_one
+ DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
+ // any
+ DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
+ // serial
+ DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
+ // local_serial
+ DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
+)
+
+// DBCassandraPageSize returns an attribute KeyValue conforming to the
+// "db.cassandra.page_size" semantic conventions. It represents the fetch size
+// used for paging, i.e. how many rows will be returned at once.
+func DBCassandraPageSize(val int) attribute.KeyValue {
+ return DBCassandraPageSizeKey.Int(val)
+}
+
+// DBCassandraTable returns an attribute KeyValue conforming to the
+// "db.cassandra.table" semantic conventions. It represents the name of the
+// primary table that the operation is acting upon, including the keyspace name
+// (if applicable).
+func DBCassandraTable(val string) attribute.KeyValue {
+ return DBCassandraTableKey.String(val)
+}
+
+// DBCassandraIdempotence returns an attribute KeyValue conforming to the
+// "db.cassandra.idempotence" semantic conventions. It represents the whether
+// or not the query is idempotent.
+func DBCassandraIdempotence(val bool) attribute.KeyValue {
+ return DBCassandraIdempotenceKey.Bool(val)
+}
+
+// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue
+// conforming to the "db.cassandra.speculative_execution_count" semantic
+// conventions. It represents the number of times a query was speculatively
+// executed. Not set or `0` if the query was not executed speculatively.
+func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
+ return DBCassandraSpeculativeExecutionCountKey.Int(val)
+}
+
+// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the
+// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of
+// the coordinating node for a query.
+func DBCassandraCoordinatorID(val string) attribute.KeyValue {
+ return DBCassandraCoordinatorIDKey.String(val)
+}
+
+// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the
+// "db.cassandra.coordinator.dc" semantic conventions. It represents the data
+// center of the coordinating node for a query.
+func DBCassandraCoordinatorDC(val string) attribute.KeyValue {
+ return DBCassandraCoordinatorDCKey.String(val)
+}
+
+// Call-level attributes for Redis
+const (
+ // DBRedisDBIndexKey is the attribute Key conforming to the
+ // "db.redis.database_index" semantic conventions. It represents the index
+ // of the database being accessed as used in the [`SELECT`
+ // command](https://redis.io/commands/select), provided as an integer. To
+ // be used instead of the generic `db.name` attribute.
+ //
+ // Type: int
+ // RequirementLevel: ConditionallyRequired (If other than the default
+ // database (`0`).)
+ // Stability: stable
+ // Examples: 0, 1, 15
+ DBRedisDBIndexKey = attribute.Key("db.redis.database_index")
+)
+
+// DBRedisDBIndex returns an attribute KeyValue conforming to the
+// "db.redis.database_index" semantic conventions. It represents the index of
+// the database being accessed as used in the [`SELECT`
+// command](https://redis.io/commands/select), provided as an integer. To be
+// used instead of the generic `db.name` attribute.
+func DBRedisDBIndex(val int) attribute.KeyValue {
+ return DBRedisDBIndexKey.Int(val)
+}
+
+// Call-level attributes for MongoDB
+const (
+ // DBMongoDBCollectionKey is the attribute Key conforming to the
+ // "db.mongodb.collection" semantic conventions. It represents the
+ // collection being accessed within the database stated in `db.name`.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'customers', 'products'
+ DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection")
+)
+
+// DBMongoDBCollection returns an attribute KeyValue conforming to the
+// "db.mongodb.collection" semantic conventions. It represents the collection
+// being accessed within the database stated in `db.name`.
+func DBMongoDBCollection(val string) attribute.KeyValue {
+ return DBMongoDBCollectionKey.String(val)
+}
+
+// Call-level attributes for SQL databases
+const (
+ // DBSQLTableKey is the attribute Key conforming to the "db.sql.table"
+ // semantic conventions. It represents the name of the primary table that
+ // the operation is acting upon, including the database name (if
+ // applicable).
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: stable
+ // Examples: 'public.users', 'customers'
+ // Note: It is not recommended to attempt any client-side parsing of
+ // `db.statement` just to get this property, but it should be set if it is
+ // provided by the library being instrumented. If the operation is acting
+ // upon an anonymous table, or more than one table, this value MUST NOT be
+ // set.
+ DBSQLTableKey = attribute.Key("db.sql.table")
+)
+
+// DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table"
+// semantic conventions. It represents the name of the primary table that the
+// operation is acting upon, including the database name (if applicable).
+func DBSQLTable(val string) attribute.KeyValue {
+ return DBSQLTableKey.String(val)
+}
+
+// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's
+// concepts.
+const (
+ // OtelStatusCodeKey is the attribute Key conforming to the
+ // "otel.status_code" semantic conventions. It represents the name of the
+ // code, either "OK" or "ERROR". MUST NOT be set if the status code is
+ // UNSET.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ OtelStatusCodeKey = attribute.Key("otel.status_code")
+
+ // OtelStatusDescriptionKey is the attribute Key conforming to the
+ // "otel.status_description" semantic conventions. It represents the
+ // description of the Status if it has a value, otherwise not set.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'resource not found'
+ OtelStatusDescriptionKey = attribute.Key("otel.status_description")
+)
+
+var (
+ // The operation has been validated by an Application developer or Operator to have completed successfully
+ OtelStatusCodeOk = OtelStatusCodeKey.String("OK")
+ // The operation contains an error
+ OtelStatusCodeError = OtelStatusCodeKey.String("ERROR")
+)
+
+// OtelStatusDescription returns an attribute KeyValue conforming to the
+// "otel.status_description" semantic conventions. It represents the
+// description of the Status if it has a value, otherwise not set.
+func OtelStatusDescription(val string) attribute.KeyValue {
+ return OtelStatusDescriptionKey.String(val)
+}
+
+// This semantic convention describes an instance of a function that runs
+// without provisioning or managing of servers (also known as serverless
+// functions or Function as a Service (FaaS)) with spans.
+const (
+ // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
+ // semantic conventions. It represents the type of the trigger which caused
+ // this function execution.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Note: For the server/consumer span on the incoming side,
+ // `faas.trigger` MUST be set.
+ //
+ // Clients invoking FaaS instances usually cannot set `faas.trigger`,
+ // since they would typically need to look in the payload to determine
+ // the event type. If clients set it, it should be the same as the
+ // trigger that corresponding incoming would have (i.e., this has
+ // nothing to do with the underlying transport used to make the API
+ // call to invoke the lambda, which is often HTTP).
+ FaaSTriggerKey = attribute.Key("faas.trigger")
+
+ // FaaSExecutionKey is the attribute Key conforming to the "faas.execution"
+ // semantic conventions. It represents the execution ID of the current
+ // function execution.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
+ FaaSExecutionKey = attribute.Key("faas.execution")
+)
+
+var (
+ // A response to some data source operation such as a database or filesystem read/write
+ FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
+ // To provide an answer to an inbound HTTP request
+ FaaSTriggerHTTP = FaaSTriggerKey.String("http")
+ // A function is set to be executed when messages are sent to a messaging system
+ FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
+ // A function is scheduled to be executed regularly
+ FaaSTriggerTimer = FaaSTriggerKey.String("timer")
+ // If none of the others apply
+ FaaSTriggerOther = FaaSTriggerKey.String("other")
+)
+
+// FaaSExecution returns an attribute KeyValue conforming to the
+// "faas.execution" semantic conventions. It represents the execution ID of the
+// current function execution.
+func FaaSExecution(val string) attribute.KeyValue {
+ return FaaSExecutionKey.String(val)
+}
+
+// Semantic Convention for FaaS triggered as a response to some data source
+// operation such as a database or filesystem read/write.
+const (
+ // FaaSDocumentCollectionKey is the attribute Key conforming to the
+ // "faas.document.collection" semantic conventions. It represents the name
+ // of the source on which the triggering operation was performed. For
+ // example, in Cloud Storage or S3 corresponds to the bucket name, and in
+ // Cosmos DB to the database name.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'myBucketName', 'myDBName'
+ FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
+
+ // FaaSDocumentOperationKey is the attribute Key conforming to the
+ // "faas.document.operation" semantic conventions. It represents the
+ // describes the type of the operation that was performed on the data.
+ //
+ // Type: Enum
+ // RequirementLevel: Required
+ // Stability: stable
+ FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
+
+ // FaaSDocumentTimeKey is the attribute Key conforming to the
+ // "faas.document.time" semantic conventions. It represents a string
+ // containing the time when the data was accessed in the [ISO
+ // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
+ // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '2020-01-23T13:47:06Z'
+ FaaSDocumentTimeKey = attribute.Key("faas.document.time")
+
+ // FaaSDocumentNameKey is the attribute Key conforming to the
+ // "faas.document.name" semantic conventions. It represents the document
+ // name/table subjected to the operation. For example, in Cloud Storage or
+ // S3 is the name of the file, and in Cosmos DB the table name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'myFile.txt', 'myTableName'
+ FaaSDocumentNameKey = attribute.Key("faas.document.name")
+)
+
+var (
+ // When a new object is created
+ FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
+ // When an object is modified
+ FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
+ // When an object is deleted
+ FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
+)
+
+// FaaSDocumentCollection returns an attribute KeyValue conforming to the
+// "faas.document.collection" semantic conventions. It represents the name of
+// the source on which the triggering operation was performed. For example, in
+// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
+// database name.
+func FaaSDocumentCollection(val string) attribute.KeyValue {
+ return FaaSDocumentCollectionKey.String(val)
+}
+
+// FaaSDocumentTime returns an attribute KeyValue conforming to the
+// "faas.document.time" semantic conventions. It represents a string containing
+// the time when the data was accessed in the [ISO
+// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
+// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
+func FaaSDocumentTime(val string) attribute.KeyValue {
+ return FaaSDocumentTimeKey.String(val)
+}
+
+// FaaSDocumentName returns an attribute KeyValue conforming to the
+// "faas.document.name" semantic conventions. It represents the document
+// name/table subjected to the operation. For example, in Cloud Storage or S3
+// is the name of the file, and in Cosmos DB the table name.
+func FaaSDocumentName(val string) attribute.KeyValue {
+ return FaaSDocumentNameKey.String(val)
+}
+
+// Semantic Convention for FaaS scheduled to be executed regularly.
+const (
+ // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
+ // conventions. It represents a string containing the function invocation
+ // time in the [ISO
+ // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
+ // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '2020-01-23T13:47:06Z'
+ FaaSTimeKey = attribute.Key("faas.time")
+
+ // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
+ // conventions. It represents a string containing the schedule period as
+ // [Cron
+ // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '0/5 * * * ? *'
+ FaaSCronKey = attribute.Key("faas.cron")
+)
+
+// FaaSTime returns an attribute KeyValue conforming to the "faas.time"
+// semantic conventions. It represents a string containing the function
+// invocation time in the [ISO
+// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
+// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
+func FaaSTime(val string) attribute.KeyValue {
+ return FaaSTimeKey.String(val)
+}
+
+// FaaSCron returns an attribute KeyValue conforming to the "faas.cron"
+// semantic conventions. It represents a string containing the schedule period
+// as [Cron
+// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
+func FaaSCron(val string) attribute.KeyValue {
+ return FaaSCronKey.String(val)
+}
+
+// Contains additional attributes for incoming FaaS spans.
+const (
+ // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
+ // semantic conventions. It represents a boolean that is true if the
+ // serverless function is executed for the first time (aka cold-start).
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ FaaSColdstartKey = attribute.Key("faas.coldstart")
+)
+
+// FaaSColdstart returns an attribute KeyValue conforming to the
+// "faas.coldstart" semantic conventions. It represents a boolean that is true
+// if the serverless function is executed for the first time (aka cold-start).
+func FaaSColdstart(val bool) attribute.KeyValue {
+ return FaaSColdstartKey.Bool(val)
+}
+
+// Contains additional attributes for outgoing FaaS spans.
+const (
+ // FaaSInvokedNameKey is the attribute Key conforming to the
+ // "faas.invoked_name" semantic conventions. It represents the name of the
+ // invoked function.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'my-function'
+ // Note: SHOULD be equal to the `faas.name` resource attribute of the
+ // invoked function.
+ FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
+
+ // FaaSInvokedProviderKey is the attribute Key conforming to the
+ // "faas.invoked_provider" semantic conventions. It represents the cloud
+ // provider of the invoked function.
+ //
+ // Type: Enum
+ // RequirementLevel: Required
+ // Stability: stable
+ // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
+ // invoked function.
+ FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
+
+ // FaaSInvokedRegionKey is the attribute Key conforming to the
+ // "faas.invoked_region" semantic conventions. It represents the cloud
+ // region of the invoked function.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (For some cloud providers, like
+ // AWS or GCP, the region in which a function is hosted is essential to
+ // uniquely identify the function and also part of its endpoint. Since it's
+ // part of the endpoint being called, the region is always known to
+ // clients. In these cases, `faas.invoked_region` MUST be set accordingly.
+ // If the region is unknown to the client or not required for identifying
+ // the invoked function, setting `faas.invoked_region` is optional.)
+ // Stability: stable
+ // Examples: 'eu-central-1'
+ // Note: SHOULD be equal to the `cloud.region` resource attribute of the
+ // invoked function.
+ FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
+)
+
+var (
+ // Alibaba Cloud
+ FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
+ // Amazon Web Services
+ FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
+ // Microsoft Azure
+ FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
+ // Google Cloud Platform
+ FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
+ // Tencent Cloud
+ FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
+)
+
+// FaaSInvokedName returns an attribute KeyValue conforming to the
+// "faas.invoked_name" semantic conventions. It represents the name of the
+// invoked function.
+func FaaSInvokedName(val string) attribute.KeyValue {
+ return FaaSInvokedNameKey.String(val)
+}
+
+// FaaSInvokedRegion returns an attribute KeyValue conforming to the
+// "faas.invoked_region" semantic conventions. It represents the cloud region
+// of the invoked function.
+func FaaSInvokedRegion(val string) attribute.KeyValue {
+ return FaaSInvokedRegionKey.String(val)
+}
+
+// These attributes may be used for any network related operation.
+const (
+ // NetTransportKey is the attribute Key conforming to the "net.transport"
+ // semantic conventions. It represents the transport protocol used. See
+ // note below.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ NetTransportKey = attribute.Key("net.transport")
+
+ // NetAppProtocolNameKey is the attribute Key conforming to the
+ // "net.app.protocol.name" semantic conventions. It represents the
+ // application layer protocol used. The value SHOULD be normalized to
+ // lowercase.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'amqp', 'http', 'mqtt'
+ NetAppProtocolNameKey = attribute.Key("net.app.protocol.name")
+
+ // NetAppProtocolVersionKey is the attribute Key conforming to the
+ // "net.app.protocol.version" semantic conventions. It represents the
+ // version of the application layer protocol used. See note below.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '3.1.1'
+ // Note: `net.app.protocol.version` refers to the version of the protocol
+ // used and might be different from the protocol client's version. If the
+ // HTTP client used has a version of `0.27.2`, but sends HTTP version
+ // `1.1`, this attribute should be set to `1.1`.
+ NetAppProtocolVersionKey = attribute.Key("net.app.protocol.version")
+
+ // NetSockPeerNameKey is the attribute Key conforming to the
+ // "net.sock.peer.name" semantic conventions. It represents the remote
+ // socket peer name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended (If available and different from
+ // `net.peer.name` and if `net.sock.peer.addr` is set.)
+ // Stability: stable
+ // Examples: 'proxy.example.com'
+ NetSockPeerNameKey = attribute.Key("net.sock.peer.name")
+
+ // NetSockPeerAddrKey is the attribute Key conforming to the
+ // "net.sock.peer.addr" semantic conventions. It represents the remote
+ // socket peer address: IPv4 or IPv6 for internet protocols, path for local
+ // communication,
+ // [etc](https://man7.org/linux/man-pages/man7/address_families.7.html).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '127.0.0.1', '/tmp/mysql.sock'
+ NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr")
+
+ // NetSockPeerPortKey is the attribute Key conforming to the
+ // "net.sock.peer.port" semantic conventions. It represents the remote
+ // socket peer port.
+ //
+ // Type: int
+ // RequirementLevel: Recommended (If defined for the address family and if
+ // different than `net.peer.port` and if `net.sock.peer.addr` is set.)
+ // Stability: stable
+ // Examples: 16456
+ NetSockPeerPortKey = attribute.Key("net.sock.peer.port")
+
+ // NetSockFamilyKey is the attribute Key conforming to the
+ // "net.sock.family" semantic conventions. It represents the protocol
+ // [address
+ // family](https://man7.org/linux/man-pages/man7/address_families.7.html)
+ // which is used for communication.
+ //
+ // Type: Enum
+ // RequirementLevel: ConditionallyRequired (If different than `inet` and if
+ // any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers
+ // of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in
+ // `net.sock.peer.addr` if `net.sock.family` is not set. This is to support
+ // instrumentations that follow previous versions of this document.)
+ // Stability: stable
+ // Examples: 'inet6', 'bluetooth'
+ NetSockFamilyKey = attribute.Key("net.sock.family")
+
+ // NetPeerNameKey is the attribute Key conforming to the "net.peer.name"
+ // semantic conventions. It represents the logical remote hostname, see
+ // note below.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'example.com'
+ // Note: `net.peer.name` SHOULD NOT be set if capturing it would require an
+ // extra DNS lookup.
+ NetPeerNameKey = attribute.Key("net.peer.name")
+
+ // NetPeerPortKey is the attribute Key conforming to the "net.peer.port"
+ // semantic conventions. It represents the logical remote port number
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 80, 8080, 443
+ NetPeerPortKey = attribute.Key("net.peer.port")
+
+ // NetHostNameKey is the attribute Key conforming to the "net.host.name"
+ // semantic conventions. It represents the logical local hostname or
+ // similar, see note below.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'localhost'
+ NetHostNameKey = attribute.Key("net.host.name")
+
+ // NetHostPortKey is the attribute Key conforming to the "net.host.port"
+ // semantic conventions. It represents the logical local port number,
+ // preferably the one that the peer used to connect
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 8080
+ NetHostPortKey = attribute.Key("net.host.port")
+
+ // NetSockHostAddrKey is the attribute Key conforming to the
+ // "net.sock.host.addr" semantic conventions. It represents the local
+ // socket address. Useful in case of a multi-IP host.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '192.168.0.1'
+ NetSockHostAddrKey = attribute.Key("net.sock.host.addr")
+
+ // NetSockHostPortKey is the attribute Key conforming to the
+ // "net.sock.host.port" semantic conventions. It represents the local
+ // socket port number.
+ //
+ // Type: int
+ // RequirementLevel: Recommended (If defined for the address family and if
+ // different than `net.host.port` and if `net.sock.host.addr` is set.)
+ // Stability: stable
+ // Examples: 35555
+ NetSockHostPortKey = attribute.Key("net.sock.host.port")
+
+ // NetHostConnectionTypeKey is the attribute Key conforming to the
+ // "net.host.connection.type" semantic conventions. It represents the
+ // internet connection type currently being used by the host.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'wifi'
+ NetHostConnectionTypeKey = attribute.Key("net.host.connection.type")
+
+ // NetHostConnectionSubtypeKey is the attribute Key conforming to the
+ // "net.host.connection.subtype" semantic conventions. It represents the
+ // this describes more details regarding the connection.type. It may be the
+ // type of cell technology connection, but it could be used for describing
+ // details about a wifi connection.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'LTE'
+ NetHostConnectionSubtypeKey = attribute.Key("net.host.connection.subtype")
+
+ // NetHostCarrierNameKey is the attribute Key conforming to the
+ // "net.host.carrier.name" semantic conventions. It represents the name of
+ // the mobile carrier.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'sprint'
+ NetHostCarrierNameKey = attribute.Key("net.host.carrier.name")
+
+ // NetHostCarrierMccKey is the attribute Key conforming to the
+ // "net.host.carrier.mcc" semantic conventions. It represents the mobile
+ // carrier country code.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '310'
+ NetHostCarrierMccKey = attribute.Key("net.host.carrier.mcc")
+
+ // NetHostCarrierMncKey is the attribute Key conforming to the
+ // "net.host.carrier.mnc" semantic conventions. It represents the mobile
+ // carrier network code.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '001'
+ NetHostCarrierMncKey = attribute.Key("net.host.carrier.mnc")
+
+ // NetHostCarrierIccKey is the attribute Key conforming to the
+ // "net.host.carrier.icc" semantic conventions. It represents the ISO
+ // 3166-1 alpha-2 2-character country code associated with the mobile
+ // carrier network.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'DE'
+ NetHostCarrierIccKey = attribute.Key("net.host.carrier.icc")
+)
+
+var (
+ // ip_tcp
+ NetTransportTCP = NetTransportKey.String("ip_tcp")
+ // ip_udp
+ NetTransportUDP = NetTransportKey.String("ip_udp")
+ // Named or anonymous pipe. See note below
+ NetTransportPipe = NetTransportKey.String("pipe")
+ // In-process communication
+ NetTransportInProc = NetTransportKey.String("inproc")
+ // Something else (non IP-based)
+ NetTransportOther = NetTransportKey.String("other")
+)
+
+var (
+ // IPv4 address
+ NetSockFamilyInet = NetSockFamilyKey.String("inet")
+ // IPv6 address
+ NetSockFamilyInet6 = NetSockFamilyKey.String("inet6")
+ // Unix domain socket path
+ NetSockFamilyUnix = NetSockFamilyKey.String("unix")
+)
+
+var (
+ // wifi
+ NetHostConnectionTypeWifi = NetHostConnectionTypeKey.String("wifi")
+ // wired
+ NetHostConnectionTypeWired = NetHostConnectionTypeKey.String("wired")
+ // cell
+ NetHostConnectionTypeCell = NetHostConnectionTypeKey.String("cell")
+ // unavailable
+ NetHostConnectionTypeUnavailable = NetHostConnectionTypeKey.String("unavailable")
+ // unknown
+ NetHostConnectionTypeUnknown = NetHostConnectionTypeKey.String("unknown")
+)
+
+var (
+ // GPRS
+ NetHostConnectionSubtypeGprs = NetHostConnectionSubtypeKey.String("gprs")
+ // EDGE
+ NetHostConnectionSubtypeEdge = NetHostConnectionSubtypeKey.String("edge")
+ // UMTS
+ NetHostConnectionSubtypeUmts = NetHostConnectionSubtypeKey.String("umts")
+ // CDMA
+ NetHostConnectionSubtypeCdma = NetHostConnectionSubtypeKey.String("cdma")
+ // EVDO Rel. 0
+ NetHostConnectionSubtypeEvdo0 = NetHostConnectionSubtypeKey.String("evdo_0")
+ // EVDO Rev. A
+ NetHostConnectionSubtypeEvdoA = NetHostConnectionSubtypeKey.String("evdo_a")
+ // CDMA2000 1XRTT
+ NetHostConnectionSubtypeCdma20001xrtt = NetHostConnectionSubtypeKey.String("cdma2000_1xrtt")
+ // HSDPA
+ NetHostConnectionSubtypeHsdpa = NetHostConnectionSubtypeKey.String("hsdpa")
+ // HSUPA
+ NetHostConnectionSubtypeHsupa = NetHostConnectionSubtypeKey.String("hsupa")
+ // HSPA
+ NetHostConnectionSubtypeHspa = NetHostConnectionSubtypeKey.String("hspa")
+ // IDEN
+ NetHostConnectionSubtypeIden = NetHostConnectionSubtypeKey.String("iden")
+ // EVDO Rev. B
+ NetHostConnectionSubtypeEvdoB = NetHostConnectionSubtypeKey.String("evdo_b")
+ // LTE
+ NetHostConnectionSubtypeLte = NetHostConnectionSubtypeKey.String("lte")
+ // EHRPD
+ NetHostConnectionSubtypeEhrpd = NetHostConnectionSubtypeKey.String("ehrpd")
+ // HSPAP
+ NetHostConnectionSubtypeHspap = NetHostConnectionSubtypeKey.String("hspap")
+ // GSM
+ NetHostConnectionSubtypeGsm = NetHostConnectionSubtypeKey.String("gsm")
+ // TD-SCDMA
+ NetHostConnectionSubtypeTdScdma = NetHostConnectionSubtypeKey.String("td_scdma")
+ // IWLAN
+ NetHostConnectionSubtypeIwlan = NetHostConnectionSubtypeKey.String("iwlan")
+ // 5G NR (New Radio)
+ NetHostConnectionSubtypeNr = NetHostConnectionSubtypeKey.String("nr")
+ // 5G NRNSA (New Radio Non-Standalone)
+ NetHostConnectionSubtypeNrnsa = NetHostConnectionSubtypeKey.String("nrnsa")
+ // LTE CA
+ NetHostConnectionSubtypeLteCa = NetHostConnectionSubtypeKey.String("lte_ca")
+)
+
+// NetAppProtocolName returns an attribute KeyValue conforming to the
+// "net.app.protocol.name" semantic conventions. It represents the application
+// layer protocol used. The value SHOULD be normalized to lowercase.
+func NetAppProtocolName(val string) attribute.KeyValue {
+ return NetAppProtocolNameKey.String(val)
+}
+
+// NetAppProtocolVersion returns an attribute KeyValue conforming to the
+// "net.app.protocol.version" semantic conventions. It represents the version
+// of the application layer protocol used. See note below.
+func NetAppProtocolVersion(val string) attribute.KeyValue {
+ return NetAppProtocolVersionKey.String(val)
+}
+
+// NetSockPeerName returns an attribute KeyValue conforming to the
+// "net.sock.peer.name" semantic conventions. It represents the remote socket
+// peer name.
+func NetSockPeerName(val string) attribute.KeyValue {
+ return NetSockPeerNameKey.String(val)
+}
+
+// NetSockPeerAddr returns an attribute KeyValue conforming to the
+// "net.sock.peer.addr" semantic conventions. It represents the remote socket
+// peer address: IPv4 or IPv6 for internet protocols, path for local
+// communication,
+// [etc](https://man7.org/linux/man-pages/man7/address_families.7.html).
+func NetSockPeerAddr(val string) attribute.KeyValue {
+ return NetSockPeerAddrKey.String(val)
+}
+
+// NetSockPeerPort returns an attribute KeyValue conforming to the
+// "net.sock.peer.port" semantic conventions. It represents the remote socket
+// peer port.
+func NetSockPeerPort(val int) attribute.KeyValue {
+ return NetSockPeerPortKey.Int(val)
+}
+
+// NetPeerName returns an attribute KeyValue conforming to the
+// "net.peer.name" semantic conventions. It represents the logical remote
+// hostname, see note below.
+func NetPeerName(val string) attribute.KeyValue {
+ return NetPeerNameKey.String(val)
+}
+
+// NetPeerPort returns an attribute KeyValue conforming to the
+// "net.peer.port" semantic conventions. It represents the logical remote port
+// number
+func NetPeerPort(val int) attribute.KeyValue {
+ return NetPeerPortKey.Int(val)
+}
+
+// NetHostName returns an attribute KeyValue conforming to the
+// "net.host.name" semantic conventions. It represents the logical local
+// hostname or similar, see note below.
+func NetHostName(val string) attribute.KeyValue {
+ return NetHostNameKey.String(val)
+}
+
+// NetHostPort returns an attribute KeyValue conforming to the
+// "net.host.port" semantic conventions. It represents the logical local port
+// number, preferably the one that the peer used to connect
+func NetHostPort(val int) attribute.KeyValue {
+ return NetHostPortKey.Int(val)
+}
+
+// NetSockHostAddr returns an attribute KeyValue conforming to the
+// "net.sock.host.addr" semantic conventions. It represents the local socket
+// address. Useful in case of a multi-IP host.
+func NetSockHostAddr(val string) attribute.KeyValue {
+ return NetSockHostAddrKey.String(val)
+}
+
+// NetSockHostPort returns an attribute KeyValue conforming to the
+// "net.sock.host.port" semantic conventions. It represents the local socket
+// port number.
+func NetSockHostPort(val int) attribute.KeyValue {
+ return NetSockHostPortKey.Int(val)
+}
+
+// NetHostCarrierName returns an attribute KeyValue conforming to the
+// "net.host.carrier.name" semantic conventions. It represents the name of the
+// mobile carrier.
+func NetHostCarrierName(val string) attribute.KeyValue {
+ return NetHostCarrierNameKey.String(val)
+}
+
+// NetHostCarrierMcc returns an attribute KeyValue conforming to the
+// "net.host.carrier.mcc" semantic conventions. It represents the mobile
+// carrier country code.
+func NetHostCarrierMcc(val string) attribute.KeyValue {
+ return NetHostCarrierMccKey.String(val)
+}
+
+// NetHostCarrierMnc returns an attribute KeyValue conforming to the
+// "net.host.carrier.mnc" semantic conventions. It represents the mobile
+// carrier network code.
+func NetHostCarrierMnc(val string) attribute.KeyValue {
+ return NetHostCarrierMncKey.String(val)
+}
+
+// NetHostCarrierIcc returns an attribute KeyValue conforming to the
+// "net.host.carrier.icc" semantic conventions. It represents the ISO 3166-1
+// alpha-2 2-character country code associated with the mobile carrier network.
+func NetHostCarrierIcc(val string) attribute.KeyValue {
+ return NetHostCarrierIccKey.String(val)
+}
+
+// Operations that access some remote service.
+const (
+ // PeerServiceKey is the attribute Key conforming to the "peer.service"
+ // semantic conventions. It represents the
+ // [`service.name`](../../resource/semantic_conventions/README.md#service)
+ // of the remote service. SHOULD be equal to the actual `service.name`
+ // resource attribute of the remote service if any.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'AuthTokenCache'
+ PeerServiceKey = attribute.Key("peer.service")
+)
+
+// PeerService returns an attribute KeyValue conforming to the
+// "peer.service" semantic conventions. It represents the
+// [`service.name`](../../resource/semantic_conventions/README.md#service) of
+// the remote service. SHOULD be equal to the actual `service.name` resource
+// attribute of the remote service if any.
+func PeerService(val string) attribute.KeyValue {
+ return PeerServiceKey.String(val)
+}
+
+// These attributes may be used for any operation with an authenticated and/or
+// authorized enduser.
+const (
+ // EnduserIDKey is the attribute Key conforming to the "enduser.id"
+ // semantic conventions. It represents the username or client_id extracted
+ // from the access token or
+ // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header
+ // in the inbound request from outside the system.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'username'
+ EnduserIDKey = attribute.Key("enduser.id")
+
+ // EnduserRoleKey is the attribute Key conforming to the "enduser.role"
+ // semantic conventions. It represents the actual/assumed role the client
+ // is making the request under extracted from token or application security
+ // context.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'admin'
+ EnduserRoleKey = attribute.Key("enduser.role")
+
+ // EnduserScopeKey is the attribute Key conforming to the "enduser.scope"
+ // semantic conventions. It represents the scopes or granted authorities
+ // the client currently possesses extracted from token or application
+ // security context. The value would come from the scope associated with an
+ // [OAuth 2.0 Access
+ // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
+ // value in a [SAML 2.0
+ // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'read:message, write:files'
+ EnduserScopeKey = attribute.Key("enduser.scope")
+)
+
+// EnduserID returns an attribute KeyValue conforming to the "enduser.id"
+// semantic conventions. It represents the username or client_id extracted from
+// the access token or
+// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in
+// the inbound request from outside the system.
+func EnduserID(val string) attribute.KeyValue {
+ return EnduserIDKey.String(val)
+}
+
+// EnduserRole returns an attribute KeyValue conforming to the
+// "enduser.role" semantic conventions. It represents the actual/assumed role
+// the client is making the request under extracted from token or application
+// security context.
+func EnduserRole(val string) attribute.KeyValue {
+ return EnduserRoleKey.String(val)
+}
+
+// EnduserScope returns an attribute KeyValue conforming to the
+// "enduser.scope" semantic conventions. It represents the scopes or granted
+// authorities the client currently possesses extracted from token or
+// application security context. The value would come from the scope associated
+// with an [OAuth 2.0 Access
+// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
+// value in a [SAML 2.0
+// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
+func EnduserScope(val string) attribute.KeyValue {
+ return EnduserScopeKey.String(val)
+}
+
+// These attributes may be used for any operation to store information about a
+// thread that started a span.
+const (
+ // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
+ // conventions. It represents the current "managed" thread ID (as opposed
+ // to OS thread ID).
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 42
+ ThreadIDKey = attribute.Key("thread.id")
+
+ // ThreadNameKey is the attribute Key conforming to the "thread.name"
+ // semantic conventions. It represents the current thread name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'main'
+ ThreadNameKey = attribute.Key("thread.name")
+)
+
+// ThreadID returns an attribute KeyValue conforming to the "thread.id"
+// semantic conventions. It represents the current "managed" thread ID (as
+// opposed to OS thread ID).
+func ThreadID(val int) attribute.KeyValue {
+ return ThreadIDKey.Int(val)
+}
+
+// ThreadName returns an attribute KeyValue conforming to the "thread.name"
+// semantic conventions. It represents the current thread name.
+func ThreadName(val string) attribute.KeyValue {
+ return ThreadNameKey.String(val)
+}
+
+// These attributes allow to report this unit of code and therefore to provide
+// more context about the span.
+const (
+ // CodeFunctionKey is the attribute Key conforming to the "code.function"
+ // semantic conventions. It represents the method or function name, or
+ // equivalent (usually rightmost part of the code unit's name).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'serveRequest'
+ CodeFunctionKey = attribute.Key("code.function")
+
+ // CodeNamespaceKey is the attribute Key conforming to the "code.namespace"
+ // semantic conventions. It represents the "namespace" within which
+ // `code.function` is defined. Usually the qualified class or module name,
+ // such that `code.namespace` + some separator + `code.function` form a
+ // unique identifier for the code unit.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'com.example.MyHTTPService'
+ CodeNamespaceKey = attribute.Key("code.namespace")
+
+ // CodeFilepathKey is the attribute Key conforming to the "code.filepath"
+ // semantic conventions. It represents the source code file name that
+ // identifies the code unit as uniquely as possible (preferably an absolute
+ // file path).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '/usr/local/MyApplication/content_root/app/index.php'
+ CodeFilepathKey = attribute.Key("code.filepath")
+
+ // CodeLineNumberKey is the attribute Key conforming to the "code.lineno"
+ // semantic conventions. It represents the line number in `code.filepath`
+ // best representing the operation. It SHOULD point within the code unit
+ // named in `code.function`.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 42
+ CodeLineNumberKey = attribute.Key("code.lineno")
+
+ // CodeColumnKey is the attribute Key conforming to the "code.column"
+ // semantic conventions. It represents the column number in `code.filepath`
+ // best representing the operation. It SHOULD point within the code unit
+ // named in `code.function`.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 16
+ CodeColumnKey = attribute.Key("code.column")
+)
+
+// CodeFunction returns an attribute KeyValue conforming to the
+// "code.function" semantic conventions. It represents the method or function
+// name, or equivalent (usually rightmost part of the code unit's name).
+func CodeFunction(val string) attribute.KeyValue {
+ return CodeFunctionKey.String(val)
+}
+
+// CodeNamespace returns an attribute KeyValue conforming to the
+// "code.namespace" semantic conventions. It represents the "namespace" within
+// which `code.function` is defined. Usually the qualified class or module
+// name, such that `code.namespace` + some separator + `code.function` form a
+// unique identifier for the code unit.
+func CodeNamespace(val string) attribute.KeyValue {
+ return CodeNamespaceKey.String(val)
+}
+
+// CodeFilepath returns an attribute KeyValue conforming to the
+// "code.filepath" semantic conventions. It represents the source code file
+// name that identifies the code unit as uniquely as possible (preferably an
+// absolute file path).
+func CodeFilepath(val string) attribute.KeyValue {
+ return CodeFilepathKey.String(val)
+}
+
+// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno"
+// semantic conventions. It represents the line number in `code.filepath` best
+// representing the operation. It SHOULD point within the code unit named in
+// `code.function`.
+func CodeLineNumber(val int) attribute.KeyValue {
+ return CodeLineNumberKey.Int(val)
+}
+
+// CodeColumn returns an attribute KeyValue conforming to the "code.column"
+// semantic conventions. It represents the column number in `code.filepath`
+// best representing the operation. It SHOULD point within the code unit named
+// in `code.function`.
+func CodeColumn(val int) attribute.KeyValue {
+ return CodeColumnKey.Int(val)
+}
+
+// Semantic conventions for HTTP client and server Spans.
+const (
+ // HTTPMethodKey is the attribute Key conforming to the "http.method"
+ // semantic conventions. It represents the hTTP request method.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'GET', 'POST', 'HEAD'
+ HTTPMethodKey = attribute.Key("http.method")
+
+ // HTTPStatusCodeKey is the attribute Key conforming to the
+ // "http.status_code" semantic conventions. It represents the [HTTP
+ // response status code](https://tools.ietf.org/html/rfc7231#section-6).
+ //
+ // Type: int
+ // RequirementLevel: ConditionallyRequired (If and only if one was
+ // received/sent.)
+ // Stability: stable
+ // Examples: 200
+ HTTPStatusCodeKey = attribute.Key("http.status_code")
+
+ // HTTPFlavorKey is the attribute Key conforming to the "http.flavor"
+ // semantic conventions. It represents the kind of HTTP protocol used.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Note: If `net.transport` is not specified, it can be assumed to be
+ // `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is
+ // assumed.
+ HTTPFlavorKey = attribute.Key("http.flavor")
+
+ // HTTPUserAgentKey is the attribute Key conforming to the
+ // "http.user_agent" semantic conventions. It represents the value of the
+ // [HTTP
+ // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
+ // header sent by the client.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'CERN-LineMode/2.15 libwww/2.17b3'
+ HTTPUserAgentKey = attribute.Key("http.user_agent")
+
+ // HTTPRequestContentLengthKey is the attribute Key conforming to the
+ // "http.request_content_length" semantic conventions. It represents the
+ // size of the request payload body in bytes. This is the number of bytes
+ // transferred excluding headers and is often, but not always, present as
+ // the
+ // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
+ // header. For requests using transport encoding, this should be the
+ // compressed size.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 3495
+ HTTPRequestContentLengthKey = attribute.Key("http.request_content_length")
+
+ // HTTPResponseContentLengthKey is the attribute Key conforming to the
+ // "http.response_content_length" semantic conventions. It represents the
+ // size of the response payload body in bytes. This is the number of bytes
+ // transferred excluding headers and is often, but not always, present as
+ // the
+ // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
+ // header. For requests using transport encoding, this should be the
+ // compressed size.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 3495
+ HTTPResponseContentLengthKey = attribute.Key("http.response_content_length")
+)
+
+var (
+ // HTTP/1.0
+ HTTPFlavorHTTP10 = HTTPFlavorKey.String("1.0")
+ // HTTP/1.1
+ HTTPFlavorHTTP11 = HTTPFlavorKey.String("1.1")
+ // HTTP/2
+ HTTPFlavorHTTP20 = HTTPFlavorKey.String("2.0")
+ // HTTP/3
+ HTTPFlavorHTTP30 = HTTPFlavorKey.String("3.0")
+ // SPDY protocol
+ HTTPFlavorSPDY = HTTPFlavorKey.String("SPDY")
+ // QUIC protocol
+ HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC")
+)
+
+// HTTPMethod returns an attribute KeyValue conforming to the "http.method"
+// semantic conventions. It represents the hTTP request method.
+func HTTPMethod(val string) attribute.KeyValue {
+ return HTTPMethodKey.String(val)
+}
+
+// HTTPStatusCode returns an attribute KeyValue conforming to the
+// "http.status_code" semantic conventions. It represents the [HTTP response
+// status code](https://tools.ietf.org/html/rfc7231#section-6).
+func HTTPStatusCode(val int) attribute.KeyValue {
+ return HTTPStatusCodeKey.Int(val)
+}
+
+// HTTPUserAgent returns an attribute KeyValue conforming to the
+// "http.user_agent" semantic conventions. It represents the value of the [HTTP
+// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
+// header sent by the client.
+func HTTPUserAgent(val string) attribute.KeyValue {
+ return HTTPUserAgentKey.String(val)
+}
+
+// HTTPRequestContentLength returns an attribute KeyValue conforming to the
+// "http.request_content_length" semantic conventions. It represents the size
+// of the request payload body in bytes. This is the number of bytes
+// transferred excluding headers and is often, but not always, present as the
+// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
+// header. For requests using transport encoding, this should be the compressed
+// size.
+func HTTPRequestContentLength(val int) attribute.KeyValue {
+ return HTTPRequestContentLengthKey.Int(val)
+}
+
+// HTTPResponseContentLength returns an attribute KeyValue conforming to the
+// "http.response_content_length" semantic conventions. It represents the size
+// of the response payload body in bytes. This is the number of bytes
+// transferred excluding headers and is often, but not always, present as the
+// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
+// header. For requests using transport encoding, this should be the compressed
+// size.
+func HTTPResponseContentLength(val int) attribute.KeyValue {
+ return HTTPResponseContentLengthKey.Int(val)
+}
+
+// Semantic Convention for HTTP Client
+const (
+ // HTTPURLKey is the attribute Key conforming to the "http.url" semantic
+ // conventions. It represents the full HTTP request URL in the form
+ // `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is
+ // not transmitted over HTTP, but if it is known, it should be included
+ // nevertheless.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv'
+ // Note: `http.url` MUST NOT contain credentials passed via URL in form of
+ // `https://username:password@www.example.com/`. In such case the
+ // attribute's value should be `https://www.example.com/`.
+ HTTPURLKey = attribute.Key("http.url")
+
+ // HTTPResendCountKey is the attribute Key conforming to the
+ // "http.resend_count" semantic conventions. It represents the ordinal
+ // number of request resending attempt (for any reason, including
+ // redirects).
+ //
+ // Type: int
+ // RequirementLevel: Recommended (if and only if request was retried.)
+ // Stability: stable
+ // Examples: 3
+ // Note: The resend count SHOULD be updated each time an HTTP request gets
+ // resent by the client, regardless of what was the cause of the resending
+ // (e.g. redirection, authorization failure, 503 Server Unavailable,
+ // network issues, or any other).
+ HTTPResendCountKey = attribute.Key("http.resend_count")
+)
+
+// HTTPURL returns an attribute KeyValue conforming to the "http.url"
+// semantic conventions. It represents the full HTTP request URL in the form
+// `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not
+// transmitted over HTTP, but if it is known, it should be included
+// nevertheless.
+func HTTPURL(val string) attribute.KeyValue {
+ return HTTPURLKey.String(val)
+}
+
+// HTTPResendCount returns an attribute KeyValue conforming to the
+// "http.resend_count" semantic conventions. It represents the ordinal number
+// of request resending attempt (for any reason, including redirects).
+func HTTPResendCount(val int) attribute.KeyValue {
+ return HTTPResendCountKey.Int(val)
+}
+
+// Semantic Convention for HTTP Server
+const (
+ // HTTPSchemeKey is the attribute Key conforming to the "http.scheme"
+ // semantic conventions. It represents the URI scheme identifying the used
+ // protocol.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'http', 'https'
+ HTTPSchemeKey = attribute.Key("http.scheme")
+
+ // HTTPTargetKey is the attribute Key conforming to the "http.target"
+ // semantic conventions. It represents the full request target as passed in
+ // a HTTP request line or equivalent.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: '/path/12314/?q=ddds'
+ HTTPTargetKey = attribute.Key("http.target")
+
+ // HTTPRouteKey is the attribute Key conforming to the "http.route"
+ // semantic conventions. It represents the matched route (path template in
+ // the format used by the respective server framework). See note below
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (If and only if it's available)
+ // Stability: stable
+ // Examples: '/users/:userID?', '{controller}/{action}/{id?}'
+ // Note: 'http.route' MUST NOT be populated when this is not supported by
+ // the HTTP server framework as the route attribute should have
+ // low-cardinality and the URI path can NOT substitute it.
+ HTTPRouteKey = attribute.Key("http.route")
+
+ // HTTPClientIPKey is the attribute Key conforming to the "http.client_ip"
+ // semantic conventions. It represents the IP address of the original
+ // client behind all proxies, if known (e.g. from
+ // [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '83.164.160.102'
+ // Note: This is not necessarily the same as `net.sock.peer.addr`, which
+ // would
+ // identify the network-level peer, which may be a proxy.
+ //
+ // This attribute should be set when a source of information different
+ // from the one used for `net.sock.peer.addr`, is available even if that
+ // other
+ // source just confirms the same value as `net.sock.peer.addr`.
+ // Rationale: For `net.sock.peer.addr`, one typically does not know if it
+ // comes from a proxy, reverse proxy, or the actual client. Setting
+ // `http.client_ip` when it's the same as `net.sock.peer.addr` means that
+ // one is at least somewhat confident that the address is not that of
+ // the closest proxy.
+ HTTPClientIPKey = attribute.Key("http.client_ip")
+)
+
+// HTTPScheme returns an attribute KeyValue conforming to the "http.scheme"
+// semantic conventions. It represents the URI scheme identifying the used
+// protocol.
+func HTTPScheme(val string) attribute.KeyValue {
+ return HTTPSchemeKey.String(val)
+}
+
+// HTTPTarget returns an attribute KeyValue conforming to the "http.target"
+// semantic conventions. It represents the full request target as passed in a
+// HTTP request line or equivalent.
+func HTTPTarget(val string) attribute.KeyValue {
+ return HTTPTargetKey.String(val)
+}
+
+// HTTPRoute returns an attribute KeyValue conforming to the "http.route"
+// semantic conventions. It represents the matched route (path template in the
+// format used by the respective server framework). See note below
+func HTTPRoute(val string) attribute.KeyValue {
+ return HTTPRouteKey.String(val)
+}
+
+// HTTPClientIP returns an attribute KeyValue conforming to the
+// "http.client_ip" semantic conventions. It represents the IP address of the
+// original client behind all proxies, if known (e.g. from
+// [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).
+func HTTPClientIP(val string) attribute.KeyValue {
+ return HTTPClientIPKey.String(val)
+}
+
+// Attributes that exist for multiple DynamoDB request types.
+const (
+ // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
+ // "aws.dynamodb.table_names" semantic conventions. It represents the keys
+ // in the `RequestItems` object field.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Users', 'Cats'
+ AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
+
+ // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
+ // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
+ // JSON-serialized value of each item in the `ConsumedCapacity` response
+ // field.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": {
+ // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number,
+ // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" :
+ // { "CapacityUnits": number, "ReadCapacityUnits": number,
+ // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table":
+ // { "CapacityUnits": number, "ReadCapacityUnits": number,
+ // "WriteCapacityUnits": number }, "TableName": "string",
+ // "WriteCapacityUnits": number }'
+ AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
+
+ // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to
+ // the "aws.dynamodb.item_collection_metrics" semantic conventions. It
+ // represents the JSON-serialized value of the `ItemCollectionMetrics`
+ // response field.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B":
+ // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": {
+ // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ],
+ // "NULL": boolean, "S": "string", "SS": [ "string" ] } },
+ // "SizeEstimateRangeGB": [ number ] } ] }'
+ AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
+
+ // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to
+ // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
+ // represents the value of the `ProvisionedThroughput.ReadCapacityUnits`
+ // request parameter.
+ //
+ // Type: double
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 1.0, 2.0
+ AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
+
+ // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming
+ // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions.
+ // It represents the value of the
+ // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
+ //
+ // Type: double
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 1.0, 2.0
+ AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
+
+ // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
+ // "aws.dynamodb.consistent_read" semantic conventions. It represents the
+ // value of the `ConsistentRead` request parameter.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
+
+ // AWSDynamoDBProjectionKey is the attribute Key conforming to the
+ // "aws.dynamodb.projection" semantic conventions. It represents the value
+ // of the `ProjectionExpression` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Title', 'Title, Price, Color', 'Title, Description,
+ // RelatedItems, ProductReviews'
+ AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
+
+ // AWSDynamoDBLimitKey is the attribute Key conforming to the
+ // "aws.dynamodb.limit" semantic conventions. It represents the value of
+ // the `Limit` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 10
+ AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
+
+ // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
+ // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
+ // value of the `AttributesToGet` request parameter.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'lives', 'id'
+ AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
+
+ // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
+ // "aws.dynamodb.index_name" semantic conventions. It represents the value
+ // of the `IndexName` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'name_to_group'
+ AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
+
+ // AWSDynamoDBSelectKey is the attribute Key conforming to the
+ // "aws.dynamodb.select" semantic conventions. It represents the value of
+ // the `Select` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'ALL_ATTRIBUTES', 'COUNT'
+ AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
+)
+
+// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
+// "aws.dynamodb.table_names" semantic conventions. It represents the keys in
+// the `RequestItems` object field.
+func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
+ return AWSDynamoDBTableNamesKey.StringSlice(val)
+}
+
+// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to
+// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
+// JSON-serialized value of each item in the `ConsumedCapacity` response field.
+func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
+ return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
+}
+
+// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming
+// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It
+// represents the JSON-serialized value of the `ItemCollectionMetrics` response
+// field.
+func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
+ return AWSDynamoDBItemCollectionMetricsKey.String(val)
+}
+
+// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue
+// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic
+// conventions. It represents the value of the
+// `ProvisionedThroughput.ReadCapacityUnits` request parameter.
+func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
+ return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
+}
+
+// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue
+// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic
+// conventions. It represents the value of the
+// `ProvisionedThroughput.WriteCapacityUnits` request parameter.
+func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
+ return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
+}
+
+// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
+// "aws.dynamodb.consistent_read" semantic conventions. It represents the value
+// of the `ConsistentRead` request parameter.
+func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
+ return AWSDynamoDBConsistentReadKey.Bool(val)
+}
+
+// AWSDynamoDBProjection returns an attribute KeyValue conforming to the
+// "aws.dynamodb.projection" semantic conventions. It represents the value of
+// the `ProjectionExpression` request parameter.
+func AWSDynamoDBProjection(val string) attribute.KeyValue {
+ return AWSDynamoDBProjectionKey.String(val)
+}
+
+// AWSDynamoDBLimit returns an attribute KeyValue conforming to the
+// "aws.dynamodb.limit" semantic conventions. It represents the value of the
+// `Limit` request parameter.
+func AWSDynamoDBLimit(val int) attribute.KeyValue {
+ return AWSDynamoDBLimitKey.Int(val)
+}
+
+// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to
+// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
+// value of the `AttributesToGet` request parameter.
+func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
+ return AWSDynamoDBAttributesToGetKey.StringSlice(val)
+}
+
+// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
+// "aws.dynamodb.index_name" semantic conventions. It represents the value of
+// the `IndexName` request parameter.
+func AWSDynamoDBIndexName(val string) attribute.KeyValue {
+ return AWSDynamoDBIndexNameKey.String(val)
+}
+
+// AWSDynamoDBSelect returns an attribute KeyValue conforming to the
+// "aws.dynamodb.select" semantic conventions. It represents the value of the
+// `Select` request parameter.
+func AWSDynamoDBSelect(val string) attribute.KeyValue {
+ return AWSDynamoDBSelectKey.String(val)
+}
+
+// DynamoDB.CreateTable
+const (
+ // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to
+ // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
+ // represents the JSON-serialized value of each item of the
+ // `GlobalSecondaryIndexes` request field
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName":
+ // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
+ // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
+ // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }'
+ AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
+
+ // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to
+ // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
+ // represents the JSON-serialized value of each item of the
+ // `LocalSecondaryIndexes` request field.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '{ "IndexARN": "string", "IndexName": "string",
+ // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ {
+ // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
+ // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }'
+ AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
+)
+
+// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue
+// conforming to the "aws.dynamodb.global_secondary_indexes" semantic
+// conventions. It represents the JSON-serialized value of each item of the
+// `GlobalSecondaryIndexes` request field
+func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
+ return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
+}
+
+// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming
+// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
+// represents the JSON-serialized value of each item of the
+// `LocalSecondaryIndexes` request field.
+func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
+ return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
+}
+
+// DynamoDB.ListTables
+const (
+ // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
+ // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents
+ // the value of the `ExclusiveStartTableName` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Users', 'CatsTable'
+ AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
+
+ // AWSDynamoDBTableCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.table_count" semantic conventions. It represents the the
+ // number of items in the `TableNames` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 20
+ AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
+)
+
+// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming
+// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It
+// represents the value of the `ExclusiveStartTableName` request parameter.
+func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
+ return AWSDynamoDBExclusiveStartTableKey.String(val)
+}
+
+// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.table_count" semantic conventions. It represents the the
+// number of items in the `TableNames` response parameter.
+func AWSDynamoDBTableCount(val int) attribute.KeyValue {
+ return AWSDynamoDBTableCountKey.Int(val)
+}
+
+// DynamoDB.Query
+const (
+ // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
+ // "aws.dynamodb.scan_forward" semantic conventions. It represents the
+ // value of the `ScanIndexForward` request parameter.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
+)
+
+// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
+// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
+// the `ScanIndexForward` request parameter.
+func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
+ return AWSDynamoDBScanForwardKey.Bool(val)
+}
+
+// DynamoDB.Scan
+const (
+ // AWSDynamoDBSegmentKey is the attribute Key conforming to the
+ // "aws.dynamodb.segment" semantic conventions. It represents the value of
+ // the `Segment` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 10
+ AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
+
+ // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
+ // "aws.dynamodb.total_segments" semantic conventions. It represents the
+ // value of the `TotalSegments` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 100
+ AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
+
+ // AWSDynamoDBCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.count" semantic conventions. It represents the value of
+ // the `Count` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 10
+ AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
+
+ // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.scanned_count" semantic conventions. It represents the
+ // value of the `ScannedCount` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 50
+ AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
+)
+
+// AWSDynamoDBSegment returns an attribute KeyValue conforming to the
+// "aws.dynamodb.segment" semantic conventions. It represents the value of the
+// `Segment` request parameter.
+func AWSDynamoDBSegment(val int) attribute.KeyValue {
+ return AWSDynamoDBSegmentKey.Int(val)
+}
+
+// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
+// "aws.dynamodb.total_segments" semantic conventions. It represents the value
+// of the `TotalSegments` request parameter.
+func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
+ return AWSDynamoDBTotalSegmentsKey.Int(val)
+}
+
+// AWSDynamoDBCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.count" semantic conventions. It represents the value of the
+// `Count` response parameter.
+func AWSDynamoDBCount(val int) attribute.KeyValue {
+ return AWSDynamoDBCountKey.Int(val)
+}
+
+// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.scanned_count" semantic conventions. It represents the value
+// of the `ScannedCount` response parameter.
+func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
+ return AWSDynamoDBScannedCountKey.Int(val)
+}
+
+// DynamoDB.UpdateTable
+const (
+ // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to
+ // the "aws.dynamodb.attribute_definitions" semantic conventions. It
+ // represents the JSON-serialized value of each item in the
+ // `AttributeDefinitions` request field.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
+ AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
+
+ // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key
+ // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
+ // conventions. It represents the JSON-serialized value of each item in the
+ // the `GlobalSecondaryIndexUpdates` request field.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
+ // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
+ // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
+ // "ProvisionedThroughput": { "ReadCapacityUnits": number,
+ // "WriteCapacityUnits": number } }'
+ AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
+)
+
+// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming
+// to the "aws.dynamodb.attribute_definitions" semantic conventions. It
+// represents the JSON-serialized value of each item in the
+// `AttributeDefinitions` request field.
+func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
+ return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
+}
+
+// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
+// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
+// conventions. It represents the JSON-serialized value of each item in the the
+// `GlobalSecondaryIndexUpdates` request field.
+func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
+ return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
+}
+
+// Semantic conventions to apply when instrumenting the GraphQL implementation.
+// They map GraphQL operations to attributes on a Span.
+const (
+ // GraphqlOperationNameKey is the attribute Key conforming to the
+ // "graphql.operation.name" semantic conventions. It represents the name of
+ // the operation being executed.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'findBookByID'
+ GraphqlOperationNameKey = attribute.Key("graphql.operation.name")
+
+ // GraphqlOperationTypeKey is the attribute Key conforming to the
+ // "graphql.operation.type" semantic conventions. It represents the type of
+ // the operation being executed.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'query', 'mutation', 'subscription'
+ GraphqlOperationTypeKey = attribute.Key("graphql.operation.type")
+
+ // GraphqlDocumentKey is the attribute Key conforming to the
+ // "graphql.document" semantic conventions. It represents the GraphQL
+ // document being executed.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'query findBookByID { bookByID(id: ?) { name } }'
+ // Note: The value may be sanitized to exclude sensitive information.
+ GraphqlDocumentKey = attribute.Key("graphql.document")
+)
+
+var (
+ // GraphQL query
+ GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query")
+ // GraphQL mutation
+ GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation")
+ // GraphQL subscription
+ GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription")
+)
+
+// GraphqlOperationName returns an attribute KeyValue conforming to the
+// "graphql.operation.name" semantic conventions. It represents the name of the
+// operation being executed.
+func GraphqlOperationName(val string) attribute.KeyValue {
+ return GraphqlOperationNameKey.String(val)
+}
+
+// GraphqlDocument returns an attribute KeyValue conforming to the
+// "graphql.document" semantic conventions. It represents the GraphQL document
+// being executed.
+func GraphqlDocument(val string) attribute.KeyValue {
+ return GraphqlDocumentKey.String(val)
+}
+
+// Semantic convention describing per-message attributes populated on messaging
+// spans or links.
+const (
+ // MessagingMessageIDKey is the attribute Key conforming to the
+ // "messaging.message.id" semantic conventions. It represents a value used
+ // by the messaging system as an identifier for the message, represented as
+ // a string.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '452a7c7c7c7048c2f887f61572b18fc2'
+ MessagingMessageIDKey = attribute.Key("messaging.message.id")
+
+ // MessagingMessageConversationIDKey is the attribute Key conforming to the
+ // "messaging.message.conversation_id" semantic conventions. It represents
+ // the [conversation ID](#conversations) identifying the conversation to
+ // which the message belongs, represented as a string. Sometimes called
+ // "Correlation ID".
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'MyConversationID'
+ MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
+
+ // MessagingMessagePayloadSizeBytesKey is the attribute Key conforming to
+ // the "messaging.message.payload_size_bytes" semantic conventions. It
+ // represents the (uncompressed) size of the message payload in bytes. Also
+ // use this attribute if it is unknown whether the compressed or
+ // uncompressed payload size is reported.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 2738
+ MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message.payload_size_bytes")
+
+ // MessagingMessagePayloadCompressedSizeBytesKey is the attribute Key
+ // conforming to the "messaging.message.payload_compressed_size_bytes"
+ // semantic conventions. It represents the compressed size of the message
+ // payload in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 2048
+ MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message.payload_compressed_size_bytes")
+)
+
+// MessagingMessageID returns an attribute KeyValue conforming to the
+// "messaging.message.id" semantic conventions. It represents a value used by
+// the messaging system as an identifier for the message, represented as a
+// string.
+func MessagingMessageID(val string) attribute.KeyValue {
+ return MessagingMessageIDKey.String(val)
+}
+
+// MessagingMessageConversationID returns an attribute KeyValue conforming
+// to the "messaging.message.conversation_id" semantic conventions. It
+// represents the [conversation ID](#conversations) identifying the
+// conversation to which the message belongs, represented as a string.
+// Sometimes called "Correlation ID".
+func MessagingMessageConversationID(val string) attribute.KeyValue {
+ return MessagingMessageConversationIDKey.String(val)
+}
+
+// MessagingMessagePayloadSizeBytes returns an attribute KeyValue conforming
+// to the "messaging.message.payload_size_bytes" semantic conventions. It
+// represents the (uncompressed) size of the message payload in bytes. Also use
+// this attribute if it is unknown whether the compressed or uncompressed
+// payload size is reported.
+func MessagingMessagePayloadSizeBytes(val int) attribute.KeyValue {
+ return MessagingMessagePayloadSizeBytesKey.Int(val)
+}
+
+// MessagingMessagePayloadCompressedSizeBytes returns an attribute KeyValue
+// conforming to the "messaging.message.payload_compressed_size_bytes" semantic
+// conventions. It represents the compressed size of the message payload in
+// bytes.
+func MessagingMessagePayloadCompressedSizeBytes(val int) attribute.KeyValue {
+ return MessagingMessagePayloadCompressedSizeBytesKey.Int(val)
+}
+
+// Semantic convention for attributes that describe messaging destination on
+// broker
+const (
+ // MessagingDestinationNameKey is the attribute Key conforming to the
+ // "messaging.destination.name" semantic conventions. It represents the
+ // message destination name
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'MyQueue', 'MyTopic'
+ // Note: Destination name SHOULD uniquely identify a specific queue, topic
+ // or other entity within the broker. If
+ // the broker does not have such notion, the destination name SHOULD
+ // uniquely identify the broker.
+ MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
+
+ // MessagingDestinationKindKey is the attribute Key conforming to the
+ // "messaging.destination.kind" semantic conventions. It represents the
+ // kind of message destination
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ MessagingDestinationKindKey = attribute.Key("messaging.destination.kind")
+
+ // MessagingDestinationTemplateKey is the attribute Key conforming to the
+ // "messaging.destination.template" semantic conventions. It represents the
+ // low cardinality representation of the messaging destination name
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '/customers/{customerID}'
+ // Note: Destination names could be constructed from templates. An example
+ // would be a destination name involving a user name or product id.
+ // Although the destination name in this case is of high cardinality, the
+ // underlying template is of low cardinality and can be effectively used
+ // for grouping and aggregation.
+ MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
+
+ // MessagingDestinationTemporaryKey is the attribute Key conforming to the
+ // "messaging.destination.temporary" semantic conventions. It represents a
+ // boolean that is true if the message destination is temporary and might
+ // not exist anymore after messages are processed.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
+
+ // MessagingDestinationAnonymousKey is the attribute Key conforming to the
+ // "messaging.destination.anonymous" semantic conventions. It represents a
+ // boolean that is true if the message destination is anonymous (could be
+ // unnamed or have auto-generated name).
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
+)
+
+var (
+ // A message sent to a queue
+ MessagingDestinationKindQueue = MessagingDestinationKindKey.String("queue")
+ // A message sent to a topic
+ MessagingDestinationKindTopic = MessagingDestinationKindKey.String("topic")
+)
+
+// MessagingDestinationName returns an attribute KeyValue conforming to the
+// "messaging.destination.name" semantic conventions. It represents the message
+// destination name
+func MessagingDestinationName(val string) attribute.KeyValue {
+ return MessagingDestinationNameKey.String(val)
+}
+
+// MessagingDestinationTemplate returns an attribute KeyValue conforming to
+// the "messaging.destination.template" semantic conventions. It represents the
+// low cardinality representation of the messaging destination name
+func MessagingDestinationTemplate(val string) attribute.KeyValue {
+ return MessagingDestinationTemplateKey.String(val)
+}
+
+// MessagingDestinationTemporary returns an attribute KeyValue conforming to
+// the "messaging.destination.temporary" semantic conventions. It represents a
+// boolean that is true if the message destination is temporary and might not
+// exist anymore after messages are processed.
+func MessagingDestinationTemporary(val bool) attribute.KeyValue {
+ return MessagingDestinationTemporaryKey.Bool(val)
+}
+
+// MessagingDestinationAnonymous returns an attribute KeyValue conforming to
+// the "messaging.destination.anonymous" semantic conventions. It represents a
+// boolean that is true if the message destination is anonymous (could be
+// unnamed or have auto-generated name).
+func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
+ return MessagingDestinationAnonymousKey.Bool(val)
+}
+
+// Semantic convention for attributes that describe messaging source on broker
+const (
+ // MessagingSourceNameKey is the attribute Key conforming to the
+ // "messaging.source.name" semantic conventions. It represents the message
+ // source name
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'MyQueue', 'MyTopic'
+ // Note: Source name SHOULD uniquely identify a specific queue, topic, or
+ // other entity within the broker. If
+ // the broker does not have such notion, the source name SHOULD uniquely
+ // identify the broker.
+ MessagingSourceNameKey = attribute.Key("messaging.source.name")
+
+ // MessagingSourceKindKey is the attribute Key conforming to the
+ // "messaging.source.kind" semantic conventions. It represents the kind of
+ // message source
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ MessagingSourceKindKey = attribute.Key("messaging.source.kind")
+
+ // MessagingSourceTemplateKey is the attribute Key conforming to the
+ // "messaging.source.template" semantic conventions. It represents the low
+ // cardinality representation of the messaging source name
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '/customers/{customerID}'
+ // Note: Source names could be constructed from templates. An example would
+ // be a source name involving a user name or product id. Although the
+ // source name in this case is of high cardinality, the underlying template
+ // is of low cardinality and can be effectively used for grouping and
+ // aggregation.
+ MessagingSourceTemplateKey = attribute.Key("messaging.source.template")
+
+ // MessagingSourceTemporaryKey is the attribute Key conforming to the
+ // "messaging.source.temporary" semantic conventions. It represents a
+ // boolean that is true if the message source is temporary and might not
+ // exist anymore after messages are processed.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ MessagingSourceTemporaryKey = attribute.Key("messaging.source.temporary")
+
+ // MessagingSourceAnonymousKey is the attribute Key conforming to the
+ // "messaging.source.anonymous" semantic conventions. It represents a
+ // boolean that is true if the message source is anonymous (could be
+ // unnamed or have auto-generated name).
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ MessagingSourceAnonymousKey = attribute.Key("messaging.source.anonymous")
+)
+
+var (
+ // A message received from a queue
+ MessagingSourceKindQueue = MessagingSourceKindKey.String("queue")
+ // A message received from a topic
+ MessagingSourceKindTopic = MessagingSourceKindKey.String("topic")
+)
+
+// MessagingSourceName returns an attribute KeyValue conforming to the
+// "messaging.source.name" semantic conventions. It represents the message
+// source name
+func MessagingSourceName(val string) attribute.KeyValue {
+ return MessagingSourceNameKey.String(val)
+}
+
+// MessagingSourceTemplate returns an attribute KeyValue conforming to the
+// "messaging.source.template" semantic conventions. It represents the low
+// cardinality representation of the messaging source name
+func MessagingSourceTemplate(val string) attribute.KeyValue {
+ return MessagingSourceTemplateKey.String(val)
+}
+
+// MessagingSourceTemporary returns an attribute KeyValue conforming to the
+// "messaging.source.temporary" semantic conventions. It represents a boolean
+// that is true if the message source is temporary and might not exist anymore
+// after messages are processed.
+func MessagingSourceTemporary(val bool) attribute.KeyValue {
+ return MessagingSourceTemporaryKey.Bool(val)
+}
+
+// MessagingSourceAnonymous returns an attribute KeyValue conforming to the
+// "messaging.source.anonymous" semantic conventions. It represents a boolean
+// that is true if the message source is anonymous (could be unnamed or have
+// auto-generated name).
+func MessagingSourceAnonymous(val bool) attribute.KeyValue {
+ return MessagingSourceAnonymousKey.Bool(val)
+}
+
+// General attributes used in messaging systems.
+const (
+ // MessagingSystemKey is the attribute Key conforming to the
+ // "messaging.system" semantic conventions. It represents a string
+ // identifying the messaging system.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS'
+ MessagingSystemKey = attribute.Key("messaging.system")
+
+ // MessagingOperationKey is the attribute Key conforming to the
+ // "messaging.operation" semantic conventions. It represents a string
+ // identifying the kind of messaging operation as defined in the [Operation
+ // names](#operation-names) section above.
+ //
+ // Type: Enum
+ // RequirementLevel: Required
+ // Stability: stable
+ // Note: If a custom value is used, it MUST be of low cardinality.
+ MessagingOperationKey = attribute.Key("messaging.operation")
+
+ // MessagingBatchMessageCountKey is the attribute Key conforming to the
+ // "messaging.batch.message_count" semantic conventions. It represents the
+ // number of messages sent, received, or processed in the scope of the
+ // batching operation.
+ //
+ // Type: int
+ // RequirementLevel: ConditionallyRequired (If the span describes an
+ // operation on a batch of messages.)
+ // Stability: stable
+ // Examples: 0, 1, 2
+ // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
+ // spans that operate with a single message. When a messaging client
+ // library supports both batch and single-message API for the same
+ // operation, instrumentations SHOULD use `messaging.batch.message_count`
+ // for batching APIs and SHOULD NOT use it for single-message APIs.
+ MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
+)
+
+var (
+ // publish
+ MessagingOperationPublish = MessagingOperationKey.String("publish")
+ // receive
+ MessagingOperationReceive = MessagingOperationKey.String("receive")
+ // process
+ MessagingOperationProcess = MessagingOperationKey.String("process")
+)
+
+// MessagingSystem returns an attribute KeyValue conforming to the
+// "messaging.system" semantic conventions. It represents a string identifying
+// the messaging system.
+func MessagingSystem(val string) attribute.KeyValue {
+ return MessagingSystemKey.String(val)
+}
+
+// MessagingBatchMessageCount returns an attribute KeyValue conforming to
+// the "messaging.batch.message_count" semantic conventions. It represents the
+// number of messages sent, received, or processed in the scope of the batching
+// operation.
+func MessagingBatchMessageCount(val int) attribute.KeyValue {
+ return MessagingBatchMessageCountKey.Int(val)
+}
+
+// Semantic convention for a consumer of messages received from a messaging
+// system
+const (
+ // MessagingConsumerIDKey is the attribute Key conforming to the
+ // "messaging.consumer.id" semantic conventions. It represents the
+ // identifier for the consumer receiving a message. For Kafka, set it to
+ // `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if
+ // both are present, or only `messaging.kafka.consumer.group`. For brokers,
+ // such as RabbitMQ and Artemis, set it to the `client_id` of the client
+ // consuming the message.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'mygroup - client-6'
+ MessagingConsumerIDKey = attribute.Key("messaging.consumer.id")
+)
+
+// MessagingConsumerID returns an attribute KeyValue conforming to the
+// "messaging.consumer.id" semantic conventions. It represents the identifier
+// for the consumer receiving a message. For Kafka, set it to
+// `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if both
+// are present, or only `messaging.kafka.consumer.group`. For brokers, such as
+// RabbitMQ and Artemis, set it to the `client_id` of the client consuming the
+// message.
+func MessagingConsumerID(val string) attribute.KeyValue {
+ return MessagingConsumerIDKey.String(val)
+}
+
+// Attributes for RabbitMQ
+const (
+ // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key
+ // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
+ // conventions. It represents the rabbitMQ message routing key.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (If not empty.)
+ // Stability: stable
+ // Examples: 'myKey'
+ MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
+)
+
+// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue
+// conforming to the "messaging.rabbitmq.destination.routing_key" semantic
+// conventions. It represents the rabbitMQ message routing key.
+func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue {
+ return MessagingRabbitmqDestinationRoutingKeyKey.String(val)
+}
+
+// Attributes for Apache Kafka
+const (
+ // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
+ // "messaging.kafka.message.key" semantic conventions. It represents the
+ // message keys in Kafka are used for grouping alike messages to ensure
+ // they're processed on the same partition. They differ from
+ // `messaging.message.id` in that they're not unique. If the key is `null`,
+ // the attribute MUST NOT be set.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'myKey'
+ // Note: If the key type is not string, it's string representation has to
+ // be supplied for the attribute. If the key has no unambiguous, canonical
+ // string form, don't include its value.
+ MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
+
+ // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the
+ // "messaging.kafka.consumer.group" semantic conventions. It represents the
+ // name of the Kafka Consumer Group that is handling the message. Only
+ // applies to consumers, not producers.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'my-group'
+ MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group")
+
+ // MessagingKafkaClientIDKey is the attribute Key conforming to the
+ // "messaging.kafka.client_id" semantic conventions. It represents the
+ // client ID for the Consumer or Producer that is handling the message.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'client-5'
+ MessagingKafkaClientIDKey = attribute.Key("messaging.kafka.client_id")
+
+ // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to
+ // the "messaging.kafka.destination.partition" semantic conventions. It
+ // represents the partition the message is sent to.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 2
+ MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition")
+
+ // MessagingKafkaSourcePartitionKey is the attribute Key conforming to the
+ // "messaging.kafka.source.partition" semantic conventions. It represents
+ // the partition the message is received from.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 2
+ MessagingKafkaSourcePartitionKey = attribute.Key("messaging.kafka.source.partition")
+
+ // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the
+ // "messaging.kafka.message.offset" semantic conventions. It represents the
+ // offset of a record in the corresponding Kafka partition.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 42
+ MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset")
+
+ // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
+ // "messaging.kafka.message.tombstone" semantic conventions. It represents
+ // a boolean that is true if the message is a tombstone.
+ //
+ // Type: boolean
+ // RequirementLevel: ConditionallyRequired (If value is `true`. When
+ // missing, the value is assumed to be `false`.)
+ // Stability: stable
+ MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
+)
+
+// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
+// "messaging.kafka.message.key" semantic conventions. It represents the
+// message keys in Kafka are used for grouping alike messages to ensure they're
+// processed on the same partition. They differ from `messaging.message.id` in
+// that they're not unique. If the key is `null`, the attribute MUST NOT be
+// set.
+func MessagingKafkaMessageKey(val string) attribute.KeyValue {
+ return MessagingKafkaMessageKeyKey.String(val)
+}
+
+// MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to
+// the "messaging.kafka.consumer.group" semantic conventions. It represents the
+// name of the Kafka Consumer Group that is handling the message. Only applies
+// to consumers, not producers.
+func MessagingKafkaConsumerGroup(val string) attribute.KeyValue {
+ return MessagingKafkaConsumerGroupKey.String(val)
+}
+
+// MessagingKafkaClientID returns an attribute KeyValue conforming to the
+// "messaging.kafka.client_id" semantic conventions. It represents the client
+// ID for the Consumer or Producer that is handling the message.
+func MessagingKafkaClientID(val string) attribute.KeyValue {
+ return MessagingKafkaClientIDKey.String(val)
+}
+
+// MessagingKafkaDestinationPartition returns an attribute KeyValue
+// conforming to the "messaging.kafka.destination.partition" semantic
+// conventions. It represents the partition the message is sent to.
+func MessagingKafkaDestinationPartition(val int) attribute.KeyValue {
+ return MessagingKafkaDestinationPartitionKey.Int(val)
+}
+
+// MessagingKafkaSourcePartition returns an attribute KeyValue conforming to
+// the "messaging.kafka.source.partition" semantic conventions. It represents
+// the partition the message is received from.
+func MessagingKafkaSourcePartition(val int) attribute.KeyValue {
+ return MessagingKafkaSourcePartitionKey.Int(val)
+}
+
+// MessagingKafkaMessageOffset returns an attribute KeyValue conforming to
+// the "messaging.kafka.message.offset" semantic conventions. It represents the
+// offset of a record in the corresponding Kafka partition.
+func MessagingKafkaMessageOffset(val int) attribute.KeyValue {
+ return MessagingKafkaMessageOffsetKey.Int(val)
+}
+
+// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming
+// to the "messaging.kafka.message.tombstone" semantic conventions. It
+// represents a boolean that is true if the message is a tombstone.
+func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
+ return MessagingKafkaMessageTombstoneKey.Bool(val)
+}
+
+// Attributes for Apache RocketMQ
+const (
+ // MessagingRocketmqNamespaceKey is the attribute Key conforming to the
+ // "messaging.rocketmq.namespace" semantic conventions. It represents the
+ // namespace of RocketMQ resources, resources in different namespaces are
+ // individual.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'myNamespace'
+ MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
+
+ // MessagingRocketmqClientGroupKey is the attribute Key conforming to the
+ // "messaging.rocketmq.client_group" semantic conventions. It represents
+ // the name of the RocketMQ producer/consumer group that is handling the
+ // message. The client type is identified by the SpanKind.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'myConsumerGroup'
+ MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group")
+
+ // MessagingRocketmqClientIDKey is the attribute Key conforming to the
+ // "messaging.rocketmq.client_id" semantic conventions. It represents the
+ // unique identifier for each client.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'myhost@8742@s8083jm'
+ MessagingRocketmqClientIDKey = attribute.Key("messaging.rocketmq.client_id")
+
+ // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key
+ // conforming to the "messaging.rocketmq.message.delivery_timestamp"
+ // semantic conventions. It represents the timestamp in milliseconds that
+ // the delay message is expected to be delivered to consumer.
+ //
+ // Type: int
+ // RequirementLevel: ConditionallyRequired (If the message type is delay
+ // and delay time level is not specified.)
+ // Stability: stable
+ // Examples: 1665987217045
+ MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
+
+ // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key
+ // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
+ // conventions. It represents the delay time level for delay message, which
+ // determines the message delay time.
+ //
+ // Type: int
+ // RequirementLevel: ConditionallyRequired (If the message type is delay
+ // and delivery timestamp is not specified.)
+ // Stability: stable
+ // Examples: 3
+ MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
+
+ // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.group" semantic conventions. It represents
+ // the it is essential for FIFO message. Messages that belong to the same
+ // message group are always processed one by one within the same consumer
+ // group.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (If the message type is FIFO.)
+ // Stability: stable
+ // Examples: 'myMessageGroup'
+ MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
+
+ // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.type" semantic conventions. It represents
+ // the type of message.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
+
+ // MessagingRocketmqMessageTagKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.tag" semantic conventions. It represents the
+ // secondary classifier of message besides topic.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'tagA'
+ MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
+
+ // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.keys" semantic conventions. It represents
+ // the key(s) of message, another way to mark message besides message id.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'keyA', 'keyB'
+ MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
+
+ // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to
+ // the "messaging.rocketmq.consumption_model" semantic conventions. It
+ // represents the model of message consumption. This only applies to
+ // consumer spans.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
+)
+
+var (
+ // Normal message
+ MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal")
+ // FIFO message
+ MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo")
+ // Delay message
+ MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay")
+ // Transaction message
+ MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction")
+)
+
+var (
+ // Clustering consumption model
+ MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering")
+ // Broadcasting consumption model
+ MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting")
+)
+
+// MessagingRocketmqNamespace returns an attribute KeyValue conforming to
+// the "messaging.rocketmq.namespace" semantic conventions. It represents the
+// namespace of RocketMQ resources, resources in different namespaces are
+// individual.
+func MessagingRocketmqNamespace(val string) attribute.KeyValue {
+ return MessagingRocketmqNamespaceKey.String(val)
+}
+
+// MessagingRocketmqClientGroup returns an attribute KeyValue conforming to
+// the "messaging.rocketmq.client_group" semantic conventions. It represents
+// the name of the RocketMQ producer/consumer group that is handling the
+// message. The client type is identified by the SpanKind.
+func MessagingRocketmqClientGroup(val string) attribute.KeyValue {
+ return MessagingRocketmqClientGroupKey.String(val)
+}
+
+// MessagingRocketmqClientID returns an attribute KeyValue conforming to the
+// "messaging.rocketmq.client_id" semantic conventions. It represents the
+// unique identifier for each client.
+func MessagingRocketmqClientID(val string) attribute.KeyValue {
+ return MessagingRocketmqClientIDKey.String(val)
+}
+
+// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue
+// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
+// conventions. It represents the timestamp in milliseconds that the delay
+// message is expected to be delivered to consumer.
+func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue {
+ return MessagingRocketmqMessageDeliveryTimestampKey.Int(val)
+}
+
+// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue
+// conforming to the "messaging.rocketmq.message.delay_time_level" semantic
+// conventions. It represents the delay time level for delay message, which
+// determines the message delay time.
+func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue {
+ return MessagingRocketmqMessageDelayTimeLevelKey.Int(val)
+}
+
+// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to
+// the "messaging.rocketmq.message.group" semantic conventions. It represents
+// the it is essential for FIFO message. Messages that belong to the same
+// message group are always processed one by one within the same consumer
+// group.
+func MessagingRocketmqMessageGroup(val string) attribute.KeyValue {
+ return MessagingRocketmqMessageGroupKey.String(val)
+}
+
+// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to
+// the "messaging.rocketmq.message.tag" semantic conventions. It represents the
+// secondary classifier of message besides topic.
+func MessagingRocketmqMessageTag(val string) attribute.KeyValue {
+ return MessagingRocketmqMessageTagKey.String(val)
+}
+
+// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to
+// the "messaging.rocketmq.message.keys" semantic conventions. It represents
+// the key(s) of message, another way to mark message besides message id.
+func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue {
+ return MessagingRocketmqMessageKeysKey.StringSlice(val)
+}
+
+// Semantic conventions for remote procedure calls.
+const (
+ // RPCSystemKey is the attribute Key conforming to the "rpc.system"
+ // semantic conventions. It represents a string identifying the remoting
+ // system. See below for a list of well-known identifiers.
+ //
+ // Type: Enum
+ // RequirementLevel: Required
+ // Stability: stable
+ RPCSystemKey = attribute.Key("rpc.system")
+
+ // RPCServiceKey is the attribute Key conforming to the "rpc.service"
+ // semantic conventions. It represents the full (logical) name of the
+ // service being called, including its package name, if applicable.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: stable
+ // Examples: 'myservice.EchoService'
+ // Note: This is the logical name of the service from the RPC interface
+ // perspective, which can be different from the name of any implementing
+ // class. The `code.namespace` attribute may be used to store the latter
+ // (despite the attribute name, it may include a class name; e.g., class
+ // with method actually executing the call on the server side, RPC client
+ // stub class on the client side).
+ RPCServiceKey = attribute.Key("rpc.service")
+
+ // RPCMethodKey is the attribute Key conforming to the "rpc.method"
+ // semantic conventions. It represents the name of the (logical) method
+ // being called, must be equal to the $method part in the span name.
+ //
+ // Type: string
+ // RequirementLevel: Recommended
+ // Stability: stable
+ // Examples: 'exampleMethod'
+ // Note: This is the logical name of the method from the RPC interface
+ // perspective, which can be different from the name of any implementing
+ // method/function. The `code.function` attribute may be used to store the
+ // latter (e.g., method actually executing the call on the server side, RPC
+ // client stub method on the client side).
+ RPCMethodKey = attribute.Key("rpc.method")
+)
+
+var (
+ // gRPC
+ RPCSystemGRPC = RPCSystemKey.String("grpc")
+ // Java RMI
+ RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
+ // .NET WCF
+ RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
+ // Apache Dubbo
+ RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
+)
+
+// RPCService returns an attribute KeyValue conforming to the "rpc.service"
+// semantic conventions. It represents the full (logical) name of the service
+// being called, including its package name, if applicable.
+func RPCService(val string) attribute.KeyValue {
+ return RPCServiceKey.String(val)
+}
+
+// RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
+// semantic conventions. It represents the name of the (logical) method being
+// called, must be equal to the $method part in the span name.
+func RPCMethod(val string) attribute.KeyValue {
+ return RPCMethodKey.String(val)
+}
+
+// Tech-specific attributes for gRPC.
+const (
+ // RPCGRPCStatusCodeKey is the attribute Key conforming to the
+ // "rpc.grpc.status_code" semantic conventions. It represents the [numeric
+ // status
+ // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of
+ // the gRPC request.
+ //
+ // Type: Enum
+ // RequirementLevel: Required
+ // Stability: stable
+ RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
+)
+
+var (
+ // OK
+ RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
+ // CANCELLED
+ RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
+ // UNKNOWN
+ RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
+ // INVALID_ARGUMENT
+ RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
+ // DEADLINE_EXCEEDED
+ RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
+ // NOT_FOUND
+ RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
+ // ALREADY_EXISTS
+ RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
+ // PERMISSION_DENIED
+ RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
+ // RESOURCE_EXHAUSTED
+ RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
+ // FAILED_PRECONDITION
+ RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
+ // ABORTED
+ RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
+ // OUT_OF_RANGE
+ RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
+ // UNIMPLEMENTED
+ RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
+ // INTERNAL
+ RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
+ // UNAVAILABLE
+ RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
+ // DATA_LOSS
+ RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
+ // UNAUTHENTICATED
+ RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
+)
+
+// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/).
+const (
+ // RPCJsonrpcVersionKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
+ // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
+ // does not specify this, the value can be omitted.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (If other than the default
+ // version (`1.0`))
+ // Stability: stable
+ // Examples: '2.0', '1.0'
+ RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
+
+ // RPCJsonrpcRequestIDKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
+ // property of request or response. Since protocol allows id to be int,
+ // string, `null` or missing (for notifications), value is expected to be
+ // cast to string for simplicity. Use empty string in case of `null` value.
+ // Omit entirely if this is a notification.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '10', 'request-7', ''
+ RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
+
+ // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.error_code" semantic conventions. It represents the
+ // `error.code` property of response if it is an error response.
+ //
+ // Type: int
+ // RequirementLevel: ConditionallyRequired (If response is not successful.)
+ // Stability: stable
+ // Examples: -32700, 100
+ RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
+
+ // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.error_message" semantic conventions. It represents the
+ // `error.message` property of response if it is an error response.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Parse error', 'User already exists'
+ RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
+)
+
+// RPCJsonrpcVersion returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.version" semantic conventions. It represents the protocol
+// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
+// does not specify this, the value can be omitted.
+func RPCJsonrpcVersion(val string) attribute.KeyValue {
+ return RPCJsonrpcVersionKey.String(val)
+}
+
+// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
+// property of request or response. Since protocol allows id to be int, string,
+// `null` or missing (for notifications), value is expected to be cast to
+// string for simplicity. Use empty string in case of `null` value. Omit
+// entirely if this is a notification.
+func RPCJsonrpcRequestID(val string) attribute.KeyValue {
+ return RPCJsonrpcRequestIDKey.String(val)
+}
+
+// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.error_code" semantic conventions. It represents the
+// `error.code` property of response if it is an error response.
+func RPCJsonrpcErrorCode(val int) attribute.KeyValue {
+ return RPCJsonrpcErrorCodeKey.Int(val)
+}
+
+// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.error_message" semantic conventions. It represents the
+// `error.message` property of response if it is an error response.
+func RPCJsonrpcErrorMessage(val string) attribute.KeyValue {
+ return RPCJsonrpcErrorMessageKey.String(val)
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/README.md
new file mode 100644
index 00000000..2de1fc3c
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/README.md
@@ -0,0 +1,3 @@
+# Semconv v1.26.0
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.26.0)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/attribute_group.go
new file mode 100644
index 00000000..d8dc822b
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/attribute_group.go
@@ -0,0 +1,8996 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0"
+
+import "go.opentelemetry.io/otel/attribute"
+
+// The Android platform on which the Android application is running.
+const (
+ // AndroidOSAPILevelKey is the attribute Key conforming to the
+ // "android.os.api_level" semantic conventions. It represents the uniquely
+ // identifies the framework API revision offered by a version
+ // (`os.version`) of the android operating system. More information can be
+ // found
+ // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '33', '32'
+ AndroidOSAPILevelKey = attribute.Key("android.os.api_level")
+)
+
+// AndroidOSAPILevel returns an attribute KeyValue conforming to the
+// "android.os.api_level" semantic conventions. It represents the uniquely
+// identifies the framework API revision offered by a version (`os.version`) of
+// the android operating system. More information can be found
+// [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
+func AndroidOSAPILevel(val string) attribute.KeyValue {
+ return AndroidOSAPILevelKey.String(val)
+}
+
+// ASP.NET Core attributes
+const (
+ // AspnetcoreRateLimitingResultKey is the attribute Key conforming to the
+ // "aspnetcore.rate_limiting.result" semantic conventions. It represents
+ // the rate-limiting result, shows whether the lease was acquired or
+ // contains a rejection reason
+ //
+ // Type: Enum
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'acquired', 'request_canceled'
+ AspnetcoreRateLimitingResultKey = attribute.Key("aspnetcore.rate_limiting.result")
+
+ // AspnetcoreDiagnosticsHandlerTypeKey is the attribute Key conforming to
+ // the "aspnetcore.diagnostics.handler.type" semantic conventions. It
+ // represents the full type name of the
+ // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler)
+ // implementation that handled the exception.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (if and only if the exception
+ // was handled by this handler.)
+ // Stability: stable
+ // Examples: 'Contoso.MyHandler'
+ AspnetcoreDiagnosticsHandlerTypeKey = attribute.Key("aspnetcore.diagnostics.handler.type")
+
+ // AspnetcoreDiagnosticsExceptionResultKey is the attribute Key conforming
+ // to the "aspnetcore.diagnostics.exception.result" semantic conventions.
+ // It represents the aSP.NET Core exception middleware handling result
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'handled', 'unhandled'
+ AspnetcoreDiagnosticsExceptionResultKey = attribute.Key("aspnetcore.diagnostics.exception.result")
+
+ // AspnetcoreRateLimitingPolicyKey is the attribute Key conforming to the
+ // "aspnetcore.rate_limiting.policy" semantic conventions. It represents
+ // the rate limiting policy name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'fixed', 'sliding', 'token'
+ AspnetcoreRateLimitingPolicyKey = attribute.Key("aspnetcore.rate_limiting.policy")
+
+ // AspnetcoreRequestIsUnhandledKey is the attribute Key conforming to the
+ // "aspnetcore.request.is_unhandled" semantic conventions. It represents
+ // the flag indicating if request was handled by the application pipeline.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: True
+ AspnetcoreRequestIsUnhandledKey = attribute.Key("aspnetcore.request.is_unhandled")
+
+ // AspnetcoreRoutingIsFallbackKey is the attribute Key conforming to the
+ // "aspnetcore.routing.is_fallback" semantic conventions. It represents a
+ // value that indicates whether the matched route is a fallback route.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: True
+ AspnetcoreRoutingIsFallbackKey = attribute.Key("aspnetcore.routing.is_fallback")
+
+ // AspnetcoreRoutingMatchStatusKey is the attribute Key conforming to the
+ // "aspnetcore.routing.match_status" semantic conventions. It represents
+ // the match result - success or failure
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'success', 'failure'
+ AspnetcoreRoutingMatchStatusKey = attribute.Key("aspnetcore.routing.match_status")
+)
+
+var (
+ // Lease was acquired
+ AspnetcoreRateLimitingResultAcquired = AspnetcoreRateLimitingResultKey.String("acquired")
+ // Lease request was rejected by the endpoint limiter
+ AspnetcoreRateLimitingResultEndpointLimiter = AspnetcoreRateLimitingResultKey.String("endpoint_limiter")
+ // Lease request was rejected by the global limiter
+ AspnetcoreRateLimitingResultGlobalLimiter = AspnetcoreRateLimitingResultKey.String("global_limiter")
+ // Lease request was canceled
+ AspnetcoreRateLimitingResultRequestCanceled = AspnetcoreRateLimitingResultKey.String("request_canceled")
+)
+
+var (
+ // Exception was handled by the exception handling middleware
+ AspnetcoreDiagnosticsExceptionResultHandled = AspnetcoreDiagnosticsExceptionResultKey.String("handled")
+ // Exception was not handled by the exception handling middleware
+ AspnetcoreDiagnosticsExceptionResultUnhandled = AspnetcoreDiagnosticsExceptionResultKey.String("unhandled")
+ // Exception handling was skipped because the response had started
+ AspnetcoreDiagnosticsExceptionResultSkipped = AspnetcoreDiagnosticsExceptionResultKey.String("skipped")
+ // Exception handling didn't run because the request was aborted
+ AspnetcoreDiagnosticsExceptionResultAborted = AspnetcoreDiagnosticsExceptionResultKey.String("aborted")
+)
+
+var (
+ // Match succeeded
+ AspnetcoreRoutingMatchStatusSuccess = AspnetcoreRoutingMatchStatusKey.String("success")
+ // Match failed
+ AspnetcoreRoutingMatchStatusFailure = AspnetcoreRoutingMatchStatusKey.String("failure")
+)
+
+// AspnetcoreDiagnosticsHandlerType returns an attribute KeyValue conforming
+// to the "aspnetcore.diagnostics.handler.type" semantic conventions. It
+// represents the full type name of the
+// [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler)
+// implementation that handled the exception.
+func AspnetcoreDiagnosticsHandlerType(val string) attribute.KeyValue {
+ return AspnetcoreDiagnosticsHandlerTypeKey.String(val)
+}
+
+// AspnetcoreRateLimitingPolicy returns an attribute KeyValue conforming to
+// the "aspnetcore.rate_limiting.policy" semantic conventions. It represents
+// the rate limiting policy name.
+func AspnetcoreRateLimitingPolicy(val string) attribute.KeyValue {
+ return AspnetcoreRateLimitingPolicyKey.String(val)
+}
+
+// AspnetcoreRequestIsUnhandled returns an attribute KeyValue conforming to
+// the "aspnetcore.request.is_unhandled" semantic conventions. It represents
+// the flag indicating if request was handled by the application pipeline.
+func AspnetcoreRequestIsUnhandled(val bool) attribute.KeyValue {
+ return AspnetcoreRequestIsUnhandledKey.Bool(val)
+}
+
+// AspnetcoreRoutingIsFallback returns an attribute KeyValue conforming to
+// the "aspnetcore.routing.is_fallback" semantic conventions. It represents a
+// value that indicates whether the matched route is a fallback route.
+func AspnetcoreRoutingIsFallback(val bool) attribute.KeyValue {
+ return AspnetcoreRoutingIsFallbackKey.Bool(val)
+}
+
+// Generic attributes for AWS services.
+const (
+ // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id"
+ // semantic conventions. It represents the AWS request ID as returned in
+ // the response headers `x-amz-request-id` or `x-amz-requestid`.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ'
+ AWSRequestIDKey = attribute.Key("aws.request_id")
+)
+
+// AWSRequestID returns an attribute KeyValue conforming to the
+// "aws.request_id" semantic conventions. It represents the AWS request ID as
+// returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
+func AWSRequestID(val string) attribute.KeyValue {
+ return AWSRequestIDKey.String(val)
+}
+
+// Attributes for AWS DynamoDB.
+const (
+ // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to
+ // the "aws.dynamodb.attribute_definitions" semantic conventions. It
+ // represents the JSON-serialized value of each item in the
+ // `AttributeDefinitions` request field.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
+ AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
+
+ // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
+ // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
+ // value of the `AttributesToGet` request parameter.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'lives', 'id'
+ AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
+
+ // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
+ // "aws.dynamodb.consistent_read" semantic conventions. It represents the
+ // value of the `ConsistentRead` request parameter.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
+
+ // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
+ // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
+ // JSON-serialized value of each item in the `ConsumedCapacity` response
+ // field.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": {
+ // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number,
+ // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" :
+ // { "CapacityUnits": number, "ReadCapacityUnits": number,
+ // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table":
+ // { "CapacityUnits": number, "ReadCapacityUnits": number,
+ // "WriteCapacityUnits": number }, "TableName": "string",
+ // "WriteCapacityUnits": number }'
+ AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
+
+ // AWSDynamoDBCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.count" semantic conventions. It represents the value of
+ // the `Count` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 10
+ AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
+
+ // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
+ // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents
+ // the value of the `ExclusiveStartTableName` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Users', 'CatsTable'
+ AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
+
+ // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key
+ // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
+ // conventions. It represents the JSON-serialized value of each item in the
+ // `GlobalSecondaryIndexUpdates` request field.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
+ // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
+ // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
+ // "ProvisionedThroughput": { "ReadCapacityUnits": number,
+ // "WriteCapacityUnits": number } }'
+ AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
+
+ // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to
+ // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
+ // represents the JSON-serialized value of each item of the
+ // `GlobalSecondaryIndexes` request field
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName":
+ // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
+ // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
+ // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }'
+ AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
+
+ // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
+ // "aws.dynamodb.index_name" semantic conventions. It represents the value
+ // of the `IndexName` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'name_to_group'
+ AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
+
+ // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to
+ // the "aws.dynamodb.item_collection_metrics" semantic conventions. It
+ // represents the JSON-serialized value of the `ItemCollectionMetrics`
+ // response field.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B":
+ // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": {
+ // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ],
+ // "NULL": boolean, "S": "string", "SS": [ "string" ] } },
+ // "SizeEstimateRangeGB": [ number ] } ] }'
+ AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
+
+ // AWSDynamoDBLimitKey is the attribute Key conforming to the
+ // "aws.dynamodb.limit" semantic conventions. It represents the value of
+ // the `Limit` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 10
+ AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
+
+ // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to
+ // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
+ // represents the JSON-serialized value of each item of the
+ // `LocalSecondaryIndexes` request field.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '{ "IndexARN": "string", "IndexName": "string",
+ // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ {
+ // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
+ // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }'
+ AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
+
+ // AWSDynamoDBProjectionKey is the attribute Key conforming to the
+ // "aws.dynamodb.projection" semantic conventions. It represents the value
+ // of the `ProjectionExpression` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Title', 'Title, Price, Color', 'Title, Description,
+ // RelatedItems, ProductReviews'
+ AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
+
+ // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to
+ // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
+ // represents the value of the `ProvisionedThroughput.ReadCapacityUnits`
+ // request parameter.
+ //
+ // Type: double
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1.0, 2.0
+ AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
+
+ // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming
+ // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions.
+ // It represents the value of the
+ // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
+ //
+ // Type: double
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1.0, 2.0
+ AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
+
+ // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
+ // "aws.dynamodb.scan_forward" semantic conventions. It represents the
+ // value of the `ScanIndexForward` request parameter.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
+
+ // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.scanned_count" semantic conventions. It represents the
+ // value of the `ScannedCount` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 50
+ AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
+
+ // AWSDynamoDBSegmentKey is the attribute Key conforming to the
+ // "aws.dynamodb.segment" semantic conventions. It represents the value of
+ // the `Segment` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 10
+ AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
+
+ // AWSDynamoDBSelectKey is the attribute Key conforming to the
+ // "aws.dynamodb.select" semantic conventions. It represents the value of
+ // the `Select` request parameter.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'ALL_ATTRIBUTES', 'COUNT'
+ AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
+
+ // AWSDynamoDBTableCountKey is the attribute Key conforming to the
+ // "aws.dynamodb.table_count" semantic conventions. It represents the
+ // number of items in the `TableNames` response parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 20
+ AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
+
+ // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
+ // "aws.dynamodb.table_names" semantic conventions. It represents the keys
+ // in the `RequestItems` object field.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Users', 'Cats'
+ AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
+
+ // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
+ // "aws.dynamodb.total_segments" semantic conventions. It represents the
+ // value of the `TotalSegments` request parameter.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 100
+ AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
+)
+
+// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming
+// to the "aws.dynamodb.attribute_definitions" semantic conventions. It
+// represents the JSON-serialized value of each item in the
+// `AttributeDefinitions` request field.
+func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
+ return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
+}
+
+// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to
+// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
+// value of the `AttributesToGet` request parameter.
+func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
+ return AWSDynamoDBAttributesToGetKey.StringSlice(val)
+}
+
+// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
+// "aws.dynamodb.consistent_read" semantic conventions. It represents the value
+// of the `ConsistentRead` request parameter.
+func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
+ return AWSDynamoDBConsistentReadKey.Bool(val)
+}
+
+// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to
+// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
+// JSON-serialized value of each item in the `ConsumedCapacity` response field.
+func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
+ return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
+}
+
+// AWSDynamoDBCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.count" semantic conventions. It represents the value of the
+// `Count` response parameter.
+func AWSDynamoDBCount(val int) attribute.KeyValue {
+ return AWSDynamoDBCountKey.Int(val)
+}
+
+// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming
+// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It
+// represents the value of the `ExclusiveStartTableName` request parameter.
+func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
+ return AWSDynamoDBExclusiveStartTableKey.String(val)
+}
+
+// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
+// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
+// conventions. It represents the JSON-serialized value of each item in the
+// `GlobalSecondaryIndexUpdates` request field.
+func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
+ return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
+}
+
+// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue
+// conforming to the "aws.dynamodb.global_secondary_indexes" semantic
+// conventions. It represents the JSON-serialized value of each item of the
+// `GlobalSecondaryIndexes` request field
+func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
+ return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
+}
+
+// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
+// "aws.dynamodb.index_name" semantic conventions. It represents the value of
+// the `IndexName` request parameter.
+func AWSDynamoDBIndexName(val string) attribute.KeyValue {
+ return AWSDynamoDBIndexNameKey.String(val)
+}
+
+// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming
+// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It
+// represents the JSON-serialized value of the `ItemCollectionMetrics` response
+// field.
+func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
+ return AWSDynamoDBItemCollectionMetricsKey.String(val)
+}
+
+// AWSDynamoDBLimit returns an attribute KeyValue conforming to the
+// "aws.dynamodb.limit" semantic conventions. It represents the value of the
+// `Limit` request parameter.
+func AWSDynamoDBLimit(val int) attribute.KeyValue {
+ return AWSDynamoDBLimitKey.Int(val)
+}
+
+// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming
+// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
+// represents the JSON-serialized value of each item of the
+// `LocalSecondaryIndexes` request field.
+func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
+ return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
+}
+
+// AWSDynamoDBProjection returns an attribute KeyValue conforming to the
+// "aws.dynamodb.projection" semantic conventions. It represents the value of
+// the `ProjectionExpression` request parameter.
+func AWSDynamoDBProjection(val string) attribute.KeyValue {
+ return AWSDynamoDBProjectionKey.String(val)
+}
+
+// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue
+// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic
+// conventions. It represents the value of the
+// `ProvisionedThroughput.ReadCapacityUnits` request parameter.
+func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
+ return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
+}
+
+// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue
+// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic
+// conventions. It represents the value of the
+// `ProvisionedThroughput.WriteCapacityUnits` request parameter.
+func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
+ return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
+}
+
+// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
+// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
+// the `ScanIndexForward` request parameter.
+func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
+ return AWSDynamoDBScanForwardKey.Bool(val)
+}
+
+// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.scanned_count" semantic conventions. It represents the value
+// of the `ScannedCount` response parameter.
+func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
+ return AWSDynamoDBScannedCountKey.Int(val)
+}
+
+// AWSDynamoDBSegment returns an attribute KeyValue conforming to the
+// "aws.dynamodb.segment" semantic conventions. It represents the value of the
+// `Segment` request parameter.
+func AWSDynamoDBSegment(val int) attribute.KeyValue {
+ return AWSDynamoDBSegmentKey.Int(val)
+}
+
+// AWSDynamoDBSelect returns an attribute KeyValue conforming to the
+// "aws.dynamodb.select" semantic conventions. It represents the value of the
+// `Select` request parameter.
+func AWSDynamoDBSelect(val string) attribute.KeyValue {
+ return AWSDynamoDBSelectKey.String(val)
+}
+
+// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
+// "aws.dynamodb.table_count" semantic conventions. It represents the number of
+// items in the `TableNames` response parameter.
+func AWSDynamoDBTableCount(val int) attribute.KeyValue {
+ return AWSDynamoDBTableCountKey.Int(val)
+}
+
+// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
+// "aws.dynamodb.table_names" semantic conventions. It represents the keys in
+// the `RequestItems` object field.
+func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
+ return AWSDynamoDBTableNamesKey.StringSlice(val)
+}
+
+// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
+// "aws.dynamodb.total_segments" semantic conventions. It represents the value
+// of the `TotalSegments` request parameter.
+func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
+ return AWSDynamoDBTotalSegmentsKey.Int(val)
+}
+
+// Attributes for AWS Elastic Container Service (ECS).
+const (
+ // AWSECSTaskIDKey is the attribute Key conforming to the "aws.ecs.task.id"
+ // semantic conventions. It represents the ID of a running ECS task. The ID
+ // MUST be extracted from `task.arn`.
+ //
+ // Type: string
+ // RequirementLevel: ConditionallyRequired (If and only if `task.arn` is
+ // populated.)
+ // Stability: experimental
+ // Examples: '10838bed-421f-43ef-870a-f43feacbbb5b',
+ // '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd'
+ AWSECSTaskIDKey = attribute.Key("aws.ecs.task.id")
+
+ // AWSECSClusterARNKey is the attribute Key conforming to the
+ // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
+ // [ECS
+ // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
+ AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn")
+
+ // AWSECSContainerARNKey is the attribute Key conforming to the
+ // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
+ // Resource Name (ARN) of an [ECS container
+ // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples:
+ // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9'
+ AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn")
+
+ // AWSECSLaunchtypeKey is the attribute Key conforming to the
+ // "aws.ecs.launchtype" semantic conventions. It represents the [launch
+ // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
+ // for an ECS task.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype")
+
+ // AWSECSTaskARNKey is the attribute Key conforming to the
+ // "aws.ecs.task.arn" semantic conventions. It represents the ARN of a
+ // running [ECS
+ // task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples:
+ // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b',
+ // 'arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd'
+ AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn")
+
+ // AWSECSTaskFamilyKey is the attribute Key conforming to the
+ // "aws.ecs.task.family" semantic conventions. It represents the family
+ // name of the [ECS task
+ // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html)
+ // used to create the ECS task.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry-family'
+ AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family")
+
+ // AWSECSTaskRevisionKey is the attribute Key conforming to the
+ // "aws.ecs.task.revision" semantic conventions. It represents the revision
+ // for the task definition used to create the ECS task.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '8', '26'
+ AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision")
+)
+
+var (
+ // ec2
+ AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2")
+ // fargate
+ AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate")
+)
+
+// AWSECSTaskID returns an attribute KeyValue conforming to the
+// "aws.ecs.task.id" semantic conventions. It represents the ID of a running
+// ECS task. The ID MUST be extracted from `task.arn`.
+func AWSECSTaskID(val string) attribute.KeyValue {
+ return AWSECSTaskIDKey.String(val)
+}
+
+// AWSECSClusterARN returns an attribute KeyValue conforming to the
+// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS
+// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
+func AWSECSClusterARN(val string) attribute.KeyValue {
+ return AWSECSClusterARNKey.String(val)
+}
+
+// AWSECSContainerARN returns an attribute KeyValue conforming to the
+// "aws.ecs.container.arn" semantic conventions. It represents the Amazon
+// Resource Name (ARN) of an [ECS container
+// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
+func AWSECSContainerARN(val string) attribute.KeyValue {
+ return AWSECSContainerARNKey.String(val)
+}
+
+// AWSECSTaskARN returns an attribute KeyValue conforming to the
+// "aws.ecs.task.arn" semantic conventions. It represents the ARN of a running
+// [ECS
+// task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids).
+func AWSECSTaskARN(val string) attribute.KeyValue {
+ return AWSECSTaskARNKey.String(val)
+}
+
+// AWSECSTaskFamily returns an attribute KeyValue conforming to the
+// "aws.ecs.task.family" semantic conventions. It represents the family name of
+// the [ECS task
+// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html)
+// used to create the ECS task.
+func AWSECSTaskFamily(val string) attribute.KeyValue {
+ return AWSECSTaskFamilyKey.String(val)
+}
+
+// AWSECSTaskRevision returns an attribute KeyValue conforming to the
+// "aws.ecs.task.revision" semantic conventions. It represents the revision for
+// the task definition used to create the ECS task.
+func AWSECSTaskRevision(val string) attribute.KeyValue {
+ return AWSECSTaskRevisionKey.String(val)
+}
+
+// Attributes for AWS Elastic Kubernetes Service (EKS).
+const (
+ // AWSEKSClusterARNKey is the attribute Key conforming to the
+ // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an
+ // EKS cluster.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
+ AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn")
+)
+
+// AWSEKSClusterARN returns an attribute KeyValue conforming to the
+// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
+// cluster.
+func AWSEKSClusterARN(val string) attribute.KeyValue {
+ return AWSEKSClusterARNKey.String(val)
+}
+
+// Attributes for AWS Logs.
+const (
+ // AWSLogGroupARNsKey is the attribute Key conforming to the
+ // "aws.log.group.arns" semantic conventions. It represents the Amazon
+ // Resource Name(s) (ARN) of the AWS log group(s).
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples:
+ // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*'
+ // Note: See the [log group ARN format
+ // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
+ AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns")
+
+ // AWSLogGroupNamesKey is the attribute Key conforming to the
+ // "aws.log.group.names" semantic conventions. It represents the name(s) of
+ // the AWS log group(s) an application is writing to.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '/aws/lambda/my-function', 'opentelemetry-service'
+ // Note: Multiple log groups must be supported for cases like
+ // multi-container applications, where a single application has sidecar
+ // containers, and each write to their own log group.
+ AWSLogGroupNamesKey = attribute.Key("aws.log.group.names")
+
+ // AWSLogStreamARNsKey is the attribute Key conforming to the
+ // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of
+ // the AWS log stream(s).
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples:
+ // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
+ // Note: See the [log stream ARN format
+ // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
+ // One log group can contain several log streams, so these ARNs necessarily
+ // identify both a log group and a log stream.
+ AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns")
+
+ // AWSLogStreamNamesKey is the attribute Key conforming to the
+ // "aws.log.stream.names" semantic conventions. It represents the name(s)
+ // of the AWS log stream(s) an application is writing to.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
+ AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names")
+)
+
+// AWSLogGroupARNs returns an attribute KeyValue conforming to the
+// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
+// Name(s) (ARN) of the AWS log group(s).
+func AWSLogGroupARNs(val ...string) attribute.KeyValue {
+ return AWSLogGroupARNsKey.StringSlice(val)
+}
+
+// AWSLogGroupNames returns an attribute KeyValue conforming to the
+// "aws.log.group.names" semantic conventions. It represents the name(s) of the
+// AWS log group(s) an application is writing to.
+func AWSLogGroupNames(val ...string) attribute.KeyValue {
+ return AWSLogGroupNamesKey.StringSlice(val)
+}
+
+// AWSLogStreamARNs returns an attribute KeyValue conforming to the
+// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
+// AWS log stream(s).
+func AWSLogStreamARNs(val ...string) attribute.KeyValue {
+ return AWSLogStreamARNsKey.StringSlice(val)
+}
+
+// AWSLogStreamNames returns an attribute KeyValue conforming to the
+// "aws.log.stream.names" semantic conventions. It represents the name(s) of
+// the AWS log stream(s) an application is writing to.
+func AWSLogStreamNames(val ...string) attribute.KeyValue {
+ return AWSLogStreamNamesKey.StringSlice(val)
+}
+
+// Attributes for AWS Lambda.
+const (
+ // AWSLambdaInvokedARNKey is the attribute Key conforming to the
+ // "aws.lambda.invoked_arn" semantic conventions. It represents the full
+ // invoked ARN as provided on the `Context` passed to the function
+ // (`Lambda-Runtime-Invoked-Function-ARN` header on the
+ // `/runtime/invocation/next` applicable).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'
+ // Note: This may be different from `cloud.resource_id` if an alias is
+ // involved.
+ AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
+)
+
+// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
+// "aws.lambda.invoked_arn" semantic conventions. It represents the full
+// invoked ARN as provided on the `Context` passed to the function
+// (`Lambda-Runtime-Invoked-Function-ARN` header on the
+// `/runtime/invocation/next` applicable).
+func AWSLambdaInvokedARN(val string) attribute.KeyValue {
+ return AWSLambdaInvokedARNKey.String(val)
+}
+
+// Attributes for AWS S3.
+const (
+ // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket"
+ // semantic conventions. It represents the S3 bucket name the request
+ // refers to. Corresponds to the `--bucket` parameter of the [S3
+ // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
+ // operations.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'some-bucket-name'
+ // Note: The `bucket` attribute is applicable to all S3 operations that
+ // reference a bucket, i.e. that require the bucket name as a mandatory
+ // parameter.
+ // This applies to almost all S3 operations except `list-buckets`.
+ AWSS3BucketKey = attribute.Key("aws.s3.bucket")
+
+ // AWSS3CopySourceKey is the attribute Key conforming to the
+ // "aws.s3.copy_source" semantic conventions. It represents the source
+ // object (in the form `bucket`/`key`) for the copy operation.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'someFile.yml'
+ // Note: The `copy_source` attribute applies to S3 copy operations and
+ // corresponds to the `--copy-source` parameter
+ // of the [copy-object operation within the S3
+ // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).
+ // This applies in particular to the following operations:
+ //
+ // -
+ // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
+ // -
+ // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
+ AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source")
+
+ // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete"
+ // semantic conventions. It represents the delete request container that
+ // specifies the objects to be deleted.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples:
+ // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean'
+ // Note: The `delete` attribute is only applicable to the
+ // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
+ // operation.
+ // The `delete` attribute corresponds to the `--delete` parameter of the
+ // [delete-objects operation within the S3
+ // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).
+ AWSS3DeleteKey = attribute.Key("aws.s3.delete")
+
+ // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic
+ // conventions. It represents the S3 object key the request refers to.
+ // Corresponds to the `--key` parameter of the [S3
+ // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
+ // operations.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'someFile.yml'
+ // Note: The `key` attribute is applicable to all object-related S3
+ // operations, i.e. that require the object key as a mandatory parameter.
+ // This applies in particular to the following operations:
+ //
+ // -
+ // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
+ // -
+ // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
+ // -
+ // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)
+ // -
+ // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)
+ // -
+ // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)
+ // -
+ // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)
+ // -
+ // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)
+ // -
+ // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
+ // -
+ // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
+ // -
+ // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)
+ // -
+ // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
+ // -
+ // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
+ // -
+ // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
+ AWSS3KeyKey = attribute.Key("aws.s3.key")
+
+ // AWSS3PartNumberKey is the attribute Key conforming to the
+ // "aws.s3.part_number" semantic conventions. It represents the part number
+ // of the part being uploaded in a multipart-upload operation. This is a
+ // positive integer between 1 and 10,000.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 3456
+ // Note: The `part_number` attribute is only applicable to the
+ // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
+ // and
+ // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
+ // operations.
+ // The `part_number` attribute corresponds to the `--part-number` parameter
+ // of the
+ // [upload-part operation within the S3
+ // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
+ AWSS3PartNumberKey = attribute.Key("aws.s3.part_number")
+
+ // AWSS3UploadIDKey is the attribute Key conforming to the
+ // "aws.s3.upload_id" semantic conventions. It represents the upload ID
+ // that identifies the multipart upload.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ'
+ // Note: The `upload_id` attribute applies to S3 multipart-upload
+ // operations and corresponds to the `--upload-id` parameter
+ // of the [S3
+ // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
+ // multipart operations.
+ // This applies in particular to the following operations:
+ //
+ // -
+ // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
+ // -
+ // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
+ // -
+ // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
+ // -
+ // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
+ // -
+ // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
+ AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id")
+)
+
+// AWSS3Bucket returns an attribute KeyValue conforming to the
+// "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the
+// request refers to. Corresponds to the `--bucket` parameter of the [S3
+// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
+// operations.
+func AWSS3Bucket(val string) attribute.KeyValue {
+ return AWSS3BucketKey.String(val)
+}
+
+// AWSS3CopySource returns an attribute KeyValue conforming to the
+// "aws.s3.copy_source" semantic conventions. It represents the source object
+// (in the form `bucket`/`key`) for the copy operation.
+func AWSS3CopySource(val string) attribute.KeyValue {
+ return AWSS3CopySourceKey.String(val)
+}
+
+// AWSS3Delete returns an attribute KeyValue conforming to the
+// "aws.s3.delete" semantic conventions. It represents the delete request
+// container that specifies the objects to be deleted.
+func AWSS3Delete(val string) attribute.KeyValue {
+ return AWSS3DeleteKey.String(val)
+}
+
+// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key"
+// semantic conventions. It represents the S3 object key the request refers to.
+// Corresponds to the `--key` parameter of the [S3
+// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
+// operations.
+func AWSS3Key(val string) attribute.KeyValue {
+ return AWSS3KeyKey.String(val)
+}
+
+// AWSS3PartNumber returns an attribute KeyValue conforming to the
+// "aws.s3.part_number" semantic conventions. It represents the part number of
+// the part being uploaded in a multipart-upload operation. This is a positive
+// integer between 1 and 10,000.
+func AWSS3PartNumber(val int) attribute.KeyValue {
+ return AWSS3PartNumberKey.Int(val)
+}
+
+// AWSS3UploadID returns an attribute KeyValue conforming to the
+// "aws.s3.upload_id" semantic conventions. It represents the upload ID that
+// identifies the multipart upload.
+func AWSS3UploadID(val string) attribute.KeyValue {
+ return AWSS3UploadIDKey.String(val)
+}
+
+// The web browser attributes
+const (
+ // BrowserBrandsKey is the attribute Key conforming to the "browser.brands"
+ // semantic conventions. It represents the array of brand name and version
+ // separated by a space
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99'
+ // Note: This value is intended to be taken from the [UA client hints
+ // API](https://wicg.github.io/ua-client-hints/#interface)
+ // (`navigator.userAgentData.brands`).
+ BrowserBrandsKey = attribute.Key("browser.brands")
+
+ // BrowserLanguageKey is the attribute Key conforming to the
+ // "browser.language" semantic conventions. It represents the preferred
+ // language of the user using the browser
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'en', 'en-US', 'fr', 'fr-FR'
+ // Note: This value is intended to be taken from the Navigator API
+ // `navigator.language`.
+ BrowserLanguageKey = attribute.Key("browser.language")
+
+ // BrowserMobileKey is the attribute Key conforming to the "browser.mobile"
+ // semantic conventions. It represents a boolean that is true if the
+ // browser is running on a mobile device
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Note: This value is intended to be taken from the [UA client hints
+ // API](https://wicg.github.io/ua-client-hints/#interface)
+ // (`navigator.userAgentData.mobile`). If unavailable, this attribute
+ // SHOULD be left unset.
+ BrowserMobileKey = attribute.Key("browser.mobile")
+
+ // BrowserPlatformKey is the attribute Key conforming to the
+ // "browser.platform" semantic conventions. It represents the platform on
+ // which the browser is running
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Windows', 'macOS', 'Android'
+ // Note: This value is intended to be taken from the [UA client hints
+ // API](https://wicg.github.io/ua-client-hints/#interface)
+ // (`navigator.userAgentData.platform`). If unavailable, the legacy
+ // `navigator.platform` API SHOULD NOT be used instead and this attribute
+ // SHOULD be left unset in order for the values to be consistent.
+ // The list of possible values is defined in the [W3C User-Agent Client
+ // Hints
+ // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform).
+ // Note that some (but not all) of these values can overlap with values in
+ // the [`os.type` and `os.name` attributes](./os.md). However, for
+ // consistency, the values in the `browser.platform` attribute should
+ // capture the exact value that the user agent provides.
+ BrowserPlatformKey = attribute.Key("browser.platform")
+)
+
+// BrowserBrands returns an attribute KeyValue conforming to the
+// "browser.brands" semantic conventions. It represents the array of brand name
+// and version separated by a space
+func BrowserBrands(val ...string) attribute.KeyValue {
+ return BrowserBrandsKey.StringSlice(val)
+}
+
+// BrowserLanguage returns an attribute KeyValue conforming to the
+// "browser.language" semantic conventions. It represents the preferred
+// language of the user using the browser
+func BrowserLanguage(val string) attribute.KeyValue {
+ return BrowserLanguageKey.String(val)
+}
+
+// BrowserMobile returns an attribute KeyValue conforming to the
+// "browser.mobile" semantic conventions. It represents a boolean that is true
+// if the browser is running on a mobile device
+func BrowserMobile(val bool) attribute.KeyValue {
+ return BrowserMobileKey.Bool(val)
+}
+
+// BrowserPlatform returns an attribute KeyValue conforming to the
+// "browser.platform" semantic conventions. It represents the platform on which
+// the browser is running
+func BrowserPlatform(val string) attribute.KeyValue {
+ return BrowserPlatformKey.String(val)
+}
+
+// These attributes may be used to describe the client in a connection-based
+// network interaction where there is one side that initiates the connection
+// (the client is the side that initiates the connection). This covers all TCP
+// network interactions since TCP is connection-based and one side initiates
+// the connection (an exception is made for peer-to-peer communication over TCP
+// where the "user-facing" surface of the protocol / API doesn't expose a clear
+// notion of client and server). This also covers UDP network interactions
+// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
+const (
+ // ClientAddressKey is the attribute Key conforming to the "client.address"
+ // semantic conventions. It represents the client address - domain name if
+ // available without reverse DNS lookup; otherwise, IP address or Unix
+ // domain socket name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock'
+ // Note: When observed from the server side, and when communicating through
+ // an intermediary, `client.address` SHOULD represent the client address
+ // behind any intermediaries, for example proxies, if it's available.
+ ClientAddressKey = attribute.Key("client.address")
+
+ // ClientPortKey is the attribute Key conforming to the "client.port"
+ // semantic conventions. It represents the client port number.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 65123
+ // Note: When observed from the server side, and when communicating through
+ // an intermediary, `client.port` SHOULD represent the client port behind
+ // any intermediaries, for example proxies, if it's available.
+ ClientPortKey = attribute.Key("client.port")
+)
+
+// ClientAddress returns an attribute KeyValue conforming to the
+// "client.address" semantic conventions. It represents the client address -
+// domain name if available without reverse DNS lookup; otherwise, IP address
+// or Unix domain socket name.
+func ClientAddress(val string) attribute.KeyValue {
+ return ClientAddressKey.String(val)
+}
+
+// ClientPort returns an attribute KeyValue conforming to the "client.port"
+// semantic conventions. It represents the client port number.
+func ClientPort(val int) attribute.KeyValue {
+ return ClientPortKey.Int(val)
+}
+
+// A cloud environment (e.g. GCP, Azure, AWS).
+const (
+ // CloudAccountIDKey is the attribute Key conforming to the
+ // "cloud.account.id" semantic conventions. It represents the cloud account
+ // ID the resource is assigned to.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '111111111111', 'opentelemetry'
+ CloudAccountIDKey = attribute.Key("cloud.account.id")
+
+ // CloudAvailabilityZoneKey is the attribute Key conforming to the
+ // "cloud.availability_zone" semantic conventions. It represents the cloud
+ // regions often have multiple, isolated locations known as zones to
+ // increase availability. Availability zone represents the zone where the
+ // resource is running.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'us-east-1c'
+ // Note: Availability zones are called "zones" on Alibaba Cloud and Google
+ // Cloud.
+ CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
+
+ // CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
+ // semantic conventions. It represents the cloud platform in use.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Note: The prefix of the service SHOULD match the one specified in
+ // `cloud.provider`.
+ CloudPlatformKey = attribute.Key("cloud.platform")
+
+ // CloudProviderKey is the attribute Key conforming to the "cloud.provider"
+ // semantic conventions. It represents the name of the cloud provider.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ CloudProviderKey = attribute.Key("cloud.provider")
+
+ // CloudRegionKey is the attribute Key conforming to the "cloud.region"
+ // semantic conventions. It represents the geographical region the resource
+ // is running.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'us-central1', 'us-east-1'
+ // Note: Refer to your provider's docs to see the available regions, for
+ // example [Alibaba Cloud
+ // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS
+ // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/),
+ // [Azure
+ // regions](https://azure.microsoft.com/global-infrastructure/geographies/),
+ // [Google Cloud regions](https://cloud.google.com/about/locations), or
+ // [Tencent Cloud
+ // regions](https://www.tencentcloud.com/document/product/213/6091).
+ CloudRegionKey = attribute.Key("cloud.region")
+
+ // CloudResourceIDKey is the attribute Key conforming to the
+ // "cloud.resource_id" semantic conventions. It represents the cloud
+ // provider-specific native identifier of the monitored cloud resource
+ // (e.g. an
+ // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
+ // on AWS, a [fully qualified resource
+ // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id)
+ // on Azure, a [full resource
+ // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ // on GCP)
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function',
+ // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID',
+ // '/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/'
+ // Note: On some cloud providers, it may not be possible to determine the
+ // full ID at startup,
+ // so it may be necessary to set `cloud.resource_id` as a span attribute
+ // instead.
+ //
+ // The exact value to use for `cloud.resource_id` depends on the cloud
+ // provider.
+ // The following well-known definitions MUST be used if you set this
+ // attribute and they apply:
+ //
+ // * **AWS Lambda:** The function
+ // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
+ // Take care not to use the "invoked ARN" directly but replace any
+ // [alias
+ // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
+ // with the resolved function version, as the same runtime instance may
+ // be invokable with
+ // multiple different aliases.
+ // * **GCP:** The [URI of the
+ // resource](https://cloud.google.com/iam/docs/full-resource-names)
+ // * **Azure:** The [Fully Qualified Resource
+ // ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id)
+ // of the invoked function,
+ // *not* the function app, having the form
+ // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`.
+ // This means that a span attribute MUST be used, as an Azure function
+ // app can host multiple functions that would usually share
+ // a TracerProvider.
+ CloudResourceIDKey = attribute.Key("cloud.resource_id")
+)
+
+var (
+ // Alibaba Cloud Elastic Compute Service
+ CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
+ // Alibaba Cloud Function Compute
+ CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc")
+ // Red Hat OpenShift on Alibaba Cloud
+ CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift")
+ // AWS Elastic Compute Cloud
+ CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
+ // AWS Elastic Container Service
+ CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
+ // AWS Elastic Kubernetes Service
+ CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
+ // AWS Lambda
+ CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
+ // AWS Elastic Beanstalk
+ CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
+ // AWS App Runner
+ CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
+ // Red Hat OpenShift on AWS (ROSA)
+ CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift")
+ // Azure Virtual Machines
+ CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm")
+ // Azure Container Apps
+ CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure_container_apps")
+ // Azure Container Instances
+ CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances")
+ // Azure Kubernetes Service
+ CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks")
+ // Azure Functions
+ CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions")
+ // Azure App Service
+ CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service")
+ // Azure Red Hat OpenShift
+ CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift")
+ // Google Bare Metal Solution (BMS)
+ CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution")
+ // Google Cloud Compute Engine (GCE)
+ CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
+ // Google Cloud Run
+ CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
+ // Google Cloud Kubernetes Engine (GKE)
+ CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
+ // Google Cloud Functions (GCF)
+ CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
+ // Google Cloud App Engine (GAE)
+ CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
+ // Red Hat OpenShift on Google Cloud
+ CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift")
+ // Red Hat OpenShift on IBM Cloud
+ CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift")
+ // Tencent Cloud Cloud Virtual Machine (CVM)
+ CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm")
+ // Tencent Cloud Elastic Kubernetes Service (EKS)
+ CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
+ // Tencent Cloud Serverless Cloud Function (SCF)
+ CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf")
+)
+
+var (
+ // Alibaba Cloud
+ CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
+ // Amazon Web Services
+ CloudProviderAWS = CloudProviderKey.String("aws")
+ // Microsoft Azure
+ CloudProviderAzure = CloudProviderKey.String("azure")
+ // Google Cloud Platform
+ CloudProviderGCP = CloudProviderKey.String("gcp")
+ // Heroku Platform as a Service
+ CloudProviderHeroku = CloudProviderKey.String("heroku")
+ // IBM Cloud
+ CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud")
+ // Tencent Cloud
+ CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
+)
+
+// CloudAccountID returns an attribute KeyValue conforming to the
+// "cloud.account.id" semantic conventions. It represents the cloud account ID
+// the resource is assigned to.
+func CloudAccountID(val string) attribute.KeyValue {
+ return CloudAccountIDKey.String(val)
+}
+
+// CloudAvailabilityZone returns an attribute KeyValue conforming to the
+// "cloud.availability_zone" semantic conventions. It represents the cloud
+// regions often have multiple, isolated locations known as zones to increase
+// availability. Availability zone represents the zone where the resource is
+// running.
+func CloudAvailabilityZone(val string) attribute.KeyValue {
+ return CloudAvailabilityZoneKey.String(val)
+}
+
+// CloudRegion returns an attribute KeyValue conforming to the
+// "cloud.region" semantic conventions. It represents the geographical region
+// the resource is running.
+func CloudRegion(val string) attribute.KeyValue {
+ return CloudRegionKey.String(val)
+}
+
+// CloudResourceID returns an attribute KeyValue conforming to the
+// "cloud.resource_id" semantic conventions. It represents the cloud
+// provider-specific native identifier of the monitored cloud resource (e.g. an
+// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
+// on AWS, a [fully qualified resource
+// ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on
+// Azure, a [full resource
+// name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+// on GCP)
+func CloudResourceID(val string) attribute.KeyValue {
+ return CloudResourceIDKey.String(val)
+}
+
+// Attributes for CloudEvents.
+const (
+ // CloudeventsEventIDKey is the attribute Key conforming to the
+ // "cloudevents.event_id" semantic conventions. It represents the
+ // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
+ // uniquely identifies the event.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001'
+ CloudeventsEventIDKey = attribute.Key("cloudevents.event_id")
+
+ // CloudeventsEventSourceKey is the attribute Key conforming to the
+ // "cloudevents.event_source" semantic conventions. It represents the
+ // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
+ // identifies the context in which an event happened.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'https://github.com/cloudevents',
+ // '/cloudevents/spec/pull/123', 'my-service'
+ CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source")
+
+ // CloudeventsEventSpecVersionKey is the attribute Key conforming to the
+ // "cloudevents.event_spec_version" semantic conventions. It represents the
+ // [version of the CloudEvents
+ // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
+ // which the event uses.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '1.0'
+ CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
+
+ // CloudeventsEventSubjectKey is the attribute Key conforming to the
+ // "cloudevents.event_subject" semantic conventions. It represents the
+ // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
+ // of the event in the context of the event producer (identified by
+ // source).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'mynewfile.jpg'
+ CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
+
+ // CloudeventsEventTypeKey is the attribute Key conforming to the
+ // "cloudevents.event_type" semantic conventions. It represents the
+ // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
+ // contains a value describing the type of event related to the originating
+ // occurrence.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'com.github.pull_request.opened',
+ // 'com.example.object.deleted.v2'
+ CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type")
+)
+
+// CloudeventsEventID returns an attribute KeyValue conforming to the
+// "cloudevents.event_id" semantic conventions. It represents the
+// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
+// uniquely identifies the event.
+func CloudeventsEventID(val string) attribute.KeyValue {
+ return CloudeventsEventIDKey.String(val)
+}
+
+// CloudeventsEventSource returns an attribute KeyValue conforming to the
+// "cloudevents.event_source" semantic conventions. It represents the
+// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
+// identifies the context in which an event happened.
+func CloudeventsEventSource(val string) attribute.KeyValue {
+ return CloudeventsEventSourceKey.String(val)
+}
+
+// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to
+// the "cloudevents.event_spec_version" semantic conventions. It represents the
+// [version of the CloudEvents
+// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
+// which the event uses.
+func CloudeventsEventSpecVersion(val string) attribute.KeyValue {
+ return CloudeventsEventSpecVersionKey.String(val)
+}
+
+// CloudeventsEventSubject returns an attribute KeyValue conforming to the
+// "cloudevents.event_subject" semantic conventions. It represents the
+// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
+// of the event in the context of the event producer (identified by source).
+func CloudeventsEventSubject(val string) attribute.KeyValue {
+ return CloudeventsEventSubjectKey.String(val)
+}
+
+// CloudeventsEventType returns an attribute KeyValue conforming to the
+// "cloudevents.event_type" semantic conventions. It represents the
+// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
+// contains a value describing the type of event related to the originating
+// occurrence.
+func CloudeventsEventType(val string) attribute.KeyValue {
+ return CloudeventsEventTypeKey.String(val)
+}
+
+// These attributes allow to report this unit of code and therefore to provide
+// more context about the span.
+const (
+ // CodeColumnKey is the attribute Key conforming to the "code.column"
+ // semantic conventions. It represents the column number in `code.filepath`
+ // best representing the operation. It SHOULD point within the code unit
+ // named in `code.function`.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 16
+ CodeColumnKey = attribute.Key("code.column")
+
+ // CodeFilepathKey is the attribute Key conforming to the "code.filepath"
+ // semantic conventions. It represents the source code file name that
+ // identifies the code unit as uniquely as possible (preferably an absolute
+ // file path).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '/usr/local/MyApplication/content_root/app/index.php'
+ CodeFilepathKey = attribute.Key("code.filepath")
+
+ // CodeFunctionKey is the attribute Key conforming to the "code.function"
+ // semantic conventions. It represents the method or function name, or
+ // equivalent (usually rightmost part of the code unit's name).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'serveRequest'
+ CodeFunctionKey = attribute.Key("code.function")
+
+ // CodeLineNumberKey is the attribute Key conforming to the "code.lineno"
+ // semantic conventions. It represents the line number in `code.filepath`
+ // best representing the operation. It SHOULD point within the code unit
+ // named in `code.function`.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 42
+ CodeLineNumberKey = attribute.Key("code.lineno")
+
+ // CodeNamespaceKey is the attribute Key conforming to the "code.namespace"
+ // semantic conventions. It represents the "namespace" within which
+ // `code.function` is defined. Usually the qualified class or module name,
+ // such that `code.namespace` + some separator + `code.function` form a
+ // unique identifier for the code unit.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'com.example.MyHTTPService'
+ CodeNamespaceKey = attribute.Key("code.namespace")
+
+ // CodeStacktraceKey is the attribute Key conforming to the
+ // "code.stacktrace" semantic conventions. It represents a stacktrace as a
+ // string in the natural representation for the language runtime. The
+ // representation is to be determined and documented by each language SIG.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'at
+ // com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
+ // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
+ // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
+ CodeStacktraceKey = attribute.Key("code.stacktrace")
+)
+
+// CodeColumn returns an attribute KeyValue conforming to the "code.column"
+// semantic conventions. It represents the column number in `code.filepath`
+// best representing the operation. It SHOULD point within the code unit named
+// in `code.function`.
+func CodeColumn(val int) attribute.KeyValue {
+ return CodeColumnKey.Int(val)
+}
+
+// CodeFilepath returns an attribute KeyValue conforming to the
+// "code.filepath" semantic conventions. It represents the source code file
+// name that identifies the code unit as uniquely as possible (preferably an
+// absolute file path).
+func CodeFilepath(val string) attribute.KeyValue {
+ return CodeFilepathKey.String(val)
+}
+
+// CodeFunction returns an attribute KeyValue conforming to the
+// "code.function" semantic conventions. It represents the method or function
+// name, or equivalent (usually rightmost part of the code unit's name).
+func CodeFunction(val string) attribute.KeyValue {
+ return CodeFunctionKey.String(val)
+}
+
+// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno"
+// semantic conventions. It represents the line number in `code.filepath` best
+// representing the operation. It SHOULD point within the code unit named in
+// `code.function`.
+func CodeLineNumber(val int) attribute.KeyValue {
+ return CodeLineNumberKey.Int(val)
+}
+
+// CodeNamespace returns an attribute KeyValue conforming to the
+// "code.namespace" semantic conventions. It represents the "namespace" within
+// which `code.function` is defined. Usually the qualified class or module
+// name, such that `code.namespace` + some separator + `code.function` form a
+// unique identifier for the code unit.
+func CodeNamespace(val string) attribute.KeyValue {
+ return CodeNamespaceKey.String(val)
+}
+
+// CodeStacktrace returns an attribute KeyValue conforming to the
+// "code.stacktrace" semantic conventions. It represents a stacktrace as a
+// string in the natural representation for the language runtime. The
+// representation is to be determined and documented by each language SIG.
+func CodeStacktrace(val string) attribute.KeyValue {
+ return CodeStacktraceKey.String(val)
+}
+
+// A container instance.
+const (
+ // ContainerCommandKey is the attribute Key conforming to the
+ // "container.command" semantic conventions. It represents the command used
+ // to run the container (i.e. the command name).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'otelcontribcol'
+ // Note: If using embedded credentials or sensitive data, it is recommended
+ // to remove them to prevent potential leakage.
+ ContainerCommandKey = attribute.Key("container.command")
+
+ // ContainerCommandArgsKey is the attribute Key conforming to the
+ // "container.command_args" semantic conventions. It represents the all the
+ // command arguments (including the command/executable itself) run by the
+ // container. [2]
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'otelcontribcol, --config, config.yaml'
+ ContainerCommandArgsKey = attribute.Key("container.command_args")
+
+ // ContainerCommandLineKey is the attribute Key conforming to the
+ // "container.command_line" semantic conventions. It represents the full
+ // command run by the container as a single string representing the full
+ // command. [2]
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'otelcontribcol --config config.yaml'
+ ContainerCommandLineKey = attribute.Key("container.command_line")
+
+ // ContainerCPUStateKey is the attribute Key conforming to the
+ // "container.cpu.state" semantic conventions. It represents the CPU state
+ // for this data point.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'user', 'kernel'
+ ContainerCPUStateKey = attribute.Key("container.cpu.state")
+
+ // ContainerIDKey is the attribute Key conforming to the "container.id"
+ // semantic conventions. It represents the container ID. Usually a UUID, as
+ // for example used to [identify Docker
+ // containers](https://docs.docker.com/engine/reference/run/#container-identification).
+ // The UUID might be abbreviated.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'a3bf90e006b2'
+ ContainerIDKey = attribute.Key("container.id")
+
+ // ContainerImageIDKey is the attribute Key conforming to the
+ // "container.image.id" semantic conventions. It represents the runtime
+ // specific image identifier. Usually a hash algorithm followed by a UUID.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples:
+ // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f'
+ // Note: Docker defines a sha256 of the image id; `container.image.id`
+ // corresponds to the `Image` field from the Docker container inspect
+ // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect)
+ // endpoint.
+ // K8S defines a link to the container registry repository with digest
+ // `"imageID": "registry.azurecr.io
+ // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
+ // The ID is assigned by the container runtime and can vary in different
+ // environments. Consider using `oci.manifest.digest` if it is important to
+ // identify the same image in different environments/runtimes.
+ ContainerImageIDKey = attribute.Key("container.image.id")
+
+ // ContainerImageNameKey is the attribute Key conforming to the
+ // "container.image.name" semantic conventions. It represents the name of
+ // the image the container was built on.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'gcr.io/opentelemetry/operator'
+ ContainerImageNameKey = attribute.Key("container.image.name")
+
+ // ContainerImageRepoDigestsKey is the attribute Key conforming to the
+ // "container.image.repo_digests" semantic conventions. It represents the
+ // repo digests of the container image as provided by the container
+ // runtime.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples:
+ // 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb',
+ // 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578'
+ // Note:
+ // [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect)
+ // and
+ // [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238)
+ // report those under the `RepoDigests` field.
+ ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests")
+
+ // ContainerImageTagsKey is the attribute Key conforming to the
+ // "container.image.tags" semantic conventions. It represents the container
+ // image tags. An example can be found in [Docker Image
+ // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
+ // Should be only the `` section of the full name for example from
+ // `registry.example.com/my-org/my-image:`.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'v1.27.1', '3.5.7-0'
+ ContainerImageTagsKey = attribute.Key("container.image.tags")
+
+ // ContainerNameKey is the attribute Key conforming to the "container.name"
+ // semantic conventions. It represents the container name used by container
+ // runtime.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry-autoconf'
+ ContainerNameKey = attribute.Key("container.name")
+
+ // ContainerRuntimeKey is the attribute Key conforming to the
+ // "container.runtime" semantic conventions. It represents the container
+ // runtime managing this container.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'docker', 'containerd', 'rkt'
+ ContainerRuntimeKey = attribute.Key("container.runtime")
+)
+
+var (
+ // When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows)
+ ContainerCPUStateUser = ContainerCPUStateKey.String("user")
+ // When CPU is used by the system (host OS)
+ ContainerCPUStateSystem = ContainerCPUStateKey.String("system")
+ // When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows)
+ ContainerCPUStateKernel = ContainerCPUStateKey.String("kernel")
+)
+
+// ContainerCommand returns an attribute KeyValue conforming to the
+// "container.command" semantic conventions. It represents the command used to
+// run the container (i.e. the command name).
+func ContainerCommand(val string) attribute.KeyValue {
+ return ContainerCommandKey.String(val)
+}
+
+// ContainerCommandArgs returns an attribute KeyValue conforming to the
+// "container.command_args" semantic conventions. It represents the all the
+// command arguments (including the command/executable itself) run by the
+// container. [2]
+func ContainerCommandArgs(val ...string) attribute.KeyValue {
+ return ContainerCommandArgsKey.StringSlice(val)
+}
+
+// ContainerCommandLine returns an attribute KeyValue conforming to the
+// "container.command_line" semantic conventions. It represents the full
+// command run by the container as a single string representing the full
+// command. [2]
+func ContainerCommandLine(val string) attribute.KeyValue {
+ return ContainerCommandLineKey.String(val)
+}
+
+// ContainerID returns an attribute KeyValue conforming to the
+// "container.id" semantic conventions. It represents the container ID. Usually
+// a UUID, as for example used to [identify Docker
+// containers](https://docs.docker.com/engine/reference/run/#container-identification).
+// The UUID might be abbreviated.
+func ContainerID(val string) attribute.KeyValue {
+ return ContainerIDKey.String(val)
+}
+
+// ContainerImageID returns an attribute KeyValue conforming to the
+// "container.image.id" semantic conventions. It represents the runtime
+// specific image identifier. Usually a hash algorithm followed by a UUID.
+func ContainerImageID(val string) attribute.KeyValue {
+ return ContainerImageIDKey.String(val)
+}
+
+// ContainerImageName returns an attribute KeyValue conforming to the
+// "container.image.name" semantic conventions. It represents the name of the
+// image the container was built on.
+func ContainerImageName(val string) attribute.KeyValue {
+ return ContainerImageNameKey.String(val)
+}
+
+// ContainerImageRepoDigests returns an attribute KeyValue conforming to the
+// "container.image.repo_digests" semantic conventions. It represents the repo
+// digests of the container image as provided by the container runtime.
+func ContainerImageRepoDigests(val ...string) attribute.KeyValue {
+ return ContainerImageRepoDigestsKey.StringSlice(val)
+}
+
+// ContainerImageTags returns an attribute KeyValue conforming to the
+// "container.image.tags" semantic conventions. It represents the container
+// image tags. An example can be found in [Docker Image
+// Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
+// Should be only the `` section of the full name for example from
+// `registry.example.com/my-org/my-image:`.
+func ContainerImageTags(val ...string) attribute.KeyValue {
+ return ContainerImageTagsKey.StringSlice(val)
+}
+
+// ContainerName returns an attribute KeyValue conforming to the
+// "container.name" semantic conventions. It represents the container name used
+// by container runtime.
+func ContainerName(val string) attribute.KeyValue {
+ return ContainerNameKey.String(val)
+}
+
+// ContainerRuntime returns an attribute KeyValue conforming to the
+// "container.runtime" semantic conventions. It represents the container
+// runtime managing this container.
+func ContainerRuntime(val string) attribute.KeyValue {
+ return ContainerRuntimeKey.String(val)
+}
+
+// This group defines the attributes used to describe telemetry in the context
+// of databases.
+const (
+ // DBClientConnectionsPoolNameKey is the attribute Key conforming to the
+ // "db.client.connections.pool.name" semantic conventions. It represents
+ // the name of the connection pool; unique within the instrumented
+ // application. In case the connection pool implementation doesn't provide
+ // a name, instrumentation should use a combination of `server.address` and
+ // `server.port` attributes formatted as `server.address:server.port`.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'myDataSource'
+ DBClientConnectionsPoolNameKey = attribute.Key("db.client.connections.pool.name")
+
+ // DBClientConnectionsStateKey is the attribute Key conforming to the
+ // "db.client.connections.state" semantic conventions. It represents the
+ // state of a connection in the pool
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'idle'
+ DBClientConnectionsStateKey = attribute.Key("db.client.connections.state")
+
+ // DBCollectionNameKey is the attribute Key conforming to the
+ // "db.collection.name" semantic conventions. It represents the name of a
+ // collection (table, container) within the database.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'public.users', 'customers'
+ // Note: If the collection name is parsed from the query, it SHOULD match
+ // the value provided in the query and may be qualified with the schema and
+ // database name.
+ // It is RECOMMENDED to capture the value as provided by the application
+ // without attempting to do any case normalization.
+ DBCollectionNameKey = attribute.Key("db.collection.name")
+
+ // DBNamespaceKey is the attribute Key conforming to the "db.namespace"
+ // semantic conventions. It represents the name of the database, fully
+ // qualified within the server address and port.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'customers', 'test.users'
+ // Note: If a database system has multiple namespace components, they
+ // SHOULD be concatenated (potentially using database system specific
+ // conventions) from most general to most specific namespace component, and
+ // more specific namespaces SHOULD NOT be captured without the more general
+ // namespaces, to ensure that "startswith" queries for the more general
+ // namespaces will be valid.
+ // Semantic conventions for individual database systems SHOULD document
+ // what `db.namespace` means in the context of that system.
+ // It is RECOMMENDED to capture the value as provided by the application
+ // without attempting to do any case normalization.
+ DBNamespaceKey = attribute.Key("db.namespace")
+
+ // DBOperationNameKey is the attribute Key conforming to the
+ // "db.operation.name" semantic conventions. It represents the name of the
+ // operation or command being executed.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'findAndModify', 'HMSET', 'SELECT'
+ // Note: It is RECOMMENDED to capture the value as provided by the
+ // application without attempting to do any case normalization.
+ DBOperationNameKey = attribute.Key("db.operation.name")
+
+ // DBQueryTextKey is the attribute Key conforming to the "db.query.text"
+ // semantic conventions. It represents the database query being executed.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'SELECT * FROM wuser_table where username = ?', 'SET mykey
+ // "WuValue"'
+ DBQueryTextKey = attribute.Key("db.query.text")
+
+ // DBSystemKey is the attribute Key conforming to the "db.system" semantic
+ // conventions. It represents the database management system (DBMS) product
+ // as identified by the client instrumentation.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Note: The actual DBMS may differ from the one identified by the client.
+ // For example, when using PostgreSQL client libraries to connect to a
+ // CockroachDB, the `db.system` is set to `postgresql` based on the
+ // instrumentation's best knowledge.
+ DBSystemKey = attribute.Key("db.system")
+)
+
+var (
+ // idle
+ DBClientConnectionsStateIdle = DBClientConnectionsStateKey.String("idle")
+ // used
+ DBClientConnectionsStateUsed = DBClientConnectionsStateKey.String("used")
+)
+
+var (
+ // Some other SQL database. Fallback only. See notes
+ DBSystemOtherSQL = DBSystemKey.String("other_sql")
+ // Microsoft SQL Server
+ DBSystemMSSQL = DBSystemKey.String("mssql")
+ // Microsoft SQL Server Compact
+ DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact")
+ // MySQL
+ DBSystemMySQL = DBSystemKey.String("mysql")
+ // Oracle Database
+ DBSystemOracle = DBSystemKey.String("oracle")
+ // IBM DB2
+ DBSystemDB2 = DBSystemKey.String("db2")
+ // PostgreSQL
+ DBSystemPostgreSQL = DBSystemKey.String("postgresql")
+ // Amazon Redshift
+ DBSystemRedshift = DBSystemKey.String("redshift")
+ // Apache Hive
+ DBSystemHive = DBSystemKey.String("hive")
+ // Cloudscape
+ DBSystemCloudscape = DBSystemKey.String("cloudscape")
+ // HyperSQL DataBase
+ DBSystemHSQLDB = DBSystemKey.String("hsqldb")
+ // Progress Database
+ DBSystemProgress = DBSystemKey.String("progress")
+ // SAP MaxDB
+ DBSystemMaxDB = DBSystemKey.String("maxdb")
+ // SAP HANA
+ DBSystemHanaDB = DBSystemKey.String("hanadb")
+ // Ingres
+ DBSystemIngres = DBSystemKey.String("ingres")
+ // FirstSQL
+ DBSystemFirstSQL = DBSystemKey.String("firstsql")
+ // EnterpriseDB
+ DBSystemEDB = DBSystemKey.String("edb")
+ // InterSystems Caché
+ DBSystemCache = DBSystemKey.String("cache")
+ // Adabas (Adaptable Database System)
+ DBSystemAdabas = DBSystemKey.String("adabas")
+ // Firebird
+ DBSystemFirebird = DBSystemKey.String("firebird")
+ // Apache Derby
+ DBSystemDerby = DBSystemKey.String("derby")
+ // FileMaker
+ DBSystemFilemaker = DBSystemKey.String("filemaker")
+ // Informix
+ DBSystemInformix = DBSystemKey.String("informix")
+ // InstantDB
+ DBSystemInstantDB = DBSystemKey.String("instantdb")
+ // InterBase
+ DBSystemInterbase = DBSystemKey.String("interbase")
+ // MariaDB
+ DBSystemMariaDB = DBSystemKey.String("mariadb")
+ // Netezza
+ DBSystemNetezza = DBSystemKey.String("netezza")
+ // Pervasive PSQL
+ DBSystemPervasive = DBSystemKey.String("pervasive")
+ // PointBase
+ DBSystemPointbase = DBSystemKey.String("pointbase")
+ // SQLite
+ DBSystemSqlite = DBSystemKey.String("sqlite")
+ // Sybase
+ DBSystemSybase = DBSystemKey.String("sybase")
+ // Teradata
+ DBSystemTeradata = DBSystemKey.String("teradata")
+ // Vertica
+ DBSystemVertica = DBSystemKey.String("vertica")
+ // H2
+ DBSystemH2 = DBSystemKey.String("h2")
+ // ColdFusion IMQ
+ DBSystemColdfusion = DBSystemKey.String("coldfusion")
+ // Apache Cassandra
+ DBSystemCassandra = DBSystemKey.String("cassandra")
+ // Apache HBase
+ DBSystemHBase = DBSystemKey.String("hbase")
+ // MongoDB
+ DBSystemMongoDB = DBSystemKey.String("mongodb")
+ // Redis
+ DBSystemRedis = DBSystemKey.String("redis")
+ // Couchbase
+ DBSystemCouchbase = DBSystemKey.String("couchbase")
+ // CouchDB
+ DBSystemCouchDB = DBSystemKey.String("couchdb")
+ // Microsoft Azure Cosmos DB
+ DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
+ // Amazon DynamoDB
+ DBSystemDynamoDB = DBSystemKey.String("dynamodb")
+ // Neo4j
+ DBSystemNeo4j = DBSystemKey.String("neo4j")
+ // Apache Geode
+ DBSystemGeode = DBSystemKey.String("geode")
+ // Elasticsearch
+ DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
+ // Memcached
+ DBSystemMemcached = DBSystemKey.String("memcached")
+ // CockroachDB
+ DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
+ // OpenSearch
+ DBSystemOpensearch = DBSystemKey.String("opensearch")
+ // ClickHouse
+ DBSystemClickhouse = DBSystemKey.String("clickhouse")
+ // Cloud Spanner
+ DBSystemSpanner = DBSystemKey.String("spanner")
+ // Trino
+ DBSystemTrino = DBSystemKey.String("trino")
+)
+
+// DBClientConnectionsPoolName returns an attribute KeyValue conforming to
+// the "db.client.connections.pool.name" semantic conventions. It represents
+// the name of the connection pool; unique within the instrumented application.
+// In case the connection pool implementation doesn't provide a name,
+// instrumentation should use a combination of `server.address` and
+// `server.port` attributes formatted as `server.address:server.port`.
+func DBClientConnectionsPoolName(val string) attribute.KeyValue {
+ return DBClientConnectionsPoolNameKey.String(val)
+}
+
+// DBCollectionName returns an attribute KeyValue conforming to the
+// "db.collection.name" semantic conventions. It represents the name of a
+// collection (table, container) within the database.
+func DBCollectionName(val string) attribute.KeyValue {
+ return DBCollectionNameKey.String(val)
+}
+
+// DBNamespace returns an attribute KeyValue conforming to the
+// "db.namespace" semantic conventions. It represents the name of the database,
+// fully qualified within the server address and port.
+func DBNamespace(val string) attribute.KeyValue {
+ return DBNamespaceKey.String(val)
+}
+
+// DBOperationName returns an attribute KeyValue conforming to the
+// "db.operation.name" semantic conventions. It represents the name of the
+// operation or command being executed.
+func DBOperationName(val string) attribute.KeyValue {
+ return DBOperationNameKey.String(val)
+}
+
+// DBQueryText returns an attribute KeyValue conforming to the
+// "db.query.text" semantic conventions. It represents the database query being
+// executed.
+func DBQueryText(val string) attribute.KeyValue {
+ return DBQueryTextKey.String(val)
+}
+
+// This group defines attributes for Cassandra.
+const (
+ // DBCassandraConsistencyLevelKey is the attribute Key conforming to the
+ // "db.cassandra.consistency_level" semantic conventions. It represents the
+ // consistency level of the query. Based on consistency values from
+ // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
+
+ // DBCassandraCoordinatorDCKey is the attribute Key conforming to the
+ // "db.cassandra.coordinator.dc" semantic conventions. It represents the
+ // data center of the coordinating node for a query.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'us-west-2'
+ DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
+
+ // DBCassandraCoordinatorIDKey is the attribute Key conforming to the
+ // "db.cassandra.coordinator.id" semantic conventions. It represents the ID
+ // of the coordinating node for a query.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
+ DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
+
+ // DBCassandraIdempotenceKey is the attribute Key conforming to the
+ // "db.cassandra.idempotence" semantic conventions. It represents the
+ // whether or not the query is idempotent.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
+
+ // DBCassandraPageSizeKey is the attribute Key conforming to the
+ // "db.cassandra.page_size" semantic conventions. It represents the fetch
+ // size used for paging, i.e. how many rows will be returned at once.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 5000
+ DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
+
+ // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming
+ // to the "db.cassandra.speculative_execution_count" semantic conventions.
+ // It represents the number of times a query was speculatively executed.
+ // Not set or `0` if the query was not executed speculatively.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 0, 2
+ DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
+)
+
+var (
+ // all
+ DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
+ // each_quorum
+ DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
+ // quorum
+ DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
+ // local_quorum
+ DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
+ // one
+ DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
+ // two
+ DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
+ // three
+ DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
+ // local_one
+ DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
+ // any
+ DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
+ // serial
+ DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
+ // local_serial
+ DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
+)
+
+// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the
+// "db.cassandra.coordinator.dc" semantic conventions. It represents the data
+// center of the coordinating node for a query.
+func DBCassandraCoordinatorDC(val string) attribute.KeyValue {
+ return DBCassandraCoordinatorDCKey.String(val)
+}
+
+// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the
+// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of
+// the coordinating node for a query.
+func DBCassandraCoordinatorID(val string) attribute.KeyValue {
+ return DBCassandraCoordinatorIDKey.String(val)
+}
+
+// DBCassandraIdempotence returns an attribute KeyValue conforming to the
+// "db.cassandra.idempotence" semantic conventions. It represents the whether
+// or not the query is idempotent.
+func DBCassandraIdempotence(val bool) attribute.KeyValue {
+ return DBCassandraIdempotenceKey.Bool(val)
+}
+
+// DBCassandraPageSize returns an attribute KeyValue conforming to the
+// "db.cassandra.page_size" semantic conventions. It represents the fetch size
+// used for paging, i.e. how many rows will be returned at once.
+func DBCassandraPageSize(val int) attribute.KeyValue {
+ return DBCassandraPageSizeKey.Int(val)
+}
+
+// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue
+// conforming to the "db.cassandra.speculative_execution_count" semantic
+// conventions. It represents the number of times a query was speculatively
+// executed. Not set or `0` if the query was not executed speculatively.
+func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
+ return DBCassandraSpeculativeExecutionCountKey.Int(val)
+}
+
+// This group defines attributes for Azure Cosmos DB.
+const (
+ // DBCosmosDBClientIDKey is the attribute Key conforming to the
+ // "db.cosmosdb.client_id" semantic conventions. It represents the unique
+ // Cosmos client instance id.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d'
+ DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id")
+
+ // DBCosmosDBConnectionModeKey is the attribute Key conforming to the
+ // "db.cosmosdb.connection_mode" semantic conventions. It represents the
+ // cosmos client connection mode.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode")
+
+ // DBCosmosDBOperationTypeKey is the attribute Key conforming to the
+ // "db.cosmosdb.operation_type" semantic conventions. It represents the
+ // cosmosDB Operation Type.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type")
+
+ // DBCosmosDBRequestChargeKey is the attribute Key conforming to the
+ // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
+ // consumed for that operation
+ //
+ // Type: double
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 46.18, 1.0
+ DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge")
+
+ // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the
+ // "db.cosmosdb.request_content_length" semantic conventions. It represents
+ // the request payload size in bytes
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length")
+
+ // DBCosmosDBStatusCodeKey is the attribute Key conforming to the
+ // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos
+ // DB status code.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 200, 201
+ DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code")
+
+ // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the
+ // "db.cosmosdb.sub_status_code" semantic conventions. It represents the
+ // cosmos DB sub status code.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1000, 1002
+ DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code")
+)
+
+var (
+ // Gateway (HTTP) connections mode
+ DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway")
+ // Direct connection
+ DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct")
+)
+
+var (
+ // invalid
+ DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid")
+ // create
+ DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create")
+ // patch
+ DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch")
+ // read
+ DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read")
+ // read_feed
+ DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed")
+ // delete
+ DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete")
+ // replace
+ DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace")
+ // execute
+ DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute")
+ // query
+ DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query")
+ // head
+ DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head")
+ // head_feed
+ DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed")
+ // upsert
+ DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert")
+ // batch
+ DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch")
+ // query_plan
+ DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan")
+ // execute_javascript
+ DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript")
+)
+
+// DBCosmosDBClientID returns an attribute KeyValue conforming to the
+// "db.cosmosdb.client_id" semantic conventions. It represents the unique
+// Cosmos client instance id.
+func DBCosmosDBClientID(val string) attribute.KeyValue {
+ return DBCosmosDBClientIDKey.String(val)
+}
+
+// DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the
+// "db.cosmosdb.request_charge" semantic conventions. It represents the rU
+// consumed for that operation
+func DBCosmosDBRequestCharge(val float64) attribute.KeyValue {
+ return DBCosmosDBRequestChargeKey.Float64(val)
+}
+
+// DBCosmosDBRequestContentLength returns an attribute KeyValue conforming
+// to the "db.cosmosdb.request_content_length" semantic conventions. It
+// represents the request payload size in bytes
+func DBCosmosDBRequestContentLength(val int) attribute.KeyValue {
+ return DBCosmosDBRequestContentLengthKey.Int(val)
+}
+
+// DBCosmosDBStatusCode returns an attribute KeyValue conforming to the
+// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB
+// status code.
+func DBCosmosDBStatusCode(val int) attribute.KeyValue {
+ return DBCosmosDBStatusCodeKey.Int(val)
+}
+
+// DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the
+// "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos
+// DB sub status code.
+func DBCosmosDBSubStatusCode(val int) attribute.KeyValue {
+ return DBCosmosDBSubStatusCodeKey.Int(val)
+}
+
+// This group defines attributes for Elasticsearch.
+const (
+ // DBElasticsearchClusterNameKey is the attribute Key conforming to the
+ // "db.elasticsearch.cluster.name" semantic conventions. It represents the
+ // represents the identifier of an Elasticsearch cluster.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f'
+ DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name")
+
+ // DBElasticsearchNodeNameKey is the attribute Key conforming to the
+ // "db.elasticsearch.node.name" semantic conventions. It represents the
+ // represents the human-readable identifier of the node/instance to which a
+ // request was routed.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'instance-0000000001'
+ DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name")
+)
+
+// DBElasticsearchClusterName returns an attribute KeyValue conforming to
+// the "db.elasticsearch.cluster.name" semantic conventions. It represents the
+// represents the identifier of an Elasticsearch cluster.
+func DBElasticsearchClusterName(val string) attribute.KeyValue {
+ return DBElasticsearchClusterNameKey.String(val)
+}
+
+// DBElasticsearchNodeName returns an attribute KeyValue conforming to the
+// "db.elasticsearch.node.name" semantic conventions. It represents the
+// represents the human-readable identifier of the node/instance to which a
+// request was routed.
+func DBElasticsearchNodeName(val string) attribute.KeyValue {
+ return DBElasticsearchNodeNameKey.String(val)
+}
+
+// Attributes for software deployments.
+const (
+ // DeploymentEnvironmentKey is the attribute Key conforming to the
+ // "deployment.environment" semantic conventions. It represents the name of
+ // the [deployment
+ // environment](https://wikipedia.org/wiki/Deployment_environment) (aka
+ // deployment tier).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'staging', 'production'
+ // Note: `deployment.environment` does not affect the uniqueness
+ // constraints defined through
+ // the `service.namespace`, `service.name` and `service.instance.id`
+ // resource attributes.
+ // This implies that resources carrying the following attribute
+ // combinations MUST be
+ // considered to be identifying the same service:
+ //
+ // * `service.name=frontend`, `deployment.environment=production`
+ // * `service.name=frontend`, `deployment.environment=staging`.
+ DeploymentEnvironmentKey = attribute.Key("deployment.environment")
+)
+
+// DeploymentEnvironment returns an attribute KeyValue conforming to the
+// "deployment.environment" semantic conventions. It represents the name of the
+// [deployment environment](https://wikipedia.org/wiki/Deployment_environment)
+// (aka deployment tier).
+func DeploymentEnvironment(val string) attribute.KeyValue {
+ return DeploymentEnvironmentKey.String(val)
+}
+
+// Attributes that represents an occurrence of a lifecycle transition on the
+// Android platform.
+const (
+ // AndroidStateKey is the attribute Key conforming to the "android.state"
+ // semantic conventions. It represents the deprecated use the
+ // `device.app.lifecycle` event definition including `android.state` as a
+ // payload field instead.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Note: The Android lifecycle states are defined in [Activity lifecycle
+ // callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc),
+ // and from which the `OS identifiers` are derived.
+ AndroidStateKey = attribute.Key("android.state")
+)
+
+var (
+ // Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time
+ AndroidStateCreated = AndroidStateKey.String("created")
+ // Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state
+ AndroidStateBackground = AndroidStateKey.String("background")
+ // Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states
+ AndroidStateForeground = AndroidStateKey.String("foreground")
+)
+
+// These attributes may be used to describe the receiver of a network
+// exchange/packet. These should be used when there is no client/server
+// relationship between the two sides, or when that relationship is unknown.
+// This covers low-level network interactions (e.g. packet tracing) where you
+// don't know if there was a connection or which side initiated it. This also
+// covers unidirectional UDP flows and peer-to-peer communication where the
+// "user-facing" surface of the protocol / API doesn't expose a clear notion of
+// client and server.
+const (
+ // DestinationAddressKey is the attribute Key conforming to the
+ // "destination.address" semantic conventions. It represents the
+ // destination address - domain name if available without reverse DNS
+ // lookup; otherwise, IP address or Unix domain socket name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock'
+ // Note: When observed from the source side, and when communicating through
+ // an intermediary, `destination.address` SHOULD represent the destination
+ // address behind any intermediaries, for example proxies, if it's
+ // available.
+ DestinationAddressKey = attribute.Key("destination.address")
+
+ // DestinationPortKey is the attribute Key conforming to the
+ // "destination.port" semantic conventions. It represents the destination
+ // port number
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 3389, 2888
+ DestinationPortKey = attribute.Key("destination.port")
+)
+
+// DestinationAddress returns an attribute KeyValue conforming to the
+// "destination.address" semantic conventions. It represents the destination
+// address - domain name if available without reverse DNS lookup; otherwise, IP
+// address or Unix domain socket name.
+func DestinationAddress(val string) attribute.KeyValue {
+ return DestinationAddressKey.String(val)
+}
+
+// DestinationPort returns an attribute KeyValue conforming to the
+// "destination.port" semantic conventions. It represents the destination port
+// number
+func DestinationPort(val int) attribute.KeyValue {
+ return DestinationPortKey.Int(val)
+}
+
+// Describes device attributes.
+const (
+ // DeviceIDKey is the attribute Key conforming to the "device.id" semantic
+ // conventions. It represents a unique identifier representing the device
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092'
+ // Note: The device identifier MUST only be defined using the values
+ // outlined below. This value is not an advertising identifier and MUST NOT
+ // be used as such. On iOS (Swift or Objective-C), this value MUST be equal
+ // to the [vendor
+ // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
+ // On Android (Java or Kotlin), this value MUST be equal to the Firebase
+ // Installation ID or a globally unique UUID which is persisted across
+ // sessions in your application. More information can be found
+ // [here](https://developer.android.com/training/articles/user-data-ids) on
+ // best practices and exact implementation details. Caution should be taken
+ // when storing personal data or anything which can identify a user. GDPR
+ // and data protection laws may apply, ensure you do your own due
+ // diligence.
+ DeviceIDKey = attribute.Key("device.id")
+
+ // DeviceManufacturerKey is the attribute Key conforming to the
+ // "device.manufacturer" semantic conventions. It represents the name of
+ // the device manufacturer
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Apple', 'Samsung'
+ // Note: The Android OS provides this field via
+ // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER).
+ // iOS apps SHOULD hardcode the value `Apple`.
+ DeviceManufacturerKey = attribute.Key("device.manufacturer")
+
+ // DeviceModelIdentifierKey is the attribute Key conforming to the
+ // "device.model.identifier" semantic conventions. It represents the model
+ // identifier for the device
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'iPhone3,4', 'SM-G920F'
+ // Note: It's recommended this value represents a machine-readable version
+ // of the model identifier rather than the market or consumer-friendly name
+ // of the device.
+ DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
+
+ // DeviceModelNameKey is the attribute Key conforming to the
+ // "device.model.name" semantic conventions. It represents the marketing
+ // name for the device model
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6'
+ // Note: It's recommended this value represents a human-readable version of
+ // the device model rather than a machine-readable alternative.
+ DeviceModelNameKey = attribute.Key("device.model.name")
+)
+
+// DeviceID returns an attribute KeyValue conforming to the "device.id"
+// semantic conventions. It represents a unique identifier representing the
+// device
+func DeviceID(val string) attribute.KeyValue {
+ return DeviceIDKey.String(val)
+}
+
+// DeviceManufacturer returns an attribute KeyValue conforming to the
+// "device.manufacturer" semantic conventions. It represents the name of the
+// device manufacturer
+func DeviceManufacturer(val string) attribute.KeyValue {
+ return DeviceManufacturerKey.String(val)
+}
+
+// DeviceModelIdentifier returns an attribute KeyValue conforming to the
+// "device.model.identifier" semantic conventions. It represents the model
+// identifier for the device
+func DeviceModelIdentifier(val string) attribute.KeyValue {
+ return DeviceModelIdentifierKey.String(val)
+}
+
+// DeviceModelName returns an attribute KeyValue conforming to the
+// "device.model.name" semantic conventions. It represents the marketing name
+// for the device model
+func DeviceModelName(val string) attribute.KeyValue {
+ return DeviceModelNameKey.String(val)
+}
+
+// These attributes may be used for any disk related operation.
+const (
+ // DiskIoDirectionKey is the attribute Key conforming to the
+ // "disk.io.direction" semantic conventions. It represents the disk IO
+ // operation direction.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'read'
+ DiskIoDirectionKey = attribute.Key("disk.io.direction")
+)
+
+var (
+ // read
+ DiskIoDirectionRead = DiskIoDirectionKey.String("read")
+ // write
+ DiskIoDirectionWrite = DiskIoDirectionKey.String("write")
+)
+
+// The shared attributes used to report a DNS query.
+const (
+ // DNSQuestionNameKey is the attribute Key conforming to the
+ // "dns.question.name" semantic conventions. It represents the name being
+ // queried.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'www.example.com', 'opentelemetry.io'
+ // Note: If the name field contains non-printable characters (below 32 or
+ // above 126), those characters should be represented as escaped base 10
+ // integers (\DDD). Back slashes and quotes should be escaped. Tabs,
+ // carriage returns, and line feeds should be converted to \t, \r, and \n
+ // respectively.
+ DNSQuestionNameKey = attribute.Key("dns.question.name")
+)
+
+// DNSQuestionName returns an attribute KeyValue conforming to the
+// "dns.question.name" semantic conventions. It represents the name being
+// queried.
+func DNSQuestionName(val string) attribute.KeyValue {
+ return DNSQuestionNameKey.String(val)
+}
+
+// Attributes for operations with an authenticated and/or authorized enduser.
+const (
+ // EnduserIDKey is the attribute Key conforming to the "enduser.id"
+ // semantic conventions. It represents the username or client_id extracted
+ // from the access token or
+ // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header
+ // in the inbound request from outside the system.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'username'
+ EnduserIDKey = attribute.Key("enduser.id")
+
+ // EnduserRoleKey is the attribute Key conforming to the "enduser.role"
+ // semantic conventions. It represents the actual/assumed role the client
+ // is making the request under extracted from token or application security
+ // context.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'admin'
+ EnduserRoleKey = attribute.Key("enduser.role")
+
+ // EnduserScopeKey is the attribute Key conforming to the "enduser.scope"
+ // semantic conventions. It represents the scopes or granted authorities
+ // the client currently possesses extracted from token or application
+ // security context. The value would come from the scope associated with an
+ // [OAuth 2.0 Access
+ // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
+ // value in a [SAML 2.0
+ // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'read:message, write:files'
+ EnduserScopeKey = attribute.Key("enduser.scope")
+)
+
+// EnduserID returns an attribute KeyValue conforming to the "enduser.id"
+// semantic conventions. It represents the username or client_id extracted from
+// the access token or
+// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in
+// the inbound request from outside the system.
+func EnduserID(val string) attribute.KeyValue {
+ return EnduserIDKey.String(val)
+}
+
+// EnduserRole returns an attribute KeyValue conforming to the
+// "enduser.role" semantic conventions. It represents the actual/assumed role
+// the client is making the request under extracted from token or application
+// security context.
+func EnduserRole(val string) attribute.KeyValue {
+ return EnduserRoleKey.String(val)
+}
+
+// EnduserScope returns an attribute KeyValue conforming to the
+// "enduser.scope" semantic conventions. It represents the scopes or granted
+// authorities the client currently possesses extracted from token or
+// application security context. The value would come from the scope associated
+// with an [OAuth 2.0 Access
+// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
+// value in a [SAML 2.0
+// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
+func EnduserScope(val string) attribute.KeyValue {
+ return EnduserScopeKey.String(val)
+}
+
+// The shared attributes used to report an error.
+const (
+ // ErrorTypeKey is the attribute Key conforming to the "error.type"
+ // semantic conventions. It represents the describes a class of error the
+ // operation ended with.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'timeout', 'java.net.UnknownHostException',
+ // 'server_certificate_invalid', '500'
+ // Note: The `error.type` SHOULD be predictable, and SHOULD have low
+ // cardinality.
+ //
+ // When `error.type` is set to a type (e.g., an exception type), its
+ // canonical class name identifying the type within the artifact SHOULD be
+ // used.
+ //
+ // Instrumentations SHOULD document the list of errors they report.
+ //
+ // The cardinality of `error.type` within one instrumentation library
+ // SHOULD be low.
+ // Telemetry consumers that aggregate data from multiple instrumentation
+ // libraries and applications
+ // should be prepared for `error.type` to have high cardinality at query
+ // time when no
+ // additional filters are applied.
+ //
+ // If the operation has completed successfully, instrumentations SHOULD NOT
+ // set `error.type`.
+ //
+ // If a specific domain defines its own set of error identifiers (such as
+ // HTTP or gRPC status codes),
+ // it's RECOMMENDED to:
+ //
+ // * Use a domain-specific attribute
+ // * Set `error.type` to capture all errors, regardless of whether they are
+ // defined within the domain-specific set or not.
+ ErrorTypeKey = attribute.Key("error.type")
+)
+
+var (
+ // A fallback error value to be used when the instrumentation doesn't define a custom value
+ ErrorTypeOther = ErrorTypeKey.String("_OTHER")
+)
+
+// Attributes for Events represented using Log Records.
+const (
+ // EventNameKey is the attribute Key conforming to the "event.name"
+ // semantic conventions. It represents the identifies the class / type of
+ // event.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'browser.mouse.click', 'device.app.lifecycle'
+ // Note: Event names are subject to the same rules as [attribute
+ // names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.33.0/specification/common/attribute-naming.md).
+ // Notably, event names are namespaced to avoid collisions and provide a
+ // clean separation of semantics for events in separate domains like
+ // browser, mobile, and kubernetes.
+ EventNameKey = attribute.Key("event.name")
+)
+
+// EventName returns an attribute KeyValue conforming to the "event.name"
+// semantic conventions. It represents the identifies the class / type of
+// event.
+func EventName(val string) attribute.KeyValue {
+ return EventNameKey.String(val)
+}
+
+// The shared attributes used to report a single exception associated with a
+// span or log.
+const (
+ // ExceptionEscapedKey is the attribute Key conforming to the
+ // "exception.escaped" semantic conventions. It represents the sHOULD be
+ // set to true if the exception event is recorded at a point where it is
+ // known that the exception is escaping the scope of the span.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Note: An exception is considered to have escaped (or left) the scope of
+ // a span,
+ // if that span is ended while the exception is still logically "in
+ // flight".
+ // This may be actually "in flight" in some languages (e.g. if the
+ // exception
+ // is passed to a Context manager's `__exit__` method in Python) but will
+ // usually be caught at the point of recording the exception in most
+ // languages.
+ //
+ // It is usually not possible to determine at the point where an exception
+ // is thrown
+ // whether it will escape the scope of a span.
+ // However, it is trivial to know that an exception
+ // will escape, if one checks for an active exception just before ending
+ // the span,
+ // as done in the [example for recording span
+ // exceptions](https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception).
+ //
+ // It follows that an exception may still escape the scope of the span
+ // even if the `exception.escaped` attribute was not set or set to false,
+ // since the event might have been recorded at a time where it was not
+ // clear whether the exception will escape.
+ ExceptionEscapedKey = attribute.Key("exception.escaped")
+
+ // ExceptionMessageKey is the attribute Key conforming to the
+ // "exception.message" semantic conventions. It represents the exception
+ // message.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Division by zero', "Can't convert 'int' object to str
+ // implicitly"
+ ExceptionMessageKey = attribute.Key("exception.message")
+
+ // ExceptionStacktraceKey is the attribute Key conforming to the
+ // "exception.stacktrace" semantic conventions. It represents a stacktrace
+ // as a string in the natural representation for the language runtime. The
+ // representation is to be determined and documented by each language SIG.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test
+ // exception\\n at '
+ // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
+ // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
+ // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
+ ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
+
+ // ExceptionTypeKey is the attribute Key conforming to the "exception.type"
+ // semantic conventions. It represents the type of the exception (its
+ // fully-qualified class name, if applicable). The dynamic type of the
+ // exception should be preferred over the static type in languages that
+ // support it.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'java.net.ConnectException', 'OSError'
+ ExceptionTypeKey = attribute.Key("exception.type")
+)
+
+// ExceptionEscaped returns an attribute KeyValue conforming to the
+// "exception.escaped" semantic conventions. It represents the sHOULD be set to
+// true if the exception event is recorded at a point where it is known that
+// the exception is escaping the scope of the span.
+func ExceptionEscaped(val bool) attribute.KeyValue {
+ return ExceptionEscapedKey.Bool(val)
+}
+
+// ExceptionMessage returns an attribute KeyValue conforming to the
+// "exception.message" semantic conventions. It represents the exception
+// message.
+func ExceptionMessage(val string) attribute.KeyValue {
+ return ExceptionMessageKey.String(val)
+}
+
+// ExceptionStacktrace returns an attribute KeyValue conforming to the
+// "exception.stacktrace" semantic conventions. It represents a stacktrace as a
+// string in the natural representation for the language runtime. The
+// representation is to be determined and documented by each language SIG.
+func ExceptionStacktrace(val string) attribute.KeyValue {
+ return ExceptionStacktraceKey.String(val)
+}
+
+// ExceptionType returns an attribute KeyValue conforming to the
+// "exception.type" semantic conventions. It represents the type of the
+// exception (its fully-qualified class name, if applicable). The dynamic type
+// of the exception should be preferred over the static type in languages that
+// support it.
+func ExceptionType(val string) attribute.KeyValue {
+ return ExceptionTypeKey.String(val)
+}
+
+// FaaS attributes
+const (
+ // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
+ // semantic conventions. It represents a boolean that is true if the
+ // serverless function is executed for the first time (aka cold-start).
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ FaaSColdstartKey = attribute.Key("faas.coldstart")
+
+ // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
+ // conventions. It represents a string containing the schedule period as
+ // [Cron
+ // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '0/5 * * * ? *'
+ FaaSCronKey = attribute.Key("faas.cron")
+
+ // FaaSDocumentCollectionKey is the attribute Key conforming to the
+ // "faas.document.collection" semantic conventions. It represents the name
+ // of the source on which the triggering operation was performed. For
+ // example, in Cloud Storage or S3 corresponds to the bucket name, and in
+ // Cosmos DB to the database name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'myBucketName', 'myDBName'
+ FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
+
+ // FaaSDocumentNameKey is the attribute Key conforming to the
+ // "faas.document.name" semantic conventions. It represents the document
+ // name/table subjected to the operation. For example, in Cloud Storage or
+ // S3 is the name of the file, and in Cosmos DB the table name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'myFile.txt', 'myTableName'
+ FaaSDocumentNameKey = attribute.Key("faas.document.name")
+
+ // FaaSDocumentOperationKey is the attribute Key conforming to the
+ // "faas.document.operation" semantic conventions. It represents the
+ // describes the type of the operation that was performed on the data.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
+
+ // FaaSDocumentTimeKey is the attribute Key conforming to the
+ // "faas.document.time" semantic conventions. It represents a string
+ // containing the time when the data was accessed in the [ISO
+ // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
+ // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '2020-01-23T13:47:06Z'
+ FaaSDocumentTimeKey = attribute.Key("faas.document.time")
+
+ // FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
+ // semantic conventions. It represents the execution environment ID as a
+ // string, that will be potentially reused for other invocations to the
+ // same function/function version.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de'
+ // Note: * **AWS Lambda:** Use the (full) log stream name.
+ FaaSInstanceKey = attribute.Key("faas.instance")
+
+ // FaaSInvocationIDKey is the attribute Key conforming to the
+ // "faas.invocation_id" semantic conventions. It represents the invocation
+ // ID of the current function invocation.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
+ FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
+
+ // FaaSInvokedNameKey is the attribute Key conforming to the
+ // "faas.invoked_name" semantic conventions. It represents the name of the
+ // invoked function.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'my-function'
+ // Note: SHOULD be equal to the `faas.name` resource attribute of the
+ // invoked function.
+ FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
+
+ // FaaSInvokedProviderKey is the attribute Key conforming to the
+ // "faas.invoked_provider" semantic conventions. It represents the cloud
+ // provider of the invoked function.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
+ // invoked function.
+ FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
+
+ // FaaSInvokedRegionKey is the attribute Key conforming to the
+ // "faas.invoked_region" semantic conventions. It represents the cloud
+ // region of the invoked function.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'eu-central-1'
+ // Note: SHOULD be equal to the `cloud.region` resource attribute of the
+ // invoked function.
+ FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
+
+ // FaaSMaxMemoryKey is the attribute Key conforming to the
+ // "faas.max_memory" semantic conventions. It represents the amount of
+ // memory available to the serverless function converted to Bytes.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 134217728
+ // Note: It's recommended to set this attribute since e.g. too little
+ // memory can easily stop a Java AWS Lambda function from working
+ // correctly. On AWS Lambda, the environment variable
+ // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must
+ // be multiplied by 1,048,576).
+ FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
+
+ // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
+ // conventions. It represents the name of the single function that this
+ // runtime instance executes.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'my-function', 'myazurefunctionapp/some-function-name'
+ // Note: This is the name of the function as configured/deployed on the
+ // FaaS
+ // platform and is usually different from the name of the callback
+ // function (which may be stored in the
+ // [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes)
+ // span attributes).
+ //
+ // For some cloud providers, the above definition is ambiguous. The
+ // following
+ // definition of function name MUST be used for this attribute
+ // (and consequently the span name) for the listed cloud
+ // providers/products:
+ //
+ // * **Azure:** The full name `/`, i.e., function app name
+ // followed by a forward slash followed by the function name (this form
+ // can also be seen in the resource JSON for the function).
+ // This means that a span attribute MUST be used, as an Azure function
+ // app can host multiple functions that would usually share
+ // a TracerProvider (see also the `cloud.resource_id` attribute).
+ FaaSNameKey = attribute.Key("faas.name")
+
+ // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
+ // conventions. It represents a string containing the function invocation
+ // time in the [ISO
+ // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
+ // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '2020-01-23T13:47:06Z'
+ FaaSTimeKey = attribute.Key("faas.time")
+
+ // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
+ // semantic conventions. It represents the type of the trigger which caused
+ // this function invocation.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ FaaSTriggerKey = attribute.Key("faas.trigger")
+
+ // FaaSVersionKey is the attribute Key conforming to the "faas.version"
+ // semantic conventions. It represents the immutable version of the
+ // function being executed.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '26', 'pinkfroid-00002'
+ // Note: Depending on the cloud provider and platform, use:
+ //
+ // * **AWS Lambda:** The [function
+ // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
+ // (an integer represented as a decimal string).
+ // * **Google Cloud Run (Services):** The
+ // [revision](https://cloud.google.com/run/docs/managing/revisions)
+ // (i.e., the function name plus the revision suffix).
+ // * **Google Cloud Functions:** The value of the
+ // [`K_REVISION` environment
+ // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
+ // * **Azure Functions:** Not applicable. Do not set this attribute.
+ FaaSVersionKey = attribute.Key("faas.version")
+)
+
+var (
+ // When a new object is created
+ FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
+ // When an object is modified
+ FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
+ // When an object is deleted
+ FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
+)
+
+var (
+ // Alibaba Cloud
+ FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
+ // Amazon Web Services
+ FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
+ // Microsoft Azure
+ FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
+ // Google Cloud Platform
+ FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
+ // Tencent Cloud
+ FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
+)
+
+var (
+ // A response to some data source operation such as a database or filesystem read/write
+ FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
+ // To provide an answer to an inbound HTTP request
+ FaaSTriggerHTTP = FaaSTriggerKey.String("http")
+ // A function is set to be executed when messages are sent to a messaging system
+ FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
+ // A function is scheduled to be executed regularly
+ FaaSTriggerTimer = FaaSTriggerKey.String("timer")
+ // If none of the others apply
+ FaaSTriggerOther = FaaSTriggerKey.String("other")
+)
+
+// FaaSColdstart returns an attribute KeyValue conforming to the
+// "faas.coldstart" semantic conventions. It represents a boolean that is true
+// if the serverless function is executed for the first time (aka cold-start).
+func FaaSColdstart(val bool) attribute.KeyValue {
+ return FaaSColdstartKey.Bool(val)
+}
+
+// FaaSCron returns an attribute KeyValue conforming to the "faas.cron"
+// semantic conventions. It represents a string containing the schedule period
+// as [Cron
+// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
+func FaaSCron(val string) attribute.KeyValue {
+ return FaaSCronKey.String(val)
+}
+
+// FaaSDocumentCollection returns an attribute KeyValue conforming to the
+// "faas.document.collection" semantic conventions. It represents the name of
+// the source on which the triggering operation was performed. For example, in
+// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
+// database name.
+func FaaSDocumentCollection(val string) attribute.KeyValue {
+ return FaaSDocumentCollectionKey.String(val)
+}
+
+// FaaSDocumentName returns an attribute KeyValue conforming to the
+// "faas.document.name" semantic conventions. It represents the document
+// name/table subjected to the operation. For example, in Cloud Storage or S3
+// is the name of the file, and in Cosmos DB the table name.
+func FaaSDocumentName(val string) attribute.KeyValue {
+ return FaaSDocumentNameKey.String(val)
+}
+
+// FaaSDocumentTime returns an attribute KeyValue conforming to the
+// "faas.document.time" semantic conventions. It represents a string containing
+// the time when the data was accessed in the [ISO
+// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
+// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
+func FaaSDocumentTime(val string) attribute.KeyValue {
+ return FaaSDocumentTimeKey.String(val)
+}
+
+// FaaSInstance returns an attribute KeyValue conforming to the
+// "faas.instance" semantic conventions. It represents the execution
+// environment ID as a string, that will be potentially reused for other
+// invocations to the same function/function version.
+func FaaSInstance(val string) attribute.KeyValue {
+ return FaaSInstanceKey.String(val)
+}
+
+// FaaSInvocationID returns an attribute KeyValue conforming to the
+// "faas.invocation_id" semantic conventions. It represents the invocation ID
+// of the current function invocation.
+func FaaSInvocationID(val string) attribute.KeyValue {
+ return FaaSInvocationIDKey.String(val)
+}
+
+// FaaSInvokedName returns an attribute KeyValue conforming to the
+// "faas.invoked_name" semantic conventions. It represents the name of the
+// invoked function.
+func FaaSInvokedName(val string) attribute.KeyValue {
+ return FaaSInvokedNameKey.String(val)
+}
+
+// FaaSInvokedRegion returns an attribute KeyValue conforming to the
+// "faas.invoked_region" semantic conventions. It represents the cloud region
+// of the invoked function.
+func FaaSInvokedRegion(val string) attribute.KeyValue {
+ return FaaSInvokedRegionKey.String(val)
+}
+
+// FaaSMaxMemory returns an attribute KeyValue conforming to the
+// "faas.max_memory" semantic conventions. It represents the amount of memory
+// available to the serverless function converted to Bytes.
+func FaaSMaxMemory(val int) attribute.KeyValue {
+ return FaaSMaxMemoryKey.Int(val)
+}
+
+// FaaSName returns an attribute KeyValue conforming to the "faas.name"
+// semantic conventions. It represents the name of the single function that
+// this runtime instance executes.
+func FaaSName(val string) attribute.KeyValue {
+ return FaaSNameKey.String(val)
+}
+
+// FaaSTime returns an attribute KeyValue conforming to the "faas.time"
+// semantic conventions. It represents a string containing the function
+// invocation time in the [ISO
+// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
+// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
+func FaaSTime(val string) attribute.KeyValue {
+ return FaaSTimeKey.String(val)
+}
+
+// FaaSVersion returns an attribute KeyValue conforming to the
+// "faas.version" semantic conventions. It represents the immutable version of
+// the function being executed.
+func FaaSVersion(val string) attribute.KeyValue {
+ return FaaSVersionKey.String(val)
+}
+
+// Attributes for Feature Flags.
+const (
+ // FeatureFlagKeyKey is the attribute Key conforming to the
+ // "feature_flag.key" semantic conventions. It represents the unique
+ // identifier of the feature flag.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'logo-color'
+ FeatureFlagKeyKey = attribute.Key("feature_flag.key")
+
+ // FeatureFlagProviderNameKey is the attribute Key conforming to the
+ // "feature_flag.provider_name" semantic conventions. It represents the
+ // name of the service provider that performs the flag evaluation.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Flag Manager'
+ FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name")
+
+ // FeatureFlagVariantKey is the attribute Key conforming to the
+ // "feature_flag.variant" semantic conventions. It represents the sHOULD be
+ // a semantic identifier for a value. If one is unavailable, a stringified
+ // version of the value can be used.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'red', 'true', 'on'
+ // Note: A semantic identifier, commonly referred to as a variant, provides
+ // a means
+ // for referring to a value without including the value itself. This can
+ // provide additional context for understanding the meaning behind a value.
+ // For example, the variant `red` maybe be used for the value `#c05543`.
+ //
+ // A stringified version of the value can be used in situations where a
+ // semantic identifier is unavailable. String representation of the value
+ // should be determined by the implementer.
+ FeatureFlagVariantKey = attribute.Key("feature_flag.variant")
+)
+
+// FeatureFlagKey returns an attribute KeyValue conforming to the
+// "feature_flag.key" semantic conventions. It represents the unique identifier
+// of the feature flag.
+func FeatureFlagKey(val string) attribute.KeyValue {
+ return FeatureFlagKeyKey.String(val)
+}
+
+// FeatureFlagProviderName returns an attribute KeyValue conforming to the
+// "feature_flag.provider_name" semantic conventions. It represents the name of
+// the service provider that performs the flag evaluation.
+func FeatureFlagProviderName(val string) attribute.KeyValue {
+ return FeatureFlagProviderNameKey.String(val)
+}
+
+// FeatureFlagVariant returns an attribute KeyValue conforming to the
+// "feature_flag.variant" semantic conventions. It represents the sHOULD be a
+// semantic identifier for a value. If one is unavailable, a stringified
+// version of the value can be used.
+func FeatureFlagVariant(val string) attribute.KeyValue {
+ return FeatureFlagVariantKey.String(val)
+}
+
+// Describes file attributes.
+const (
+ // FileDirectoryKey is the attribute Key conforming to the "file.directory"
+ // semantic conventions. It represents the directory where the file is
+ // located. It should include the drive letter, when appropriate.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '/home/user', 'C:\\Program Files\\MyApp'
+ FileDirectoryKey = attribute.Key("file.directory")
+
+ // FileExtensionKey is the attribute Key conforming to the "file.extension"
+ // semantic conventions. It represents the file extension, excluding the
+ // leading dot.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'png', 'gz'
+ // Note: When the file name has multiple extensions (example.tar.gz), only
+ // the last one should be captured ("gz", not "tar.gz").
+ FileExtensionKey = attribute.Key("file.extension")
+
+ // FileNameKey is the attribute Key conforming to the "file.name" semantic
+ // conventions. It represents the name of the file including the extension,
+ // without the directory.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'example.png'
+ FileNameKey = attribute.Key("file.name")
+
+ // FilePathKey is the attribute Key conforming to the "file.path" semantic
+ // conventions. It represents the full path to the file, including the file
+ // name. It should include the drive letter, when appropriate.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '/home/alice/example.png', 'C:\\Program
+ // Files\\MyApp\\myapp.exe'
+ FilePathKey = attribute.Key("file.path")
+
+ // FileSizeKey is the attribute Key conforming to the "file.size" semantic
+ // conventions. It represents the file size in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ FileSizeKey = attribute.Key("file.size")
+)
+
+// FileDirectory returns an attribute KeyValue conforming to the
+// "file.directory" semantic conventions. It represents the directory where the
+// file is located. It should include the drive letter, when appropriate.
+func FileDirectory(val string) attribute.KeyValue {
+ return FileDirectoryKey.String(val)
+}
+
+// FileExtension returns an attribute KeyValue conforming to the
+// "file.extension" semantic conventions. It represents the file extension,
+// excluding the leading dot.
+func FileExtension(val string) attribute.KeyValue {
+ return FileExtensionKey.String(val)
+}
+
+// FileName returns an attribute KeyValue conforming to the "file.name"
+// semantic conventions. It represents the name of the file including the
+// extension, without the directory.
+func FileName(val string) attribute.KeyValue {
+ return FileNameKey.String(val)
+}
+
+// FilePath returns an attribute KeyValue conforming to the "file.path"
+// semantic conventions. It represents the full path to the file, including the
+// file name. It should include the drive letter, when appropriate.
+func FilePath(val string) attribute.KeyValue {
+ return FilePathKey.String(val)
+}
+
+// FileSize returns an attribute KeyValue conforming to the "file.size"
+// semantic conventions. It represents the file size in bytes.
+func FileSize(val int) attribute.KeyValue {
+ return FileSizeKey.Int(val)
+}
+
+// Attributes for Google Cloud Run.
+const (
+ // GCPCloudRunJobExecutionKey is the attribute Key conforming to the
+ // "gcp.cloud_run.job.execution" semantic conventions. It represents the
+ // name of the Cloud Run
+ // [execution](https://cloud.google.com/run/docs/managing/job-executions)
+ // being run for the Job, as set by the
+ // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
+ // environment variable.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'job-name-xxxx', 'sample-job-mdw84'
+ GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution")
+
+ // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the
+ // "gcp.cloud_run.job.task_index" semantic conventions. It represents the
+ // index for a task within an execution as provided by the
+ // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
+ // environment variable.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 0, 1
+ GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index")
+)
+
+// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the
+// "gcp.cloud_run.job.execution" semantic conventions. It represents the name
+// of the Cloud Run
+// [execution](https://cloud.google.com/run/docs/managing/job-executions) being
+// run for the Job, as set by the
+// [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
+// environment variable.
+func GCPCloudRunJobExecution(val string) attribute.KeyValue {
+ return GCPCloudRunJobExecutionKey.String(val)
+}
+
+// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the
+// "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
+// for a task within an execution as provided by the
+// [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
+// environment variable.
+func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {
+ return GCPCloudRunJobTaskIndexKey.Int(val)
+}
+
+// Attributes for Google Compute Engine (GCE).
+const (
+ // GCPGceInstanceHostnameKey is the attribute Key conforming to the
+ // "gcp.gce.instance.hostname" semantic conventions. It represents the
+ // hostname of a GCE instance. This is the full value of the default or
+ // [custom
+ // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'my-host1234.example.com',
+ // 'sample-vm.us-west1-b.c.my-project.internal'
+ GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname")
+
+ // GCPGceInstanceNameKey is the attribute Key conforming to the
+ // "gcp.gce.instance.name" semantic conventions. It represents the instance
+ // name of a GCE instance. This is the value provided by `host.name`, the
+ // visible name of the instance in the Cloud Console UI, and the prefix for
+ // the default hostname of the instance as defined by the [default internal
+ // DNS
+ // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'instance-1', 'my-vm-name'
+ GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name")
+)
+
+// GCPGceInstanceHostname returns an attribute KeyValue conforming to the
+// "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
+// of a GCE instance. This is the full value of the default or [custom
+// hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
+func GCPGceInstanceHostname(val string) attribute.KeyValue {
+ return GCPGceInstanceHostnameKey.String(val)
+}
+
+// GCPGceInstanceName returns an attribute KeyValue conforming to the
+// "gcp.gce.instance.name" semantic conventions. It represents the instance
+// name of a GCE instance. This is the value provided by `host.name`, the
+// visible name of the instance in the Cloud Console UI, and the prefix for the
+// default hostname of the instance as defined by the [default internal DNS
+// name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
+func GCPGceInstanceName(val string) attribute.KeyValue {
+ return GCPGceInstanceNameKey.String(val)
+}
+
+// The attributes used to describe telemetry in the context of LLM (Large
+// Language Models) requests and responses.
+const (
+ // GenAiCompletionKey is the attribute Key conforming to the
+ // "gen_ai.completion" semantic conventions. It represents the full
+ // response received from the LLM.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: "[{'role': 'assistant', 'content': 'The capital of France is
+ // Paris.'}]"
+ // Note: It's RECOMMENDED to format completions as JSON string matching
+ // [OpenAI messages
+ // format](https://platform.openai.com/docs/guides/text-generation)
+ GenAiCompletionKey = attribute.Key("gen_ai.completion")
+
+ // GenAiPromptKey is the attribute Key conforming to the "gen_ai.prompt"
+ // semantic conventions. It represents the full prompt sent to an LLM.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: "[{'role': 'user', 'content': 'What is the capital of
+ // France?'}]"
+ // Note: It's RECOMMENDED to format prompts as JSON string matching [OpenAI
+ // messages
+ // format](https://platform.openai.com/docs/guides/text-generation)
+ GenAiPromptKey = attribute.Key("gen_ai.prompt")
+
+ // GenAiRequestMaxTokensKey is the attribute Key conforming to the
+ // "gen_ai.request.max_tokens" semantic conventions. It represents the
+ // maximum number of tokens the LLM generates for a request.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 100
+ GenAiRequestMaxTokensKey = attribute.Key("gen_ai.request.max_tokens")
+
+ // GenAiRequestModelKey is the attribute Key conforming to the
+ // "gen_ai.request.model" semantic conventions. It represents the name of
+ // the LLM a request is being made to.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'gpt-4'
+ GenAiRequestModelKey = attribute.Key("gen_ai.request.model")
+
+ // GenAiRequestTemperatureKey is the attribute Key conforming to the
+ // "gen_ai.request.temperature" semantic conventions. It represents the
+ // temperature setting for the LLM request.
+ //
+ // Type: double
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 0.0
+ GenAiRequestTemperatureKey = attribute.Key("gen_ai.request.temperature")
+
+ // GenAiRequestTopPKey is the attribute Key conforming to the
+ // "gen_ai.request.top_p" semantic conventions. It represents the top_p
+ // sampling setting for the LLM request.
+ //
+ // Type: double
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1.0
+ GenAiRequestTopPKey = attribute.Key("gen_ai.request.top_p")
+
+ // GenAiResponseFinishReasonsKey is the attribute Key conforming to the
+ // "gen_ai.response.finish_reasons" semantic conventions. It represents the
+ // array of reasons the model stopped generating tokens, corresponding to
+ // each generation received.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'stop'
+ GenAiResponseFinishReasonsKey = attribute.Key("gen_ai.response.finish_reasons")
+
+ // GenAiResponseIDKey is the attribute Key conforming to the
+ // "gen_ai.response.id" semantic conventions. It represents the unique
+ // identifier for the completion.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'chatcmpl-123'
+ GenAiResponseIDKey = attribute.Key("gen_ai.response.id")
+
+ // GenAiResponseModelKey is the attribute Key conforming to the
+ // "gen_ai.response.model" semantic conventions. It represents the name of
+ // the LLM a response was generated from.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'gpt-4-0613'
+ GenAiResponseModelKey = attribute.Key("gen_ai.response.model")
+
+ // GenAiSystemKey is the attribute Key conforming to the "gen_ai.system"
+ // semantic conventions. It represents the Generative AI product as
+ // identified by the client instrumentation.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'openai'
+ // Note: The actual GenAI product may differ from the one identified by the
+ // client. For example, when using OpenAI client libraries to communicate
+ // with Mistral, the `gen_ai.system` is set to `openai` based on the
+ // instrumentation's best knowledge.
+ GenAiSystemKey = attribute.Key("gen_ai.system")
+
+ // GenAiUsageCompletionTokensKey is the attribute Key conforming to the
+ // "gen_ai.usage.completion_tokens" semantic conventions. It represents the
+ // number of tokens used in the LLM response (completion).
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 180
+ GenAiUsageCompletionTokensKey = attribute.Key("gen_ai.usage.completion_tokens")
+
+ // GenAiUsagePromptTokensKey is the attribute Key conforming to the
+ // "gen_ai.usage.prompt_tokens" semantic conventions. It represents the
+ // number of tokens used in the LLM prompt.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 100
+ GenAiUsagePromptTokensKey = attribute.Key("gen_ai.usage.prompt_tokens")
+)
+
+var (
+ // OpenAI
+ GenAiSystemOpenai = GenAiSystemKey.String("openai")
+)
+
+// GenAiCompletion returns an attribute KeyValue conforming to the
+// "gen_ai.completion" semantic conventions. It represents the full response
+// received from the LLM.
+func GenAiCompletion(val string) attribute.KeyValue {
+ return GenAiCompletionKey.String(val)
+}
+
+// GenAiPrompt returns an attribute KeyValue conforming to the
+// "gen_ai.prompt" semantic conventions. It represents the full prompt sent to
+// an LLM.
+func GenAiPrompt(val string) attribute.KeyValue {
+ return GenAiPromptKey.String(val)
+}
+
+// GenAiRequestMaxTokens returns an attribute KeyValue conforming to the
+// "gen_ai.request.max_tokens" semantic conventions. It represents the maximum
+// number of tokens the LLM generates for a request.
+func GenAiRequestMaxTokens(val int) attribute.KeyValue {
+ return GenAiRequestMaxTokensKey.Int(val)
+}
+
+// GenAiRequestModel returns an attribute KeyValue conforming to the
+// "gen_ai.request.model" semantic conventions. It represents the name of the
+// LLM a request is being made to.
+func GenAiRequestModel(val string) attribute.KeyValue {
+ return GenAiRequestModelKey.String(val)
+}
+
+// GenAiRequestTemperature returns an attribute KeyValue conforming to the
+// "gen_ai.request.temperature" semantic conventions. It represents the
+// temperature setting for the LLM request.
+func GenAiRequestTemperature(val float64) attribute.KeyValue {
+ return GenAiRequestTemperatureKey.Float64(val)
+}
+
+// GenAiRequestTopP returns an attribute KeyValue conforming to the
+// "gen_ai.request.top_p" semantic conventions. It represents the top_p
+// sampling setting for the LLM request.
+func GenAiRequestTopP(val float64) attribute.KeyValue {
+ return GenAiRequestTopPKey.Float64(val)
+}
+
+// GenAiResponseFinishReasons returns an attribute KeyValue conforming to
+// the "gen_ai.response.finish_reasons" semantic conventions. It represents the
+// array of reasons the model stopped generating tokens, corresponding to each
+// generation received.
+func GenAiResponseFinishReasons(val ...string) attribute.KeyValue {
+ return GenAiResponseFinishReasonsKey.StringSlice(val)
+}
+
+// GenAiResponseID returns an attribute KeyValue conforming to the
+// "gen_ai.response.id" semantic conventions. It represents the unique
+// identifier for the completion.
+func GenAiResponseID(val string) attribute.KeyValue {
+ return GenAiResponseIDKey.String(val)
+}
+
+// GenAiResponseModel returns an attribute KeyValue conforming to the
+// "gen_ai.response.model" semantic conventions. It represents the name of the
+// LLM a response was generated from.
+func GenAiResponseModel(val string) attribute.KeyValue {
+ return GenAiResponseModelKey.String(val)
+}
+
+// GenAiUsageCompletionTokens returns an attribute KeyValue conforming to
+// the "gen_ai.usage.completion_tokens" semantic conventions. It represents the
+// number of tokens used in the LLM response (completion).
+func GenAiUsageCompletionTokens(val int) attribute.KeyValue {
+ return GenAiUsageCompletionTokensKey.Int(val)
+}
+
+// GenAiUsagePromptTokens returns an attribute KeyValue conforming to the
+// "gen_ai.usage.prompt_tokens" semantic conventions. It represents the number
+// of tokens used in the LLM prompt.
+func GenAiUsagePromptTokens(val int) attribute.KeyValue {
+ return GenAiUsagePromptTokensKey.Int(val)
+}
+
+// Attributes for GraphQL.
+const (
+ // GraphqlDocumentKey is the attribute Key conforming to the
+ // "graphql.document" semantic conventions. It represents the GraphQL
+ // document being executed.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'query findBookByID { bookByID(id: ?) { name } }'
+ // Note: The value may be sanitized to exclude sensitive information.
+ GraphqlDocumentKey = attribute.Key("graphql.document")
+
+ // GraphqlOperationNameKey is the attribute Key conforming to the
+ // "graphql.operation.name" semantic conventions. It represents the name of
+ // the operation being executed.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'findBookByID'
+ GraphqlOperationNameKey = attribute.Key("graphql.operation.name")
+
+ // GraphqlOperationTypeKey is the attribute Key conforming to the
+ // "graphql.operation.type" semantic conventions. It represents the type of
+ // the operation being executed.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'query', 'mutation', 'subscription'
+ GraphqlOperationTypeKey = attribute.Key("graphql.operation.type")
+)
+
+var (
+ // GraphQL query
+ GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query")
+ // GraphQL mutation
+ GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation")
+ // GraphQL subscription
+ GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription")
+)
+
+// GraphqlDocument returns an attribute KeyValue conforming to the
+// "graphql.document" semantic conventions. It represents the GraphQL document
+// being executed.
+func GraphqlDocument(val string) attribute.KeyValue {
+ return GraphqlDocumentKey.String(val)
+}
+
+// GraphqlOperationName returns an attribute KeyValue conforming to the
+// "graphql.operation.name" semantic conventions. It represents the name of the
+// operation being executed.
+func GraphqlOperationName(val string) attribute.KeyValue {
+ return GraphqlOperationNameKey.String(val)
+}
+
+// Attributes for the Android platform on which the Android application is
+// running.
+const (
+ // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id"
+ // semantic conventions. It represents the unique identifier for the
+ // application
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da'
+ HerokuAppIDKey = attribute.Key("heroku.app.id")
+
+ // HerokuReleaseCommitKey is the attribute Key conforming to the
+ // "heroku.release.commit" semantic conventions. It represents the commit
+ // hash for the current release
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec'
+ HerokuReleaseCommitKey = attribute.Key("heroku.release.commit")
+
+ // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the
+ // "heroku.release.creation_timestamp" semantic conventions. It represents
+ // the time and date the release was created
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '2022-10-23T18:00:42Z'
+ HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp")
+)
+
+// HerokuAppID returns an attribute KeyValue conforming to the
+// "heroku.app.id" semantic conventions. It represents the unique identifier
+// for the application
+func HerokuAppID(val string) attribute.KeyValue {
+ return HerokuAppIDKey.String(val)
+}
+
+// HerokuReleaseCommit returns an attribute KeyValue conforming to the
+// "heroku.release.commit" semantic conventions. It represents the commit hash
+// for the current release
+func HerokuReleaseCommit(val string) attribute.KeyValue {
+ return HerokuReleaseCommitKey.String(val)
+}
+
+// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming
+// to the "heroku.release.creation_timestamp" semantic conventions. It
+// represents the time and date the release was created
+func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue {
+ return HerokuReleaseCreationTimestampKey.String(val)
+}
+
+// A host is defined as a computing instance. For example, physical servers,
+// virtual machines, switches or disk array.
+const (
+ // HostArchKey is the attribute Key conforming to the "host.arch" semantic
+ // conventions. It represents the CPU architecture the host system is
+ // running on.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ HostArchKey = attribute.Key("host.arch")
+
+ // HostCPUCacheL2SizeKey is the attribute Key conforming to the
+ // "host.cpu.cache.l2.size" semantic conventions. It represents the amount
+ // of level 2 memory cache available to the processor (in Bytes).
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 12288000
+ HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size")
+
+ // HostCPUFamilyKey is the attribute Key conforming to the
+ // "host.cpu.family" semantic conventions. It represents the family or
+ // generation of the CPU.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '6', 'PA-RISC 1.1e'
+ HostCPUFamilyKey = attribute.Key("host.cpu.family")
+
+ // HostCPUModelIDKey is the attribute Key conforming to the
+ // "host.cpu.model.id" semantic conventions. It represents the model
+ // identifier. It provides more granular information about the CPU,
+ // distinguishing it from other CPUs within the same family.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '6', '9000/778/B180L'
+ HostCPUModelIDKey = attribute.Key("host.cpu.model.id")
+
+ // HostCPUModelNameKey is the attribute Key conforming to the
+ // "host.cpu.model.name" semantic conventions. It represents the model
+ // designation of the processor.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz'
+ HostCPUModelNameKey = attribute.Key("host.cpu.model.name")
+
+ // HostCPUSteppingKey is the attribute Key conforming to the
+ // "host.cpu.stepping" semantic conventions. It represents the stepping or
+ // core revisions.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '1', 'r1p1'
+ HostCPUSteppingKey = attribute.Key("host.cpu.stepping")
+
+ // HostCPUVendorIDKey is the attribute Key conforming to the
+ // "host.cpu.vendor.id" semantic conventions. It represents the processor
+ // manufacturer identifier. A maximum 12-character string.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'GenuineIntel'
+ // Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor
+ // ID string in EBX, EDX and ECX registers. Writing these to memory in this
+ // order results in a 12-character string.
+ HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id")
+
+ // HostIDKey is the attribute Key conforming to the "host.id" semantic
+ // conventions. It represents the unique host ID. For Cloud, this must be
+ // the instance_id assigned by the cloud provider. For non-containerized
+ // systems, this should be the `machine-id`. See the table below for the
+ // sources to use to determine the `machine-id` based on operating system.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'fdbf79e8af94cb7f9e8df36789187052'
+ HostIDKey = attribute.Key("host.id")
+
+ // HostImageIDKey is the attribute Key conforming to the "host.image.id"
+ // semantic conventions. It represents the vM image ID or host OS image ID.
+ // For Cloud, this value is from the provider.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'ami-07b06b442921831e5'
+ HostImageIDKey = attribute.Key("host.image.id")
+
+ // HostImageNameKey is the attribute Key conforming to the
+ // "host.image.name" semantic conventions. It represents the name of the VM
+ // image or OS install the host was instantiated from.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905'
+ HostImageNameKey = attribute.Key("host.image.name")
+
+ // HostImageVersionKey is the attribute Key conforming to the
+ // "host.image.version" semantic conventions. It represents the version
+ // string of the VM image or host OS as defined in [Version
+ // Attributes](/docs/resource/README.md#version-attributes).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '0.1'
+ HostImageVersionKey = attribute.Key("host.image.version")
+
+ // HostIPKey is the attribute Key conforming to the "host.ip" semantic
+ // conventions. It represents the available IP addresses of the host,
+ // excluding loopback interfaces.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e'
+ // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6
+ // addresses MUST be specified in the [RFC
+ // 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.
+ HostIPKey = attribute.Key("host.ip")
+
+ // HostMacKey is the attribute Key conforming to the "host.mac" semantic
+ // conventions. It represents the available MAC addresses of the host,
+ // excluding loopback interfaces.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F'
+ // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal
+ // form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf):
+ // as hyphen-separated octets in uppercase hexadecimal form from most to
+ // least significant.
+ HostMacKey = attribute.Key("host.mac")
+
+ // HostNameKey is the attribute Key conforming to the "host.name" semantic
+ // conventions. It represents the name of the host. On Unix systems, it may
+ // contain what the hostname command returns, or the fully qualified
+ // hostname, or another name specified by the user.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry-test'
+ HostNameKey = attribute.Key("host.name")
+
+ // HostTypeKey is the attribute Key conforming to the "host.type" semantic
+ // conventions. It represents the type of host. For Cloud, this must be the
+ // machine type.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'n1-standard-1'
+ HostTypeKey = attribute.Key("host.type")
+)
+
+var (
+ // AMD64
+ HostArchAMD64 = HostArchKey.String("amd64")
+ // ARM32
+ HostArchARM32 = HostArchKey.String("arm32")
+ // ARM64
+ HostArchARM64 = HostArchKey.String("arm64")
+ // Itanium
+ HostArchIA64 = HostArchKey.String("ia64")
+ // 32-bit PowerPC
+ HostArchPPC32 = HostArchKey.String("ppc32")
+ // 64-bit PowerPC
+ HostArchPPC64 = HostArchKey.String("ppc64")
+ // IBM z/Architecture
+ HostArchS390x = HostArchKey.String("s390x")
+ // 32-bit x86
+ HostArchX86 = HostArchKey.String("x86")
+)
+
+// HostCPUCacheL2Size returns an attribute KeyValue conforming to the
+// "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
+// level 2 memory cache available to the processor (in Bytes).
+func HostCPUCacheL2Size(val int) attribute.KeyValue {
+ return HostCPUCacheL2SizeKey.Int(val)
+}
+
+// HostCPUFamily returns an attribute KeyValue conforming to the
+// "host.cpu.family" semantic conventions. It represents the family or
+// generation of the CPU.
+func HostCPUFamily(val string) attribute.KeyValue {
+ return HostCPUFamilyKey.String(val)
+}
+
+// HostCPUModelID returns an attribute KeyValue conforming to the
+// "host.cpu.model.id" semantic conventions. It represents the model
+// identifier. It provides more granular information about the CPU,
+// distinguishing it from other CPUs within the same family.
+func HostCPUModelID(val string) attribute.KeyValue {
+ return HostCPUModelIDKey.String(val)
+}
+
+// HostCPUModelName returns an attribute KeyValue conforming to the
+// "host.cpu.model.name" semantic conventions. It represents the model
+// designation of the processor.
+func HostCPUModelName(val string) attribute.KeyValue {
+ return HostCPUModelNameKey.String(val)
+}
+
+// HostCPUStepping returns an attribute KeyValue conforming to the
+// "host.cpu.stepping" semantic conventions. It represents the stepping or core
+// revisions.
+func HostCPUStepping(val string) attribute.KeyValue {
+ return HostCPUSteppingKey.String(val)
+}
+
+// HostCPUVendorID returns an attribute KeyValue conforming to the
+// "host.cpu.vendor.id" semantic conventions. It represents the processor
+// manufacturer identifier. A maximum 12-character string.
+func HostCPUVendorID(val string) attribute.KeyValue {
+ return HostCPUVendorIDKey.String(val)
+}
+
+// HostID returns an attribute KeyValue conforming to the "host.id" semantic
+// conventions. It represents the unique host ID. For Cloud, this must be the
+// instance_id assigned by the cloud provider. For non-containerized systems,
+// this should be the `machine-id`. See the table below for the sources to use
+// to determine the `machine-id` based on operating system.
+func HostID(val string) attribute.KeyValue {
+ return HostIDKey.String(val)
+}
+
+// HostImageID returns an attribute KeyValue conforming to the
+// "host.image.id" semantic conventions. It represents the vM image ID or host
+// OS image ID. For Cloud, this value is from the provider.
+func HostImageID(val string) attribute.KeyValue {
+ return HostImageIDKey.String(val)
+}
+
+// HostImageName returns an attribute KeyValue conforming to the
+// "host.image.name" semantic conventions. It represents the name of the VM
+// image or OS install the host was instantiated from.
+func HostImageName(val string) attribute.KeyValue {
+ return HostImageNameKey.String(val)
+}
+
+// HostImageVersion returns an attribute KeyValue conforming to the
+// "host.image.version" semantic conventions. It represents the version string
+// of the VM image or host OS as defined in [Version
+// Attributes](/docs/resource/README.md#version-attributes).
+func HostImageVersion(val string) attribute.KeyValue {
+ return HostImageVersionKey.String(val)
+}
+
+// HostIP returns an attribute KeyValue conforming to the "host.ip" semantic
+// conventions. It represents the available IP addresses of the host, excluding
+// loopback interfaces.
+func HostIP(val ...string) attribute.KeyValue {
+ return HostIPKey.StringSlice(val)
+}
+
+// HostMac returns an attribute KeyValue conforming to the "host.mac"
+// semantic conventions. It represents the available MAC addresses of the host,
+// excluding loopback interfaces.
+func HostMac(val ...string) attribute.KeyValue {
+ return HostMacKey.StringSlice(val)
+}
+
+// HostName returns an attribute KeyValue conforming to the "host.name"
+// semantic conventions. It represents the name of the host. On Unix systems,
+// it may contain what the hostname command returns, or the fully qualified
+// hostname, or another name specified by the user.
+func HostName(val string) attribute.KeyValue {
+ return HostNameKey.String(val)
+}
+
+// HostType returns an attribute KeyValue conforming to the "host.type"
+// semantic conventions. It represents the type of host. For Cloud, this must
+// be the machine type.
+func HostType(val string) attribute.KeyValue {
+ return HostTypeKey.String(val)
+}
+
+// Semantic convention attributes in the HTTP namespace.
+const (
+ // HTTPConnectionStateKey is the attribute Key conforming to the
+ // "http.connection.state" semantic conventions. It represents the state of
+ // the HTTP connection in the HTTP connection pool.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'active', 'idle'
+ HTTPConnectionStateKey = attribute.Key("http.connection.state")
+
+ // HTTPRequestBodySizeKey is the attribute Key conforming to the
+ // "http.request.body.size" semantic conventions. It represents the size of
+ // the request payload body in bytes. This is the number of bytes
+ // transferred excluding headers and is often, but not always, present as
+ // the
+ // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
+ // header. For requests using transport encoding, this should be the
+ // compressed size.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 3495
+ HTTPRequestBodySizeKey = attribute.Key("http.request.body.size")
+
+ // HTTPRequestMethodKey is the attribute Key conforming to the
+ // "http.request.method" semantic conventions. It represents the hTTP
+ // request method.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'GET', 'POST', 'HEAD'
+ // Note: HTTP request method value SHOULD be "known" to the
+ // instrumentation.
+ // By default, this convention defines "known" methods as the ones listed
+ // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
+ // and the PATCH method defined in
+ // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).
+ //
+ // If the HTTP request method is not known to instrumentation, it MUST set
+ // the `http.request.method` attribute to `_OTHER`.
+ //
+ // If the HTTP instrumentation could end up converting valid HTTP request
+ // methods to `_OTHER`, then it MUST provide a way to override
+ // the list of known HTTP methods. If this override is done via environment
+ // variable, then the environment variable MUST be named
+ // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated
+ // list of case-sensitive known HTTP methods
+ // (this list MUST be a full override of the default known method, it is
+ // not a list of known methods in addition to the defaults).
+ //
+ // HTTP method names are case-sensitive and `http.request.method` attribute
+ // value MUST match a known HTTP method name exactly.
+ // Instrumentations for specific web frameworks that consider HTTP methods
+ // to be case insensitive, SHOULD populate a canonical equivalent.
+ // Tracing instrumentations that do so, MUST also set
+ // `http.request.method_original` to the original value.
+ HTTPRequestMethodKey = attribute.Key("http.request.method")
+
+ // HTTPRequestMethodOriginalKey is the attribute Key conforming to the
+ // "http.request.method_original" semantic conventions. It represents the
+ // original HTTP method sent by the client in the request line.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'GeT', 'ACL', 'foo'
+ HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original")
+
+ // HTTPRequestResendCountKey is the attribute Key conforming to the
+ // "http.request.resend_count" semantic conventions. It represents the
+ // ordinal number of request resending attempt (for any reason, including
+ // redirects).
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 3
+ // Note: The resend count SHOULD be updated each time an HTTP request gets
+ // resent by the client, regardless of what was the cause of the resending
+ // (e.g. redirection, authorization failure, 503 Server Unavailable,
+ // network issues, or any other).
+ HTTPRequestResendCountKey = attribute.Key("http.request.resend_count")
+
+ // HTTPRequestSizeKey is the attribute Key conforming to the
+ // "http.request.size" semantic conventions. It represents the total size
+ // of the request in bytes. This should be the total number of bytes sent
+ // over the wire, including the request line (HTTP/1.1), framing (HTTP/2
+ // and HTTP/3), headers, and request body if any.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1437
+ HTTPRequestSizeKey = attribute.Key("http.request.size")
+
+ // HTTPResponseBodySizeKey is the attribute Key conforming to the
+ // "http.response.body.size" semantic conventions. It represents the size
+ // of the response payload body in bytes. This is the number of bytes
+ // transferred excluding headers and is often, but not always, present as
+ // the
+ // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
+ // header. For requests using transport encoding, this should be the
+ // compressed size.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 3495
+ HTTPResponseBodySizeKey = attribute.Key("http.response.body.size")
+
+ // HTTPResponseSizeKey is the attribute Key conforming to the
+ // "http.response.size" semantic conventions. It represents the total size
+ // of the response in bytes. This should be the total number of bytes sent
+ // over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and
+ // HTTP/3), headers, and response body and trailers if any.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1437
+ HTTPResponseSizeKey = attribute.Key("http.response.size")
+
+ // HTTPResponseStatusCodeKey is the attribute Key conforming to the
+ // "http.response.status_code" semantic conventions. It represents the
+ // [HTTP response status
+ // code](https://tools.ietf.org/html/rfc7231#section-6).
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 200
+ HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code")
+
+ // HTTPRouteKey is the attribute Key conforming to the "http.route"
+ // semantic conventions. It represents the matched route, that is, the path
+ // template in the format used by the respective server framework.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '/users/:userID?', '{controller}/{action}/{id?}'
+ // Note: MUST NOT be populated when this is not supported by the HTTP
+ // server framework as the route attribute should have low-cardinality and
+ // the URI path can NOT substitute it.
+ // SHOULD include the [application
+ // root](/docs/http/http-spans.md#http-server-definitions) if there is one.
+ HTTPRouteKey = attribute.Key("http.route")
+)
+
+var (
+ // active state
+ HTTPConnectionStateActive = HTTPConnectionStateKey.String("active")
+ // idle state
+ HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle")
+)
+
+var (
+ // CONNECT method
+ HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT")
+ // DELETE method
+ HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE")
+ // GET method
+ HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET")
+ // HEAD method
+ HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD")
+ // OPTIONS method
+ HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS")
+ // PATCH method
+ HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH")
+ // POST method
+ HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST")
+ // PUT method
+ HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT")
+ // TRACE method
+ HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE")
+ // Any HTTP method that the instrumentation has no prior knowledge of
+ HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER")
+)
+
+// HTTPRequestBodySize returns an attribute KeyValue conforming to the
+// "http.request.body.size" semantic conventions. It represents the size of the
+// request payload body in bytes. This is the number of bytes transferred
+// excluding headers and is often, but not always, present as the
+// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
+// header. For requests using transport encoding, this should be the compressed
+// size.
+func HTTPRequestBodySize(val int) attribute.KeyValue {
+ return HTTPRequestBodySizeKey.Int(val)
+}
+
+// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the
+// "http.request.method_original" semantic conventions. It represents the
+// original HTTP method sent by the client in the request line.
+func HTTPRequestMethodOriginal(val string) attribute.KeyValue {
+ return HTTPRequestMethodOriginalKey.String(val)
+}
+
+// HTTPRequestResendCount returns an attribute KeyValue conforming to the
+// "http.request.resend_count" semantic conventions. It represents the ordinal
+// number of request resending attempt (for any reason, including redirects).
+func HTTPRequestResendCount(val int) attribute.KeyValue {
+ return HTTPRequestResendCountKey.Int(val)
+}
+
+// HTTPRequestSize returns an attribute KeyValue conforming to the
+// "http.request.size" semantic conventions. It represents the total size of
+// the request in bytes. This should be the total number of bytes sent over the
+// wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
+// headers, and request body if any.
+func HTTPRequestSize(val int) attribute.KeyValue {
+ return HTTPRequestSizeKey.Int(val)
+}
+
+// HTTPResponseBodySize returns an attribute KeyValue conforming to the
+// "http.response.body.size" semantic conventions. It represents the size of
+// the response payload body in bytes. This is the number of bytes transferred
+// excluding headers and is often, but not always, present as the
+// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
+// header. For requests using transport encoding, this should be the compressed
+// size.
+func HTTPResponseBodySize(val int) attribute.KeyValue {
+ return HTTPResponseBodySizeKey.Int(val)
+}
+
+// HTTPResponseSize returns an attribute KeyValue conforming to the
+// "http.response.size" semantic conventions. It represents the total size of
+// the response in bytes. This should be the total number of bytes sent over
+// the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
+// headers, and response body and trailers if any.
+func HTTPResponseSize(val int) attribute.KeyValue {
+ return HTTPResponseSizeKey.Int(val)
+}
+
+// HTTPResponseStatusCode returns an attribute KeyValue conforming to the
+// "http.response.status_code" semantic conventions. It represents the [HTTP
+// response status code](https://tools.ietf.org/html/rfc7231#section-6).
+func HTTPResponseStatusCode(val int) attribute.KeyValue {
+ return HTTPResponseStatusCodeKey.Int(val)
+}
+
+// HTTPRoute returns an attribute KeyValue conforming to the "http.route"
+// semantic conventions. It represents the matched route, that is, the path
+// template in the format used by the respective server framework.
+func HTTPRoute(val string) attribute.KeyValue {
+ return HTTPRouteKey.String(val)
+}
+
+// Java Virtual machine related attributes.
+const (
+ // JvmBufferPoolNameKey is the attribute Key conforming to the
+ // "jvm.buffer.pool.name" semantic conventions. It represents the name of
+ // the buffer pool.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'mapped', 'direct'
+ // Note: Pool names are generally obtained via
+ // [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).
+ JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name")
+
+ // JvmGcActionKey is the attribute Key conforming to the "jvm.gc.action"
+ // semantic conventions. It represents the name of the garbage collector
+ // action.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'end of minor GC', 'end of major GC'
+ // Note: Garbage collector action is generally obtained via
+ // [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).
+ JvmGcActionKey = attribute.Key("jvm.gc.action")
+
+ // JvmGcNameKey is the attribute Key conforming to the "jvm.gc.name"
+ // semantic conventions. It represents the name of the garbage collector.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'G1 Young Generation', 'G1 Old Generation'
+ // Note: Garbage collector name is generally obtained via
+ // [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()).
+ JvmGcNameKey = attribute.Key("jvm.gc.name")
+
+ // JvmMemoryPoolNameKey is the attribute Key conforming to the
+ // "jvm.memory.pool.name" semantic conventions. It represents the name of
+ // the memory pool.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space'
+ // Note: Pool names are generally obtained via
+ // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).
+ JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name")
+
+ // JvmMemoryTypeKey is the attribute Key conforming to the
+ // "jvm.memory.type" semantic conventions. It represents the type of
+ // memory.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'heap', 'non_heap'
+ JvmMemoryTypeKey = attribute.Key("jvm.memory.type")
+
+ // JvmThreadDaemonKey is the attribute Key conforming to the
+ // "jvm.thread.daemon" semantic conventions. It represents the whether the
+ // thread is daemon or not.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: stable
+ JvmThreadDaemonKey = attribute.Key("jvm.thread.daemon")
+
+ // JvmThreadStateKey is the attribute Key conforming to the
+ // "jvm.thread.state" semantic conventions. It represents the state of the
+ // thread.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'runnable', 'blocked'
+ JvmThreadStateKey = attribute.Key("jvm.thread.state")
+)
+
+var (
+ // Heap memory
+ JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap")
+ // Non-heap memory
+ JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap")
+)
+
+var (
+ // A thread that has not yet started is in this state
+ JvmThreadStateNew = JvmThreadStateKey.String("new")
+ // A thread executing in the Java virtual machine is in this state
+ JvmThreadStateRunnable = JvmThreadStateKey.String("runnable")
+ // A thread that is blocked waiting for a monitor lock is in this state
+ JvmThreadStateBlocked = JvmThreadStateKey.String("blocked")
+ // A thread that is waiting indefinitely for another thread to perform a particular action is in this state
+ JvmThreadStateWaiting = JvmThreadStateKey.String("waiting")
+ // A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state
+ JvmThreadStateTimedWaiting = JvmThreadStateKey.String("timed_waiting")
+ // A thread that has exited is in this state
+ JvmThreadStateTerminated = JvmThreadStateKey.String("terminated")
+)
+
+// JvmBufferPoolName returns an attribute KeyValue conforming to the
+// "jvm.buffer.pool.name" semantic conventions. It represents the name of the
+// buffer pool.
+func JvmBufferPoolName(val string) attribute.KeyValue {
+ return JvmBufferPoolNameKey.String(val)
+}
+
+// JvmGcAction returns an attribute KeyValue conforming to the
+// "jvm.gc.action" semantic conventions. It represents the name of the garbage
+// collector action.
+func JvmGcAction(val string) attribute.KeyValue {
+ return JvmGcActionKey.String(val)
+}
+
+// JvmGcName returns an attribute KeyValue conforming to the "jvm.gc.name"
+// semantic conventions. It represents the name of the garbage collector.
+func JvmGcName(val string) attribute.KeyValue {
+ return JvmGcNameKey.String(val)
+}
+
+// JvmMemoryPoolName returns an attribute KeyValue conforming to the
+// "jvm.memory.pool.name" semantic conventions. It represents the name of the
+// memory pool.
+func JvmMemoryPoolName(val string) attribute.KeyValue {
+ return JvmMemoryPoolNameKey.String(val)
+}
+
+// JvmThreadDaemon returns an attribute KeyValue conforming to the
+// "jvm.thread.daemon" semantic conventions. It represents the whether the
+// thread is daemon or not.
+func JvmThreadDaemon(val bool) attribute.KeyValue {
+ return JvmThreadDaemonKey.Bool(val)
+}
+
+// Kubernetes resource attributes.
+const (
+ // K8SClusterNameKey is the attribute Key conforming to the
+ // "k8s.cluster.name" semantic conventions. It represents the name of the
+ // cluster.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry-cluster'
+ K8SClusterNameKey = attribute.Key("k8s.cluster.name")
+
+ // K8SClusterUIDKey is the attribute Key conforming to the
+ // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for
+ // the cluster, set to the UID of the `kube-system` namespace.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d'
+ // Note: K8S doesn't have support for obtaining a cluster ID. If this is
+ // ever
+ // added, we will recommend collecting the `k8s.cluster.uid` through the
+ // official APIs. In the meantime, we are able to use the `uid` of the
+ // `kube-system` namespace as a proxy for cluster ID. Read on for the
+ // rationale.
+ //
+ // Every object created in a K8S cluster is assigned a distinct UID. The
+ // `kube-system` namespace is used by Kubernetes itself and will exist
+ // for the lifetime of the cluster. Using the `uid` of the `kube-system`
+ // namespace is a reasonable proxy for the K8S ClusterID as it will only
+ // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
+ // UUIDs as standardized by
+ // [ISO/IEC 9834-8 and ITU-T
+ // X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html).
+ // Which states:
+ //
+ // > If generated according to one of the mechanisms defined in Rec.
+ // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
+ // different from all other UUIDs generated before 3603 A.D., or is
+ // extremely likely to be different (depending on the mechanism chosen).
+ //
+ // Therefore, UIDs between clusters should be extremely unlikely to
+ // conflict.
+ K8SClusterUIDKey = attribute.Key("k8s.cluster.uid")
+
+ // K8SContainerNameKey is the attribute Key conforming to the
+ // "k8s.container.name" semantic conventions. It represents the name of the
+ // Container from Pod specification, must be unique within a Pod. Container
+ // runtime usually uses different globally unique name (`container.name`).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'redis'
+ K8SContainerNameKey = attribute.Key("k8s.container.name")
+
+ // K8SContainerRestartCountKey is the attribute Key conforming to the
+ // "k8s.container.restart_count" semantic conventions. It represents the
+ // number of times the container was restarted. This attribute can be used
+ // to identify a particular container (running or stopped) within a
+ // container spec.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
+
+ // K8SContainerStatusLastTerminatedReasonKey is the attribute Key
+ // conforming to the "k8s.container.status.last_terminated_reason" semantic
+ // conventions. It represents the last terminated reason of the Container.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Evicted', 'Error'
+ K8SContainerStatusLastTerminatedReasonKey = attribute.Key("k8s.container.status.last_terminated_reason")
+
+ // K8SCronJobNameKey is the attribute Key conforming to the
+ // "k8s.cronjob.name" semantic conventions. It represents the name of the
+ // CronJob.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry'
+ K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
+
+ // K8SCronJobUIDKey is the attribute Key conforming to the
+ // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
+ // CronJob.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
+
+ // K8SDaemonSetNameKey is the attribute Key conforming to the
+ // "k8s.daemonset.name" semantic conventions. It represents the name of the
+ // DaemonSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry'
+ K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
+
+ // K8SDaemonSetUIDKey is the attribute Key conforming to the
+ // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
+ // DaemonSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
+
+ // K8SDeploymentNameKey is the attribute Key conforming to the
+ // "k8s.deployment.name" semantic conventions. It represents the name of
+ // the Deployment.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry'
+ K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
+
+ // K8SDeploymentUIDKey is the attribute Key conforming to the
+ // "k8s.deployment.uid" semantic conventions. It represents the UID of the
+ // Deployment.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
+
+ // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name"
+ // semantic conventions. It represents the name of the Job.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry'
+ K8SJobNameKey = attribute.Key("k8s.job.name")
+
+ // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid"
+ // semantic conventions. It represents the UID of the Job.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SJobUIDKey = attribute.Key("k8s.job.uid")
+
+ // K8SNamespaceNameKey is the attribute Key conforming to the
+ // "k8s.namespace.name" semantic conventions. It represents the name of the
+ // namespace that the pod is running in.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'default'
+ K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
+
+ // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
+ // semantic conventions. It represents the name of the Node.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'node-1'
+ K8SNodeNameKey = attribute.Key("k8s.node.name")
+
+ // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid"
+ // semantic conventions. It represents the UID of the Node.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2'
+ K8SNodeUIDKey = attribute.Key("k8s.node.uid")
+
+ // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name"
+ // semantic conventions. It represents the name of the Pod.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry-pod-autoconf'
+ K8SPodNameKey = attribute.Key("k8s.pod.name")
+
+ // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid"
+ // semantic conventions. It represents the UID of the Pod.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SPodUIDKey = attribute.Key("k8s.pod.uid")
+
+ // K8SReplicaSetNameKey is the attribute Key conforming to the
+ // "k8s.replicaset.name" semantic conventions. It represents the name of
+ // the ReplicaSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry'
+ K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
+
+ // K8SReplicaSetUIDKey is the attribute Key conforming to the
+ // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
+ // ReplicaSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
+
+ // K8SStatefulSetNameKey is the attribute Key conforming to the
+ // "k8s.statefulset.name" semantic conventions. It represents the name of
+ // the StatefulSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry'
+ K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
+
+ // K8SStatefulSetUIDKey is the attribute Key conforming to the
+ // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
+ // StatefulSet.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
+ K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
+)
+
+// K8SClusterName returns an attribute KeyValue conforming to the
+// "k8s.cluster.name" semantic conventions. It represents the name of the
+// cluster.
+func K8SClusterName(val string) attribute.KeyValue {
+ return K8SClusterNameKey.String(val)
+}
+
+// K8SClusterUID returns an attribute KeyValue conforming to the
+// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the
+// cluster, set to the UID of the `kube-system` namespace.
+func K8SClusterUID(val string) attribute.KeyValue {
+ return K8SClusterUIDKey.String(val)
+}
+
+// K8SContainerName returns an attribute KeyValue conforming to the
+// "k8s.container.name" semantic conventions. It represents the name of the
+// Container from Pod specification, must be unique within a Pod. Container
+// runtime usually uses different globally unique name (`container.name`).
+func K8SContainerName(val string) attribute.KeyValue {
+ return K8SContainerNameKey.String(val)
+}
+
+// K8SContainerRestartCount returns an attribute KeyValue conforming to the
+// "k8s.container.restart_count" semantic conventions. It represents the number
+// of times the container was restarted. This attribute can be used to identify
+// a particular container (running or stopped) within a container spec.
+func K8SContainerRestartCount(val int) attribute.KeyValue {
+ return K8SContainerRestartCountKey.Int(val)
+}
+
+// K8SContainerStatusLastTerminatedReason returns an attribute KeyValue
+// conforming to the "k8s.container.status.last_terminated_reason" semantic
+// conventions. It represents the last terminated reason of the Container.
+func K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue {
+ return K8SContainerStatusLastTerminatedReasonKey.String(val)
+}
+
+// K8SCronJobName returns an attribute KeyValue conforming to the
+// "k8s.cronjob.name" semantic conventions. It represents the name of the
+// CronJob.
+func K8SCronJobName(val string) attribute.KeyValue {
+ return K8SCronJobNameKey.String(val)
+}
+
+// K8SCronJobUID returns an attribute KeyValue conforming to the
+// "k8s.cronjob.uid" semantic conventions. It represents the UID of the
+// CronJob.
+func K8SCronJobUID(val string) attribute.KeyValue {
+ return K8SCronJobUIDKey.String(val)
+}
+
+// K8SDaemonSetName returns an attribute KeyValue conforming to the
+// "k8s.daemonset.name" semantic conventions. It represents the name of the
+// DaemonSet.
+func K8SDaemonSetName(val string) attribute.KeyValue {
+ return K8SDaemonSetNameKey.String(val)
+}
+
+// K8SDaemonSetUID returns an attribute KeyValue conforming to the
+// "k8s.daemonset.uid" semantic conventions. It represents the UID of the
+// DaemonSet.
+func K8SDaemonSetUID(val string) attribute.KeyValue {
+ return K8SDaemonSetUIDKey.String(val)
+}
+
+// K8SDeploymentName returns an attribute KeyValue conforming to the
+// "k8s.deployment.name" semantic conventions. It represents the name of the
+// Deployment.
+func K8SDeploymentName(val string) attribute.KeyValue {
+ return K8SDeploymentNameKey.String(val)
+}
+
+// K8SDeploymentUID returns an attribute KeyValue conforming to the
+// "k8s.deployment.uid" semantic conventions. It represents the UID of the
+// Deployment.
+func K8SDeploymentUID(val string) attribute.KeyValue {
+ return K8SDeploymentUIDKey.String(val)
+}
+
+// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
+// semantic conventions. It represents the name of the Job.
+func K8SJobName(val string) attribute.KeyValue {
+ return K8SJobNameKey.String(val)
+}
+
+// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
+// semantic conventions. It represents the UID of the Job.
+func K8SJobUID(val string) attribute.KeyValue {
+ return K8SJobUIDKey.String(val)
+}
+
+// K8SNamespaceName returns an attribute KeyValue conforming to the
+// "k8s.namespace.name" semantic conventions. It represents the name of the
+// namespace that the pod is running in.
+func K8SNamespaceName(val string) attribute.KeyValue {
+ return K8SNamespaceNameKey.String(val)
+}
+
+// K8SNodeName returns an attribute KeyValue conforming to the
+// "k8s.node.name" semantic conventions. It represents the name of the Node.
+func K8SNodeName(val string) attribute.KeyValue {
+ return K8SNodeNameKey.String(val)
+}
+
+// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
+// semantic conventions. It represents the UID of the Node.
+func K8SNodeUID(val string) attribute.KeyValue {
+ return K8SNodeUIDKey.String(val)
+}
+
+// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
+// semantic conventions. It represents the name of the Pod.
+func K8SPodName(val string) attribute.KeyValue {
+ return K8SPodNameKey.String(val)
+}
+
+// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
+// semantic conventions. It represents the UID of the Pod.
+func K8SPodUID(val string) attribute.KeyValue {
+ return K8SPodUIDKey.String(val)
+}
+
+// K8SReplicaSetName returns an attribute KeyValue conforming to the
+// "k8s.replicaset.name" semantic conventions. It represents the name of the
+// ReplicaSet.
+func K8SReplicaSetName(val string) attribute.KeyValue {
+ return K8SReplicaSetNameKey.String(val)
+}
+
+// K8SReplicaSetUID returns an attribute KeyValue conforming to the
+// "k8s.replicaset.uid" semantic conventions. It represents the UID of the
+// ReplicaSet.
+func K8SReplicaSetUID(val string) attribute.KeyValue {
+ return K8SReplicaSetUIDKey.String(val)
+}
+
+// K8SStatefulSetName returns an attribute KeyValue conforming to the
+// "k8s.statefulset.name" semantic conventions. It represents the name of the
+// StatefulSet.
+func K8SStatefulSetName(val string) attribute.KeyValue {
+ return K8SStatefulSetNameKey.String(val)
+}
+
+// K8SStatefulSetUID returns an attribute KeyValue conforming to the
+// "k8s.statefulset.uid" semantic conventions. It represents the UID of the
+// StatefulSet.
+func K8SStatefulSetUID(val string) attribute.KeyValue {
+ return K8SStatefulSetUIDKey.String(val)
+}
+
+// Log attributes
+const (
+ // LogIostreamKey is the attribute Key conforming to the "log.iostream"
+ // semantic conventions. It represents the stream associated with the log.
+ // See below for a list of well-known values.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ LogIostreamKey = attribute.Key("log.iostream")
+)
+
+var (
+ // Logs from stdout stream
+ LogIostreamStdout = LogIostreamKey.String("stdout")
+ // Events from stderr stream
+ LogIostreamStderr = LogIostreamKey.String("stderr")
+)
+
+// Attributes for a file to which log was emitted.
+const (
+ // LogFileNameKey is the attribute Key conforming to the "log.file.name"
+ // semantic conventions. It represents the basename of the file.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'audit.log'
+ LogFileNameKey = attribute.Key("log.file.name")
+
+ // LogFileNameResolvedKey is the attribute Key conforming to the
+ // "log.file.name_resolved" semantic conventions. It represents the
+ // basename of the file, with symlinks resolved.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'uuid.log'
+ LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
+
+ // LogFilePathKey is the attribute Key conforming to the "log.file.path"
+ // semantic conventions. It represents the full path to the file.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '/var/log/mysql/audit.log'
+ LogFilePathKey = attribute.Key("log.file.path")
+
+ // LogFilePathResolvedKey is the attribute Key conforming to the
+ // "log.file.path_resolved" semantic conventions. It represents the full
+ // path to the file, with symlinks resolved.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '/var/lib/docker/uuid.log'
+ LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
+)
+
+// LogFileName returns an attribute KeyValue conforming to the
+// "log.file.name" semantic conventions. It represents the basename of the
+// file.
+func LogFileName(val string) attribute.KeyValue {
+ return LogFileNameKey.String(val)
+}
+
+// LogFileNameResolved returns an attribute KeyValue conforming to the
+// "log.file.name_resolved" semantic conventions. It represents the basename of
+// the file, with symlinks resolved.
+func LogFileNameResolved(val string) attribute.KeyValue {
+ return LogFileNameResolvedKey.String(val)
+}
+
+// LogFilePath returns an attribute KeyValue conforming to the
+// "log.file.path" semantic conventions. It represents the full path to the
+// file.
+func LogFilePath(val string) attribute.KeyValue {
+ return LogFilePathKey.String(val)
+}
+
+// LogFilePathResolved returns an attribute KeyValue conforming to the
+// "log.file.path_resolved" semantic conventions. It represents the full path
+// to the file, with symlinks resolved.
+func LogFilePathResolved(val string) attribute.KeyValue {
+ return LogFilePathResolvedKey.String(val)
+}
+
+// The generic attributes that may be used in any Log Record.
+const (
+ // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
+ // semantic conventions. It represents a unique identifier for the Log
+ // Record.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV'
+ // Note: If an id is provided, other log records with the same id will be
+ // considered duplicates and can be removed safely. This means, that two
+ // distinguishable log records MUST have different values.
+ // The id MAY be an [Universally Unique Lexicographically Sortable
+ // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers
+ // (e.g. UUID) may be used as needed.
+ LogRecordUIDKey = attribute.Key("log.record.uid")
+)
+
+// LogRecordUID returns an attribute KeyValue conforming to the
+// "log.record.uid" semantic conventions. It represents a unique identifier for
+// the Log Record.
+func LogRecordUID(val string) attribute.KeyValue {
+ return LogRecordUIDKey.String(val)
+}
+
+// Attributes describing telemetry around messaging systems and messaging
+// activities.
+const (
+ // MessagingBatchMessageCountKey is the attribute Key conforming to the
+ // "messaging.batch.message_count" semantic conventions. It represents the
+ // number of messages sent, received, or processed in the scope of the
+ // batching operation.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 0, 1, 2
+ // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
+ // spans that operate with a single message. When a messaging client
+ // library supports both batch and single-message API for the same
+ // operation, instrumentations SHOULD use `messaging.batch.message_count`
+ // for batching APIs and SHOULD NOT use it for single-message APIs.
+ MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
+
+ // MessagingClientIDKey is the attribute Key conforming to the
+ // "messaging.client.id" semantic conventions. It represents a unique
+ // identifier for the client that consumes or produces a message.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'client-5', 'myhost@8742@s8083jm'
+ MessagingClientIDKey = attribute.Key("messaging.client.id")
+
+ // MessagingDestinationAnonymousKey is the attribute Key conforming to the
+ // "messaging.destination.anonymous" semantic conventions. It represents a
+ // boolean that is true if the message destination is anonymous (could be
+ // unnamed or have auto-generated name).
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
+
+ // MessagingDestinationNameKey is the attribute Key conforming to the
+ // "messaging.destination.name" semantic conventions. It represents the
+ // message destination name
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'MyQueue', 'MyTopic'
+ // Note: Destination name SHOULD uniquely identify a specific queue, topic
+ // or other entity within the broker. If
+ // the broker doesn't have such notion, the destination name SHOULD
+ // uniquely identify the broker.
+ MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
+
+ // MessagingDestinationPartitionIDKey is the attribute Key conforming to
+ // the "messaging.destination.partition.id" semantic conventions. It
+ // represents the identifier of the partition messages are sent to or
+ // received from, unique within the `messaging.destination.name`.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '1'
+ MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id")
+
+ // MessagingDestinationTemplateKey is the attribute Key conforming to the
+ // "messaging.destination.template" semantic conventions. It represents the
+ // low cardinality representation of the messaging destination name
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '/customers/{customerID}'
+ // Note: Destination names could be constructed from templates. An example
+ // would be a destination name involving a user name or product id.
+ // Although the destination name in this case is of high cardinality, the
+ // underlying template is of low cardinality and can be effectively used
+ // for grouping and aggregation.
+ MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
+
+ // MessagingDestinationTemporaryKey is the attribute Key conforming to the
+ // "messaging.destination.temporary" semantic conventions. It represents a
+ // boolean that is true if the message destination is temporary and might
+ // not exist anymore after messages are processed.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
+
+ // MessagingDestinationPublishAnonymousKey is the attribute Key conforming
+ // to the "messaging.destination_publish.anonymous" semantic conventions.
+ // It represents a boolean that is true if the publish message destination
+ // is anonymous (could be unnamed or have auto-generated name).
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ MessagingDestinationPublishAnonymousKey = attribute.Key("messaging.destination_publish.anonymous")
+
+ // MessagingDestinationPublishNameKey is the attribute Key conforming to
+ // the "messaging.destination_publish.name" semantic conventions. It
+ // represents the name of the original destination the message was
+ // published to
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'MyQueue', 'MyTopic'
+ // Note: The name SHOULD uniquely identify a specific queue, topic, or
+ // other entity within the broker. If
+ // the broker doesn't have such notion, the original destination name
+ // SHOULD uniquely identify the broker.
+ MessagingDestinationPublishNameKey = attribute.Key("messaging.destination_publish.name")
+
+ // MessagingMessageBodySizeKey is the attribute Key conforming to the
+ // "messaging.message.body.size" semantic conventions. It represents the
+ // size of the message body in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1439
+ // Note: This can refer to both the compressed or uncompressed body size.
+ // If both sizes are known, the uncompressed
+ // body size should be used.
+ MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size")
+
+ // MessagingMessageConversationIDKey is the attribute Key conforming to the
+ // "messaging.message.conversation_id" semantic conventions. It represents
+ // the conversation ID identifying the conversation to which the message
+ // belongs, represented as a string. Sometimes called "Correlation ID".
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'MyConversationID'
+ MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
+
+ // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the
+ // "messaging.message.envelope.size" semantic conventions. It represents
+ // the size of the message body and metadata in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 2738
+ // Note: This can refer to both the compressed or uncompressed size. If
+ // both sizes are known, the uncompressed
+ // size should be used.
+ MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size")
+
+ // MessagingMessageIDKey is the attribute Key conforming to the
+ // "messaging.message.id" semantic conventions. It represents a value used
+ // by the messaging system as an identifier for the message, represented as
+ // a string.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '452a7c7c7c7048c2f887f61572b18fc2'
+ MessagingMessageIDKey = attribute.Key("messaging.message.id")
+
+ // MessagingOperationNameKey is the attribute Key conforming to the
+ // "messaging.operation.name" semantic conventions. It represents the
+ // system-specific name of the messaging operation.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'ack', 'nack', 'send'
+ MessagingOperationNameKey = attribute.Key("messaging.operation.name")
+
+ // MessagingOperationTypeKey is the attribute Key conforming to the
+ // "messaging.operation.type" semantic conventions. It represents a string
+ // identifying the type of the messaging operation.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Note: If a custom value is used, it MUST be of low cardinality.
+ MessagingOperationTypeKey = attribute.Key("messaging.operation.type")
+
+ // MessagingSystemKey is the attribute Key conforming to the
+ // "messaging.system" semantic conventions. It represents the messaging
+ // system as identified by the client instrumentation.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Note: The actual messaging system may differ from the one known by the
+ // client. For example, when using Kafka client libraries to communicate
+ // with Azure Event Hubs, the `messaging.system` is set to `kafka` based on
+ // the instrumentation's best knowledge.
+ MessagingSystemKey = attribute.Key("messaging.system")
+)
+
+var (
+ // One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created
+ MessagingOperationTypePublish = MessagingOperationTypeKey.String("publish")
+ // A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios
+ MessagingOperationTypeCreate = MessagingOperationTypeKey.String("create")
+ // One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages
+ MessagingOperationTypeReceive = MessagingOperationTypeKey.String("receive")
+ // One or more messages are delivered to or processed by a consumer
+ MessagingOperationTypeDeliver = MessagingOperationTypeKey.String("process")
+ // One or more messages are settled
+ MessagingOperationTypeSettle = MessagingOperationTypeKey.String("settle")
+)
+
+var (
+ // Apache ActiveMQ
+ MessagingSystemActivemq = MessagingSystemKey.String("activemq")
+ // Amazon Simple Queue Service (SQS)
+ MessagingSystemAWSSqs = MessagingSystemKey.String("aws_sqs")
+ // Azure Event Grid
+ MessagingSystemEventgrid = MessagingSystemKey.String("eventgrid")
+ // Azure Event Hubs
+ MessagingSystemEventhubs = MessagingSystemKey.String("eventhubs")
+ // Azure Service Bus
+ MessagingSystemServicebus = MessagingSystemKey.String("servicebus")
+ // Google Cloud Pub/Sub
+ MessagingSystemGCPPubsub = MessagingSystemKey.String("gcp_pubsub")
+ // Java Message Service
+ MessagingSystemJms = MessagingSystemKey.String("jms")
+ // Apache Kafka
+ MessagingSystemKafka = MessagingSystemKey.String("kafka")
+ // RabbitMQ
+ MessagingSystemRabbitmq = MessagingSystemKey.String("rabbitmq")
+ // Apache RocketMQ
+ MessagingSystemRocketmq = MessagingSystemKey.String("rocketmq")
+)
+
+// MessagingBatchMessageCount returns an attribute KeyValue conforming to
+// the "messaging.batch.message_count" semantic conventions. It represents the
+// number of messages sent, received, or processed in the scope of the batching
+// operation.
+func MessagingBatchMessageCount(val int) attribute.KeyValue {
+ return MessagingBatchMessageCountKey.Int(val)
+}
+
+// MessagingClientID returns an attribute KeyValue conforming to the
+// "messaging.client.id" semantic conventions. It represents a unique
+// identifier for the client that consumes or produces a message.
+func MessagingClientID(val string) attribute.KeyValue {
+ return MessagingClientIDKey.String(val)
+}
+
+// MessagingDestinationAnonymous returns an attribute KeyValue conforming to
+// the "messaging.destination.anonymous" semantic conventions. It represents a
+// boolean that is true if the message destination is anonymous (could be
+// unnamed or have auto-generated name).
+func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
+ return MessagingDestinationAnonymousKey.Bool(val)
+}
+
+// MessagingDestinationName returns an attribute KeyValue conforming to the
+// "messaging.destination.name" semantic conventions. It represents the message
+// destination name
+func MessagingDestinationName(val string) attribute.KeyValue {
+ return MessagingDestinationNameKey.String(val)
+}
+
+// MessagingDestinationPartitionID returns an attribute KeyValue conforming
+// to the "messaging.destination.partition.id" semantic conventions. It
+// represents the identifier of the partition messages are sent to or received
+// from, unique within the `messaging.destination.name`.
+func MessagingDestinationPartitionID(val string) attribute.KeyValue {
+ return MessagingDestinationPartitionIDKey.String(val)
+}
+
+// MessagingDestinationTemplate returns an attribute KeyValue conforming to
+// the "messaging.destination.template" semantic conventions. It represents the
+// low cardinality representation of the messaging destination name
+func MessagingDestinationTemplate(val string) attribute.KeyValue {
+ return MessagingDestinationTemplateKey.String(val)
+}
+
+// MessagingDestinationTemporary returns an attribute KeyValue conforming to
+// the "messaging.destination.temporary" semantic conventions. It represents a
+// boolean that is true if the message destination is temporary and might not
+// exist anymore after messages are processed.
+func MessagingDestinationTemporary(val bool) attribute.KeyValue {
+ return MessagingDestinationTemporaryKey.Bool(val)
+}
+
+// MessagingDestinationPublishAnonymous returns an attribute KeyValue
+// conforming to the "messaging.destination_publish.anonymous" semantic
+// conventions. It represents a boolean that is true if the publish message
+// destination is anonymous (could be unnamed or have auto-generated name).
+func MessagingDestinationPublishAnonymous(val bool) attribute.KeyValue {
+ return MessagingDestinationPublishAnonymousKey.Bool(val)
+}
+
+// MessagingDestinationPublishName returns an attribute KeyValue conforming
+// to the "messaging.destination_publish.name" semantic conventions. It
+// represents the name of the original destination the message was published to
+func MessagingDestinationPublishName(val string) attribute.KeyValue {
+ return MessagingDestinationPublishNameKey.String(val)
+}
+
+// MessagingMessageBodySize returns an attribute KeyValue conforming to the
+// "messaging.message.body.size" semantic conventions. It represents the size
+// of the message body in bytes.
+func MessagingMessageBodySize(val int) attribute.KeyValue {
+ return MessagingMessageBodySizeKey.Int(val)
+}
+
+// MessagingMessageConversationID returns an attribute KeyValue conforming
+// to the "messaging.message.conversation_id" semantic conventions. It
+// represents the conversation ID identifying the conversation to which the
+// message belongs, represented as a string. Sometimes called "Correlation ID".
+func MessagingMessageConversationID(val string) attribute.KeyValue {
+ return MessagingMessageConversationIDKey.String(val)
+}
+
+// MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to
+// the "messaging.message.envelope.size" semantic conventions. It represents
+// the size of the message body and metadata in bytes.
+func MessagingMessageEnvelopeSize(val int) attribute.KeyValue {
+ return MessagingMessageEnvelopeSizeKey.Int(val)
+}
+
+// MessagingMessageID returns an attribute KeyValue conforming to the
+// "messaging.message.id" semantic conventions. It represents a value used by
+// the messaging system as an identifier for the message, represented as a
+// string.
+func MessagingMessageID(val string) attribute.KeyValue {
+ return MessagingMessageIDKey.String(val)
+}
+
+// MessagingOperationName returns an attribute KeyValue conforming to the
+// "messaging.operation.name" semantic conventions. It represents the
+// system-specific name of the messaging operation.
+func MessagingOperationName(val string) attribute.KeyValue {
+ return MessagingOperationNameKey.String(val)
+}
+
+// This group describes attributes specific to Apache Kafka.
+const (
+ // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the
+ // "messaging.kafka.consumer.group" semantic conventions. It represents the
+ // name of the Kafka Consumer Group that is handling the message. Only
+ // applies to consumers, not producers.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'my-group'
+ MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group")
+
+ // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
+ // "messaging.kafka.message.key" semantic conventions. It represents the
+ // message keys in Kafka are used for grouping alike messages to ensure
+ // they're processed on the same partition. They differ from
+ // `messaging.message.id` in that they're not unique. If the key is `null`,
+ // the attribute MUST NOT be set.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'myKey'
+ // Note: If the key type is not string, it's string representation has to
+ // be supplied for the attribute. If the key has no unambiguous, canonical
+ // string form, don't include its value.
+ MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
+
+ // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the
+ // "messaging.kafka.message.offset" semantic conventions. It represents the
+ // offset of a record in the corresponding Kafka partition.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 42
+ MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset")
+
+ // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
+ // "messaging.kafka.message.tombstone" semantic conventions. It represents
+ // a boolean that is true if the message is a tombstone.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
+)
+
+// MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to
+// the "messaging.kafka.consumer.group" semantic conventions. It represents the
+// name of the Kafka Consumer Group that is handling the message. Only applies
+// to consumers, not producers.
+func MessagingKafkaConsumerGroup(val string) attribute.KeyValue {
+ return MessagingKafkaConsumerGroupKey.String(val)
+}
+
+// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
+// "messaging.kafka.message.key" semantic conventions. It represents the
+// message keys in Kafka are used for grouping alike messages to ensure they're
+// processed on the same partition. They differ from `messaging.message.id` in
+// that they're not unique. If the key is `null`, the attribute MUST NOT be
+// set.
+func MessagingKafkaMessageKey(val string) attribute.KeyValue {
+ return MessagingKafkaMessageKeyKey.String(val)
+}
+
+// MessagingKafkaMessageOffset returns an attribute KeyValue conforming to
+// the "messaging.kafka.message.offset" semantic conventions. It represents the
+// offset of a record in the corresponding Kafka partition.
+func MessagingKafkaMessageOffset(val int) attribute.KeyValue {
+ return MessagingKafkaMessageOffsetKey.Int(val)
+}
+
+// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming
+// to the "messaging.kafka.message.tombstone" semantic conventions. It
+// represents a boolean that is true if the message is a tombstone.
+func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
+ return MessagingKafkaMessageTombstoneKey.Bool(val)
+}
+
+// This group describes attributes specific to RabbitMQ.
+const (
+ // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key
+ // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
+ // conventions. It represents the rabbitMQ message routing key.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'myKey'
+ MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
+
+ // MessagingRabbitmqMessageDeliveryTagKey is the attribute Key conforming
+ // to the "messaging.rabbitmq.message.delivery_tag" semantic conventions.
+ // It represents the rabbitMQ message delivery tag
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 123
+ MessagingRabbitmqMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag")
+)
+
+// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue
+// conforming to the "messaging.rabbitmq.destination.routing_key" semantic
+// conventions. It represents the rabbitMQ message routing key.
+func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue {
+ return MessagingRabbitmqDestinationRoutingKeyKey.String(val)
+}
+
+// MessagingRabbitmqMessageDeliveryTag returns an attribute KeyValue
+// conforming to the "messaging.rabbitmq.message.delivery_tag" semantic
+// conventions. It represents the rabbitMQ message delivery tag
+func MessagingRabbitmqMessageDeliveryTag(val int) attribute.KeyValue {
+ return MessagingRabbitmqMessageDeliveryTagKey.Int(val)
+}
+
+// This group describes attributes specific to RocketMQ.
+const (
+ // MessagingRocketmqClientGroupKey is the attribute Key conforming to the
+ // "messaging.rocketmq.client_group" semantic conventions. It represents
+ // the name of the RocketMQ producer/consumer group that is handling the
+ // message. The client type is identified by the SpanKind.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'myConsumerGroup'
+ MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group")
+
+ // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to
+ // the "messaging.rocketmq.consumption_model" semantic conventions. It
+ // represents the model of message consumption. This only applies to
+ // consumer spans.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
+
+ // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key
+ // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
+ // conventions. It represents the delay time level for delay message, which
+ // determines the message delay time.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 3
+ MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
+
+ // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key
+ // conforming to the "messaging.rocketmq.message.delivery_timestamp"
+ // semantic conventions. It represents the timestamp in milliseconds that
+ // the delay message is expected to be delivered to consumer.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1665987217045
+ MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
+
+ // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.group" semantic conventions. It represents
+ // the it is essential for FIFO message. Messages that belong to the same
+ // message group are always processed one by one within the same consumer
+ // group.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'myMessageGroup'
+ MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
+
+ // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.keys" semantic conventions. It represents
+ // the key(s) of message, another way to mark message besides message id.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'keyA', 'keyB'
+ MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
+
+ // MessagingRocketmqMessageTagKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.tag" semantic conventions. It represents the
+ // secondary classifier of message besides topic.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'tagA'
+ MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
+
+ // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the
+ // "messaging.rocketmq.message.type" semantic conventions. It represents
+ // the type of message.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
+
+ // MessagingRocketmqNamespaceKey is the attribute Key conforming to the
+ // "messaging.rocketmq.namespace" semantic conventions. It represents the
+ // namespace of RocketMQ resources, resources in different namespaces are
+ // individual.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'myNamespace'
+ MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
+)
+
+var (
+ // Clustering consumption model
+ MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering")
+ // Broadcasting consumption model
+ MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting")
+)
+
+var (
+ // Normal message
+ MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal")
+ // FIFO message
+ MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo")
+ // Delay message
+ MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay")
+ // Transaction message
+ MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction")
+)
+
+// MessagingRocketmqClientGroup returns an attribute KeyValue conforming to
+// the "messaging.rocketmq.client_group" semantic conventions. It represents
+// the name of the RocketMQ producer/consumer group that is handling the
+// message. The client type is identified by the SpanKind.
+func MessagingRocketmqClientGroup(val string) attribute.KeyValue {
+ return MessagingRocketmqClientGroupKey.String(val)
+}
+
+// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue
+// conforming to the "messaging.rocketmq.message.delay_time_level" semantic
+// conventions. It represents the delay time level for delay message, which
+// determines the message delay time.
+func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue {
+ return MessagingRocketmqMessageDelayTimeLevelKey.Int(val)
+}
+
+// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue
+// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
+// conventions. It represents the timestamp in milliseconds that the delay
+// message is expected to be delivered to consumer.
+func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue {
+ return MessagingRocketmqMessageDeliveryTimestampKey.Int(val)
+}
+
+// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to
+// the "messaging.rocketmq.message.group" semantic conventions. It represents
+// the it is essential for FIFO message. Messages that belong to the same
+// message group are always processed one by one within the same consumer
+// group.
+func MessagingRocketmqMessageGroup(val string) attribute.KeyValue {
+ return MessagingRocketmqMessageGroupKey.String(val)
+}
+
+// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to
+// the "messaging.rocketmq.message.keys" semantic conventions. It represents
+// the key(s) of message, another way to mark message besides message id.
+func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue {
+ return MessagingRocketmqMessageKeysKey.StringSlice(val)
+}
+
+// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to
+// the "messaging.rocketmq.message.tag" semantic conventions. It represents the
+// secondary classifier of message besides topic.
+func MessagingRocketmqMessageTag(val string) attribute.KeyValue {
+ return MessagingRocketmqMessageTagKey.String(val)
+}
+
+// MessagingRocketmqNamespace returns an attribute KeyValue conforming to
+// the "messaging.rocketmq.namespace" semantic conventions. It represents the
+// namespace of RocketMQ resources, resources in different namespaces are
+// individual.
+func MessagingRocketmqNamespace(val string) attribute.KeyValue {
+ return MessagingRocketmqNamespaceKey.String(val)
+}
+
+// This group describes attributes specific to GCP Pub/Sub.
+const (
+ // MessagingGCPPubsubMessageAckDeadlineKey is the attribute Key conforming
+ // to the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions.
+ // It represents the ack deadline in seconds set for the modify ack
+ // deadline request.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 10
+ MessagingGCPPubsubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline")
+
+ // MessagingGCPPubsubMessageAckIDKey is the attribute Key conforming to the
+ // "messaging.gcp_pubsub.message.ack_id" semantic conventions. It
+ // represents the ack id for a given message.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'ack_id'
+ MessagingGCPPubsubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id")
+
+ // MessagingGCPPubsubMessageDeliveryAttemptKey is the attribute Key
+ // conforming to the "messaging.gcp_pubsub.message.delivery_attempt"
+ // semantic conventions. It represents the delivery attempt for a given
+ // message.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 2
+ MessagingGCPPubsubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt")
+
+ // MessagingGCPPubsubMessageOrderingKeyKey is the attribute Key conforming
+ // to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions.
+ // It represents the ordering key for a given message. If the attribute is
+ // not present, the message does not have an ordering key.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'ordering_key'
+ MessagingGCPPubsubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key")
+)
+
+// MessagingGCPPubsubMessageAckDeadline returns an attribute KeyValue
+// conforming to the "messaging.gcp_pubsub.message.ack_deadline" semantic
+// conventions. It represents the ack deadline in seconds set for the modify
+// ack deadline request.
+func MessagingGCPPubsubMessageAckDeadline(val int) attribute.KeyValue {
+ return MessagingGCPPubsubMessageAckDeadlineKey.Int(val)
+}
+
+// MessagingGCPPubsubMessageAckID returns an attribute KeyValue conforming
+// to the "messaging.gcp_pubsub.message.ack_id" semantic conventions. It
+// represents the ack id for a given message.
+func MessagingGCPPubsubMessageAckID(val string) attribute.KeyValue {
+ return MessagingGCPPubsubMessageAckIDKey.String(val)
+}
+
+// MessagingGCPPubsubMessageDeliveryAttempt returns an attribute KeyValue
+// conforming to the "messaging.gcp_pubsub.message.delivery_attempt" semantic
+// conventions. It represents the delivery attempt for a given message.
+func MessagingGCPPubsubMessageDeliveryAttempt(val int) attribute.KeyValue {
+ return MessagingGCPPubsubMessageDeliveryAttemptKey.Int(val)
+}
+
+// MessagingGCPPubsubMessageOrderingKey returns an attribute KeyValue
+// conforming to the "messaging.gcp_pubsub.message.ordering_key" semantic
+// conventions. It represents the ordering key for a given message. If the
+// attribute is not present, the message does not have an ordering key.
+func MessagingGCPPubsubMessageOrderingKey(val string) attribute.KeyValue {
+ return MessagingGCPPubsubMessageOrderingKeyKey.String(val)
+}
+
+// This group describes attributes specific to Azure Service Bus.
+const (
+ // MessagingServicebusDestinationSubscriptionNameKey is the attribute Key
+ // conforming to the "messaging.servicebus.destination.subscription_name"
+ // semantic conventions. It represents the name of the subscription in the
+ // topic messages are received from.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'mySubscription'
+ MessagingServicebusDestinationSubscriptionNameKey = attribute.Key("messaging.servicebus.destination.subscription_name")
+
+ // MessagingServicebusDispositionStatusKey is the attribute Key conforming
+ // to the "messaging.servicebus.disposition_status" semantic conventions.
+ // It represents the describes the [settlement
+ // type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock).
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ MessagingServicebusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status")
+
+ // MessagingServicebusMessageDeliveryCountKey is the attribute Key
+ // conforming to the "messaging.servicebus.message.delivery_count" semantic
+ // conventions. It represents the number of deliveries that have been
+ // attempted for this message.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 2
+ MessagingServicebusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count")
+
+ // MessagingServicebusMessageEnqueuedTimeKey is the attribute Key
+ // conforming to the "messaging.servicebus.message.enqueued_time" semantic
+ // conventions. It represents the UTC epoch seconds at which the message
+ // has been accepted and stored in the entity.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1701393730
+ MessagingServicebusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time")
+)
+
+var (
+ // Message is completed
+ MessagingServicebusDispositionStatusComplete = MessagingServicebusDispositionStatusKey.String("complete")
+ // Message is abandoned
+ MessagingServicebusDispositionStatusAbandon = MessagingServicebusDispositionStatusKey.String("abandon")
+ // Message is sent to dead letter queue
+ MessagingServicebusDispositionStatusDeadLetter = MessagingServicebusDispositionStatusKey.String("dead_letter")
+ // Message is deferred
+ MessagingServicebusDispositionStatusDefer = MessagingServicebusDispositionStatusKey.String("defer")
+)
+
+// MessagingServicebusDestinationSubscriptionName returns an attribute
+// KeyValue conforming to the
+// "messaging.servicebus.destination.subscription_name" semantic conventions.
+// It represents the name of the subscription in the topic messages are
+// received from.
+func MessagingServicebusDestinationSubscriptionName(val string) attribute.KeyValue {
+ return MessagingServicebusDestinationSubscriptionNameKey.String(val)
+}
+
+// MessagingServicebusMessageDeliveryCount returns an attribute KeyValue
+// conforming to the "messaging.servicebus.message.delivery_count" semantic
+// conventions. It represents the number of deliveries that have been attempted
+// for this message.
+func MessagingServicebusMessageDeliveryCount(val int) attribute.KeyValue {
+ return MessagingServicebusMessageDeliveryCountKey.Int(val)
+}
+
+// MessagingServicebusMessageEnqueuedTime returns an attribute KeyValue
+// conforming to the "messaging.servicebus.message.enqueued_time" semantic
+// conventions. It represents the UTC epoch seconds at which the message has
+// been accepted and stored in the entity.
+func MessagingServicebusMessageEnqueuedTime(val int) attribute.KeyValue {
+ return MessagingServicebusMessageEnqueuedTimeKey.Int(val)
+}
+
+// This group describes attributes specific to Azure Event Hubs.
+const (
+ // MessagingEventhubsConsumerGroupKey is the attribute Key conforming to
+ // the "messaging.eventhubs.consumer.group" semantic conventions. It
+ // represents the name of the consumer group the event consumer is
+ // associated with.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'indexer'
+ MessagingEventhubsConsumerGroupKey = attribute.Key("messaging.eventhubs.consumer.group")
+
+ // MessagingEventhubsMessageEnqueuedTimeKey is the attribute Key conforming
+ // to the "messaging.eventhubs.message.enqueued_time" semantic conventions.
+ // It represents the UTC epoch seconds at which the message has been
+ // accepted and stored in the entity.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1701393730
+ MessagingEventhubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time")
+)
+
+// MessagingEventhubsConsumerGroup returns an attribute KeyValue conforming
+// to the "messaging.eventhubs.consumer.group" semantic conventions. It
+// represents the name of the consumer group the event consumer is associated
+// with.
+func MessagingEventhubsConsumerGroup(val string) attribute.KeyValue {
+ return MessagingEventhubsConsumerGroupKey.String(val)
+}
+
+// MessagingEventhubsMessageEnqueuedTime returns an attribute KeyValue
+// conforming to the "messaging.eventhubs.message.enqueued_time" semantic
+// conventions. It represents the UTC epoch seconds at which the message has
+// been accepted and stored in the entity.
+func MessagingEventhubsMessageEnqueuedTime(val int) attribute.KeyValue {
+ return MessagingEventhubsMessageEnqueuedTimeKey.Int(val)
+}
+
+// These attributes may be used for any network related operation.
+const (
+ // NetworkCarrierIccKey is the attribute Key conforming to the
+ // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
+ // alpha-2 2-character country code associated with the mobile carrier
+ // network.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'DE'
+ NetworkCarrierIccKey = attribute.Key("network.carrier.icc")
+
+ // NetworkCarrierMccKey is the attribute Key conforming to the
+ // "network.carrier.mcc" semantic conventions. It represents the mobile
+ // carrier country code.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '310'
+ NetworkCarrierMccKey = attribute.Key("network.carrier.mcc")
+
+ // NetworkCarrierMncKey is the attribute Key conforming to the
+ // "network.carrier.mnc" semantic conventions. It represents the mobile
+ // carrier network code.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '001'
+ NetworkCarrierMncKey = attribute.Key("network.carrier.mnc")
+
+ // NetworkCarrierNameKey is the attribute Key conforming to the
+ // "network.carrier.name" semantic conventions. It represents the name of
+ // the mobile carrier.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'sprint'
+ NetworkCarrierNameKey = attribute.Key("network.carrier.name")
+
+ // NetworkConnectionSubtypeKey is the attribute Key conforming to the
+ // "network.connection.subtype" semantic conventions. It represents the
+ // this describes more details regarding the connection.type. It may be the
+ // type of cell technology connection, but it could be used for describing
+ // details about a wifi connection.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'LTE'
+ NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype")
+
+ // NetworkConnectionTypeKey is the attribute Key conforming to the
+ // "network.connection.type" semantic conventions. It represents the
+ // internet connection type.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'wifi'
+ NetworkConnectionTypeKey = attribute.Key("network.connection.type")
+
+ // NetworkIoDirectionKey is the attribute Key conforming to the
+ // "network.io.direction" semantic conventions. It represents the network
+ // IO operation direction.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'transmit'
+ NetworkIoDirectionKey = attribute.Key("network.io.direction")
+
+ // NetworkLocalAddressKey is the attribute Key conforming to the
+ // "network.local.address" semantic conventions. It represents the local
+ // address of the network connection - IP address or Unix domain socket
+ // name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '10.1.2.80', '/tmp/my.sock'
+ NetworkLocalAddressKey = attribute.Key("network.local.address")
+
+ // NetworkLocalPortKey is the attribute Key conforming to the
+ // "network.local.port" semantic conventions. It represents the local port
+ // number of the network connection.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 65123
+ NetworkLocalPortKey = attribute.Key("network.local.port")
+
+ // NetworkPeerAddressKey is the attribute Key conforming to the
+ // "network.peer.address" semantic conventions. It represents the peer
+ // address of the network connection - IP address or Unix domain socket
+ // name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '10.1.2.80', '/tmp/my.sock'
+ NetworkPeerAddressKey = attribute.Key("network.peer.address")
+
+ // NetworkPeerPortKey is the attribute Key conforming to the
+ // "network.peer.port" semantic conventions. It represents the peer port
+ // number of the network connection.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 65123
+ NetworkPeerPortKey = attribute.Key("network.peer.port")
+
+ // NetworkProtocolNameKey is the attribute Key conforming to the
+ // "network.protocol.name" semantic conventions. It represents the [OSI
+ // application layer](https://osi-model.com/application-layer/) or non-OSI
+ // equivalent.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'amqp', 'http', 'mqtt'
+ // Note: The value SHOULD be normalized to lowercase.
+ NetworkProtocolNameKey = attribute.Key("network.protocol.name")
+
+ // NetworkProtocolVersionKey is the attribute Key conforming to the
+ // "network.protocol.version" semantic conventions. It represents the
+ // actual version of the protocol used for network communication.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '1.1', '2'
+ // Note: If protocol version is subject to negotiation (for example using
+ // [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute
+ // SHOULD be set to the negotiated version. If the actual protocol version
+ // is not known, this attribute SHOULD NOT be set.
+ NetworkProtocolVersionKey = attribute.Key("network.protocol.version")
+
+ // NetworkTransportKey is the attribute Key conforming to the
+ // "network.transport" semantic conventions. It represents the [OSI
+ // transport layer](https://osi-model.com/transport-layer/) or
+ // [inter-process communication
+ // method](https://wikipedia.org/wiki/Inter-process_communication).
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'tcp', 'udp'
+ // Note: The value SHOULD be normalized to lowercase.
+ //
+ // Consider always setting the transport when setting a port number, since
+ // a port number is ambiguous without knowing the transport. For example
+ // different processes could be listening on TCP port 12345 and UDP port
+ // 12345.
+ NetworkTransportKey = attribute.Key("network.transport")
+
+ // NetworkTypeKey is the attribute Key conforming to the "network.type"
+ // semantic conventions. It represents the [OSI network
+ // layer](https://osi-model.com/network-layer/) or non-OSI equivalent.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'ipv4', 'ipv6'
+ // Note: The value SHOULD be normalized to lowercase.
+ NetworkTypeKey = attribute.Key("network.type")
+)
+
+var (
+ // GPRS
+ NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs")
+ // EDGE
+ NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge")
+ // UMTS
+ NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts")
+ // CDMA
+ NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma")
+ // EVDO Rel. 0
+ NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0")
+ // EVDO Rev. A
+ NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a")
+ // CDMA2000 1XRTT
+ NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt")
+ // HSDPA
+ NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa")
+ // HSUPA
+ NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa")
+ // HSPA
+ NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa")
+ // IDEN
+ NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden")
+ // EVDO Rev. B
+ NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b")
+ // LTE
+ NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte")
+ // EHRPD
+ NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd")
+ // HSPAP
+ NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap")
+ // GSM
+ NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm")
+ // TD-SCDMA
+ NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma")
+ // IWLAN
+ NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan")
+ // 5G NR (New Radio)
+ NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr")
+ // 5G NRNSA (New Radio Non-Standalone)
+ NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa")
+ // LTE CA
+ NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca")
+)
+
+var (
+ // wifi
+ NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi")
+ // wired
+ NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired")
+ // cell
+ NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell")
+ // unavailable
+ NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable")
+ // unknown
+ NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown")
+)
+
+var (
+ // transmit
+ NetworkIoDirectionTransmit = NetworkIoDirectionKey.String("transmit")
+ // receive
+ NetworkIoDirectionReceive = NetworkIoDirectionKey.String("receive")
+)
+
+var (
+ // TCP
+ NetworkTransportTCP = NetworkTransportKey.String("tcp")
+ // UDP
+ NetworkTransportUDP = NetworkTransportKey.String("udp")
+ // Named or anonymous pipe
+ NetworkTransportPipe = NetworkTransportKey.String("pipe")
+ // Unix domain socket
+ NetworkTransportUnix = NetworkTransportKey.String("unix")
+)
+
+var (
+ // IPv4
+ NetworkTypeIpv4 = NetworkTypeKey.String("ipv4")
+ // IPv6
+ NetworkTypeIpv6 = NetworkTypeKey.String("ipv6")
+)
+
+// NetworkCarrierIcc returns an attribute KeyValue conforming to the
+// "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
+// alpha-2 2-character country code associated with the mobile carrier network.
+func NetworkCarrierIcc(val string) attribute.KeyValue {
+ return NetworkCarrierIccKey.String(val)
+}
+
+// NetworkCarrierMcc returns an attribute KeyValue conforming to the
+// "network.carrier.mcc" semantic conventions. It represents the mobile carrier
+// country code.
+func NetworkCarrierMcc(val string) attribute.KeyValue {
+ return NetworkCarrierMccKey.String(val)
+}
+
+// NetworkCarrierMnc returns an attribute KeyValue conforming to the
+// "network.carrier.mnc" semantic conventions. It represents the mobile carrier
+// network code.
+func NetworkCarrierMnc(val string) attribute.KeyValue {
+ return NetworkCarrierMncKey.String(val)
+}
+
+// NetworkCarrierName returns an attribute KeyValue conforming to the
+// "network.carrier.name" semantic conventions. It represents the name of the
+// mobile carrier.
+func NetworkCarrierName(val string) attribute.KeyValue {
+ return NetworkCarrierNameKey.String(val)
+}
+
+// NetworkLocalAddress returns an attribute KeyValue conforming to the
+// "network.local.address" semantic conventions. It represents the local
+// address of the network connection - IP address or Unix domain socket name.
+func NetworkLocalAddress(val string) attribute.KeyValue {
+ return NetworkLocalAddressKey.String(val)
+}
+
+// NetworkLocalPort returns an attribute KeyValue conforming to the
+// "network.local.port" semantic conventions. It represents the local port
+// number of the network connection.
+func NetworkLocalPort(val int) attribute.KeyValue {
+ return NetworkLocalPortKey.Int(val)
+}
+
+// NetworkPeerAddress returns an attribute KeyValue conforming to the
+// "network.peer.address" semantic conventions. It represents the peer address
+// of the network connection - IP address or Unix domain socket name.
+func NetworkPeerAddress(val string) attribute.KeyValue {
+ return NetworkPeerAddressKey.String(val)
+}
+
+// NetworkPeerPort returns an attribute KeyValue conforming to the
+// "network.peer.port" semantic conventions. It represents the peer port number
+// of the network connection.
+func NetworkPeerPort(val int) attribute.KeyValue {
+ return NetworkPeerPortKey.Int(val)
+}
+
+// NetworkProtocolName returns an attribute KeyValue conforming to the
+// "network.protocol.name" semantic conventions. It represents the [OSI
+// application layer](https://osi-model.com/application-layer/) or non-OSI
+// equivalent.
+func NetworkProtocolName(val string) attribute.KeyValue {
+ return NetworkProtocolNameKey.String(val)
+}
+
+// NetworkProtocolVersion returns an attribute KeyValue conforming to the
+// "network.protocol.version" semantic conventions. It represents the actual
+// version of the protocol used for network communication.
+func NetworkProtocolVersion(val string) attribute.KeyValue {
+ return NetworkProtocolVersionKey.String(val)
+}
+
+// An OCI image manifest.
+const (
+ // OciManifestDigestKey is the attribute Key conforming to the
+ // "oci.manifest.digest" semantic conventions. It represents the digest of
+ // the OCI image manifest. For container images specifically is the digest
+ // by which the container image is known.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples:
+ // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4'
+ // Note: Follows [OCI Image Manifest
+ // Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md),
+ // and specifically the [Digest
+ // property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests).
+ // An example can be found in [Example Image
+ // Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest).
+ OciManifestDigestKey = attribute.Key("oci.manifest.digest")
+)
+
+// OciManifestDigest returns an attribute KeyValue conforming to the
+// "oci.manifest.digest" semantic conventions. It represents the digest of the
+// OCI image manifest. For container images specifically is the digest by which
+// the container image is known.
+func OciManifestDigest(val string) attribute.KeyValue {
+ return OciManifestDigestKey.String(val)
+}
+
+// Attributes used by the OpenTracing Shim layer.
+const (
+ // OpentracingRefTypeKey is the attribute Key conforming to the
+ // "opentracing.ref_type" semantic conventions. It represents the
+ // parent-child Reference type
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Note: The causal relationship between a child Span and a parent Span.
+ OpentracingRefTypeKey = attribute.Key("opentracing.ref_type")
+)
+
+var (
+ // The parent Span depends on the child Span in some capacity
+ OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of")
+ // The parent Span doesn't depend in any way on the result of the child Span
+ OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from")
+)
+
+// The operating system (OS) on which the process represented by this resource
+// is running.
+const (
+ // OSBuildIDKey is the attribute Key conforming to the "os.build_id"
+ // semantic conventions. It represents the unique identifier for a
+ // particular build or compilation of the operating system.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'TQ3C.230805.001.B2', '20E247', '22621'
+ OSBuildIDKey = attribute.Key("os.build_id")
+
+ // OSDescriptionKey is the attribute Key conforming to the "os.description"
+ // semantic conventions. It represents the human readable (not intended to
+ // be parsed) OS version information, like e.g. reported by `ver` or
+ // `lsb_release -a` commands.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1
+ // LTS'
+ OSDescriptionKey = attribute.Key("os.description")
+
+ // OSNameKey is the attribute Key conforming to the "os.name" semantic
+ // conventions. It represents the human readable operating system name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'iOS', 'Android', 'Ubuntu'
+ OSNameKey = attribute.Key("os.name")
+
+ // OSTypeKey is the attribute Key conforming to the "os.type" semantic
+ // conventions. It represents the operating system type.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ OSTypeKey = attribute.Key("os.type")
+
+ // OSVersionKey is the attribute Key conforming to the "os.version"
+ // semantic conventions. It represents the version string of the operating
+ // system as defined in [Version
+ // Attributes](/docs/resource/README.md#version-attributes).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '14.2.1', '18.04.1'
+ OSVersionKey = attribute.Key("os.version")
+)
+
+var (
+ // Microsoft Windows
+ OSTypeWindows = OSTypeKey.String("windows")
+ // Linux
+ OSTypeLinux = OSTypeKey.String("linux")
+ // Apple Darwin
+ OSTypeDarwin = OSTypeKey.String("darwin")
+ // FreeBSD
+ OSTypeFreeBSD = OSTypeKey.String("freebsd")
+ // NetBSD
+ OSTypeNetBSD = OSTypeKey.String("netbsd")
+ // OpenBSD
+ OSTypeOpenBSD = OSTypeKey.String("openbsd")
+ // DragonFly BSD
+ OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
+ // HP-UX (Hewlett Packard Unix)
+ OSTypeHPUX = OSTypeKey.String("hpux")
+ // AIX (Advanced Interactive eXecutive)
+ OSTypeAIX = OSTypeKey.String("aix")
+ // SunOS, Oracle Solaris
+ OSTypeSolaris = OSTypeKey.String("solaris")
+ // IBM z/OS
+ OSTypeZOS = OSTypeKey.String("z_os")
+)
+
+// OSBuildID returns an attribute KeyValue conforming to the "os.build_id"
+// semantic conventions. It represents the unique identifier for a particular
+// build or compilation of the operating system.
+func OSBuildID(val string) attribute.KeyValue {
+ return OSBuildIDKey.String(val)
+}
+
+// OSDescription returns an attribute KeyValue conforming to the
+// "os.description" semantic conventions. It represents the human readable (not
+// intended to be parsed) OS version information, like e.g. reported by `ver`
+// or `lsb_release -a` commands.
+func OSDescription(val string) attribute.KeyValue {
+ return OSDescriptionKey.String(val)
+}
+
+// OSName returns an attribute KeyValue conforming to the "os.name" semantic
+// conventions. It represents the human readable operating system name.
+func OSName(val string) attribute.KeyValue {
+ return OSNameKey.String(val)
+}
+
+// OSVersion returns an attribute KeyValue conforming to the "os.version"
+// semantic conventions. It represents the version string of the operating
+// system as defined in [Version
+// Attributes](/docs/resource/README.md#version-attributes).
+func OSVersion(val string) attribute.KeyValue {
+ return OSVersionKey.String(val)
+}
+
+// Attributes reserved for OpenTelemetry
+const (
+ // OTelStatusCodeKey is the attribute Key conforming to the
+ // "otel.status_code" semantic conventions. It represents the name of the
+ // code, either "OK" or "ERROR". MUST NOT be set if the status code is
+ // UNSET.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ OTelStatusCodeKey = attribute.Key("otel.status_code")
+
+ // OTelStatusDescriptionKey is the attribute Key conforming to the
+ // "otel.status_description" semantic conventions. It represents the
+ // description of the Status if it has a value, otherwise not set.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'resource not found'
+ OTelStatusDescriptionKey = attribute.Key("otel.status_description")
+)
+
+var (
+ // The operation has been validated by an Application developer or Operator to have completed successfully
+ OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
+ // The operation contains an error
+ OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
+)
+
+// OTelStatusDescription returns an attribute KeyValue conforming to the
+// "otel.status_description" semantic conventions. It represents the
+// description of the Status if it has a value, otherwise not set.
+func OTelStatusDescription(val string) attribute.KeyValue {
+ return OTelStatusDescriptionKey.String(val)
+}
+
+// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's
+// concepts.
+const (
+ // OTelScopeNameKey is the attribute Key conforming to the
+ // "otel.scope.name" semantic conventions. It represents the name of the
+ // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'io.opentelemetry.contrib.mongodb'
+ OTelScopeNameKey = attribute.Key("otel.scope.name")
+
+ // OTelScopeVersionKey is the attribute Key conforming to the
+ // "otel.scope.version" semantic conventions. It represents the version of
+ // the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '1.0.0'
+ OTelScopeVersionKey = attribute.Key("otel.scope.version")
+)
+
+// OTelScopeName returns an attribute KeyValue conforming to the
+// "otel.scope.name" semantic conventions. It represents the name of the
+// instrumentation scope - (`InstrumentationScope.Name` in OTLP).
+func OTelScopeName(val string) attribute.KeyValue {
+ return OTelScopeNameKey.String(val)
+}
+
+// OTelScopeVersion returns an attribute KeyValue conforming to the
+// "otel.scope.version" semantic conventions. It represents the version of the
+// instrumentation scope - (`InstrumentationScope.Version` in OTLP).
+func OTelScopeVersion(val string) attribute.KeyValue {
+ return OTelScopeVersionKey.String(val)
+}
+
+// Operations that access some remote service.
+const (
+ // PeerServiceKey is the attribute Key conforming to the "peer.service"
+ // semantic conventions. It represents the
+ // [`service.name`](/docs/resource/README.md#service) of the remote
+ // service. SHOULD be equal to the actual `service.name` resource attribute
+ // of the remote service if any.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'AuthTokenCache'
+ PeerServiceKey = attribute.Key("peer.service")
+)
+
+// PeerService returns an attribute KeyValue conforming to the
+// "peer.service" semantic conventions. It represents the
+// [`service.name`](/docs/resource/README.md#service) of the remote service.
+// SHOULD be equal to the actual `service.name` resource attribute of the
+// remote service if any.
+func PeerService(val string) attribute.KeyValue {
+ return PeerServiceKey.String(val)
+}
+
+// An operating system process.
+const (
+ // ProcessCommandKey is the attribute Key conforming to the
+ // "process.command" semantic conventions. It represents the command used
+ // to launch the process (i.e. the command name). On Linux based systems,
+ // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can
+ // be set to the first parameter extracted from `GetCommandLineW`.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'cmd/otelcol'
+ ProcessCommandKey = attribute.Key("process.command")
+
+ // ProcessCommandArgsKey is the attribute Key conforming to the
+ // "process.command_args" semantic conventions. It represents the all the
+ // command arguments (including the command/executable itself) as received
+ // by the process. On Linux-based systems (and some other Unixoid systems
+ // supporting procfs), can be set according to the list of null-delimited
+ // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
+ // this would be the full argv vector passed to `main`.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'cmd/otecol', '--config=config.yaml'
+ ProcessCommandArgsKey = attribute.Key("process.command_args")
+
+ // ProcessCommandLineKey is the attribute Key conforming to the
+ // "process.command_line" semantic conventions. It represents the full
+ // command used to launch the process as a single string representing the
+ // full command. On Windows, can be set to the result of `GetCommandLineW`.
+ // Do not set this if you have to assemble it just for monitoring; use
+ // `process.command_args` instead.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"'
+ ProcessCommandLineKey = attribute.Key("process.command_line")
+
+ // ProcessContextSwitchTypeKey is the attribute Key conforming to the
+ // "process.context_switch_type" semantic conventions. It represents the
+ // specifies whether the context switches for this data point were
+ // voluntary or involuntary.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ ProcessContextSwitchTypeKey = attribute.Key("process.context_switch_type")
+
+ // ProcessCreationTimeKey is the attribute Key conforming to the
+ // "process.creation.time" semantic conventions. It represents the date and
+ // time the process was created, in ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '2023-11-21T09:25:34.853Z'
+ ProcessCreationTimeKey = attribute.Key("process.creation.time")
+
+ // ProcessExecutableNameKey is the attribute Key conforming to the
+ // "process.executable.name" semantic conventions. It represents the name
+ // of the process executable. On Linux based systems, can be set to the
+ // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name
+ // of `GetProcessImageFileNameW`.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'otelcol'
+ ProcessExecutableNameKey = attribute.Key("process.executable.name")
+
+ // ProcessExecutablePathKey is the attribute Key conforming to the
+ // "process.executable.path" semantic conventions. It represents the full
+ // path to the process executable. On Linux based systems, can be set to
+ // the target of `proc/[pid]/exe`. On Windows, can be set to the result of
+ // `GetProcessImageFileNameW`.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '/usr/bin/cmd/otelcol'
+ ProcessExecutablePathKey = attribute.Key("process.executable.path")
+
+ // ProcessExitCodeKey is the attribute Key conforming to the
+ // "process.exit.code" semantic conventions. It represents the exit code of
+ // the process.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 127
+ ProcessExitCodeKey = attribute.Key("process.exit.code")
+
+ // ProcessExitTimeKey is the attribute Key conforming to the
+ // "process.exit.time" semantic conventions. It represents the date and
+ // time the process exited, in ISO 8601 format.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '2023-11-21T09:26:12.315Z'
+ ProcessExitTimeKey = attribute.Key("process.exit.time")
+
+ // ProcessGroupLeaderPIDKey is the attribute Key conforming to the
+ // "process.group_leader.pid" semantic conventions. It represents the PID
+ // of the process's group leader. This is also the process group ID (PGID)
+ // of the process.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 23
+ ProcessGroupLeaderPIDKey = attribute.Key("process.group_leader.pid")
+
+ // ProcessInteractiveKey is the attribute Key conforming to the
+ // "process.interactive" semantic conventions. It represents the whether
+ // the process is connected to an interactive shell.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ ProcessInteractiveKey = attribute.Key("process.interactive")
+
+ // ProcessOwnerKey is the attribute Key conforming to the "process.owner"
+ // semantic conventions. It represents the username of the user that owns
+ // the process.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'root'
+ ProcessOwnerKey = attribute.Key("process.owner")
+
+ // ProcessPagingFaultTypeKey is the attribute Key conforming to the
+ // "process.paging.fault_type" semantic conventions. It represents the type
+ // of page fault for this data point. Type `major` is for major/hard page
+ // faults, and `minor` is for minor/soft page faults.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ ProcessPagingFaultTypeKey = attribute.Key("process.paging.fault_type")
+
+ // ProcessParentPIDKey is the attribute Key conforming to the
+ // "process.parent_pid" semantic conventions. It represents the parent
+ // Process identifier (PPID).
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 111
+ ProcessParentPIDKey = attribute.Key("process.parent_pid")
+
+ // ProcessPIDKey is the attribute Key conforming to the "process.pid"
+ // semantic conventions. It represents the process identifier (PID).
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1234
+ ProcessPIDKey = attribute.Key("process.pid")
+
+ // ProcessRealUserIDKey is the attribute Key conforming to the
+ // "process.real_user.id" semantic conventions. It represents the real user
+ // ID (RUID) of the process.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1000
+ ProcessRealUserIDKey = attribute.Key("process.real_user.id")
+
+ // ProcessRealUserNameKey is the attribute Key conforming to the
+ // "process.real_user.name" semantic conventions. It represents the
+ // username of the real user of the process.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'operator'
+ ProcessRealUserNameKey = attribute.Key("process.real_user.name")
+
+ // ProcessRuntimeDescriptionKey is the attribute Key conforming to the
+ // "process.runtime.description" semantic conventions. It represents an
+ // additional description about the runtime of the process, for example a
+ // specific vendor customization of the runtime environment.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0'
+ ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
+
+ // ProcessRuntimeNameKey is the attribute Key conforming to the
+ // "process.runtime.name" semantic conventions. It represents the name of
+ // the runtime of this process. For compiled native binaries, this SHOULD
+ // be the name of the compiler.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'OpenJDK Runtime Environment'
+ ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
+
+ // ProcessRuntimeVersionKey is the attribute Key conforming to the
+ // "process.runtime.version" semantic conventions. It represents the
+ // version of the runtime of this process, as returned by the runtime
+ // without modification.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '14.0.2'
+ ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
+
+ // ProcessSavedUserIDKey is the attribute Key conforming to the
+ // "process.saved_user.id" semantic conventions. It represents the saved
+ // user ID (SUID) of the process.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1002
+ ProcessSavedUserIDKey = attribute.Key("process.saved_user.id")
+
+ // ProcessSavedUserNameKey is the attribute Key conforming to the
+ // "process.saved_user.name" semantic conventions. It represents the
+ // username of the saved user.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'operator'
+ ProcessSavedUserNameKey = attribute.Key("process.saved_user.name")
+
+ // ProcessSessionLeaderPIDKey is the attribute Key conforming to the
+ // "process.session_leader.pid" semantic conventions. It represents the PID
+ // of the process's session leader. This is also the session ID (SID) of
+ // the process.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 14
+ ProcessSessionLeaderPIDKey = attribute.Key("process.session_leader.pid")
+
+ // ProcessUserIDKey is the attribute Key conforming to the
+ // "process.user.id" semantic conventions. It represents the effective user
+ // ID (EUID) of the process.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1001
+ ProcessUserIDKey = attribute.Key("process.user.id")
+
+ // ProcessUserNameKey is the attribute Key conforming to the
+ // "process.user.name" semantic conventions. It represents the username of
+ // the effective user of the process.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'root'
+ ProcessUserNameKey = attribute.Key("process.user.name")
+
+ // ProcessVpidKey is the attribute Key conforming to the "process.vpid"
+ // semantic conventions. It represents the virtual process identifier.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 12
+ // Note: The process ID within a PID namespace. This is not necessarily
+ // unique across all processes on the host but it is unique within the
+ // process namespace that the process exists within.
+ ProcessVpidKey = attribute.Key("process.vpid")
+)
+
+var (
+ // voluntary
+ ProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String("voluntary")
+ // involuntary
+ ProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String("involuntary")
+)
+
+var (
+ // major
+ ProcessPagingFaultTypeMajor = ProcessPagingFaultTypeKey.String("major")
+ // minor
+ ProcessPagingFaultTypeMinor = ProcessPagingFaultTypeKey.String("minor")
+)
+
+// ProcessCommand returns an attribute KeyValue conforming to the
+// "process.command" semantic conventions. It represents the command used to
+// launch the process (i.e. the command name). On Linux based systems, can be
+// set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to
+// the first parameter extracted from `GetCommandLineW`.
+func ProcessCommand(val string) attribute.KeyValue {
+ return ProcessCommandKey.String(val)
+}
+
+// ProcessCommandArgs returns an attribute KeyValue conforming to the
+// "process.command_args" semantic conventions. It represents the all the
+// command arguments (including the command/executable itself) as received by
+// the process. On Linux-based systems (and some other Unixoid systems
+// supporting procfs), can be set according to the list of null-delimited
+// strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
+// this would be the full argv vector passed to `main`.
+func ProcessCommandArgs(val ...string) attribute.KeyValue {
+ return ProcessCommandArgsKey.StringSlice(val)
+}
+
+// ProcessCommandLine returns an attribute KeyValue conforming to the
+// "process.command_line" semantic conventions. It represents the full command
+// used to launch the process as a single string representing the full command.
+// On Windows, can be set to the result of `GetCommandLineW`. Do not set this
+// if you have to assemble it just for monitoring; use `process.command_args`
+// instead.
+func ProcessCommandLine(val string) attribute.KeyValue {
+ return ProcessCommandLineKey.String(val)
+}
+
+// ProcessCreationTime returns an attribute KeyValue conforming to the
+// "process.creation.time" semantic conventions. It represents the date and
+// time the process was created, in ISO 8601 format.
+func ProcessCreationTime(val string) attribute.KeyValue {
+ return ProcessCreationTimeKey.String(val)
+}
+
+// ProcessExecutableName returns an attribute KeyValue conforming to the
+// "process.executable.name" semantic conventions. It represents the name of
+// the process executable. On Linux based systems, can be set to the `Name` in
+// `proc/[pid]/status`. On Windows, can be set to the base name of
+// `GetProcessImageFileNameW`.
+func ProcessExecutableName(val string) attribute.KeyValue {
+ return ProcessExecutableNameKey.String(val)
+}
+
+// ProcessExecutablePath returns an attribute KeyValue conforming to the
+// "process.executable.path" semantic conventions. It represents the full path
+// to the process executable. On Linux based systems, can be set to the target
+// of `proc/[pid]/exe`. On Windows, can be set to the result of
+// `GetProcessImageFileNameW`.
+func ProcessExecutablePath(val string) attribute.KeyValue {
+ return ProcessExecutablePathKey.String(val)
+}
+
+// ProcessExitCode returns an attribute KeyValue conforming to the
+// "process.exit.code" semantic conventions. It represents the exit code of the
+// process.
+func ProcessExitCode(val int) attribute.KeyValue {
+ return ProcessExitCodeKey.Int(val)
+}
+
+// ProcessExitTime returns an attribute KeyValue conforming to the
+// "process.exit.time" semantic conventions. It represents the date and time
+// the process exited, in ISO 8601 format.
+func ProcessExitTime(val string) attribute.KeyValue {
+ return ProcessExitTimeKey.String(val)
+}
+
+// ProcessGroupLeaderPID returns an attribute KeyValue conforming to the
+// "process.group_leader.pid" semantic conventions. It represents the PID of
+// the process's group leader. This is also the process group ID (PGID) of the
+// process.
+func ProcessGroupLeaderPID(val int) attribute.KeyValue {
+ return ProcessGroupLeaderPIDKey.Int(val)
+}
+
+// ProcessInteractive returns an attribute KeyValue conforming to the
+// "process.interactive" semantic conventions. It represents the whether the
+// process is connected to an interactive shell.
+func ProcessInteractive(val bool) attribute.KeyValue {
+ return ProcessInteractiveKey.Bool(val)
+}
+
+// ProcessOwner returns an attribute KeyValue conforming to the
+// "process.owner" semantic conventions. It represents the username of the user
+// that owns the process.
+func ProcessOwner(val string) attribute.KeyValue {
+ return ProcessOwnerKey.String(val)
+}
+
+// ProcessParentPID returns an attribute KeyValue conforming to the
+// "process.parent_pid" semantic conventions. It represents the parent Process
+// identifier (PPID).
+func ProcessParentPID(val int) attribute.KeyValue {
+ return ProcessParentPIDKey.Int(val)
+}
+
+// ProcessPID returns an attribute KeyValue conforming to the "process.pid"
+// semantic conventions. It represents the process identifier (PID).
+func ProcessPID(val int) attribute.KeyValue {
+ return ProcessPIDKey.Int(val)
+}
+
+// ProcessRealUserID returns an attribute KeyValue conforming to the
+// "process.real_user.id" semantic conventions. It represents the real user ID
+// (RUID) of the process.
+func ProcessRealUserID(val int) attribute.KeyValue {
+ return ProcessRealUserIDKey.Int(val)
+}
+
+// ProcessRealUserName returns an attribute KeyValue conforming to the
+// "process.real_user.name" semantic conventions. It represents the username of
+// the real user of the process.
+func ProcessRealUserName(val string) attribute.KeyValue {
+ return ProcessRealUserNameKey.String(val)
+}
+
+// ProcessRuntimeDescription returns an attribute KeyValue conforming to the
+// "process.runtime.description" semantic conventions. It represents an
+// additional description about the runtime of the process, for example a
+// specific vendor customization of the runtime environment.
+func ProcessRuntimeDescription(val string) attribute.KeyValue {
+ return ProcessRuntimeDescriptionKey.String(val)
+}
+
+// ProcessRuntimeName returns an attribute KeyValue conforming to the
+// "process.runtime.name" semantic conventions. It represents the name of the
+// runtime of this process. For compiled native binaries, this SHOULD be the
+// name of the compiler.
+func ProcessRuntimeName(val string) attribute.KeyValue {
+ return ProcessRuntimeNameKey.String(val)
+}
+
+// ProcessRuntimeVersion returns an attribute KeyValue conforming to the
+// "process.runtime.version" semantic conventions. It represents the version of
+// the runtime of this process, as returned by the runtime without
+// modification.
+func ProcessRuntimeVersion(val string) attribute.KeyValue {
+ return ProcessRuntimeVersionKey.String(val)
+}
+
+// ProcessSavedUserID returns an attribute KeyValue conforming to the
+// "process.saved_user.id" semantic conventions. It represents the saved user
+// ID (SUID) of the process.
+func ProcessSavedUserID(val int) attribute.KeyValue {
+ return ProcessSavedUserIDKey.Int(val)
+}
+
+// ProcessSavedUserName returns an attribute KeyValue conforming to the
+// "process.saved_user.name" semantic conventions. It represents the username
+// of the saved user.
+func ProcessSavedUserName(val string) attribute.KeyValue {
+ return ProcessSavedUserNameKey.String(val)
+}
+
+// ProcessSessionLeaderPID returns an attribute KeyValue conforming to the
+// "process.session_leader.pid" semantic conventions. It represents the PID of
+// the process's session leader. This is also the session ID (SID) of the
+// process.
+func ProcessSessionLeaderPID(val int) attribute.KeyValue {
+ return ProcessSessionLeaderPIDKey.Int(val)
+}
+
+// ProcessUserID returns an attribute KeyValue conforming to the
+// "process.user.id" semantic conventions. It represents the effective user ID
+// (EUID) of the process.
+func ProcessUserID(val int) attribute.KeyValue {
+ return ProcessUserIDKey.Int(val)
+}
+
+// ProcessUserName returns an attribute KeyValue conforming to the
+// "process.user.name" semantic conventions. It represents the username of the
+// effective user of the process.
+func ProcessUserName(val string) attribute.KeyValue {
+ return ProcessUserNameKey.String(val)
+}
+
+// ProcessVpid returns an attribute KeyValue conforming to the
+// "process.vpid" semantic conventions. It represents the virtual process
+// identifier.
+func ProcessVpid(val int) attribute.KeyValue {
+ return ProcessVpidKey.Int(val)
+}
+
+// Attributes for process CPU
+const (
+ // ProcessCPUStateKey is the attribute Key conforming to the
+ // "process.cpu.state" semantic conventions. It represents the CPU state of
+ // the process.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ ProcessCPUStateKey = attribute.Key("process.cpu.state")
+)
+
+var (
+ // system
+ ProcessCPUStateSystem = ProcessCPUStateKey.String("system")
+ // user
+ ProcessCPUStateUser = ProcessCPUStateKey.String("user")
+ // wait
+ ProcessCPUStateWait = ProcessCPUStateKey.String("wait")
+)
+
+// Attributes for remote procedure calls.
+const (
+ // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the
+ // "rpc.connect_rpc.error_code" semantic conventions. It represents the
+ // [error codes](https://connect.build/docs/protocol/#error-codes) of the
+ // Connect request. Error codes are always string values.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code")
+
+ // RPCGRPCStatusCodeKey is the attribute Key conforming to the
+ // "rpc.grpc.status_code" semantic conventions. It represents the [numeric
+ // status
+ // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of
+ // the gRPC request.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
+
+ // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.error_code" semantic conventions. It represents the
+ // `error.code` property of response if it is an error response.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: -32700, 100
+ RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
+
+ // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.error_message" semantic conventions. It represents the
+ // `error.message` property of response if it is an error response.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Parse error', 'User already exists'
+ RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
+
+ // RPCJsonrpcRequestIDKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
+ // property of request or response. Since protocol allows id to be int,
+ // string, `null` or missing (for notifications), value is expected to be
+ // cast to string for simplicity. Use empty string in case of `null` value.
+ // Omit entirely if this is a notification.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '10', 'request-7', ''
+ RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
+
+ // RPCJsonrpcVersionKey is the attribute Key conforming to the
+ // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
+ // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
+ // doesn't specify this, the value can be omitted.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '2.0', '1.0'
+ RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
+
+ // RPCMessageCompressedSizeKey is the attribute Key conforming to the
+ // "rpc.message.compressed_size" semantic conventions. It represents the
+ // compressed size of the message in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ RPCMessageCompressedSizeKey = attribute.Key("rpc.message.compressed_size")
+
+ // RPCMessageIDKey is the attribute Key conforming to the "rpc.message.id"
+ // semantic conventions. It represents the mUST be calculated as two
+ // different counters starting from `1` one for sent messages and one for
+ // received message.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Note: This way we guarantee that the values will be consistent between
+ // different implementations.
+ RPCMessageIDKey = attribute.Key("rpc.message.id")
+
+ // RPCMessageTypeKey is the attribute Key conforming to the
+ // "rpc.message.type" semantic conventions. It represents the whether this
+ // is a received or sent message.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ RPCMessageTypeKey = attribute.Key("rpc.message.type")
+
+ // RPCMessageUncompressedSizeKey is the attribute Key conforming to the
+ // "rpc.message.uncompressed_size" semantic conventions. It represents the
+ // uncompressed size of the message in bytes.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ RPCMessageUncompressedSizeKey = attribute.Key("rpc.message.uncompressed_size")
+
+ // RPCMethodKey is the attribute Key conforming to the "rpc.method"
+ // semantic conventions. It represents the name of the (logical) method
+ // being called, must be equal to the $method part in the span name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'exampleMethod'
+ // Note: This is the logical name of the method from the RPC interface
+ // perspective, which can be different from the name of any implementing
+ // method/function. The `code.function` attribute may be used to store the
+ // latter (e.g., method actually executing the call on the server side, RPC
+ // client stub method on the client side).
+ RPCMethodKey = attribute.Key("rpc.method")
+
+ // RPCServiceKey is the attribute Key conforming to the "rpc.service"
+ // semantic conventions. It represents the full (logical) name of the
+ // service being called, including its package name, if applicable.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'myservice.EchoService'
+ // Note: This is the logical name of the service from the RPC interface
+ // perspective, which can be different from the name of any implementing
+ // class. The `code.namespace` attribute may be used to store the latter
+ // (despite the attribute name, it may include a class name; e.g., class
+ // with method actually executing the call on the server side, RPC client
+ // stub class on the client side).
+ RPCServiceKey = attribute.Key("rpc.service")
+
+ // RPCSystemKey is the attribute Key conforming to the "rpc.system"
+ // semantic conventions. It represents a string identifying the remoting
+ // system. See below for a list of well-known identifiers.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ RPCSystemKey = attribute.Key("rpc.system")
+)
+
+var (
+ // cancelled
+ RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled")
+ // unknown
+ RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown")
+ // invalid_argument
+ RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument")
+ // deadline_exceeded
+ RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded")
+ // not_found
+ RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found")
+ // already_exists
+ RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists")
+ // permission_denied
+ RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied")
+ // resource_exhausted
+ RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted")
+ // failed_precondition
+ RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition")
+ // aborted
+ RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted")
+ // out_of_range
+ RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range")
+ // unimplemented
+ RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented")
+ // internal
+ RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal")
+ // unavailable
+ RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable")
+ // data_loss
+ RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss")
+ // unauthenticated
+ RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated")
+)
+
+var (
+ // OK
+ RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
+ // CANCELLED
+ RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
+ // UNKNOWN
+ RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
+ // INVALID_ARGUMENT
+ RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
+ // DEADLINE_EXCEEDED
+ RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
+ // NOT_FOUND
+ RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
+ // ALREADY_EXISTS
+ RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
+ // PERMISSION_DENIED
+ RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
+ // RESOURCE_EXHAUSTED
+ RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
+ // FAILED_PRECONDITION
+ RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
+ // ABORTED
+ RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
+ // OUT_OF_RANGE
+ RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
+ // UNIMPLEMENTED
+ RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
+ // INTERNAL
+ RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
+ // UNAVAILABLE
+ RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
+ // DATA_LOSS
+ RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
+ // UNAUTHENTICATED
+ RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
+)
+
+var (
+ // sent
+ RPCMessageTypeSent = RPCMessageTypeKey.String("SENT")
+ // received
+ RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED")
+)
+
+var (
+ // gRPC
+ RPCSystemGRPC = RPCSystemKey.String("grpc")
+ // Java RMI
+ RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
+ // .NET WCF
+ RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
+ // Apache Dubbo
+ RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
+ // Connect RPC
+ RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc")
+)
+
+// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.error_code" semantic conventions. It represents the
+// `error.code` property of response if it is an error response.
+func RPCJsonrpcErrorCode(val int) attribute.KeyValue {
+ return RPCJsonrpcErrorCodeKey.Int(val)
+}
+
+// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.error_message" semantic conventions. It represents the
+// `error.message` property of response if it is an error response.
+func RPCJsonrpcErrorMessage(val string) attribute.KeyValue {
+ return RPCJsonrpcErrorMessageKey.String(val)
+}
+
+// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
+// property of request or response. Since protocol allows id to be int, string,
+// `null` or missing (for notifications), value is expected to be cast to
+// string for simplicity. Use empty string in case of `null` value. Omit
+// entirely if this is a notification.
+func RPCJsonrpcRequestID(val string) attribute.KeyValue {
+ return RPCJsonrpcRequestIDKey.String(val)
+}
+
+// RPCJsonrpcVersion returns an attribute KeyValue conforming to the
+// "rpc.jsonrpc.version" semantic conventions. It represents the protocol
+// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
+// doesn't specify this, the value can be omitted.
+func RPCJsonrpcVersion(val string) attribute.KeyValue {
+ return RPCJsonrpcVersionKey.String(val)
+}
+
+// RPCMessageCompressedSize returns an attribute KeyValue conforming to the
+// "rpc.message.compressed_size" semantic conventions. It represents the
+// compressed size of the message in bytes.
+func RPCMessageCompressedSize(val int) attribute.KeyValue {
+ return RPCMessageCompressedSizeKey.Int(val)
+}
+
+// RPCMessageID returns an attribute KeyValue conforming to the
+// "rpc.message.id" semantic conventions. It represents the mUST be calculated
+// as two different counters starting from `1` one for sent messages and one
+// for received message.
+func RPCMessageID(val int) attribute.KeyValue {
+ return RPCMessageIDKey.Int(val)
+}
+
+// RPCMessageUncompressedSize returns an attribute KeyValue conforming to
+// the "rpc.message.uncompressed_size" semantic conventions. It represents the
+// uncompressed size of the message in bytes.
+func RPCMessageUncompressedSize(val int) attribute.KeyValue {
+ return RPCMessageUncompressedSizeKey.Int(val)
+}
+
+// RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
+// semantic conventions. It represents the name of the (logical) method being
+// called, must be equal to the $method part in the span name.
+func RPCMethod(val string) attribute.KeyValue {
+ return RPCMethodKey.String(val)
+}
+
+// RPCService returns an attribute KeyValue conforming to the "rpc.service"
+// semantic conventions. It represents the full (logical) name of the service
+// being called, including its package name, if applicable.
+func RPCService(val string) attribute.KeyValue {
+ return RPCServiceKey.String(val)
+}
+
+// These attributes may be used to describe the server in a connection-based
+// network interaction where there is one side that initiates the connection
+// (the client is the side that initiates the connection). This covers all TCP
+// network interactions since TCP is connection-based and one side initiates
+// the connection (an exception is made for peer-to-peer communication over TCP
+// where the "user-facing" surface of the protocol / API doesn't expose a clear
+// notion of client and server). This also covers UDP network interactions
+// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
+const (
+ // ServerAddressKey is the attribute Key conforming to the "server.address"
+ // semantic conventions. It represents the server domain name if available
+ // without reverse DNS lookup; otherwise, IP address or Unix domain socket
+ // name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock'
+ // Note: When observed from the client side, and when communicating through
+ // an intermediary, `server.address` SHOULD represent the server address
+ // behind any intermediaries, for example proxies, if it's available.
+ ServerAddressKey = attribute.Key("server.address")
+
+ // ServerPortKey is the attribute Key conforming to the "server.port"
+ // semantic conventions. It represents the server port number.
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 80, 8080, 443
+ // Note: When observed from the client side, and when communicating through
+ // an intermediary, `server.port` SHOULD represent the server port behind
+ // any intermediaries, for example proxies, if it's available.
+ ServerPortKey = attribute.Key("server.port")
+)
+
+// ServerAddress returns an attribute KeyValue conforming to the
+// "server.address" semantic conventions. It represents the server domain name
+// if available without reverse DNS lookup; otherwise, IP address or Unix
+// domain socket name.
+func ServerAddress(val string) attribute.KeyValue {
+ return ServerAddressKey.String(val)
+}
+
+// ServerPort returns an attribute KeyValue conforming to the "server.port"
+// semantic conventions. It represents the server port number.
+func ServerPort(val int) attribute.KeyValue {
+ return ServerPortKey.Int(val)
+}
+
+// A service instance.
+const (
+ // ServiceInstanceIDKey is the attribute Key conforming to the
+ // "service.instance.id" semantic conventions. It represents the string ID
+ // of the service instance.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '627cc493-f310-47de-96bd-71410b7dec09'
+ // Note: MUST be unique for each instance of the same
+ // `service.namespace,service.name` pair (in other words
+ // `service.namespace,service.name,service.instance.id` triplet MUST be
+ // globally unique). The ID helps to
+ // distinguish instances of the same service that exist at the same time
+ // (e.g. instances of a horizontally scaled
+ // service).
+ //
+ // Implementations, such as SDKs, are recommended to generate a random
+ // Version 1 or Version 4 [RFC
+ // 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an
+ // inherent unique ID as the source of
+ // this value if stability is desirable. In that case, the ID SHOULD be
+ // used as source of a UUID Version 5 and
+ // SHOULD use the following UUID as the namespace:
+ // `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.
+ //
+ // UUIDs are typically recommended, as only an opaque value for the
+ // purposes of identifying a service instance is
+ // needed. Similar to what can be seen in the man page for the
+ // [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html)
+ // file, the underlying
+ // data, such as pod name and namespace should be treated as confidential,
+ // being the user's choice to expose it
+ // or not via another resource attribute.
+ //
+ // For applications running behind an application server (like unicorn), we
+ // do not recommend using one identifier
+ // for all processes participating in the application. Instead, it's
+ // recommended each division (e.g. a worker
+ // thread in unicorn) to have its own instance.id.
+ //
+ // It's not recommended for a Collector to set `service.instance.id` if it
+ // can't unambiguously determine the
+ // service instance that is generating that telemetry. For instance,
+ // creating an UUID based on `pod.name` will
+ // likely be wrong, as the Collector might not know from which container
+ // within that pod the telemetry originated.
+ // However, Collectors can set the `service.instance.id` if they can
+ // unambiguously determine the service instance
+ // for that telemetry. This is typically the case for scraping receivers,
+ // as they know the target address and
+ // port.
+ ServiceInstanceIDKey = attribute.Key("service.instance.id")
+
+ // ServiceNameKey is the attribute Key conforming to the "service.name"
+ // semantic conventions. It represents the logical name of the service.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'shoppingcart'
+ // Note: MUST be the same for all instances of horizontally scaled
+ // services. If the value was not specified, SDKs MUST fallback to
+ // `unknown_service:` concatenated with
+ // [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If
+ // `process.executable.name` is not available, the value MUST be set to
+ // `unknown_service`.
+ ServiceNameKey = attribute.Key("service.name")
+
+ // ServiceNamespaceKey is the attribute Key conforming to the
+ // "service.namespace" semantic conventions. It represents a namespace for
+ // `service.name`.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Shop'
+ // Note: A string value having a meaning that helps to distinguish a group
+ // of services, for example the team name that owns a group of services.
+ // `service.name` is expected to be unique within the same namespace. If
+ // `service.namespace` is not specified in the Resource then `service.name`
+ // is expected to be unique for all services that have no explicit
+ // namespace defined (so the empty/unspecified namespace is simply one more
+ // valid namespace). Zero-length namespace string is assumed equal to
+ // unspecified namespace.
+ ServiceNamespaceKey = attribute.Key("service.namespace")
+
+ // ServiceVersionKey is the attribute Key conforming to the
+ // "service.version" semantic conventions. It represents the version string
+ // of the service API or implementation. The format is not defined by these
+ // conventions.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '2.0.0', 'a01dbef8a'
+ ServiceVersionKey = attribute.Key("service.version")
+)
+
+// ServiceInstanceID returns an attribute KeyValue conforming to the
+// "service.instance.id" semantic conventions. It represents the string ID of
+// the service instance.
+func ServiceInstanceID(val string) attribute.KeyValue {
+ return ServiceInstanceIDKey.String(val)
+}
+
+// ServiceName returns an attribute KeyValue conforming to the
+// "service.name" semantic conventions. It represents the logical name of the
+// service.
+func ServiceName(val string) attribute.KeyValue {
+ return ServiceNameKey.String(val)
+}
+
+// ServiceNamespace returns an attribute KeyValue conforming to the
+// "service.namespace" semantic conventions. It represents a namespace for
+// `service.name`.
+func ServiceNamespace(val string) attribute.KeyValue {
+ return ServiceNamespaceKey.String(val)
+}
+
+// ServiceVersion returns an attribute KeyValue conforming to the
+// "service.version" semantic conventions. It represents the version string of
+// the service API or implementation. The format is not defined by these
+// conventions.
+func ServiceVersion(val string) attribute.KeyValue {
+ return ServiceVersionKey.String(val)
+}
+
+// Session is defined as the period of time encompassing all activities
+// performed by the application and the actions executed by the end user.
+// Consequently, a Session is represented as a collection of Logs, Events, and
+// Spans emitted by the Client Application throughout the Session's duration.
+// Each Session is assigned a unique identifier, which is included as an
+// attribute in the Logs, Events, and Spans generated during the Session's
+// lifecycle.
+// When a session reaches end of life, typically due to user inactivity or
+// session timeout, a new session identifier will be assigned. The previous
+// session identifier may be provided by the instrumentation so that telemetry
+// backends can link the two sessions.
+const (
+ // SessionIDKey is the attribute Key conforming to the "session.id"
+ // semantic conventions. It represents a unique id to identify a session.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '00112233-4455-6677-8899-aabbccddeeff'
+ SessionIDKey = attribute.Key("session.id")
+
+ // SessionPreviousIDKey is the attribute Key conforming to the
+ // "session.previous_id" semantic conventions. It represents the previous
+ // `session.id` for this user, when known.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '00112233-4455-6677-8899-aabbccddeeff'
+ SessionPreviousIDKey = attribute.Key("session.previous_id")
+)
+
+// SessionID returns an attribute KeyValue conforming to the "session.id"
+// semantic conventions. It represents a unique id to identify a session.
+func SessionID(val string) attribute.KeyValue {
+ return SessionIDKey.String(val)
+}
+
+// SessionPreviousID returns an attribute KeyValue conforming to the
+// "session.previous_id" semantic conventions. It represents the previous
+// `session.id` for this user, when known.
+func SessionPreviousID(val string) attribute.KeyValue {
+ return SessionPreviousIDKey.String(val)
+}
+
+// SignalR attributes
+const (
+ // SignalrConnectionStatusKey is the attribute Key conforming to the
+ // "signalr.connection.status" semantic conventions. It represents the
+ // signalR HTTP connection closure status.
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'app_shutdown', 'timeout'
+ SignalrConnectionStatusKey = attribute.Key("signalr.connection.status")
+
+ // SignalrTransportKey is the attribute Key conforming to the
+ // "signalr.transport" semantic conventions. It represents the [SignalR
+ // transport
+ // type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'web_sockets', 'long_polling'
+ SignalrTransportKey = attribute.Key("signalr.transport")
+)
+
+var (
+ // The connection was closed normally
+ SignalrConnectionStatusNormalClosure = SignalrConnectionStatusKey.String("normal_closure")
+ // The connection was closed due to a timeout
+ SignalrConnectionStatusTimeout = SignalrConnectionStatusKey.String("timeout")
+ // The connection was closed because the app is shutting down
+ SignalrConnectionStatusAppShutdown = SignalrConnectionStatusKey.String("app_shutdown")
+)
+
+var (
+ // ServerSentEvents protocol
+ SignalrTransportServerSentEvents = SignalrTransportKey.String("server_sent_events")
+ // LongPolling protocol
+ SignalrTransportLongPolling = SignalrTransportKey.String("long_polling")
+ // WebSockets protocol
+ SignalrTransportWebSockets = SignalrTransportKey.String("web_sockets")
+)
+
+// These attributes may be used to describe the sender of a network
+// exchange/packet. These should be used when there is no client/server
+// relationship between the two sides, or when that relationship is unknown.
+// This covers low-level network interactions (e.g. packet tracing) where you
+// don't know if there was a connection or which side initiated it. This also
+// covers unidirectional UDP flows and peer-to-peer communication where the
+// "user-facing" surface of the protocol / API doesn't expose a clear notion of
+// client and server.
+const (
+ // SourceAddressKey is the attribute Key conforming to the "source.address"
+ // semantic conventions. It represents the source address - domain name if
+ // available without reverse DNS lookup; otherwise, IP address or Unix
+ // domain socket name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock'
+ // Note: When observed from the destination side, and when communicating
+ // through an intermediary, `source.address` SHOULD represent the source
+ // address behind any intermediaries, for example proxies, if it's
+ // available.
+ SourceAddressKey = attribute.Key("source.address")
+
+ // SourcePortKey is the attribute Key conforming to the "source.port"
+ // semantic conventions. It represents the source port number
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 3389, 2888
+ SourcePortKey = attribute.Key("source.port")
+)
+
+// SourceAddress returns an attribute KeyValue conforming to the
+// "source.address" semantic conventions. It represents the source address -
+// domain name if available without reverse DNS lookup; otherwise, IP address
+// or Unix domain socket name.
+func SourceAddress(val string) attribute.KeyValue {
+ return SourceAddressKey.String(val)
+}
+
+// SourcePort returns an attribute KeyValue conforming to the "source.port"
+// semantic conventions. It represents the source port number
+func SourcePort(val int) attribute.KeyValue {
+ return SourcePortKey.Int(val)
+}
+
+// Describes System attributes
+const (
+ // SystemDeviceKey is the attribute Key conforming to the "system.device"
+ // semantic conventions. It represents the device identifier
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '(identifier)'
+ SystemDeviceKey = attribute.Key("system.device")
+)
+
+// SystemDevice returns an attribute KeyValue conforming to the
+// "system.device" semantic conventions. It represents the device identifier
+func SystemDevice(val string) attribute.KeyValue {
+ return SystemDeviceKey.String(val)
+}
+
+// Describes System CPU attributes
+const (
+ // SystemCPULogicalNumberKey is the attribute Key conforming to the
+ // "system.cpu.logical_number" semantic conventions. It represents the
+ // logical CPU number [0..n-1]
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 1
+ SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number")
+
+ // SystemCPUStateKey is the attribute Key conforming to the
+ // "system.cpu.state" semantic conventions. It represents the state of the
+ // CPU
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'idle', 'interrupt'
+ SystemCPUStateKey = attribute.Key("system.cpu.state")
+)
+
+var (
+ // user
+ SystemCPUStateUser = SystemCPUStateKey.String("user")
+ // system
+ SystemCPUStateSystem = SystemCPUStateKey.String("system")
+ // nice
+ SystemCPUStateNice = SystemCPUStateKey.String("nice")
+ // idle
+ SystemCPUStateIdle = SystemCPUStateKey.String("idle")
+ // iowait
+ SystemCPUStateIowait = SystemCPUStateKey.String("iowait")
+ // interrupt
+ SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt")
+ // steal
+ SystemCPUStateSteal = SystemCPUStateKey.String("steal")
+)
+
+// SystemCPULogicalNumber returns an attribute KeyValue conforming to the
+// "system.cpu.logical_number" semantic conventions. It represents the logical
+// CPU number [0..n-1]
+func SystemCPULogicalNumber(val int) attribute.KeyValue {
+ return SystemCPULogicalNumberKey.Int(val)
+}
+
+// Describes System Memory attributes
+const (
+ // SystemMemoryStateKey is the attribute Key conforming to the
+ // "system.memory.state" semantic conventions. It represents the memory
+ // state
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'free', 'cached'
+ SystemMemoryStateKey = attribute.Key("system.memory.state")
+)
+
+var (
+ // used
+ SystemMemoryStateUsed = SystemMemoryStateKey.String("used")
+ // free
+ SystemMemoryStateFree = SystemMemoryStateKey.String("free")
+ // shared
+ SystemMemoryStateShared = SystemMemoryStateKey.String("shared")
+ // buffers
+ SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers")
+ // cached
+ SystemMemoryStateCached = SystemMemoryStateKey.String("cached")
+)
+
+// Describes System Memory Paging attributes
+const (
+ // SystemPagingDirectionKey is the attribute Key conforming to the
+ // "system.paging.direction" semantic conventions. It represents the paging
+ // access direction
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'in'
+ SystemPagingDirectionKey = attribute.Key("system.paging.direction")
+
+ // SystemPagingStateKey is the attribute Key conforming to the
+ // "system.paging.state" semantic conventions. It represents the memory
+ // paging state
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'free'
+ SystemPagingStateKey = attribute.Key("system.paging.state")
+
+ // SystemPagingTypeKey is the attribute Key conforming to the
+ // "system.paging.type" semantic conventions. It represents the memory
+ // paging type
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'minor'
+ SystemPagingTypeKey = attribute.Key("system.paging.type")
+)
+
+var (
+ // in
+ SystemPagingDirectionIn = SystemPagingDirectionKey.String("in")
+ // out
+ SystemPagingDirectionOut = SystemPagingDirectionKey.String("out")
+)
+
+var (
+ // used
+ SystemPagingStateUsed = SystemPagingStateKey.String("used")
+ // free
+ SystemPagingStateFree = SystemPagingStateKey.String("free")
+)
+
+var (
+ // major
+ SystemPagingTypeMajor = SystemPagingTypeKey.String("major")
+ // minor
+ SystemPagingTypeMinor = SystemPagingTypeKey.String("minor")
+)
+
+// Describes Filesystem attributes
+const (
+ // SystemFilesystemModeKey is the attribute Key conforming to the
+ // "system.filesystem.mode" semantic conventions. It represents the
+ // filesystem mode
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'rw, ro'
+ SystemFilesystemModeKey = attribute.Key("system.filesystem.mode")
+
+ // SystemFilesystemMountpointKey is the attribute Key conforming to the
+ // "system.filesystem.mountpoint" semantic conventions. It represents the
+ // filesystem mount path
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '/mnt/data'
+ SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint")
+
+ // SystemFilesystemStateKey is the attribute Key conforming to the
+ // "system.filesystem.state" semantic conventions. It represents the
+ // filesystem state
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'used'
+ SystemFilesystemStateKey = attribute.Key("system.filesystem.state")
+
+ // SystemFilesystemTypeKey is the attribute Key conforming to the
+ // "system.filesystem.type" semantic conventions. It represents the
+ // filesystem type
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'ext4'
+ SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
+)
+
+var (
+ // used
+ SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used")
+ // free
+ SystemFilesystemStateFree = SystemFilesystemStateKey.String("free")
+ // reserved
+ SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved")
+)
+
+var (
+ // fat32
+ SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32")
+ // exfat
+ SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat")
+ // ntfs
+ SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs")
+ // refs
+ SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs")
+ // hfsplus
+ SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus")
+ // ext4
+ SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
+)
+
+// SystemFilesystemMode returns an attribute KeyValue conforming to the
+// "system.filesystem.mode" semantic conventions. It represents the filesystem
+// mode
+func SystemFilesystemMode(val string) attribute.KeyValue {
+ return SystemFilesystemModeKey.String(val)
+}
+
+// SystemFilesystemMountpoint returns an attribute KeyValue conforming to
+// the "system.filesystem.mountpoint" semantic conventions. It represents the
+// filesystem mount path
+func SystemFilesystemMountpoint(val string) attribute.KeyValue {
+ return SystemFilesystemMountpointKey.String(val)
+}
+
+// Describes Network attributes
+const (
+ // SystemNetworkStateKey is the attribute Key conforming to the
+ // "system.network.state" semantic conventions. It represents a stateless
+ // protocol MUST NOT set this attribute
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'close_wait'
+ SystemNetworkStateKey = attribute.Key("system.network.state")
+)
+
+var (
+ // close
+ SystemNetworkStateClose = SystemNetworkStateKey.String("close")
+ // close_wait
+ SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait")
+ // closing
+ SystemNetworkStateClosing = SystemNetworkStateKey.String("closing")
+ // delete
+ SystemNetworkStateDelete = SystemNetworkStateKey.String("delete")
+ // established
+ SystemNetworkStateEstablished = SystemNetworkStateKey.String("established")
+ // fin_wait_1
+ SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1")
+ // fin_wait_2
+ SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2")
+ // last_ack
+ SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack")
+ // listen
+ SystemNetworkStateListen = SystemNetworkStateKey.String("listen")
+ // syn_recv
+ SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv")
+ // syn_sent
+ SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent")
+ // time_wait
+ SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait")
+)
+
+// Describes System Process attributes
+const (
+ // SystemProcessStatusKey is the attribute Key conforming to the
+ // "system.process.status" semantic conventions. It represents the process
+ // state, e.g., [Linux Process State
+ // Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES)
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'running'
+ SystemProcessStatusKey = attribute.Key("system.process.status")
+)
+
+var (
+ // running
+ SystemProcessStatusRunning = SystemProcessStatusKey.String("running")
+ // sleeping
+ SystemProcessStatusSleeping = SystemProcessStatusKey.String("sleeping")
+ // stopped
+ SystemProcessStatusStopped = SystemProcessStatusKey.String("stopped")
+ // defunct
+ SystemProcessStatusDefunct = SystemProcessStatusKey.String("defunct")
+)
+
+// Attributes for telemetry SDK.
+const (
+ // TelemetrySDKLanguageKey is the attribute Key conforming to the
+ // "telemetry.sdk.language" semantic conventions. It represents the
+ // language of the telemetry SDK.
+ //
+ // Type: Enum
+ // RequirementLevel: Required
+ // Stability: stable
+ TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
+
+ // TelemetrySDKNameKey is the attribute Key conforming to the
+ // "telemetry.sdk.name" semantic conventions. It represents the name of the
+ // telemetry SDK as defined above.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: 'opentelemetry'
+ // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute
+ // to `opentelemetry`.
+ // If another SDK, like a fork or a vendor-provided implementation, is
+ // used, this SDK MUST set the
+ // `telemetry.sdk.name` attribute to the fully-qualified class or module
+ // name of this SDK's main entry point
+ // or another suitable identifier depending on the language.
+ // The identifier `opentelemetry` is reserved and MUST NOT be used in this
+ // case.
+ // All custom identifiers SHOULD be stable across different versions of an
+ // implementation.
+ TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
+
+ // TelemetrySDKVersionKey is the attribute Key conforming to the
+ // "telemetry.sdk.version" semantic conventions. It represents the version
+ // string of the telemetry SDK.
+ //
+ // Type: string
+ // RequirementLevel: Required
+ // Stability: stable
+ // Examples: '1.2.3'
+ TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
+
+ // TelemetryDistroNameKey is the attribute Key conforming to the
+ // "telemetry.distro.name" semantic conventions. It represents the name of
+ // the auto instrumentation agent or distribution, if used.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'parts-unlimited-java'
+ // Note: Official auto instrumentation agents and distributions SHOULD set
+ // the `telemetry.distro.name` attribute to
+ // a string starting with `opentelemetry-`, e.g.
+ // `opentelemetry-java-instrumentation`.
+ TelemetryDistroNameKey = attribute.Key("telemetry.distro.name")
+
+ // TelemetryDistroVersionKey is the attribute Key conforming to the
+ // "telemetry.distro.version" semantic conventions. It represents the
+ // version string of the auto instrumentation agent or distribution, if
+ // used.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '1.2.3'
+ TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version")
+)
+
+var (
+ // cpp
+ TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
+ // dotnet
+ TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
+ // erlang
+ TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
+ // go
+ TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
+ // java
+ TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
+ // nodejs
+ TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
+ // php
+ TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
+ // python
+ TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
+ // ruby
+ TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
+ // rust
+ TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust")
+ // swift
+ TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
+ // webjs
+ TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs")
+)
+
+// TelemetrySDKName returns an attribute KeyValue conforming to the
+// "telemetry.sdk.name" semantic conventions. It represents the name of the
+// telemetry SDK as defined above.
+func TelemetrySDKName(val string) attribute.KeyValue {
+ return TelemetrySDKNameKey.String(val)
+}
+
+// TelemetrySDKVersion returns an attribute KeyValue conforming to the
+// "telemetry.sdk.version" semantic conventions. It represents the version
+// string of the telemetry SDK.
+func TelemetrySDKVersion(val string) attribute.KeyValue {
+ return TelemetrySDKVersionKey.String(val)
+}
+
+// TelemetryDistroName returns an attribute KeyValue conforming to the
+// "telemetry.distro.name" semantic conventions. It represents the name of the
+// auto instrumentation agent or distribution, if used.
+func TelemetryDistroName(val string) attribute.KeyValue {
+ return TelemetryDistroNameKey.String(val)
+}
+
+// TelemetryDistroVersion returns an attribute KeyValue conforming to the
+// "telemetry.distro.version" semantic conventions. It represents the version
+// string of the auto instrumentation agent or distribution, if used.
+func TelemetryDistroVersion(val string) attribute.KeyValue {
+ return TelemetryDistroVersionKey.String(val)
+}
+
+// These attributes may be used for any operation to store information about a
+// thread that started a span.
+const (
+ // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
+ // conventions. It represents the current "managed" thread ID (as opposed
+ // to OS thread ID).
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 42
+ ThreadIDKey = attribute.Key("thread.id")
+
+ // ThreadNameKey is the attribute Key conforming to the "thread.name"
+ // semantic conventions. It represents the current thread name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'main'
+ ThreadNameKey = attribute.Key("thread.name")
+)
+
+// ThreadID returns an attribute KeyValue conforming to the "thread.id"
+// semantic conventions. It represents the current "managed" thread ID (as
+// opposed to OS thread ID).
+func ThreadID(val int) attribute.KeyValue {
+ return ThreadIDKey.Int(val)
+}
+
+// ThreadName returns an attribute KeyValue conforming to the "thread.name"
+// semantic conventions. It represents the current thread name.
+func ThreadName(val string) attribute.KeyValue {
+ return ThreadNameKey.String(val)
+}
+
+// Semantic convention attributes in the TLS namespace.
+const (
+ // TLSCipherKey is the attribute Key conforming to the "tls.cipher"
+ // semantic conventions. It represents the string indicating the
+ // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5)
+ // used during the current connection.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA',
+ // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256'
+ // Note: The values allowed for `tls.cipher` MUST be one of the
+ // `Descriptions` of the [registered TLS Cipher
+ // Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4).
+ TLSCipherKey = attribute.Key("tls.cipher")
+
+ // TLSClientCertificateKey is the attribute Key conforming to the
+ // "tls.client.certificate" semantic conventions. It represents the
+ // pEM-encoded stand-alone certificate offered by the client. This is
+ // usually mutually-exclusive of `client.certificate_chain` since this
+ // value also exists in that list.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'MII...'
+ TLSClientCertificateKey = attribute.Key("tls.client.certificate")
+
+ // TLSClientCertificateChainKey is the attribute Key conforming to the
+ // "tls.client.certificate_chain" semantic conventions. It represents the
+ // array of PEM-encoded certificates that make up the certificate chain
+ // offered by the client. This is usually mutually-exclusive of
+ // `client.certificate` since that value should be the first certificate in
+ // the chain.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'MII...', 'MI...'
+ TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain")
+
+ // TLSClientHashMd5Key is the attribute Key conforming to the
+ // "tls.client.hash.md5" semantic conventions. It represents the
+ // certificate fingerprint using the MD5 digest of DER-encoded version of
+ // certificate offered by the client. For consistency with other hash
+ // values, this value should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC'
+ TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5")
+
+ // TLSClientHashSha1Key is the attribute Key conforming to the
+ // "tls.client.hash.sha1" semantic conventions. It represents the
+ // certificate fingerprint using the SHA1 digest of DER-encoded version of
+ // certificate offered by the client. For consistency with other hash
+ // values, this value should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A'
+ TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1")
+
+ // TLSClientHashSha256Key is the attribute Key conforming to the
+ // "tls.client.hash.sha256" semantic conventions. It represents the
+ // certificate fingerprint using the SHA256 digest of DER-encoded version
+ // of certificate offered by the client. For consistency with other hash
+ // values, this value should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples:
+ // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0'
+ TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256")
+
+ // TLSClientIssuerKey is the attribute Key conforming to the
+ // "tls.client.issuer" semantic conventions. It represents the
+ // distinguished name of
+ // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6)
+ // of the issuer of the x.509 certificate presented by the client.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example,
+ // DC=com'
+ TLSClientIssuerKey = attribute.Key("tls.client.issuer")
+
+ // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3"
+ // semantic conventions. It represents a hash that identifies clients based
+ // on how they perform an SSL/TLS handshake.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'd4e5b18d6b55c71272893221c96ba240'
+ TLSClientJa3Key = attribute.Key("tls.client.ja3")
+
+ // TLSClientNotAfterKey is the attribute Key conforming to the
+ // "tls.client.not_after" semantic conventions. It represents the date/Time
+ // indicating when client certificate is no longer considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '2021-01-01T00:00:00.000Z'
+ TLSClientNotAfterKey = attribute.Key("tls.client.not_after")
+
+ // TLSClientNotBeforeKey is the attribute Key conforming to the
+ // "tls.client.not_before" semantic conventions. It represents the
+ // date/Time indicating when client certificate is first considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '1970-01-01T00:00:00.000Z'
+ TLSClientNotBeforeKey = attribute.Key("tls.client.not_before")
+
+ // TLSClientServerNameKey is the attribute Key conforming to the
+ // "tls.client.server_name" semantic conventions. It represents the also
+ // called an SNI, this tells the server which hostname to which the client
+ // is attempting to connect to.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'opentelemetry.io'
+ TLSClientServerNameKey = attribute.Key("tls.client.server_name")
+
+ // TLSClientSubjectKey is the attribute Key conforming to the
+ // "tls.client.subject" semantic conventions. It represents the
+ // distinguished name of subject of the x.509 certificate presented by the
+ // client.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com'
+ TLSClientSubjectKey = attribute.Key("tls.client.subject")
+
+ // TLSClientSupportedCiphersKey is the attribute Key conforming to the
+ // "tls.client.supported_ciphers" semantic conventions. It represents the
+ // array of ciphers offered by the client during the client hello.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
+ // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."'
+ TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers")
+
+ // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic
+ // conventions. It represents the string indicating the curve used for the
+ // given cipher, when applicable
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'secp256r1'
+ TLSCurveKey = attribute.Key("tls.curve")
+
+ // TLSEstablishedKey is the attribute Key conforming to the
+ // "tls.established" semantic conventions. It represents the boolean flag
+ // indicating if the TLS negotiation was successful and transitioned to an
+ // encrypted tunnel.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: True
+ TLSEstablishedKey = attribute.Key("tls.established")
+
+ // TLSNextProtocolKey is the attribute Key conforming to the
+ // "tls.next_protocol" semantic conventions. It represents the string
+ // indicating the protocol being tunneled. Per the values in the [IANA
+ // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids),
+ // this string should be lower case.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'http/1.1'
+ TLSNextProtocolKey = attribute.Key("tls.next_protocol")
+
+ // TLSProtocolNameKey is the attribute Key conforming to the
+ // "tls.protocol.name" semantic conventions. It represents the normalized
+ // lowercase protocol name parsed from original string of the negotiated
+ // [SSL/TLS protocol
+ // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
+ //
+ // Type: Enum
+ // RequirementLevel: Optional
+ // Stability: experimental
+ TLSProtocolNameKey = attribute.Key("tls.protocol.name")
+
+ // TLSProtocolVersionKey is the attribute Key conforming to the
+ // "tls.protocol.version" semantic conventions. It represents the numeric
+ // part of the version parsed from the original string of the negotiated
+ // [SSL/TLS protocol
+ // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '1.2', '3'
+ TLSProtocolVersionKey = attribute.Key("tls.protocol.version")
+
+ // TLSResumedKey is the attribute Key conforming to the "tls.resumed"
+ // semantic conventions. It represents the boolean flag indicating if this
+ // TLS connection was resumed from an existing TLS negotiation.
+ //
+ // Type: boolean
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: True
+ TLSResumedKey = attribute.Key("tls.resumed")
+
+ // TLSServerCertificateKey is the attribute Key conforming to the
+ // "tls.server.certificate" semantic conventions. It represents the
+ // pEM-encoded stand-alone certificate offered by the server. This is
+ // usually mutually-exclusive of `server.certificate_chain` since this
+ // value also exists in that list.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'MII...'
+ TLSServerCertificateKey = attribute.Key("tls.server.certificate")
+
+ // TLSServerCertificateChainKey is the attribute Key conforming to the
+ // "tls.server.certificate_chain" semantic conventions. It represents the
+ // array of PEM-encoded certificates that make up the certificate chain
+ // offered by the server. This is usually mutually-exclusive of
+ // `server.certificate` since that value should be the first certificate in
+ // the chain.
+ //
+ // Type: string[]
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'MII...', 'MI...'
+ TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain")
+
+ // TLSServerHashMd5Key is the attribute Key conforming to the
+ // "tls.server.hash.md5" semantic conventions. It represents the
+ // certificate fingerprint using the MD5 digest of DER-encoded version of
+ // certificate offered by the server. For consistency with other hash
+ // values, this value should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC'
+ TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5")
+
+ // TLSServerHashSha1Key is the attribute Key conforming to the
+ // "tls.server.hash.sha1" semantic conventions. It represents the
+ // certificate fingerprint using the SHA1 digest of DER-encoded version of
+ // certificate offered by the server. For consistency with other hash
+ // values, this value should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A'
+ TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1")
+
+ // TLSServerHashSha256Key is the attribute Key conforming to the
+ // "tls.server.hash.sha256" semantic conventions. It represents the
+ // certificate fingerprint using the SHA256 digest of DER-encoded version
+ // of certificate offered by the server. For consistency with other hash
+ // values, this value should be formatted as an uppercase hash.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples:
+ // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0'
+ TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256")
+
+ // TLSServerIssuerKey is the attribute Key conforming to the
+ // "tls.server.issuer" semantic conventions. It represents the
+ // distinguished name of
+ // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6)
+ // of the issuer of the x.509 certificate presented by the client.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example,
+ // DC=com'
+ TLSServerIssuerKey = attribute.Key("tls.server.issuer")
+
+ // TLSServerJa3sKey is the attribute Key conforming to the
+ // "tls.server.ja3s" semantic conventions. It represents a hash that
+ // identifies servers based on how they perform an SSL/TLS handshake.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'd4e5b18d6b55c71272893221c96ba240'
+ TLSServerJa3sKey = attribute.Key("tls.server.ja3s")
+
+ // TLSServerNotAfterKey is the attribute Key conforming to the
+ // "tls.server.not_after" semantic conventions. It represents the date/Time
+ // indicating when server certificate is no longer considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '2021-01-01T00:00:00.000Z'
+ TLSServerNotAfterKey = attribute.Key("tls.server.not_after")
+
+ // TLSServerNotBeforeKey is the attribute Key conforming to the
+ // "tls.server.not_before" semantic conventions. It represents the
+ // date/Time indicating when server certificate is first considered valid.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '1970-01-01T00:00:00.000Z'
+ TLSServerNotBeforeKey = attribute.Key("tls.server.not_before")
+
+ // TLSServerSubjectKey is the attribute Key conforming to the
+ // "tls.server.subject" semantic conventions. It represents the
+ // distinguished name of subject of the x.509 certificate presented by the
+ // server.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com'
+ TLSServerSubjectKey = attribute.Key("tls.server.subject")
+)
+
+var (
+ // ssl
+ TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl")
+ // tls
+ TLSProtocolNameTLS = TLSProtocolNameKey.String("tls")
+)
+
+// TLSCipher returns an attribute KeyValue conforming to the "tls.cipher"
+// semantic conventions. It represents the string indicating the
+// [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used
+// during the current connection.
+func TLSCipher(val string) attribute.KeyValue {
+ return TLSCipherKey.String(val)
+}
+
+// TLSClientCertificate returns an attribute KeyValue conforming to the
+// "tls.client.certificate" semantic conventions. It represents the pEM-encoded
+// stand-alone certificate offered by the client. This is usually
+// mutually-exclusive of `client.certificate_chain` since this value also
+// exists in that list.
+func TLSClientCertificate(val string) attribute.KeyValue {
+ return TLSClientCertificateKey.String(val)
+}
+
+// TLSClientCertificateChain returns an attribute KeyValue conforming to the
+// "tls.client.certificate_chain" semantic conventions. It represents the array
+// of PEM-encoded certificates that make up the certificate chain offered by
+// the client. This is usually mutually-exclusive of `client.certificate` since
+// that value should be the first certificate in the chain.
+func TLSClientCertificateChain(val ...string) attribute.KeyValue {
+ return TLSClientCertificateChainKey.StringSlice(val)
+}
+
+// TLSClientHashMd5 returns an attribute KeyValue conforming to the
+// "tls.client.hash.md5" semantic conventions. It represents the certificate
+// fingerprint using the MD5 digest of DER-encoded version of certificate
+// offered by the client. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSClientHashMd5(val string) attribute.KeyValue {
+ return TLSClientHashMd5Key.String(val)
+}
+
+// TLSClientHashSha1 returns an attribute KeyValue conforming to the
+// "tls.client.hash.sha1" semantic conventions. It represents the certificate
+// fingerprint using the SHA1 digest of DER-encoded version of certificate
+// offered by the client. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSClientHashSha1(val string) attribute.KeyValue {
+ return TLSClientHashSha1Key.String(val)
+}
+
+// TLSClientHashSha256 returns an attribute KeyValue conforming to the
+// "tls.client.hash.sha256" semantic conventions. It represents the certificate
+// fingerprint using the SHA256 digest of DER-encoded version of certificate
+// offered by the client. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSClientHashSha256(val string) attribute.KeyValue {
+ return TLSClientHashSha256Key.String(val)
+}
+
+// TLSClientIssuer returns an attribute KeyValue conforming to the
+// "tls.client.issuer" semantic conventions. It represents the distinguished
+// name of
+// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of
+// the issuer of the x.509 certificate presented by the client.
+func TLSClientIssuer(val string) attribute.KeyValue {
+ return TLSClientIssuerKey.String(val)
+}
+
+// TLSClientJa3 returns an attribute KeyValue conforming to the
+// "tls.client.ja3" semantic conventions. It represents a hash that identifies
+// clients based on how they perform an SSL/TLS handshake.
+func TLSClientJa3(val string) attribute.KeyValue {
+ return TLSClientJa3Key.String(val)
+}
+
+// TLSClientNotAfter returns an attribute KeyValue conforming to the
+// "tls.client.not_after" semantic conventions. It represents the date/Time
+// indicating when client certificate is no longer considered valid.
+func TLSClientNotAfter(val string) attribute.KeyValue {
+ return TLSClientNotAfterKey.String(val)
+}
+
+// TLSClientNotBefore returns an attribute KeyValue conforming to the
+// "tls.client.not_before" semantic conventions. It represents the date/Time
+// indicating when client certificate is first considered valid.
+func TLSClientNotBefore(val string) attribute.KeyValue {
+ return TLSClientNotBeforeKey.String(val)
+}
+
+// TLSClientServerName returns an attribute KeyValue conforming to the
+// "tls.client.server_name" semantic conventions. It represents the also called
+// an SNI, this tells the server which hostname to which the client is
+// attempting to connect to.
+func TLSClientServerName(val string) attribute.KeyValue {
+ return TLSClientServerNameKey.String(val)
+}
+
+// TLSClientSubject returns an attribute KeyValue conforming to the
+// "tls.client.subject" semantic conventions. It represents the distinguished
+// name of subject of the x.509 certificate presented by the client.
+func TLSClientSubject(val string) attribute.KeyValue {
+ return TLSClientSubjectKey.String(val)
+}
+
+// TLSClientSupportedCiphers returns an attribute KeyValue conforming to the
+// "tls.client.supported_ciphers" semantic conventions. It represents the array
+// of ciphers offered by the client during the client hello.
+func TLSClientSupportedCiphers(val ...string) attribute.KeyValue {
+ return TLSClientSupportedCiphersKey.StringSlice(val)
+}
+
+// TLSCurve returns an attribute KeyValue conforming to the "tls.curve"
+// semantic conventions. It represents the string indicating the curve used for
+// the given cipher, when applicable
+func TLSCurve(val string) attribute.KeyValue {
+ return TLSCurveKey.String(val)
+}
+
+// TLSEstablished returns an attribute KeyValue conforming to the
+// "tls.established" semantic conventions. It represents the boolean flag
+// indicating if the TLS negotiation was successful and transitioned to an
+// encrypted tunnel.
+func TLSEstablished(val bool) attribute.KeyValue {
+ return TLSEstablishedKey.Bool(val)
+}
+
+// TLSNextProtocol returns an attribute KeyValue conforming to the
+// "tls.next_protocol" semantic conventions. It represents the string
+// indicating the protocol being tunneled. Per the values in the [IANA
+// registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids),
+// this string should be lower case.
+func TLSNextProtocol(val string) attribute.KeyValue {
+ return TLSNextProtocolKey.String(val)
+}
+
+// TLSProtocolVersion returns an attribute KeyValue conforming to the
+// "tls.protocol.version" semantic conventions. It represents the numeric part
+// of the version parsed from the original string of the negotiated [SSL/TLS
+// protocol
+// version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
+func TLSProtocolVersion(val string) attribute.KeyValue {
+ return TLSProtocolVersionKey.String(val)
+}
+
+// TLSResumed returns an attribute KeyValue conforming to the "tls.resumed"
+// semantic conventions. It represents the boolean flag indicating if this TLS
+// connection was resumed from an existing TLS negotiation.
+func TLSResumed(val bool) attribute.KeyValue {
+ return TLSResumedKey.Bool(val)
+}
+
+// TLSServerCertificate returns an attribute KeyValue conforming to the
+// "tls.server.certificate" semantic conventions. It represents the pEM-encoded
+// stand-alone certificate offered by the server. This is usually
+// mutually-exclusive of `server.certificate_chain` since this value also
+// exists in that list.
+func TLSServerCertificate(val string) attribute.KeyValue {
+ return TLSServerCertificateKey.String(val)
+}
+
+// TLSServerCertificateChain returns an attribute KeyValue conforming to the
+// "tls.server.certificate_chain" semantic conventions. It represents the array
+// of PEM-encoded certificates that make up the certificate chain offered by
+// the server. This is usually mutually-exclusive of `server.certificate` since
+// that value should be the first certificate in the chain.
+func TLSServerCertificateChain(val ...string) attribute.KeyValue {
+ return TLSServerCertificateChainKey.StringSlice(val)
+}
+
+// TLSServerHashMd5 returns an attribute KeyValue conforming to the
+// "tls.server.hash.md5" semantic conventions. It represents the certificate
+// fingerprint using the MD5 digest of DER-encoded version of certificate
+// offered by the server. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSServerHashMd5(val string) attribute.KeyValue {
+ return TLSServerHashMd5Key.String(val)
+}
+
+// TLSServerHashSha1 returns an attribute KeyValue conforming to the
+// "tls.server.hash.sha1" semantic conventions. It represents the certificate
+// fingerprint using the SHA1 digest of DER-encoded version of certificate
+// offered by the server. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSServerHashSha1(val string) attribute.KeyValue {
+ return TLSServerHashSha1Key.String(val)
+}
+
+// TLSServerHashSha256 returns an attribute KeyValue conforming to the
+// "tls.server.hash.sha256" semantic conventions. It represents the certificate
+// fingerprint using the SHA256 digest of DER-encoded version of certificate
+// offered by the server. For consistency with other hash values, this value
+// should be formatted as an uppercase hash.
+func TLSServerHashSha256(val string) attribute.KeyValue {
+ return TLSServerHashSha256Key.String(val)
+}
+
+// TLSServerIssuer returns an attribute KeyValue conforming to the
+// "tls.server.issuer" semantic conventions. It represents the distinguished
+// name of
+// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of
+// the issuer of the x.509 certificate presented by the client.
+func TLSServerIssuer(val string) attribute.KeyValue {
+ return TLSServerIssuerKey.String(val)
+}
+
+// TLSServerJa3s returns an attribute KeyValue conforming to the
+// "tls.server.ja3s" semantic conventions. It represents a hash that identifies
+// servers based on how they perform an SSL/TLS handshake.
+func TLSServerJa3s(val string) attribute.KeyValue {
+ return TLSServerJa3sKey.String(val)
+}
+
+// TLSServerNotAfter returns an attribute KeyValue conforming to the
+// "tls.server.not_after" semantic conventions. It represents the date/Time
+// indicating when server certificate is no longer considered valid.
+func TLSServerNotAfter(val string) attribute.KeyValue {
+ return TLSServerNotAfterKey.String(val)
+}
+
+// TLSServerNotBefore returns an attribute KeyValue conforming to the
+// "tls.server.not_before" semantic conventions. It represents the date/Time
+// indicating when server certificate is first considered valid.
+func TLSServerNotBefore(val string) attribute.KeyValue {
+ return TLSServerNotBeforeKey.String(val)
+}
+
+// TLSServerSubject returns an attribute KeyValue conforming to the
+// "tls.server.subject" semantic conventions. It represents the distinguished
+// name of subject of the x.509 certificate presented by the server.
+func TLSServerSubject(val string) attribute.KeyValue {
+ return TLSServerSubjectKey.String(val)
+}
+
+// Attributes describing URL.
+const (
+ // URLDomainKey is the attribute Key conforming to the "url.domain"
+ // semantic conventions. It represents the domain extracted from the
+ // `url.full`, such as "opentelemetry.io".
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'www.foo.bar', 'opentelemetry.io', '3.12.167.2',
+ // '[1080:0:0:0:8:800:200C:417A]'
+ // Note: In some cases a URL may refer to an IP and/or port directly,
+ // without a domain name. In this case, the IP address would go to the
+ // domain field. If the URL contains a [literal IPv6
+ // address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by
+ // `[` and `]`, the `[` and `]` characters should also be captured in the
+ // domain field.
+ URLDomainKey = attribute.Key("url.domain")
+
+ // URLExtensionKey is the attribute Key conforming to the "url.extension"
+ // semantic conventions. It represents the file extension extracted from
+ // the `url.full`, excluding the leading dot.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'png', 'gz'
+ // Note: The file extension is only set if it exists, as not every url has
+ // a file extension. When the file name has multiple extensions
+ // `example.tar.gz`, only the last one should be captured `gz`, not
+ // `tar.gz`.
+ URLExtensionKey = attribute.Key("url.extension")
+
+ // URLFragmentKey is the attribute Key conforming to the "url.fragment"
+ // semantic conventions. It represents the [URI
+ // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'SemConv'
+ URLFragmentKey = attribute.Key("url.fragment")
+
+ // URLFullKey is the attribute Key conforming to the "url.full" semantic
+ // conventions. It represents the absolute URL describing a network
+ // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
+ // '//localhost'
+ // Note: For network calls, URL usually has
+ // `scheme://host[:port][path][?query][#fragment]` format, where the
+ // fragment is not transmitted over HTTP, but if it is known, it SHOULD be
+ // included nevertheless.
+ // `url.full` MUST NOT contain credentials passed via URL in form of
+ // `https://username:password@www.example.com/`. In such case username and
+ // password SHOULD be redacted and attribute's value SHOULD be
+ // `https://REDACTED:REDACTED@www.example.com/`.
+ // `url.full` SHOULD capture the absolute URL when it is available (or can
+ // be reconstructed). Sensitive content provided in `url.full` SHOULD be
+ // scrubbed when instrumentations can identify it.
+ URLFullKey = attribute.Key("url.full")
+
+ // URLOriginalKey is the attribute Key conforming to the "url.original"
+ // semantic conventions. It represents the unmodified original URL as seen
+ // in the event source.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
+ // 'search?q=OpenTelemetry'
+ // Note: In network monitoring, the observed URL may be a full URL, whereas
+ // in access logs, the URL is often just represented as a path. This field
+ // is meant to represent the URL as it was observed, complete or not.
+ // `url.original` might contain credentials passed via URL in form of
+ // `https://username:password@www.example.com/`. In such case password and
+ // username SHOULD NOT be redacted and attribute's value SHOULD remain the
+ // same.
+ URLOriginalKey = attribute.Key("url.original")
+
+ // URLPathKey is the attribute Key conforming to the "url.path" semantic
+ // conventions. It represents the [URI
+ // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: '/search'
+ // Note: Sensitive content provided in `url.path` SHOULD be scrubbed when
+ // instrumentations can identify it.
+ URLPathKey = attribute.Key("url.path")
+
+ // URLPortKey is the attribute Key conforming to the "url.port" semantic
+ // conventions. It represents the port extracted from the `url.full`
+ //
+ // Type: int
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 443
+ URLPortKey = attribute.Key("url.port")
+
+ // URLQueryKey is the attribute Key conforming to the "url.query" semantic
+ // conventions. It represents the [URI
+ // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'q=OpenTelemetry'
+ // Note: Sensitive content provided in `url.query` SHOULD be scrubbed when
+ // instrumentations can identify it.
+ URLQueryKey = attribute.Key("url.query")
+
+ // URLRegisteredDomainKey is the attribute Key conforming to the
+ // "url.registered_domain" semantic conventions. It represents the highest
+ // registered url domain, stripped of the subdomain.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'example.com', 'foo.co.uk'
+ // Note: This value can be determined precisely with the [public suffix
+ // list](http://publicsuffix.org). For example, the registered domain for
+ // `foo.example.com` is `example.com`. Trying to approximate this by simply
+ // taking the last two labels will not work well for TLDs such as `co.uk`.
+ URLRegisteredDomainKey = attribute.Key("url.registered_domain")
+
+ // URLSchemeKey is the attribute Key conforming to the "url.scheme"
+ // semantic conventions. It represents the [URI
+ // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
+ // identifying the used protocol.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'https', 'ftp', 'telnet'
+ URLSchemeKey = attribute.Key("url.scheme")
+
+ // URLSubdomainKey is the attribute Key conforming to the "url.subdomain"
+ // semantic conventions. It represents the subdomain portion of a fully
+ // qualified domain name includes all of the names except the host name
+ // under the registered_domain. In a partially qualified domain, or if the
+ // qualification level of the full name cannot be determined, subdomain
+ // contains all of the names below the registered domain.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'east', 'sub2.sub1'
+ // Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If
+ // the domain has multiple levels of subdomain, such as
+ // `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`,
+ // with no trailing period.
+ URLSubdomainKey = attribute.Key("url.subdomain")
+
+ // URLTemplateKey is the attribute Key conforming to the "url.template"
+ // semantic conventions. It represents the low-cardinality template of an
+ // [absolute path
+ // reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '/users/{id}', '/users/:id', '/users?id={id}'
+ URLTemplateKey = attribute.Key("url.template")
+
+ // URLTopLevelDomainKey is the attribute Key conforming to the
+ // "url.top_level_domain" semantic conventions. It represents the effective
+ // top level domain (eTLD), also known as the domain suffix, is the last
+ // part of the domain name. For example, the top level domain for
+ // example.com is `com`.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'com', 'co.uk'
+ // Note: This value can be determined precisely with the [public suffix
+ // list](http://publicsuffix.org).
+ URLTopLevelDomainKey = attribute.Key("url.top_level_domain")
+)
+
+// URLDomain returns an attribute KeyValue conforming to the "url.domain"
+// semantic conventions. It represents the domain extracted from the
+// `url.full`, such as "opentelemetry.io".
+func URLDomain(val string) attribute.KeyValue {
+ return URLDomainKey.String(val)
+}
+
+// URLExtension returns an attribute KeyValue conforming to the
+// "url.extension" semantic conventions. It represents the file extension
+// extracted from the `url.full`, excluding the leading dot.
+func URLExtension(val string) attribute.KeyValue {
+ return URLExtensionKey.String(val)
+}
+
+// URLFragment returns an attribute KeyValue conforming to the
+// "url.fragment" semantic conventions. It represents the [URI
+// fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
+func URLFragment(val string) attribute.KeyValue {
+ return URLFragmentKey.String(val)
+}
+
+// URLFull returns an attribute KeyValue conforming to the "url.full"
+// semantic conventions. It represents the absolute URL describing a network
+// resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
+func URLFull(val string) attribute.KeyValue {
+ return URLFullKey.String(val)
+}
+
+// URLOriginal returns an attribute KeyValue conforming to the
+// "url.original" semantic conventions. It represents the unmodified original
+// URL as seen in the event source.
+func URLOriginal(val string) attribute.KeyValue {
+ return URLOriginalKey.String(val)
+}
+
+// URLPath returns an attribute KeyValue conforming to the "url.path"
+// semantic conventions. It represents the [URI
+// path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
+func URLPath(val string) attribute.KeyValue {
+ return URLPathKey.String(val)
+}
+
+// URLPort returns an attribute KeyValue conforming to the "url.port"
+// semantic conventions. It represents the port extracted from the `url.full`
+func URLPort(val int) attribute.KeyValue {
+ return URLPortKey.Int(val)
+}
+
+// URLQuery returns an attribute KeyValue conforming to the "url.query"
+// semantic conventions. It represents the [URI
+// query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
+func URLQuery(val string) attribute.KeyValue {
+ return URLQueryKey.String(val)
+}
+
+// URLRegisteredDomain returns an attribute KeyValue conforming to the
+// "url.registered_domain" semantic conventions. It represents the highest
+// registered url domain, stripped of the subdomain.
+func URLRegisteredDomain(val string) attribute.KeyValue {
+ return URLRegisteredDomainKey.String(val)
+}
+
+// URLScheme returns an attribute KeyValue conforming to the "url.scheme"
+// semantic conventions. It represents the [URI
+// scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
+// identifying the used protocol.
+func URLScheme(val string) attribute.KeyValue {
+ return URLSchemeKey.String(val)
+}
+
+// URLSubdomain returns an attribute KeyValue conforming to the
+// "url.subdomain" semantic conventions. It represents the subdomain portion of
+// a fully qualified domain name includes all of the names except the host name
+// under the registered_domain. In a partially qualified domain, or if the
+// qualification level of the full name cannot be determined, subdomain
+// contains all of the names below the registered domain.
+func URLSubdomain(val string) attribute.KeyValue {
+ return URLSubdomainKey.String(val)
+}
+
+// URLTemplate returns an attribute KeyValue conforming to the
+// "url.template" semantic conventions. It represents the low-cardinality
+// template of an [absolute path
+// reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2).
+func URLTemplate(val string) attribute.KeyValue {
+ return URLTemplateKey.String(val)
+}
+
+// URLTopLevelDomain returns an attribute KeyValue conforming to the
+// "url.top_level_domain" semantic conventions. It represents the effective top
+// level domain (eTLD), also known as the domain suffix, is the last part of
+// the domain name. For example, the top level domain for example.com is `com`.
+func URLTopLevelDomain(val string) attribute.KeyValue {
+ return URLTopLevelDomainKey.String(val)
+}
+
+// Describes user-agent attributes.
+const (
+ // UserAgentNameKey is the attribute Key conforming to the
+ // "user_agent.name" semantic conventions. It represents the name of the
+ // user-agent extracted from original. Usually refers to the browser's
+ // name.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'Safari', 'YourApp'
+ // Note: [Example](https://www.whatsmyua.info) of extracting browser's name
+ // from original string. In the case of using a user-agent for non-browser
+ // products, such as microservices with multiple names/versions inside the
+ // `user_agent.original`, the most significant name SHOULD be selected. In
+ // such a scenario it should align with `user_agent.version`
+ UserAgentNameKey = attribute.Key("user_agent.name")
+
+ // UserAgentOriginalKey is the attribute Key conforming to the
+ // "user_agent.original" semantic conventions. It represents the value of
+ // the [HTTP
+ // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
+ // header sent by the client.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: stable
+ // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU
+ // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
+ // Version/14.1.2 Mobile/15E148 Safari/604.1', 'YourApp/1.0.0
+ // grpc-java-okhttp/1.27.2'
+ UserAgentOriginalKey = attribute.Key("user_agent.original")
+
+ // UserAgentVersionKey is the attribute Key conforming to the
+ // "user_agent.version" semantic conventions. It represents the version of
+ // the user-agent extracted from original. Usually refers to the browser's
+ // version
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '14.1.2', '1.0.0'
+ // Note: [Example](https://www.whatsmyua.info) of extracting browser's
+ // version from original string. In the case of using a user-agent for
+ // non-browser products, such as microservices with multiple names/versions
+ // inside the `user_agent.original`, the most significant version SHOULD be
+ // selected. In such a scenario it should align with `user_agent.name`
+ UserAgentVersionKey = attribute.Key("user_agent.version")
+)
+
+// UserAgentName returns an attribute KeyValue conforming to the
+// "user_agent.name" semantic conventions. It represents the name of the
+// user-agent extracted from original. Usually refers to the browser's name.
+func UserAgentName(val string) attribute.KeyValue {
+ return UserAgentNameKey.String(val)
+}
+
+// UserAgentOriginal returns an attribute KeyValue conforming to the
+// "user_agent.original" semantic conventions. It represents the value of the
+// [HTTP
+// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
+// header sent by the client.
+func UserAgentOriginal(val string) attribute.KeyValue {
+ return UserAgentOriginalKey.String(val)
+}
+
+// UserAgentVersion returns an attribute KeyValue conforming to the
+// "user_agent.version" semantic conventions. It represents the version of the
+// user-agent extracted from original. Usually refers to the browser's version
+func UserAgentVersion(val string) attribute.KeyValue {
+ return UserAgentVersionKey.String(val)
+}
+
+// The attributes used to describe the packaged software running the
+// application code.
+const (
+ // WebEngineDescriptionKey is the attribute Key conforming to the
+ // "webengine.description" semantic conventions. It represents the
+ // additional description of the web engine (e.g. detailed version and
+ // edition information).
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -
+ // 2.2.2.Final'
+ WebEngineDescriptionKey = attribute.Key("webengine.description")
+
+ // WebEngineNameKey is the attribute Key conforming to the "webengine.name"
+ // semantic conventions. It represents the name of the web engine.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: 'WildFly'
+ WebEngineNameKey = attribute.Key("webengine.name")
+
+ // WebEngineVersionKey is the attribute Key conforming to the
+ // "webengine.version" semantic conventions. It represents the version of
+ // the web engine.
+ //
+ // Type: string
+ // RequirementLevel: Optional
+ // Stability: experimental
+ // Examples: '21.0.0'
+ WebEngineVersionKey = attribute.Key("webengine.version")
+)
+
+// WebEngineDescription returns an attribute KeyValue conforming to the
+// "webengine.description" semantic conventions. It represents the additional
+// description of the web engine (e.g. detailed version and edition
+// information).
+func WebEngineDescription(val string) attribute.KeyValue {
+ return WebEngineDescriptionKey.String(val)
+}
+
+// WebEngineName returns an attribute KeyValue conforming to the
+// "webengine.name" semantic conventions. It represents the name of the web
+// engine.
+func WebEngineName(val string) attribute.KeyValue {
+ return WebEngineNameKey.String(val)
+}
+
+// WebEngineVersion returns an attribute KeyValue conforming to the
+// "webengine.version" semantic conventions. It represents the version of the
+// web engine.
+func WebEngineVersion(val string) attribute.KeyValue {
+ return WebEngineVersionKey.String(val)
+}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/doc.go
new file mode 100644
index 00000000..d031bbea
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/doc.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package semconv implements OpenTelemetry semantic conventions.
+//
+// OpenTelemetry semantic conventions are agreed standardized naming
+// patterns for OpenTelemetry things. This package represents the v1.26.0
+// version of the OpenTelemetry semantic conventions.
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0"
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/exception.go
new file mode 100644
index 00000000..bfaee0d5
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/exception.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0"
+
+const (
+ // ExceptionEventName is the name of the Span event representing an exception.
+ ExceptionEventName = "exception"
+)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/metric.go
new file mode 100644
index 00000000..fcdb9f48
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/metric.go
@@ -0,0 +1,1307 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Code generated from semantic convention specification. DO NOT EDIT.
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0"
+
+const (
+
+ // ContainerCPUTime is the metric conforming to the "container.cpu.time"
+ // semantic conventions. It represents the total CPU time consumed.
+ // Instrument: counter
+ // Unit: s
+ // Stability: Experimental
+ ContainerCPUTimeName = "container.cpu.time"
+ ContainerCPUTimeUnit = "s"
+ ContainerCPUTimeDescription = "Total CPU time consumed"
+
+ // ContainerMemoryUsage is the metric conforming to the
+ // "container.memory.usage" semantic conventions. It represents the memory
+ // usage of the container.
+ // Instrument: counter
+ // Unit: By
+ // Stability: Experimental
+ ContainerMemoryUsageName = "container.memory.usage"
+ ContainerMemoryUsageUnit = "By"
+ ContainerMemoryUsageDescription = "Memory usage of the container."
+
+ // ContainerDiskIo is the metric conforming to the "container.disk.io" semantic
+ // conventions. It represents the disk bytes for the container.
+ // Instrument: counter
+ // Unit: By
+ // Stability: Experimental
+ ContainerDiskIoName = "container.disk.io"
+ ContainerDiskIoUnit = "By"
+ ContainerDiskIoDescription = "Disk bytes for the container."
+
+ // ContainerNetworkIo is the metric conforming to the "container.network.io"
+ // semantic conventions. It represents the network bytes for the container.
+ // Instrument: counter
+ // Unit: By
+ // Stability: Experimental
+ ContainerNetworkIoName = "container.network.io"
+ ContainerNetworkIoUnit = "By"
+ ContainerNetworkIoDescription = "Network bytes for the container."
+
+ // DBClientOperationDuration is the metric conforming to the
+ // "db.client.operation.duration" semantic conventions. It represents the
+ // duration of database client operations.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ DBClientOperationDurationName = "db.client.operation.duration"
+ DBClientOperationDurationUnit = "s"
+ DBClientOperationDurationDescription = "Duration of database client operations."
+
+ // DBClientConnectionCount is the metric conforming to the
+ // "db.client.connection.count" semantic conventions. It represents the number
+ // of connections that are currently in state described by the `state`
+ // attribute.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Experimental
+ DBClientConnectionCountName = "db.client.connection.count"
+ DBClientConnectionCountUnit = "{connection}"
+ DBClientConnectionCountDescription = "The number of connections that are currently in state described by the `state` attribute"
+
+ // DBClientConnectionIdleMax is the metric conforming to the
+ // "db.client.connection.idle.max" semantic conventions. It represents the
+ // maximum number of idle open connections allowed.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Experimental
+ DBClientConnectionIdleMaxName = "db.client.connection.idle.max"
+ DBClientConnectionIdleMaxUnit = "{connection}"
+ DBClientConnectionIdleMaxDescription = "The maximum number of idle open connections allowed"
+
+ // DBClientConnectionIdleMin is the metric conforming to the
+ // "db.client.connection.idle.min" semantic conventions. It represents the
+ // minimum number of idle open connections allowed.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Experimental
+ DBClientConnectionIdleMinName = "db.client.connection.idle.min"
+ DBClientConnectionIdleMinUnit = "{connection}"
+ DBClientConnectionIdleMinDescription = "The minimum number of idle open connections allowed"
+
+ // DBClientConnectionMax is the metric conforming to the
+ // "db.client.connection.max" semantic conventions. It represents the maximum
+ // number of open connections allowed.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Experimental
+ DBClientConnectionMaxName = "db.client.connection.max"
+ DBClientConnectionMaxUnit = "{connection}"
+ DBClientConnectionMaxDescription = "The maximum number of open connections allowed"
+
+ // DBClientConnectionPendingRequests is the metric conforming to the
+ // "db.client.connection.pending_requests" semantic conventions. It represents
+ // the number of pending requests for an open connection, cumulative for the
+ // entire pool.
+ // Instrument: updowncounter
+ // Unit: {request}
+ // Stability: Experimental
+ DBClientConnectionPendingRequestsName = "db.client.connection.pending_requests"
+ DBClientConnectionPendingRequestsUnit = "{request}"
+ DBClientConnectionPendingRequestsDescription = "The number of pending requests for an open connection, cumulative for the entire pool"
+
+ // DBClientConnectionTimeouts is the metric conforming to the
+ // "db.client.connection.timeouts" semantic conventions. It represents the
+ // number of connection timeouts that have occurred trying to obtain a
+ // connection from the pool.
+ // Instrument: counter
+ // Unit: {timeout}
+ // Stability: Experimental
+ DBClientConnectionTimeoutsName = "db.client.connection.timeouts"
+ DBClientConnectionTimeoutsUnit = "{timeout}"
+ DBClientConnectionTimeoutsDescription = "The number of connection timeouts that have occurred trying to obtain a connection from the pool"
+
+ // DBClientConnectionCreateTime is the metric conforming to the
+ // "db.client.connection.create_time" semantic conventions. It represents the
+ // time it took to create a new connection.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ DBClientConnectionCreateTimeName = "db.client.connection.create_time"
+ DBClientConnectionCreateTimeUnit = "s"
+ DBClientConnectionCreateTimeDescription = "The time it took to create a new connection"
+
+ // DBClientConnectionWaitTime is the metric conforming to the
+ // "db.client.connection.wait_time" semantic conventions. It represents the
+ // time it took to obtain an open connection from the pool.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ DBClientConnectionWaitTimeName = "db.client.connection.wait_time"
+ DBClientConnectionWaitTimeUnit = "s"
+ DBClientConnectionWaitTimeDescription = "The time it took to obtain an open connection from the pool"
+
+ // DBClientConnectionUseTime is the metric conforming to the
+ // "db.client.connection.use_time" semantic conventions. It represents the time
+ // between borrowing a connection and returning it to the pool.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ DBClientConnectionUseTimeName = "db.client.connection.use_time"
+ DBClientConnectionUseTimeUnit = "s"
+ DBClientConnectionUseTimeDescription = "The time between borrowing a connection and returning it to the pool"
+
+ // DBClientConnectionsUsage is the metric conforming to the
+ // "db.client.connections.usage" semantic conventions. It represents the
+ // deprecated, use `db.client.connection.count` instead.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Experimental
+ DBClientConnectionsUsageName = "db.client.connections.usage"
+ DBClientConnectionsUsageUnit = "{connection}"
+ DBClientConnectionsUsageDescription = "Deprecated, use `db.client.connection.count` instead."
+
+ // DBClientConnectionsIdleMax is the metric conforming to the
+ // "db.client.connections.idle.max" semantic conventions. It represents the
+ // deprecated, use `db.client.connection.idle.max` instead.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Experimental
+ DBClientConnectionsIdleMaxName = "db.client.connections.idle.max"
+ DBClientConnectionsIdleMaxUnit = "{connection}"
+ DBClientConnectionsIdleMaxDescription = "Deprecated, use `db.client.connection.idle.max` instead."
+
+ // DBClientConnectionsIdleMin is the metric conforming to the
+ // "db.client.connections.idle.min" semantic conventions. It represents the
+ // deprecated, use `db.client.connection.idle.min` instead.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Experimental
+ DBClientConnectionsIdleMinName = "db.client.connections.idle.min"
+ DBClientConnectionsIdleMinUnit = "{connection}"
+ DBClientConnectionsIdleMinDescription = "Deprecated, use `db.client.connection.idle.min` instead."
+
+ // DBClientConnectionsMax is the metric conforming to the
+ // "db.client.connections.max" semantic conventions. It represents the
+ // deprecated, use `db.client.connection.max` instead.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Experimental
+ DBClientConnectionsMaxName = "db.client.connections.max"
+ DBClientConnectionsMaxUnit = "{connection}"
+ DBClientConnectionsMaxDescription = "Deprecated, use `db.client.connection.max` instead."
+
+ // DBClientConnectionsPendingRequests is the metric conforming to the
+ // "db.client.connections.pending_requests" semantic conventions. It represents
+ // the deprecated, use `db.client.connection.pending_requests` instead.
+ // Instrument: updowncounter
+ // Unit: {request}
+ // Stability: Experimental
+ DBClientConnectionsPendingRequestsName = "db.client.connections.pending_requests"
+ DBClientConnectionsPendingRequestsUnit = "{request}"
+ DBClientConnectionsPendingRequestsDescription = "Deprecated, use `db.client.connection.pending_requests` instead."
+
+ // DBClientConnectionsTimeouts is the metric conforming to the
+ // "db.client.connections.timeouts" semantic conventions. It represents the
+ // deprecated, use `db.client.connection.timeouts` instead.
+ // Instrument: counter
+ // Unit: {timeout}
+ // Stability: Experimental
+ DBClientConnectionsTimeoutsName = "db.client.connections.timeouts"
+ DBClientConnectionsTimeoutsUnit = "{timeout}"
+ DBClientConnectionsTimeoutsDescription = "Deprecated, use `db.client.connection.timeouts` instead."
+
+ // DBClientConnectionsCreateTime is the metric conforming to the
+ // "db.client.connections.create_time" semantic conventions. It represents the
+ // deprecated, use `db.client.connection.create_time` instead. Note: the unit
+ // also changed from `ms` to `s`.
+ // Instrument: histogram
+ // Unit: ms
+ // Stability: Experimental
+ DBClientConnectionsCreateTimeName = "db.client.connections.create_time"
+ DBClientConnectionsCreateTimeUnit = "ms"
+ DBClientConnectionsCreateTimeDescription = "Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`."
+
+ // DBClientConnectionsWaitTime is the metric conforming to the
+ // "db.client.connections.wait_time" semantic conventions. It represents the
+ // deprecated, use `db.client.connection.wait_time` instead. Note: the unit
+ // also changed from `ms` to `s`.
+ // Instrument: histogram
+ // Unit: ms
+ // Stability: Experimental
+ DBClientConnectionsWaitTimeName = "db.client.connections.wait_time"
+ DBClientConnectionsWaitTimeUnit = "ms"
+ DBClientConnectionsWaitTimeDescription = "Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`."
+
+ // DBClientConnectionsUseTime is the metric conforming to the
+ // "db.client.connections.use_time" semantic conventions. It represents the
+ // deprecated, use `db.client.connection.use_time` instead. Note: the unit also
+ // changed from `ms` to `s`.
+ // Instrument: histogram
+ // Unit: ms
+ // Stability: Experimental
+ DBClientConnectionsUseTimeName = "db.client.connections.use_time"
+ DBClientConnectionsUseTimeUnit = "ms"
+ DBClientConnectionsUseTimeDescription = "Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`."
+
+ // DNSLookupDuration is the metric conforming to the "dns.lookup.duration"
+ // semantic conventions. It represents the measures the time taken to perform a
+ // DNS lookup.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ DNSLookupDurationName = "dns.lookup.duration"
+ DNSLookupDurationUnit = "s"
+ DNSLookupDurationDescription = "Measures the time taken to perform a DNS lookup."
+
+ // AspnetcoreRoutingMatchAttempts is the metric conforming to the
+ // "aspnetcore.routing.match_attempts" semantic conventions. It represents the
+ // number of requests that were attempted to be matched to an endpoint.
+ // Instrument: counter
+ // Unit: {match_attempt}
+ // Stability: Stable
+ AspnetcoreRoutingMatchAttemptsName = "aspnetcore.routing.match_attempts"
+ AspnetcoreRoutingMatchAttemptsUnit = "{match_attempt}"
+ AspnetcoreRoutingMatchAttemptsDescription = "Number of requests that were attempted to be matched to an endpoint."
+
+ // AspnetcoreDiagnosticsExceptions is the metric conforming to the
+ // "aspnetcore.diagnostics.exceptions" semantic conventions. It represents the
+ // number of exceptions caught by exception handling middleware.
+ // Instrument: counter
+ // Unit: {exception}
+ // Stability: Stable
+ AspnetcoreDiagnosticsExceptionsName = "aspnetcore.diagnostics.exceptions"
+ AspnetcoreDiagnosticsExceptionsUnit = "{exception}"
+ AspnetcoreDiagnosticsExceptionsDescription = "Number of exceptions caught by exception handling middleware."
+
+ // AspnetcoreRateLimitingActiveRequestLeases is the metric conforming to the
+ // "aspnetcore.rate_limiting.active_request_leases" semantic conventions. It
+ // represents the number of requests that are currently active on the server
+ // that hold a rate limiting lease.
+ // Instrument: updowncounter
+ // Unit: {request}
+ // Stability: Stable
+ AspnetcoreRateLimitingActiveRequestLeasesName = "aspnetcore.rate_limiting.active_request_leases"
+ AspnetcoreRateLimitingActiveRequestLeasesUnit = "{request}"
+ AspnetcoreRateLimitingActiveRequestLeasesDescription = "Number of requests that are currently active on the server that hold a rate limiting lease."
+
+ // AspnetcoreRateLimitingRequestLeaseDuration is the metric conforming to the
+ // "aspnetcore.rate_limiting.request_lease.duration" semantic conventions. It
+ // represents the duration of rate limiting lease held by requests on the
+ // server.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Stable
+ AspnetcoreRateLimitingRequestLeaseDurationName = "aspnetcore.rate_limiting.request_lease.duration"
+ AspnetcoreRateLimitingRequestLeaseDurationUnit = "s"
+ AspnetcoreRateLimitingRequestLeaseDurationDescription = "The duration of rate limiting lease held by requests on the server."
+
+ // AspnetcoreRateLimitingRequestTimeInQueue is the metric conforming to the
+ // "aspnetcore.rate_limiting.request.time_in_queue" semantic conventions. It
+ // represents the time the request spent in a queue waiting to acquire a rate
+ // limiting lease.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Stable
+ AspnetcoreRateLimitingRequestTimeInQueueName = "aspnetcore.rate_limiting.request.time_in_queue"
+ AspnetcoreRateLimitingRequestTimeInQueueUnit = "s"
+ AspnetcoreRateLimitingRequestTimeInQueueDescription = "The time the request spent in a queue waiting to acquire a rate limiting lease."
+
+ // AspnetcoreRateLimitingQueuedRequests is the metric conforming to the
+ // "aspnetcore.rate_limiting.queued_requests" semantic conventions. It
+ // represents the number of requests that are currently queued, waiting to
+ // acquire a rate limiting lease.
+ // Instrument: updowncounter
+ // Unit: {request}
+ // Stability: Stable
+ AspnetcoreRateLimitingQueuedRequestsName = "aspnetcore.rate_limiting.queued_requests"
+ AspnetcoreRateLimitingQueuedRequestsUnit = "{request}"
+ AspnetcoreRateLimitingQueuedRequestsDescription = "Number of requests that are currently queued, waiting to acquire a rate limiting lease."
+
+ // AspnetcoreRateLimitingRequests is the metric conforming to the
+ // "aspnetcore.rate_limiting.requests" semantic conventions. It represents the
+ // number of requests that tried to acquire a rate limiting lease.
+ // Instrument: counter
+ // Unit: {request}
+ // Stability: Stable
+ AspnetcoreRateLimitingRequestsName = "aspnetcore.rate_limiting.requests"
+ AspnetcoreRateLimitingRequestsUnit = "{request}"
+ AspnetcoreRateLimitingRequestsDescription = "Number of requests that tried to acquire a rate limiting lease."
+
+ // KestrelActiveConnections is the metric conforming to the
+ // "kestrel.active_connections" semantic conventions. It represents the number
+ // of connections that are currently active on the server.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Stable
+ KestrelActiveConnectionsName = "kestrel.active_connections"
+ KestrelActiveConnectionsUnit = "{connection}"
+ KestrelActiveConnectionsDescription = "Number of connections that are currently active on the server."
+
+ // KestrelConnectionDuration is the metric conforming to the
+ // "kestrel.connection.duration" semantic conventions. It represents the
+ // duration of connections on the server.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Stable
+ KestrelConnectionDurationName = "kestrel.connection.duration"
+ KestrelConnectionDurationUnit = "s"
+ KestrelConnectionDurationDescription = "The duration of connections on the server."
+
+ // KestrelRejectedConnections is the metric conforming to the
+ // "kestrel.rejected_connections" semantic conventions. It represents the
+ // number of connections rejected by the server.
+ // Instrument: counter
+ // Unit: {connection}
+ // Stability: Stable
+ KestrelRejectedConnectionsName = "kestrel.rejected_connections"
+ KestrelRejectedConnectionsUnit = "{connection}"
+ KestrelRejectedConnectionsDescription = "Number of connections rejected by the server."
+
+ // KestrelQueuedConnections is the metric conforming to the
+ // "kestrel.queued_connections" semantic conventions. It represents the number
+ // of connections that are currently queued and are waiting to start.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Stable
+ KestrelQueuedConnectionsName = "kestrel.queued_connections"
+ KestrelQueuedConnectionsUnit = "{connection}"
+ KestrelQueuedConnectionsDescription = "Number of connections that are currently queued and are waiting to start."
+
+ // KestrelQueuedRequests is the metric conforming to the
+ // "kestrel.queued_requests" semantic conventions. It represents the number of
+ // HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are
+ // currently queued and are waiting to start.
+ // Instrument: updowncounter
+ // Unit: {request}
+ // Stability: Stable
+ KestrelQueuedRequestsName = "kestrel.queued_requests"
+ KestrelQueuedRequestsUnit = "{request}"
+ KestrelQueuedRequestsDescription = "Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start."
+
+ // KestrelUpgradedConnections is the metric conforming to the
+ // "kestrel.upgraded_connections" semantic conventions. It represents the
+ // number of connections that are currently upgraded (WebSockets). .
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Stable
+ KestrelUpgradedConnectionsName = "kestrel.upgraded_connections"
+ KestrelUpgradedConnectionsUnit = "{connection}"
+ KestrelUpgradedConnectionsDescription = "Number of connections that are currently upgraded (WebSockets). ."
+
+ // KestrelTLSHandshakeDuration is the metric conforming to the
+ // "kestrel.tls_handshake.duration" semantic conventions. It represents the
+ // duration of TLS handshakes on the server.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Stable
+ KestrelTLSHandshakeDurationName = "kestrel.tls_handshake.duration"
+ KestrelTLSHandshakeDurationUnit = "s"
+ KestrelTLSHandshakeDurationDescription = "The duration of TLS handshakes on the server."
+
+ // KestrelActiveTLSHandshakes is the metric conforming to the
+ // "kestrel.active_tls_handshakes" semantic conventions. It represents the
+ // number of TLS handshakes that are currently in progress on the server.
+ // Instrument: updowncounter
+ // Unit: {handshake}
+ // Stability: Stable
+ KestrelActiveTLSHandshakesName = "kestrel.active_tls_handshakes"
+ KestrelActiveTLSHandshakesUnit = "{handshake}"
+ KestrelActiveTLSHandshakesDescription = "Number of TLS handshakes that are currently in progress on the server."
+
+ // SignalrServerConnectionDuration is the metric conforming to the
+ // "signalr.server.connection.duration" semantic conventions. It represents the
+ // duration of connections on the server.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Stable
+ SignalrServerConnectionDurationName = "signalr.server.connection.duration"
+ SignalrServerConnectionDurationUnit = "s"
+ SignalrServerConnectionDurationDescription = "The duration of connections on the server."
+
+ // SignalrServerActiveConnections is the metric conforming to the
+ // "signalr.server.active_connections" semantic conventions. It represents the
+ // number of connections that are currently active on the server.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Stable
+ SignalrServerActiveConnectionsName = "signalr.server.active_connections"
+ SignalrServerActiveConnectionsUnit = "{connection}"
+ SignalrServerActiveConnectionsDescription = "Number of connections that are currently active on the server."
+
+ // FaaSInvokeDuration is the metric conforming to the "faas.invoke_duration"
+ // semantic conventions. It represents the measures the duration of the
+ // function's logic execution.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ FaaSInvokeDurationName = "faas.invoke_duration"
+ FaaSInvokeDurationUnit = "s"
+ FaaSInvokeDurationDescription = "Measures the duration of the function's logic execution"
+
+ // FaaSInitDuration is the metric conforming to the "faas.init_duration"
+ // semantic conventions. It represents the measures the duration of the
+ // function's initialization, such as a cold start.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ FaaSInitDurationName = "faas.init_duration"
+ FaaSInitDurationUnit = "s"
+ FaaSInitDurationDescription = "Measures the duration of the function's initialization, such as a cold start"
+
+ // FaaSColdstarts is the metric conforming to the "faas.coldstarts" semantic
+ // conventions. It represents the number of invocation cold starts.
+ // Instrument: counter
+ // Unit: {coldstart}
+ // Stability: Experimental
+ FaaSColdstartsName = "faas.coldstarts"
+ FaaSColdstartsUnit = "{coldstart}"
+ FaaSColdstartsDescription = "Number of invocation cold starts"
+
+ // FaaSErrors is the metric conforming to the "faas.errors" semantic
+ // conventions. It represents the number of invocation errors.
+ // Instrument: counter
+ // Unit: {error}
+ // Stability: Experimental
+ FaaSErrorsName = "faas.errors"
+ FaaSErrorsUnit = "{error}"
+ FaaSErrorsDescription = "Number of invocation errors"
+
+ // FaaSInvocations is the metric conforming to the "faas.invocations" semantic
+ // conventions. It represents the number of successful invocations.
+ // Instrument: counter
+ // Unit: {invocation}
+ // Stability: Experimental
+ FaaSInvocationsName = "faas.invocations"
+ FaaSInvocationsUnit = "{invocation}"
+ FaaSInvocationsDescription = "Number of successful invocations"
+
+ // FaaSTimeouts is the metric conforming to the "faas.timeouts" semantic
+ // conventions. It represents the number of invocation timeouts.
+ // Instrument: counter
+ // Unit: {timeout}
+ // Stability: Experimental
+ FaaSTimeoutsName = "faas.timeouts"
+ FaaSTimeoutsUnit = "{timeout}"
+ FaaSTimeoutsDescription = "Number of invocation timeouts"
+
+ // FaaSMemUsage is the metric conforming to the "faas.mem_usage" semantic
+ // conventions. It represents the distribution of max memory usage per
+ // invocation.
+ // Instrument: histogram
+ // Unit: By
+ // Stability: Experimental
+ FaaSMemUsageName = "faas.mem_usage"
+ FaaSMemUsageUnit = "By"
+ FaaSMemUsageDescription = "Distribution of max memory usage per invocation"
+
+ // FaaSCPUUsage is the metric conforming to the "faas.cpu_usage" semantic
+ // conventions. It represents the distribution of CPU usage per invocation.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ FaaSCPUUsageName = "faas.cpu_usage"
+ FaaSCPUUsageUnit = "s"
+ FaaSCPUUsageDescription = "Distribution of CPU usage per invocation"
+
+ // FaaSNetIo is the metric conforming to the "faas.net_io" semantic
+ // conventions. It represents the distribution of net I/O usage per invocation.
+ // Instrument: histogram
+ // Unit: By
+ // Stability: Experimental
+ FaaSNetIoName = "faas.net_io"
+ FaaSNetIoUnit = "By"
+ FaaSNetIoDescription = "Distribution of net I/O usage per invocation"
+
+ // HTTPServerRequestDuration is the metric conforming to the
+ // "http.server.request.duration" semantic conventions. It represents the
+ // duration of HTTP server requests.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Stable
+ HTTPServerRequestDurationName = "http.server.request.duration"
+ HTTPServerRequestDurationUnit = "s"
+ HTTPServerRequestDurationDescription = "Duration of HTTP server requests."
+
+ // HTTPServerActiveRequests is the metric conforming to the
+ // "http.server.active_requests" semantic conventions. It represents the number
+ // of active HTTP server requests.
+ // Instrument: updowncounter
+ // Unit: {request}
+ // Stability: Experimental
+ HTTPServerActiveRequestsName = "http.server.active_requests"
+ HTTPServerActiveRequestsUnit = "{request}"
+ HTTPServerActiveRequestsDescription = "Number of active HTTP server requests."
+
+ // HTTPServerRequestBodySize is the metric conforming to the
+ // "http.server.request.body.size" semantic conventions. It represents the size
+ // of HTTP server request bodies.
+ // Instrument: histogram
+ // Unit: By
+ // Stability: Experimental
+ HTTPServerRequestBodySizeName = "http.server.request.body.size"
+ HTTPServerRequestBodySizeUnit = "By"
+ HTTPServerRequestBodySizeDescription = "Size of HTTP server request bodies."
+
+ // HTTPServerResponseBodySize is the metric conforming to the
+ // "http.server.response.body.size" semantic conventions. It represents the
+ // size of HTTP server response bodies.
+ // Instrument: histogram
+ // Unit: By
+ // Stability: Experimental
+ HTTPServerResponseBodySizeName = "http.server.response.body.size"
+ HTTPServerResponseBodySizeUnit = "By"
+ HTTPServerResponseBodySizeDescription = "Size of HTTP server response bodies."
+
+ // HTTPClientRequestDuration is the metric conforming to the
+ // "http.client.request.duration" semantic conventions. It represents the
+ // duration of HTTP client requests.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Stable
+ HTTPClientRequestDurationName = "http.client.request.duration"
+ HTTPClientRequestDurationUnit = "s"
+ HTTPClientRequestDurationDescription = "Duration of HTTP client requests."
+
+ // HTTPClientRequestBodySize is the metric conforming to the
+ // "http.client.request.body.size" semantic conventions. It represents the size
+ // of HTTP client request bodies.
+ // Instrument: histogram
+ // Unit: By
+ // Stability: Experimental
+ HTTPClientRequestBodySizeName = "http.client.request.body.size"
+ HTTPClientRequestBodySizeUnit = "By"
+ HTTPClientRequestBodySizeDescription = "Size of HTTP client request bodies."
+
+ // HTTPClientResponseBodySize is the metric conforming to the
+ // "http.client.response.body.size" semantic conventions. It represents the
+ // size of HTTP client response bodies.
+ // Instrument: histogram
+ // Unit: By
+ // Stability: Experimental
+ HTTPClientResponseBodySizeName = "http.client.response.body.size"
+ HTTPClientResponseBodySizeUnit = "By"
+ HTTPClientResponseBodySizeDescription = "Size of HTTP client response bodies."
+
+ // HTTPClientOpenConnections is the metric conforming to the
+ // "http.client.open_connections" semantic conventions. It represents the
+ // number of outbound HTTP connections that are currently active or idle on the
+ // client.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Experimental
+ HTTPClientOpenConnectionsName = "http.client.open_connections"
+ HTTPClientOpenConnectionsUnit = "{connection}"
+ HTTPClientOpenConnectionsDescription = "Number of outbound HTTP connections that are currently active or idle on the client."
+
+ // HTTPClientConnectionDuration is the metric conforming to the
+ // "http.client.connection.duration" semantic conventions. It represents the
+ // duration of the successfully established outbound HTTP connections.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ HTTPClientConnectionDurationName = "http.client.connection.duration"
+ HTTPClientConnectionDurationUnit = "s"
+ HTTPClientConnectionDurationDescription = "The duration of the successfully established outbound HTTP connections."
+
+ // HTTPClientActiveRequests is the metric conforming to the
+ // "http.client.active_requests" semantic conventions. It represents the number
+ // of active HTTP requests.
+ // Instrument: updowncounter
+ // Unit: {request}
+ // Stability: Experimental
+ HTTPClientActiveRequestsName = "http.client.active_requests"
+ HTTPClientActiveRequestsUnit = "{request}"
+ HTTPClientActiveRequestsDescription = "Number of active HTTP requests."
+
+ // JvmMemoryInit is the metric conforming to the "jvm.memory.init" semantic
+ // conventions. It represents the measure of initial memory requested.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Experimental
+ JvmMemoryInitName = "jvm.memory.init"
+ JvmMemoryInitUnit = "By"
+ JvmMemoryInitDescription = "Measure of initial memory requested."
+
+ // JvmSystemCPUUtilization is the metric conforming to the
+ // "jvm.system.cpu.utilization" semantic conventions. It represents the recent
+ // CPU utilization for the whole system as reported by the JVM.
+ // Instrument: gauge
+ // Unit: 1
+ // Stability: Experimental
+ JvmSystemCPUUtilizationName = "jvm.system.cpu.utilization"
+ JvmSystemCPUUtilizationUnit = "1"
+ JvmSystemCPUUtilizationDescription = "Recent CPU utilization for the whole system as reported by the JVM."
+
+ // JvmSystemCPULoad1m is the metric conforming to the "jvm.system.cpu.load_1m"
+ // semantic conventions. It represents the average CPU load of the whole system
+ // for the last minute as reported by the JVM.
+ // Instrument: gauge
+ // Unit: {run_queue_item}
+ // Stability: Experimental
+ JvmSystemCPULoad1mName = "jvm.system.cpu.load_1m"
+ JvmSystemCPULoad1mUnit = "{run_queue_item}"
+ JvmSystemCPULoad1mDescription = "Average CPU load of the whole system for the last minute as reported by the JVM."
+
+ // JvmBufferMemoryUsage is the metric conforming to the
+ // "jvm.buffer.memory.usage" semantic conventions. It represents the measure of
+ // memory used by buffers.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Experimental
+ JvmBufferMemoryUsageName = "jvm.buffer.memory.usage"
+ JvmBufferMemoryUsageUnit = "By"
+ JvmBufferMemoryUsageDescription = "Measure of memory used by buffers."
+
+ // JvmBufferMemoryLimit is the metric conforming to the
+ // "jvm.buffer.memory.limit" semantic conventions. It represents the measure of
+ // total memory capacity of buffers.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Experimental
+ JvmBufferMemoryLimitName = "jvm.buffer.memory.limit"
+ JvmBufferMemoryLimitUnit = "By"
+ JvmBufferMemoryLimitDescription = "Measure of total memory capacity of buffers."
+
+ // JvmBufferCount is the metric conforming to the "jvm.buffer.count" semantic
+ // conventions. It represents the number of buffers in the pool.
+ // Instrument: updowncounter
+ // Unit: {buffer}
+ // Stability: Experimental
+ JvmBufferCountName = "jvm.buffer.count"
+ JvmBufferCountUnit = "{buffer}"
+ JvmBufferCountDescription = "Number of buffers in the pool."
+
+ // JvmMemoryUsed is the metric conforming to the "jvm.memory.used" semantic
+ // conventions. It represents the measure of memory used.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Stable
+ JvmMemoryUsedName = "jvm.memory.used"
+ JvmMemoryUsedUnit = "By"
+ JvmMemoryUsedDescription = "Measure of memory used."
+
+ // JvmMemoryCommitted is the metric conforming to the "jvm.memory.committed"
+ // semantic conventions. It represents the measure of memory committed.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Stable
+ JvmMemoryCommittedName = "jvm.memory.committed"
+ JvmMemoryCommittedUnit = "By"
+ JvmMemoryCommittedDescription = "Measure of memory committed."
+
+ // JvmMemoryLimit is the metric conforming to the "jvm.memory.limit" semantic
+ // conventions. It represents the measure of max obtainable memory.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Stable
+ JvmMemoryLimitName = "jvm.memory.limit"
+ JvmMemoryLimitUnit = "By"
+ JvmMemoryLimitDescription = "Measure of max obtainable memory."
+
+ // JvmMemoryUsedAfterLastGc is the metric conforming to the
+ // "jvm.memory.used_after_last_gc" semantic conventions. It represents the
+ // measure of memory used, as measured after the most recent garbage collection
+ // event on this pool.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Stable
+ JvmMemoryUsedAfterLastGcName = "jvm.memory.used_after_last_gc"
+ JvmMemoryUsedAfterLastGcUnit = "By"
+ JvmMemoryUsedAfterLastGcDescription = "Measure of memory used, as measured after the most recent garbage collection event on this pool."
+
+ // JvmGcDuration is the metric conforming to the "jvm.gc.duration" semantic
+ // conventions. It represents the duration of JVM garbage collection actions.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Stable
+ JvmGcDurationName = "jvm.gc.duration"
+ JvmGcDurationUnit = "s"
+ JvmGcDurationDescription = "Duration of JVM garbage collection actions."
+
+ // JvmThreadCount is the metric conforming to the "jvm.thread.count" semantic
+ // conventions. It represents the number of executing platform threads.
+ // Instrument: updowncounter
+ // Unit: {thread}
+ // Stability: Stable
+ JvmThreadCountName = "jvm.thread.count"
+ JvmThreadCountUnit = "{thread}"
+ JvmThreadCountDescription = "Number of executing platform threads."
+
+ // JvmClassLoaded is the metric conforming to the "jvm.class.loaded" semantic
+ // conventions. It represents the number of classes loaded since JVM start.
+ // Instrument: counter
+ // Unit: {class}
+ // Stability: Stable
+ JvmClassLoadedName = "jvm.class.loaded"
+ JvmClassLoadedUnit = "{class}"
+ JvmClassLoadedDescription = "Number of classes loaded since JVM start."
+
+ // JvmClassUnloaded is the metric conforming to the "jvm.class.unloaded"
+ // semantic conventions. It represents the number of classes unloaded since JVM
+ // start.
+ // Instrument: counter
+ // Unit: {class}
+ // Stability: Stable
+ JvmClassUnloadedName = "jvm.class.unloaded"
+ JvmClassUnloadedUnit = "{class}"
+ JvmClassUnloadedDescription = "Number of classes unloaded since JVM start."
+
+ // JvmClassCount is the metric conforming to the "jvm.class.count" semantic
+ // conventions. It represents the number of classes currently loaded.
+ // Instrument: updowncounter
+ // Unit: {class}
+ // Stability: Stable
+ JvmClassCountName = "jvm.class.count"
+ JvmClassCountUnit = "{class}"
+ JvmClassCountDescription = "Number of classes currently loaded."
+
+ // JvmCPUCount is the metric conforming to the "jvm.cpu.count" semantic
+ // conventions. It represents the number of processors available to the Java
+ // virtual machine.
+ // Instrument: updowncounter
+ // Unit: {cpu}
+ // Stability: Stable
+ JvmCPUCountName = "jvm.cpu.count"
+ JvmCPUCountUnit = "{cpu}"
+ JvmCPUCountDescription = "Number of processors available to the Java virtual machine."
+
+ // JvmCPUTime is the metric conforming to the "jvm.cpu.time" semantic
+ // conventions. It represents the cPU time used by the process as reported by
+ // the JVM.
+ // Instrument: counter
+ // Unit: s
+ // Stability: Stable
+ JvmCPUTimeName = "jvm.cpu.time"
+ JvmCPUTimeUnit = "s"
+ JvmCPUTimeDescription = "CPU time used by the process as reported by the JVM."
+
+ // JvmCPURecentUtilization is the metric conforming to the
+ // "jvm.cpu.recent_utilization" semantic conventions. It represents the recent
+ // CPU utilization for the process as reported by the JVM.
+ // Instrument: gauge
+ // Unit: 1
+ // Stability: Stable
+ JvmCPURecentUtilizationName = "jvm.cpu.recent_utilization"
+ JvmCPURecentUtilizationUnit = "1"
+ JvmCPURecentUtilizationDescription = "Recent CPU utilization for the process as reported by the JVM."
+
+ // MessagingPublishDuration is the metric conforming to the
+ // "messaging.publish.duration" semantic conventions. It represents the
+ // measures the duration of publish operation.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ MessagingPublishDurationName = "messaging.publish.duration"
+ MessagingPublishDurationUnit = "s"
+ MessagingPublishDurationDescription = "Measures the duration of publish operation."
+
+ // MessagingReceiveDuration is the metric conforming to the
+ // "messaging.receive.duration" semantic conventions. It represents the
+ // measures the duration of receive operation.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ MessagingReceiveDurationName = "messaging.receive.duration"
+ MessagingReceiveDurationUnit = "s"
+ MessagingReceiveDurationDescription = "Measures the duration of receive operation."
+
+ // MessagingProcessDuration is the metric conforming to the
+ // "messaging.process.duration" semantic conventions. It represents the
+ // measures the duration of process operation.
+ // Instrument: histogram
+ // Unit: s
+ // Stability: Experimental
+ MessagingProcessDurationName = "messaging.process.duration"
+ MessagingProcessDurationUnit = "s"
+ MessagingProcessDurationDescription = "Measures the duration of process operation."
+
+ // MessagingPublishMessages is the metric conforming to the
+ // "messaging.publish.messages" semantic conventions. It represents the
+ // measures the number of published messages.
+ // Instrument: counter
+ // Unit: {message}
+ // Stability: Experimental
+ MessagingPublishMessagesName = "messaging.publish.messages"
+ MessagingPublishMessagesUnit = "{message}"
+ MessagingPublishMessagesDescription = "Measures the number of published messages."
+
+ // MessagingReceiveMessages is the metric conforming to the
+ // "messaging.receive.messages" semantic conventions. It represents the
+ // measures the number of received messages.
+ // Instrument: counter
+ // Unit: {message}
+ // Stability: Experimental
+ MessagingReceiveMessagesName = "messaging.receive.messages"
+ MessagingReceiveMessagesUnit = "{message}"
+ MessagingReceiveMessagesDescription = "Measures the number of received messages."
+
+ // MessagingProcessMessages is the metric conforming to the
+ // "messaging.process.messages" semantic conventions. It represents the
+ // measures the number of processed messages.
+ // Instrument: counter
+ // Unit: {message}
+ // Stability: Experimental
+ MessagingProcessMessagesName = "messaging.process.messages"
+ MessagingProcessMessagesUnit = "{message}"
+ MessagingProcessMessagesDescription = "Measures the number of processed messages."
+
+ // ProcessCPUTime is the metric conforming to the "process.cpu.time" semantic
+ // conventions. It represents the total CPU seconds broken down by different
+ // states.
+ // Instrument: counter
+ // Unit: s
+ // Stability: Experimental
+ ProcessCPUTimeName = "process.cpu.time"
+ ProcessCPUTimeUnit = "s"
+ ProcessCPUTimeDescription = "Total CPU seconds broken down by different states."
+
+ // ProcessCPUUtilization is the metric conforming to the
+ // "process.cpu.utilization" semantic conventions. It represents the difference
+ // in process.cpu.time since the last measurement, divided by the elapsed time
+ // and number of CPUs available to the process.
+ // Instrument: gauge
+ // Unit: 1
+ // Stability: Experimental
+ ProcessCPUUtilizationName = "process.cpu.utilization"
+ ProcessCPUUtilizationUnit = "1"
+ ProcessCPUUtilizationDescription = "Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process."
+
+ // ProcessMemoryUsage is the metric conforming to the "process.memory.usage"
+ // semantic conventions. It represents the amount of physical memory in use.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Experimental
+ ProcessMemoryUsageName = "process.memory.usage"
+ ProcessMemoryUsageUnit = "By"
+ ProcessMemoryUsageDescription = "The amount of physical memory in use."
+
+ // ProcessMemoryVirtual is the metric conforming to the
+ // "process.memory.virtual" semantic conventions. It represents the amount of
+ // committed virtual memory.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Experimental
+ ProcessMemoryVirtualName = "process.memory.virtual"
+ ProcessMemoryVirtualUnit = "By"
+ ProcessMemoryVirtualDescription = "The amount of committed virtual memory."
+
+ // ProcessDiskIo is the metric conforming to the "process.disk.io" semantic
+ // conventions. It represents the disk bytes transferred.
+ // Instrument: counter
+ // Unit: By
+ // Stability: Experimental
+ ProcessDiskIoName = "process.disk.io"
+ ProcessDiskIoUnit = "By"
+ ProcessDiskIoDescription = "Disk bytes transferred."
+
+ // ProcessNetworkIo is the metric conforming to the "process.network.io"
+ // semantic conventions. It represents the network bytes transferred.
+ // Instrument: counter
+ // Unit: By
+ // Stability: Experimental
+ ProcessNetworkIoName = "process.network.io"
+ ProcessNetworkIoUnit = "By"
+ ProcessNetworkIoDescription = "Network bytes transferred."
+
+ // ProcessThreadCount is the metric conforming to the "process.thread.count"
+ // semantic conventions. It represents the process threads count.
+ // Instrument: updowncounter
+ // Unit: {thread}
+ // Stability: Experimental
+ ProcessThreadCountName = "process.thread.count"
+ ProcessThreadCountUnit = "{thread}"
+ ProcessThreadCountDescription = "Process threads count."
+
+ // ProcessOpenFileDescriptorCount is the metric conforming to the
+ // "process.open_file_descriptor.count" semantic conventions. It represents the
+ // number of file descriptors in use by the process.
+ // Instrument: updowncounter
+ // Unit: {count}
+ // Stability: Experimental
+ ProcessOpenFileDescriptorCountName = "process.open_file_descriptor.count"
+ ProcessOpenFileDescriptorCountUnit = "{count}"
+ ProcessOpenFileDescriptorCountDescription = "Number of file descriptors in use by the process."
+
+ // ProcessContextSwitches is the metric conforming to the
+ // "process.context_switches" semantic conventions. It represents the number of
+ // times the process has been context switched.
+ // Instrument: counter
+ // Unit: {count}
+ // Stability: Experimental
+ ProcessContextSwitchesName = "process.context_switches"
+ ProcessContextSwitchesUnit = "{count}"
+ ProcessContextSwitchesDescription = "Number of times the process has been context switched."
+
+ // ProcessPagingFaults is the metric conforming to the "process.paging.faults"
+ // semantic conventions. It represents the number of page faults the process
+ // has made.
+ // Instrument: counter
+ // Unit: {fault}
+ // Stability: Experimental
+ ProcessPagingFaultsName = "process.paging.faults"
+ ProcessPagingFaultsUnit = "{fault}"
+ ProcessPagingFaultsDescription = "Number of page faults the process has made."
+
+ // RPCServerDuration is the metric conforming to the "rpc.server.duration"
+ // semantic conventions. It represents the measures the duration of inbound
+ // RPC.
+ // Instrument: histogram
+ // Unit: ms
+ // Stability: Experimental
+ RPCServerDurationName = "rpc.server.duration"
+ RPCServerDurationUnit = "ms"
+ RPCServerDurationDescription = "Measures the duration of inbound RPC."
+
+ // RPCServerRequestSize is the metric conforming to the
+ // "rpc.server.request.size" semantic conventions. It represents the measures
+ // the size of RPC request messages (uncompressed).
+ // Instrument: histogram
+ // Unit: By
+ // Stability: Experimental
+ RPCServerRequestSizeName = "rpc.server.request.size"
+ RPCServerRequestSizeUnit = "By"
+ RPCServerRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)."
+
+ // RPCServerResponseSize is the metric conforming to the
+ // "rpc.server.response.size" semantic conventions. It represents the measures
+ // the size of RPC response messages (uncompressed).
+ // Instrument: histogram
+ // Unit: By
+ // Stability: Experimental
+ RPCServerResponseSizeName = "rpc.server.response.size"
+ RPCServerResponseSizeUnit = "By"
+ RPCServerResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)."
+
+ // RPCServerRequestsPerRPC is the metric conforming to the
+ // "rpc.server.requests_per_rpc" semantic conventions. It represents the
+ // measures the number of messages received per RPC.
+ // Instrument: histogram
+ // Unit: {count}
+ // Stability: Experimental
+ RPCServerRequestsPerRPCName = "rpc.server.requests_per_rpc"
+ RPCServerRequestsPerRPCUnit = "{count}"
+ RPCServerRequestsPerRPCDescription = "Measures the number of messages received per RPC."
+
+ // RPCServerResponsesPerRPC is the metric conforming to the
+ // "rpc.server.responses_per_rpc" semantic conventions. It represents the
+ // measures the number of messages sent per RPC.
+ // Instrument: histogram
+ // Unit: {count}
+ // Stability: Experimental
+ RPCServerResponsesPerRPCName = "rpc.server.responses_per_rpc"
+ RPCServerResponsesPerRPCUnit = "{count}"
+ RPCServerResponsesPerRPCDescription = "Measures the number of messages sent per RPC."
+
+ // RPCClientDuration is the metric conforming to the "rpc.client.duration"
+ // semantic conventions. It represents the measures the duration of outbound
+ // RPC.
+ // Instrument: histogram
+ // Unit: ms
+ // Stability: Experimental
+ RPCClientDurationName = "rpc.client.duration"
+ RPCClientDurationUnit = "ms"
+ RPCClientDurationDescription = "Measures the duration of outbound RPC."
+
+ // RPCClientRequestSize is the metric conforming to the
+ // "rpc.client.request.size" semantic conventions. It represents the measures
+ // the size of RPC request messages (uncompressed).
+ // Instrument: histogram
+ // Unit: By
+ // Stability: Experimental
+ RPCClientRequestSizeName = "rpc.client.request.size"
+ RPCClientRequestSizeUnit = "By"
+ RPCClientRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)."
+
+ // RPCClientResponseSize is the metric conforming to the
+ // "rpc.client.response.size" semantic conventions. It represents the measures
+ // the size of RPC response messages (uncompressed).
+ // Instrument: histogram
+ // Unit: By
+ // Stability: Experimental
+ RPCClientResponseSizeName = "rpc.client.response.size"
+ RPCClientResponseSizeUnit = "By"
+ RPCClientResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)."
+
+ // RPCClientRequestsPerRPC is the metric conforming to the
+ // "rpc.client.requests_per_rpc" semantic conventions. It represents the
+ // measures the number of messages received per RPC.
+ // Instrument: histogram
+ // Unit: {count}
+ // Stability: Experimental
+ RPCClientRequestsPerRPCName = "rpc.client.requests_per_rpc"
+ RPCClientRequestsPerRPCUnit = "{count}"
+ RPCClientRequestsPerRPCDescription = "Measures the number of messages received per RPC."
+
+ // RPCClientResponsesPerRPC is the metric conforming to the
+ // "rpc.client.responses_per_rpc" semantic conventions. It represents the
+ // measures the number of messages sent per RPC.
+ // Instrument: histogram
+ // Unit: {count}
+ // Stability: Experimental
+ RPCClientResponsesPerRPCName = "rpc.client.responses_per_rpc"
+ RPCClientResponsesPerRPCUnit = "{count}"
+ RPCClientResponsesPerRPCDescription = "Measures the number of messages sent per RPC."
+
+ // SystemCPUTime is the metric conforming to the "system.cpu.time" semantic
+ // conventions. It represents the seconds each logical CPU spent on each mode.
+ // Instrument: counter
+ // Unit: s
+ // Stability: Experimental
+ SystemCPUTimeName = "system.cpu.time"
+ SystemCPUTimeUnit = "s"
+ SystemCPUTimeDescription = "Seconds each logical CPU spent on each mode"
+
+ // SystemCPUUtilization is the metric conforming to the
+ // "system.cpu.utilization" semantic conventions. It represents the difference
+ // in system.cpu.time since the last measurement, divided by the elapsed time
+ // and number of logical CPUs.
+ // Instrument: gauge
+ // Unit: 1
+ // Stability: Experimental
+ SystemCPUUtilizationName = "system.cpu.utilization"
+ SystemCPUUtilizationUnit = "1"
+ SystemCPUUtilizationDescription = "Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs"
+
+ // SystemCPUFrequency is the metric conforming to the "system.cpu.frequency"
+ // semantic conventions. It represents the reports the current frequency of the
+ // CPU in Hz.
+ // Instrument: gauge
+ // Unit: {Hz}
+ // Stability: Experimental
+ SystemCPUFrequencyName = "system.cpu.frequency"
+ SystemCPUFrequencyUnit = "{Hz}"
+ SystemCPUFrequencyDescription = "Reports the current frequency of the CPU in Hz"
+
+ // SystemCPUPhysicalCount is the metric conforming to the
+ // "system.cpu.physical.count" semantic conventions. It represents the reports
+ // the number of actual physical processor cores on the hardware.
+ // Instrument: updowncounter
+ // Unit: {cpu}
+ // Stability: Experimental
+ SystemCPUPhysicalCountName = "system.cpu.physical.count"
+ SystemCPUPhysicalCountUnit = "{cpu}"
+ SystemCPUPhysicalCountDescription = "Reports the number of actual physical processor cores on the hardware"
+
+ // SystemCPULogicalCount is the metric conforming to the
+ // "system.cpu.logical.count" semantic conventions. It represents the reports
+ // the number of logical (virtual) processor cores created by the operating
+ // system to manage multitasking.
+ // Instrument: updowncounter
+ // Unit: {cpu}
+ // Stability: Experimental
+ SystemCPULogicalCountName = "system.cpu.logical.count"
+ SystemCPULogicalCountUnit = "{cpu}"
+ SystemCPULogicalCountDescription = "Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking"
+
+ // SystemMemoryUsage is the metric conforming to the "system.memory.usage"
+ // semantic conventions. It represents the reports memory in use by state.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Experimental
+ SystemMemoryUsageName = "system.memory.usage"
+ SystemMemoryUsageUnit = "By"
+ SystemMemoryUsageDescription = "Reports memory in use by state."
+
+ // SystemMemoryLimit is the metric conforming to the "system.memory.limit"
+ // semantic conventions. It represents the total memory available in the
+ // system.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Experimental
+ SystemMemoryLimitName = "system.memory.limit"
+ SystemMemoryLimitUnit = "By"
+ SystemMemoryLimitDescription = "Total memory available in the system."
+
+ // SystemMemoryShared is the metric conforming to the "system.memory.shared"
+ // semantic conventions. It represents the shared memory used (mostly by
+ // tmpfs).
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Experimental
+ SystemMemorySharedName = "system.memory.shared"
+ SystemMemorySharedUnit = "By"
+ SystemMemorySharedDescription = "Shared memory used (mostly by tmpfs)."
+
+ // SystemMemoryUtilization is the metric conforming to the
+ // "system.memory.utilization" semantic conventions.
+ // Instrument: gauge
+ // Unit: 1
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemMemoryUtilizationName = "system.memory.utilization"
+ SystemMemoryUtilizationUnit = "1"
+
+ // SystemPagingUsage is the metric conforming to the "system.paging.usage"
+ // semantic conventions. It represents the unix swap or windows pagefile usage.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Experimental
+ SystemPagingUsageName = "system.paging.usage"
+ SystemPagingUsageUnit = "By"
+ SystemPagingUsageDescription = "Unix swap or windows pagefile usage"
+
+ // SystemPagingUtilization is the metric conforming to the
+ // "system.paging.utilization" semantic conventions.
+ // Instrument: gauge
+ // Unit: 1
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemPagingUtilizationName = "system.paging.utilization"
+ SystemPagingUtilizationUnit = "1"
+
+ // SystemPagingFaults is the metric conforming to the "system.paging.faults"
+ // semantic conventions.
+ // Instrument: counter
+ // Unit: {fault}
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemPagingFaultsName = "system.paging.faults"
+ SystemPagingFaultsUnit = "{fault}"
+
+ // SystemPagingOperations is the metric conforming to the
+ // "system.paging.operations" semantic conventions.
+ // Instrument: counter
+ // Unit: {operation}
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemPagingOperationsName = "system.paging.operations"
+ SystemPagingOperationsUnit = "{operation}"
+
+ // SystemDiskIo is the metric conforming to the "system.disk.io" semantic
+ // conventions.
+ // Instrument: counter
+ // Unit: By
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemDiskIoName = "system.disk.io"
+ SystemDiskIoUnit = "By"
+
+ // SystemDiskOperations is the metric conforming to the
+ // "system.disk.operations" semantic conventions.
+ // Instrument: counter
+ // Unit: {operation}
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemDiskOperationsName = "system.disk.operations"
+ SystemDiskOperationsUnit = "{operation}"
+
+ // SystemDiskIoTime is the metric conforming to the "system.disk.io_time"
+ // semantic conventions. It represents the time disk spent activated.
+ // Instrument: counter
+ // Unit: s
+ // Stability: Experimental
+ SystemDiskIoTimeName = "system.disk.io_time"
+ SystemDiskIoTimeUnit = "s"
+ SystemDiskIoTimeDescription = "Time disk spent activated"
+
+ // SystemDiskOperationTime is the metric conforming to the
+ // "system.disk.operation_time" semantic conventions. It represents the sum of
+ // the time each operation took to complete.
+ // Instrument: counter
+ // Unit: s
+ // Stability: Experimental
+ SystemDiskOperationTimeName = "system.disk.operation_time"
+ SystemDiskOperationTimeUnit = "s"
+ SystemDiskOperationTimeDescription = "Sum of the time each operation took to complete"
+
+ // SystemDiskMerged is the metric conforming to the "system.disk.merged"
+ // semantic conventions.
+ // Instrument: counter
+ // Unit: {operation}
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemDiskMergedName = "system.disk.merged"
+ SystemDiskMergedUnit = "{operation}"
+
+ // SystemFilesystemUsage is the metric conforming to the
+ // "system.filesystem.usage" semantic conventions.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemFilesystemUsageName = "system.filesystem.usage"
+ SystemFilesystemUsageUnit = "By"
+
+ // SystemFilesystemUtilization is the metric conforming to the
+ // "system.filesystem.utilization" semantic conventions.
+ // Instrument: gauge
+ // Unit: 1
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemFilesystemUtilizationName = "system.filesystem.utilization"
+ SystemFilesystemUtilizationUnit = "1"
+
+ // SystemNetworkDropped is the metric conforming to the
+ // "system.network.dropped" semantic conventions. It represents the count of
+ // packets that are dropped or discarded even though there was no error.
+ // Instrument: counter
+ // Unit: {packet}
+ // Stability: Experimental
+ SystemNetworkDroppedName = "system.network.dropped"
+ SystemNetworkDroppedUnit = "{packet}"
+ SystemNetworkDroppedDescription = "Count of packets that are dropped or discarded even though there was no error"
+
+ // SystemNetworkPackets is the metric conforming to the
+ // "system.network.packets" semantic conventions.
+ // Instrument: counter
+ // Unit: {packet}
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemNetworkPacketsName = "system.network.packets"
+ SystemNetworkPacketsUnit = "{packet}"
+
+ // SystemNetworkErrors is the metric conforming to the "system.network.errors"
+ // semantic conventions. It represents the count of network errors detected.
+ // Instrument: counter
+ // Unit: {error}
+ // Stability: Experimental
+ SystemNetworkErrorsName = "system.network.errors"
+ SystemNetworkErrorsUnit = "{error}"
+ SystemNetworkErrorsDescription = "Count of network errors detected"
+
+ // SystemNetworkIo is the metric conforming to the "system.network.io" semantic
+ // conventions.
+ // Instrument: counter
+ // Unit: By
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemNetworkIoName = "system.network.io"
+ SystemNetworkIoUnit = "By"
+
+ // SystemNetworkConnections is the metric conforming to the
+ // "system.network.connections" semantic conventions.
+ // Instrument: updowncounter
+ // Unit: {connection}
+ // Stability: Experimental
+ // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository.
+ SystemNetworkConnectionsName = "system.network.connections"
+ SystemNetworkConnectionsUnit = "{connection}"
+
+ // SystemProcessCount is the metric conforming to the "system.process.count"
+ // semantic conventions. It represents the total number of processes in each
+ // state.
+ // Instrument: updowncounter
+ // Unit: {process}
+ // Stability: Experimental
+ SystemProcessCountName = "system.process.count"
+ SystemProcessCountUnit = "{process}"
+ SystemProcessCountDescription = "Total number of processes in each state"
+
+ // SystemProcessCreated is the metric conforming to the
+ // "system.process.created" semantic conventions. It represents the total
+ // number of processes created over uptime of the host.
+ // Instrument: counter
+ // Unit: {process}
+ // Stability: Experimental
+ SystemProcessCreatedName = "system.process.created"
+ SystemProcessCreatedUnit = "{process}"
+ SystemProcessCreatedDescription = "Total number of processes created over uptime of the host"
+
+ // SystemLinuxMemoryAvailable is the metric conforming to the
+ // "system.linux.memory.available" semantic conventions. It represents an
+ // estimate of how much memory is available for starting new applications,
+ // without causing swapping.
+ // Instrument: updowncounter
+ // Unit: By
+ // Stability: Experimental
+ SystemLinuxMemoryAvailableName = "system.linux.memory.available"
+ SystemLinuxMemoryAvailableUnit = "By"
+ SystemLinuxMemoryAvailableDescription = "An estimate of how much memory is available for starting new applications, without causing swapping"
+)
diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/schema.go
new file mode 100644
index 00000000..4c87c7ad
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/schema.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0"
+
+// SchemaURL is the schema URL that matches the version of the semantic conventions
+// that this package defines. Semconv packages starting from v1.4.0 must declare
+// non-empty schema URL in the form https://opentelemetry.io/schemas/
+const SchemaURL = "https://opentelemetry.io/schemas/1.26.0"
diff --git a/vendor/go.opentelemetry.io/otel/trace.go b/vendor/go.opentelemetry.io/otel/trace.go
new file mode 100644
index 00000000..6836c654
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace.go
@@ -0,0 +1,36 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otel // import "go.opentelemetry.io/otel"
+
+import (
+ "go.opentelemetry.io/otel/internal/global"
+ "go.opentelemetry.io/otel/trace"
+)
+
+// Tracer creates a named tracer that implements Tracer interface.
+// If the name is an empty string then provider uses default name.
+//
+// This is short for GetTracerProvider().Tracer(name, opts...)
+func Tracer(name string, opts ...trace.TracerOption) trace.Tracer {
+ return GetTracerProvider().Tracer(name, opts...)
+}
+
+// GetTracerProvider returns the registered global trace provider.
+// If none is registered then an instance of NoopTracerProvider is returned.
+//
+// Use the trace provider to create a named tracer. E.g.
+//
+// tracer := otel.GetTracerProvider().Tracer("example.com/foo")
+//
+// or
+//
+// tracer := otel.Tracer("example.com/foo")
+func GetTracerProvider() trace.TracerProvider {
+ return global.TracerProvider()
+}
+
+// SetTracerProvider registers `tp` as the global trace provider.
+func SetTracerProvider(tp trace.TracerProvider) {
+ global.SetTracerProvider(tp)
+}
diff --git a/vendor/go.opentelemetry.io/otel/trace/LICENSE b/vendor/go.opentelemetry.io/otel/trace/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/go.opentelemetry.io/otel/trace/README.md b/vendor/go.opentelemetry.io/otel/trace/README.md
new file mode 100644
index 00000000..58ccaba6
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/README.md
@@ -0,0 +1,3 @@
+# Trace API
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/trace)
diff --git a/vendor/go.opentelemetry.io/otel/trace/config.go b/vendor/go.opentelemetry.io/otel/trace/config.go
new file mode 100644
index 00000000..9c0b720a
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/config.go
@@ -0,0 +1,323 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/trace"
+
+import (
+ "time"
+
+ "go.opentelemetry.io/otel/attribute"
+)
+
+// TracerConfig is a group of options for a Tracer.
+type TracerConfig struct {
+ instrumentationVersion string
+ // Schema URL of the telemetry emitted by the Tracer.
+ schemaURL string
+ attrs attribute.Set
+}
+
+// InstrumentationVersion returns the version of the library providing instrumentation.
+func (t *TracerConfig) InstrumentationVersion() string {
+ return t.instrumentationVersion
+}
+
+// InstrumentationAttributes returns the attributes associated with the library
+// providing instrumentation.
+func (t *TracerConfig) InstrumentationAttributes() attribute.Set {
+ return t.attrs
+}
+
+// SchemaURL returns the Schema URL of the telemetry emitted by the Tracer.
+func (t *TracerConfig) SchemaURL() string {
+ return t.schemaURL
+}
+
+// NewTracerConfig applies all the options to a returned TracerConfig.
+func NewTracerConfig(options ...TracerOption) TracerConfig {
+ var config TracerConfig
+ for _, option := range options {
+ config = option.apply(config)
+ }
+ return config
+}
+
+// TracerOption applies an option to a TracerConfig.
+type TracerOption interface {
+ apply(TracerConfig) TracerConfig
+}
+
+type tracerOptionFunc func(TracerConfig) TracerConfig
+
+func (fn tracerOptionFunc) apply(cfg TracerConfig) TracerConfig {
+ return fn(cfg)
+}
+
+// SpanConfig is a group of options for a Span.
+type SpanConfig struct {
+ attributes []attribute.KeyValue
+ timestamp time.Time
+ links []Link
+ newRoot bool
+ spanKind SpanKind
+ stackTrace bool
+}
+
+// Attributes describe the associated qualities of a Span.
+func (cfg *SpanConfig) Attributes() []attribute.KeyValue {
+ return cfg.attributes
+}
+
+// Timestamp is a time in a Span life-cycle.
+func (cfg *SpanConfig) Timestamp() time.Time {
+ return cfg.timestamp
+}
+
+// StackTrace checks whether stack trace capturing is enabled.
+func (cfg *SpanConfig) StackTrace() bool {
+ return cfg.stackTrace
+}
+
+// Links are the associations a Span has with other Spans.
+func (cfg *SpanConfig) Links() []Link {
+ return cfg.links
+}
+
+// NewRoot identifies a Span as the root Span for a new trace. This is
+// commonly used when an existing trace crosses trust boundaries and the
+// remote parent span context should be ignored for security.
+func (cfg *SpanConfig) NewRoot() bool {
+ return cfg.newRoot
+}
+
+// SpanKind is the role a Span has in a trace.
+func (cfg *SpanConfig) SpanKind() SpanKind {
+ return cfg.spanKind
+}
+
+// NewSpanStartConfig applies all the options to a returned SpanConfig.
+// No validation is performed on the returned SpanConfig (e.g. no uniqueness
+// checking or bounding of data), it is left to the SDK to perform this
+// action.
+func NewSpanStartConfig(options ...SpanStartOption) SpanConfig {
+ var c SpanConfig
+ for _, option := range options {
+ c = option.applySpanStart(c)
+ }
+ return c
+}
+
+// NewSpanEndConfig applies all the options to a returned SpanConfig.
+// No validation is performed on the returned SpanConfig (e.g. no uniqueness
+// checking or bounding of data), it is left to the SDK to perform this
+// action.
+func NewSpanEndConfig(options ...SpanEndOption) SpanConfig {
+ var c SpanConfig
+ for _, option := range options {
+ c = option.applySpanEnd(c)
+ }
+ return c
+}
+
+// SpanStartOption applies an option to a SpanConfig. These options are applicable
+// only when the span is created.
+type SpanStartOption interface {
+ applySpanStart(SpanConfig) SpanConfig
+}
+
+type spanOptionFunc func(SpanConfig) SpanConfig
+
+func (fn spanOptionFunc) applySpanStart(cfg SpanConfig) SpanConfig {
+ return fn(cfg)
+}
+
+// SpanEndOption applies an option to a SpanConfig. These options are
+// applicable only when the span is ended.
+type SpanEndOption interface {
+ applySpanEnd(SpanConfig) SpanConfig
+}
+
+// EventConfig is a group of options for an Event.
+type EventConfig struct {
+ attributes []attribute.KeyValue
+ timestamp time.Time
+ stackTrace bool
+}
+
+// Attributes describe the associated qualities of an Event.
+func (cfg *EventConfig) Attributes() []attribute.KeyValue {
+ return cfg.attributes
+}
+
+// Timestamp is a time in an Event life-cycle.
+func (cfg *EventConfig) Timestamp() time.Time {
+ return cfg.timestamp
+}
+
+// StackTrace checks whether stack trace capturing is enabled.
+func (cfg *EventConfig) StackTrace() bool {
+ return cfg.stackTrace
+}
+
+// NewEventConfig applies all the EventOptions to a returned EventConfig. If no
+// timestamp option is passed, the returned EventConfig will have a Timestamp
+// set to the call time, otherwise no validation is performed on the returned
+// EventConfig.
+func NewEventConfig(options ...EventOption) EventConfig {
+ var c EventConfig
+ for _, option := range options {
+ c = option.applyEvent(c)
+ }
+ if c.timestamp.IsZero() {
+ c.timestamp = time.Now()
+ }
+ return c
+}
+
+// EventOption applies span event options to an EventConfig.
+type EventOption interface {
+ applyEvent(EventConfig) EventConfig
+}
+
+// SpanOption are options that can be used at both the beginning and end of a span.
+type SpanOption interface {
+ SpanStartOption
+ SpanEndOption
+}
+
+// SpanStartEventOption are options that can be used at the start of a span, or with an event.
+type SpanStartEventOption interface {
+ SpanStartOption
+ EventOption
+}
+
+// SpanEndEventOption are options that can be used at the end of a span, or with an event.
+type SpanEndEventOption interface {
+ SpanEndOption
+ EventOption
+}
+
+type attributeOption []attribute.KeyValue
+
+func (o attributeOption) applySpan(c SpanConfig) SpanConfig {
+ c.attributes = append(c.attributes, []attribute.KeyValue(o)...)
+ return c
+}
+func (o attributeOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) }
+func (o attributeOption) applyEvent(c EventConfig) EventConfig {
+ c.attributes = append(c.attributes, []attribute.KeyValue(o)...)
+ return c
+}
+
+var _ SpanStartEventOption = attributeOption{}
+
+// WithAttributes adds the attributes related to a span life-cycle event.
+// These attributes are used to describe the work a Span represents when this
+// option is provided to a Span's start event. Otherwise, these
+// attributes provide additional information about the event being recorded
+// (e.g. error, state change, processing progress, system event).
+//
+// If multiple of these options are passed the attributes of each successive
+// option will extend the attributes instead of overwriting. There is no
+// guarantee of uniqueness in the resulting attributes.
+func WithAttributes(attributes ...attribute.KeyValue) SpanStartEventOption {
+ return attributeOption(attributes)
+}
+
+// SpanEventOption are options that can be used with an event or a span.
+type SpanEventOption interface {
+ SpanOption
+ EventOption
+}
+
+type timestampOption time.Time
+
+func (o timestampOption) applySpan(c SpanConfig) SpanConfig {
+ c.timestamp = time.Time(o)
+ return c
+}
+func (o timestampOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) }
+func (o timestampOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) }
+func (o timestampOption) applyEvent(c EventConfig) EventConfig {
+ c.timestamp = time.Time(o)
+ return c
+}
+
+var _ SpanEventOption = timestampOption{}
+
+// WithTimestamp sets the time of a Span or Event life-cycle moment (e.g.
+// started, stopped, errored).
+func WithTimestamp(t time.Time) SpanEventOption {
+ return timestampOption(t)
+}
+
+type stackTraceOption bool
+
+func (o stackTraceOption) applyEvent(c EventConfig) EventConfig {
+ c.stackTrace = bool(o)
+ return c
+}
+
+func (o stackTraceOption) applySpan(c SpanConfig) SpanConfig {
+ c.stackTrace = bool(o)
+ return c
+}
+func (o stackTraceOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) }
+
+// WithStackTrace sets the flag to capture the error with stack trace (e.g. true, false).
+func WithStackTrace(b bool) SpanEndEventOption {
+ return stackTraceOption(b)
+}
+
+// WithLinks adds links to a Span. The links are added to the existing Span
+// links, i.e. this does not overwrite. Links with invalid span context are ignored.
+func WithLinks(links ...Link) SpanStartOption {
+ return spanOptionFunc(func(cfg SpanConfig) SpanConfig {
+ cfg.links = append(cfg.links, links...)
+ return cfg
+ })
+}
+
+// WithNewRoot specifies that the Span should be treated as a root Span. Any
+// existing parent span context will be ignored when defining the Span's trace
+// identifiers.
+func WithNewRoot() SpanStartOption {
+ return spanOptionFunc(func(cfg SpanConfig) SpanConfig {
+ cfg.newRoot = true
+ return cfg
+ })
+}
+
+// WithSpanKind sets the SpanKind of a Span.
+func WithSpanKind(kind SpanKind) SpanStartOption {
+ return spanOptionFunc(func(cfg SpanConfig) SpanConfig {
+ cfg.spanKind = kind
+ return cfg
+ })
+}
+
+// WithInstrumentationVersion sets the instrumentation version.
+func WithInstrumentationVersion(version string) TracerOption {
+ return tracerOptionFunc(func(cfg TracerConfig) TracerConfig {
+ cfg.instrumentationVersion = version
+ return cfg
+ })
+}
+
+// WithInstrumentationAttributes sets the instrumentation attributes.
+//
+// The passed attributes will be de-duplicated.
+func WithInstrumentationAttributes(attr ...attribute.KeyValue) TracerOption {
+ return tracerOptionFunc(func(config TracerConfig) TracerConfig {
+ config.attrs = attribute.NewSet(attr...)
+ return config
+ })
+}
+
+// WithSchemaURL sets the schema URL for the Tracer.
+func WithSchemaURL(schemaURL string) TracerOption {
+ return tracerOptionFunc(func(cfg TracerConfig) TracerConfig {
+ cfg.schemaURL = schemaURL
+ return cfg
+ })
+}
diff --git a/vendor/go.opentelemetry.io/otel/trace/context.go b/vendor/go.opentelemetry.io/otel/trace/context.go
new file mode 100644
index 00000000..8c45a710
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/context.go
@@ -0,0 +1,50 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/trace"
+
+import "context"
+
+type traceContextKeyType int
+
+const currentSpanKey traceContextKeyType = iota
+
+// ContextWithSpan returns a copy of parent with span set as the current Span.
+func ContextWithSpan(parent context.Context, span Span) context.Context {
+ return context.WithValue(parent, currentSpanKey, span)
+}
+
+// ContextWithSpanContext returns a copy of parent with sc as the current
+// Span. The Span implementation that wraps sc is non-recording and performs
+// no operations other than to return sc as the SpanContext from the
+// SpanContext method.
+func ContextWithSpanContext(parent context.Context, sc SpanContext) context.Context {
+ return ContextWithSpan(parent, nonRecordingSpan{sc: sc})
+}
+
+// ContextWithRemoteSpanContext returns a copy of parent with rsc set explicitly
+// as a remote SpanContext and as the current Span. The Span implementation
+// that wraps rsc is non-recording and performs no operations other than to
+// return rsc as the SpanContext from the SpanContext method.
+func ContextWithRemoteSpanContext(parent context.Context, rsc SpanContext) context.Context {
+ return ContextWithSpanContext(parent, rsc.WithRemote(true))
+}
+
+// SpanFromContext returns the current Span from ctx.
+//
+// If no Span is currently set in ctx an implementation of a Span that
+// performs no operations is returned.
+func SpanFromContext(ctx context.Context) Span {
+ if ctx == nil {
+ return noopSpanInstance
+ }
+ if span, ok := ctx.Value(currentSpanKey).(Span); ok {
+ return span
+ }
+ return noopSpanInstance
+}
+
+// SpanContextFromContext returns the current Span's SpanContext.
+func SpanContextFromContext(ctx context.Context) SpanContext {
+ return SpanFromContext(ctx).SpanContext()
+}
diff --git a/vendor/go.opentelemetry.io/otel/trace/doc.go b/vendor/go.opentelemetry.io/otel/trace/doc.go
new file mode 100644
index 00000000..cdbf41d6
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/doc.go
@@ -0,0 +1,119 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+/*
+Package trace provides an implementation of the tracing part of the
+OpenTelemetry API.
+
+To participate in distributed traces a Span needs to be created for the
+operation being performed as part of a traced workflow. In its simplest form:
+
+ var tracer trace.Tracer
+
+ func init() {
+ tracer = otel.Tracer("instrumentation/package/name")
+ }
+
+ func operation(ctx context.Context) {
+ var span trace.Span
+ ctx, span = tracer.Start(ctx, "operation")
+ defer span.End()
+ // ...
+ }
+
+A Tracer is unique to the instrumentation and is used to create Spans.
+Instrumentation should be designed to accept a TracerProvider from which it
+can create its own unique Tracer. Alternatively, the registered global
+TracerProvider from the go.opentelemetry.io/otel package can be used as
+a default.
+
+ const (
+ name = "instrumentation/package/name"
+ version = "0.1.0"
+ )
+
+ type Instrumentation struct {
+ tracer trace.Tracer
+ }
+
+ func NewInstrumentation(tp trace.TracerProvider) *Instrumentation {
+ if tp == nil {
+ tp = otel.TracerProvider()
+ }
+ return &Instrumentation{
+ tracer: tp.Tracer(name, trace.WithInstrumentationVersion(version)),
+ }
+ }
+
+ func operation(ctx context.Context, inst *Instrumentation) {
+ var span trace.Span
+ ctx, span = inst.tracer.Start(ctx, "operation")
+ defer span.End()
+ // ...
+ }
+
+# API Implementations
+
+This package does not conform to the standard Go versioning policy; all of its
+interfaces may have methods added to them without a package major version bump.
+This non-standard API evolution could surprise an uninformed implementation
+author. They could unknowingly build their implementation in a way that would
+result in a runtime panic for their users that update to the new API.
+
+The API is designed to help inform an instrumentation author about this
+non-standard API evolution. It requires them to choose a default behavior for
+unimplemented interface methods. There are three behavior choices they can
+make:
+
+ - Compilation failure
+ - Panic
+ - Default to another implementation
+
+All interfaces in this API embed a corresponding interface from
+[go.opentelemetry.io/otel/trace/embedded]. If an author wants the default
+behavior of their implementations to be a compilation failure, signaling to
+their users they need to update to the latest version of that implementation,
+they need to embed the corresponding interface from
+[go.opentelemetry.io/otel/trace/embedded] in their implementation. For
+example,
+
+ import "go.opentelemetry.io/otel/trace/embedded"
+
+ type TracerProvider struct {
+ embedded.TracerProvider
+ // ...
+ }
+
+If an author wants the default behavior of their implementations to panic, they
+can embed the API interface directly.
+
+ import "go.opentelemetry.io/otel/trace"
+
+ type TracerProvider struct {
+ trace.TracerProvider
+ // ...
+ }
+
+This option is not recommended. It will lead to publishing packages that
+contain runtime panics when users update to newer versions of
+[go.opentelemetry.io/otel/trace], which may be done with a transitive
+dependency.
+
+Finally, an author can embed another implementation in theirs. The embedded
+implementation will be used for methods not defined by the author. For example,
+an author who wants to default to silently dropping the call can use
+[go.opentelemetry.io/otel/trace/noop]:
+
+ import "go.opentelemetry.io/otel/trace/noop"
+
+ type TracerProvider struct {
+ noop.TracerProvider
+ // ...
+ }
+
+It is strongly recommended that authors only embed
+[go.opentelemetry.io/otel/trace/noop] if they choose this default behavior.
+That implementation is the only one OpenTelemetry authors can guarantee will
+fully implement all the API interfaces when a user updates their API.
+*/
+package trace // import "go.opentelemetry.io/otel/trace"
diff --git a/vendor/go.opentelemetry.io/otel/trace/embedded/README.md b/vendor/go.opentelemetry.io/otel/trace/embedded/README.md
new file mode 100644
index 00000000..7754a239
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/embedded/README.md
@@ -0,0 +1,3 @@
+# Trace Embedded
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/trace/embedded)
diff --git a/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go b/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go
new file mode 100644
index 00000000..3e359a00
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go
@@ -0,0 +1,45 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package embedded provides interfaces embedded within the [OpenTelemetry
+// trace API].
+//
+// Implementers of the [OpenTelemetry trace API] can embed the relevant type
+// from this package into their implementation directly. Doing so will result
+// in a compilation error for users when the [OpenTelemetry trace API] is
+// extended (which is something that can happen without a major version bump of
+// the API package).
+//
+// [OpenTelemetry trace API]: https://pkg.go.dev/go.opentelemetry.io/otel/trace
+package embedded // import "go.opentelemetry.io/otel/trace/embedded"
+
+// TracerProvider is embedded in
+// [go.opentelemetry.io/otel/trace.TracerProvider].
+//
+// Embed this interface in your implementation of the
+// [go.opentelemetry.io/otel/trace.TracerProvider] if you want users to
+// experience a compilation error, signaling they need to update to your latest
+// implementation, when the [go.opentelemetry.io/otel/trace.TracerProvider]
+// interface is extended (which is something that can happen without a major
+// version bump of the API package).
+type TracerProvider interface{ tracerProvider() }
+
+// Tracer is embedded in [go.opentelemetry.io/otel/trace.Tracer].
+//
+// Embed this interface in your implementation of the
+// [go.opentelemetry.io/otel/trace.Tracer] if you want users to experience a
+// compilation error, signaling they need to update to your latest
+// implementation, when the [go.opentelemetry.io/otel/trace.Tracer] interface
+// is extended (which is something that can happen without a major version bump
+// of the API package).
+type Tracer interface{ tracer() }
+
+// Span is embedded in [go.opentelemetry.io/otel/trace.Span].
+//
+// Embed this interface in your implementation of the
+// [go.opentelemetry.io/otel/trace.Span] if you want users to experience a
+// compilation error, signaling they need to update to your latest
+// implementation, when the [go.opentelemetry.io/otel/trace.Span] interface is
+// extended (which is something that can happen without a major version bump of
+// the API package).
+type Span interface{ span() }
diff --git a/vendor/go.opentelemetry.io/otel/trace/nonrecording.go b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go
new file mode 100644
index 00000000..c00221e7
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go
@@ -0,0 +1,16 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/trace"
+
+// nonRecordingSpan is a minimal implementation of a Span that wraps a
+// SpanContext. It performs no operations other than to return the wrapped
+// SpanContext.
+type nonRecordingSpan struct {
+ noopSpan
+
+ sc SpanContext
+}
+
+// SpanContext returns the wrapped SpanContext.
+func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc }
diff --git a/vendor/go.opentelemetry.io/otel/trace/noop.go b/vendor/go.opentelemetry.io/otel/trace/noop.go
new file mode 100644
index 00000000..ca20e999
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/noop.go
@@ -0,0 +1,85 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/trace"
+
+import (
+ "context"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/codes"
+ "go.opentelemetry.io/otel/trace/embedded"
+)
+
+// NewNoopTracerProvider returns an implementation of TracerProvider that
+// performs no operations. The Tracer and Spans created from the returned
+// TracerProvider also perform no operations.
+//
+// Deprecated: Use [go.opentelemetry.io/otel/trace/noop.NewTracerProvider]
+// instead.
+func NewNoopTracerProvider() TracerProvider {
+ return noopTracerProvider{}
+}
+
+type noopTracerProvider struct{ embedded.TracerProvider }
+
+var _ TracerProvider = noopTracerProvider{}
+
+// Tracer returns noop implementation of Tracer.
+func (p noopTracerProvider) Tracer(string, ...TracerOption) Tracer {
+ return noopTracer{}
+}
+
+// noopTracer is an implementation of Tracer that performs no operations.
+type noopTracer struct{ embedded.Tracer }
+
+var _ Tracer = noopTracer{}
+
+// Start carries forward a non-recording Span, if one is present in the context, otherwise it
+// creates a no-op Span.
+func (t noopTracer) Start(ctx context.Context, name string, _ ...SpanStartOption) (context.Context, Span) {
+ span := SpanFromContext(ctx)
+ if _, ok := span.(nonRecordingSpan); !ok {
+ // span is likely already a noopSpan, but let's be sure
+ span = noopSpanInstance
+ }
+ return ContextWithSpan(ctx, span), span
+}
+
+// noopSpan is an implementation of Span that performs no operations.
+type noopSpan struct{ embedded.Span }
+
+var noopSpanInstance Span = noopSpan{}
+
+// SpanContext returns an empty span context.
+func (noopSpan) SpanContext() SpanContext { return SpanContext{} }
+
+// IsRecording always returns false.
+func (noopSpan) IsRecording() bool { return false }
+
+// SetStatus does nothing.
+func (noopSpan) SetStatus(codes.Code, string) {}
+
+// SetError does nothing.
+func (noopSpan) SetError(bool) {}
+
+// SetAttributes does nothing.
+func (noopSpan) SetAttributes(...attribute.KeyValue) {}
+
+// End does nothing.
+func (noopSpan) End(...SpanEndOption) {}
+
+// RecordError does nothing.
+func (noopSpan) RecordError(error, ...EventOption) {}
+
+// AddEvent does nothing.
+func (noopSpan) AddEvent(string, ...EventOption) {}
+
+// AddLink does nothing.
+func (noopSpan) AddLink(Link) {}
+
+// SetName does nothing.
+func (noopSpan) SetName(string) {}
+
+// TracerProvider returns a no-op TracerProvider.
+func (noopSpan) TracerProvider() TracerProvider { return noopTracerProvider{} }
diff --git a/vendor/go.opentelemetry.io/otel/trace/noop/README.md b/vendor/go.opentelemetry.io/otel/trace/noop/README.md
new file mode 100644
index 00000000..cd382c82
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/noop/README.md
@@ -0,0 +1,3 @@
+# Trace Noop
+
+[](https://pkg.go.dev/go.opentelemetry.io/otel/trace/noop)
diff --git a/vendor/go.opentelemetry.io/otel/trace/noop/noop.go b/vendor/go.opentelemetry.io/otel/trace/noop/noop.go
new file mode 100644
index 00000000..64a4f1b3
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/noop/noop.go
@@ -0,0 +1,112 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+// Package noop provides an implementation of the OpenTelemetry trace API that
+// produces no telemetry and minimizes used computation resources.
+//
+// Using this package to implement the OpenTelemetry trace API will effectively
+// disable OpenTelemetry.
+//
+// This implementation can be embedded in other implementations of the
+// OpenTelemetry trace API. Doing so will mean the implementation defaults to
+// no operation for methods it does not implement.
+package noop // import "go.opentelemetry.io/otel/trace/noop"
+
+import (
+ "context"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/codes"
+ "go.opentelemetry.io/otel/trace"
+ "go.opentelemetry.io/otel/trace/embedded"
+)
+
+var (
+ // Compile-time check this implements the OpenTelemetry API.
+
+ _ trace.TracerProvider = TracerProvider{}
+ _ trace.Tracer = Tracer{}
+ _ trace.Span = Span{}
+)
+
+// TracerProvider is an OpenTelemetry No-Op TracerProvider.
+type TracerProvider struct{ embedded.TracerProvider }
+
+// NewTracerProvider returns a TracerProvider that does not record any telemetry.
+func NewTracerProvider() TracerProvider {
+ return TracerProvider{}
+}
+
+// Tracer returns an OpenTelemetry Tracer that does not record any telemetry.
+func (TracerProvider) Tracer(string, ...trace.TracerOption) trace.Tracer {
+ return Tracer{}
+}
+
+// Tracer is an OpenTelemetry No-Op Tracer.
+type Tracer struct{ embedded.Tracer }
+
+// Start creates a span. The created span will be set in a child context of ctx
+// and returned with the span.
+//
+// If ctx contains a span context, the returned span will also contain that
+// span context. If the span context in ctx is for a non-recording span, that
+// span instance will be returned directly.
+func (t Tracer) Start(ctx context.Context, _ string, _ ...trace.SpanStartOption) (context.Context, trace.Span) {
+ span := trace.SpanFromContext(ctx)
+
+ // If the parent context contains a non-zero span context, that span
+ // context needs to be returned as a non-recording span
+ // (https://github.com/open-telemetry/opentelemetry-specification/blob/3a1dde966a4ce87cce5adf464359fe369741bbea/specification/trace/api.md#behavior-of-the-api-in-the-absence-of-an-installed-sdk).
+ var zeroSC trace.SpanContext
+ if sc := span.SpanContext(); !sc.Equal(zeroSC) {
+ if !span.IsRecording() {
+ // If the span is not recording return it directly.
+ return ctx, span
+ }
+ // Otherwise, return the span context needs in a non-recording span.
+ span = Span{sc: sc}
+ } else {
+ // No parent, return a No-Op span with an empty span context.
+ span = noopSpanInstance
+ }
+ return trace.ContextWithSpan(ctx, span), span
+}
+
+var noopSpanInstance trace.Span = Span{}
+
+// Span is an OpenTelemetry No-Op Span.
+type Span struct {
+ embedded.Span
+
+ sc trace.SpanContext
+}
+
+// SpanContext returns an empty span context.
+func (s Span) SpanContext() trace.SpanContext { return s.sc }
+
+// IsRecording always returns false.
+func (Span) IsRecording() bool { return false }
+
+// SetStatus does nothing.
+func (Span) SetStatus(codes.Code, string) {}
+
+// SetAttributes does nothing.
+func (Span) SetAttributes(...attribute.KeyValue) {}
+
+// End does nothing.
+func (Span) End(...trace.SpanEndOption) {}
+
+// RecordError does nothing.
+func (Span) RecordError(error, ...trace.EventOption) {}
+
+// AddEvent does nothing.
+func (Span) AddEvent(string, ...trace.EventOption) {}
+
+// AddLink does nothing.
+func (Span) AddLink(trace.Link) {}
+
+// SetName does nothing.
+func (Span) SetName(string) {}
+
+// TracerProvider returns a No-Op TracerProvider.
+func (Span) TracerProvider() trace.TracerProvider { return TracerProvider{} }
diff --git a/vendor/go.opentelemetry.io/otel/trace/provider.go b/vendor/go.opentelemetry.io/otel/trace/provider.go
new file mode 100644
index 00000000..ef85cb70
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/provider.go
@@ -0,0 +1,59 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/trace"
+
+import "go.opentelemetry.io/otel/trace/embedded"
+
+// TracerProvider provides Tracers that are used by instrumentation code to
+// trace computational workflows.
+//
+// A TracerProvider is the collection destination of all Spans from Tracers it
+// provides, it represents a unique telemetry collection pipeline. How that
+// pipeline is defined, meaning how those Spans are collected, processed, and
+// where they are exported, depends on its implementation. Instrumentation
+// authors do not need to define this implementation, rather just use the
+// provided Tracers to instrument code.
+//
+// Commonly, instrumentation code will accept a TracerProvider implementation
+// at runtime from its users or it can simply use the globally registered one
+// (see https://pkg.go.dev/go.opentelemetry.io/otel#GetTracerProvider).
+//
+// Warning: Methods may be added to this interface in minor releases. See
+// package documentation on API implementation for information on how to set
+// default behavior for unimplemented methods.
+type TracerProvider interface {
+ // Users of the interface can ignore this. This embedded type is only used
+ // by implementations of this interface. See the "API Implementations"
+ // section of the package documentation for more information.
+ embedded.TracerProvider
+
+ // Tracer returns a unique Tracer scoped to be used by instrumentation code
+ // to trace computational workflows. The scope and identity of that
+ // instrumentation code is uniquely defined by the name and options passed.
+ //
+ // The passed name needs to uniquely identify instrumentation code.
+ // Therefore, it is recommended that name is the Go package name of the
+ // library providing instrumentation (note: not the code being
+ // instrumented). Instrumentation libraries can have multiple versions,
+ // therefore, the WithInstrumentationVersion option should be used to
+ // distinguish these different codebases. Additionally, instrumentation
+ // libraries may sometimes use traces to communicate different domains of
+ // workflow data (i.e. using spans to communicate workflow events only). If
+ // this is the case, the WithScopeAttributes option should be used to
+ // uniquely identify Tracers that handle the different domains of workflow
+ // data.
+ //
+ // If the same name and options are passed multiple times, the same Tracer
+ // will be returned (it is up to the implementation if this will be the
+ // same underlying instance of that Tracer or not). It is not necessary to
+ // call this multiple times with the same name and options to get an
+ // up-to-date Tracer. All implementations will ensure any TracerProvider
+ // configuration changes are propagated to all provided Tracers.
+ //
+ // If name is empty, then an implementation defined default name will be
+ // used instead.
+ //
+ // This method is safe to call concurrently.
+ Tracer(name string, options ...TracerOption) Tracer
+}
diff --git a/vendor/go.opentelemetry.io/otel/trace/span.go b/vendor/go.opentelemetry.io/otel/trace/span.go
new file mode 100644
index 00000000..d3aa476e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/span.go
@@ -0,0 +1,177 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/trace"
+
+import (
+ "context"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/codes"
+ "go.opentelemetry.io/otel/trace/embedded"
+)
+
+// Span is the individual component of a trace. It represents a single named
+// and timed operation of a workflow that is traced. A Tracer is used to
+// create a Span and it is then up to the operation the Span represents to
+// properly end the Span when the operation itself ends.
+//
+// Warning: Methods may be added to this interface in minor releases. See
+// package documentation on API implementation for information on how to set
+// default behavior for unimplemented methods.
+type Span interface {
+ // Users of the interface can ignore this. This embedded type is only used
+ // by implementations of this interface. See the "API Implementations"
+ // section of the package documentation for more information.
+ embedded.Span
+
+ // End completes the Span. The Span is considered complete and ready to be
+ // delivered through the rest of the telemetry pipeline after this method
+ // is called. Therefore, updates to the Span are not allowed after this
+ // method has been called.
+ End(options ...SpanEndOption)
+
+ // AddEvent adds an event with the provided name and options.
+ AddEvent(name string, options ...EventOption)
+
+ // AddLink adds a link.
+ // Adding links at span creation using WithLinks is preferred to calling AddLink
+ // later, for contexts that are available during span creation, because head
+ // sampling decisions can only consider information present during span creation.
+ AddLink(link Link)
+
+ // IsRecording returns the recording state of the Span. It will return
+ // true if the Span is active and events can be recorded.
+ IsRecording() bool
+
+ // RecordError will record err as an exception span event for this span. An
+ // additional call to SetStatus is required if the Status of the Span should
+ // be set to Error, as this method does not change the Span status. If this
+ // span is not being recorded or err is nil then this method does nothing.
+ RecordError(err error, options ...EventOption)
+
+ // SpanContext returns the SpanContext of the Span. The returned SpanContext
+ // is usable even after the End method has been called for the Span.
+ SpanContext() SpanContext
+
+ // SetStatus sets the status of the Span in the form of a code and a
+ // description, provided the status hasn't already been set to a higher
+ // value before (OK > Error > Unset). The description is only included in a
+ // status when the code is for an error.
+ SetStatus(code codes.Code, description string)
+
+ // SetName sets the Span name.
+ SetName(name string)
+
+ // SetAttributes sets kv as attributes of the Span. If a key from kv
+ // already exists for an attribute of the Span it will be overwritten with
+ // the value contained in kv.
+ SetAttributes(kv ...attribute.KeyValue)
+
+ // TracerProvider returns a TracerProvider that can be used to generate
+ // additional Spans on the same telemetry pipeline as the current Span.
+ TracerProvider() TracerProvider
+}
+
+// Link is the relationship between two Spans. The relationship can be within
+// the same Trace or across different Traces.
+//
+// For example, a Link is used in the following situations:
+//
+// 1. Batch Processing: A batch of operations may contain operations
+// associated with one or more traces/spans. Since there can only be one
+// parent SpanContext, a Link is used to keep reference to the
+// SpanContext of all operations in the batch.
+// 2. Public Endpoint: A SpanContext for an in incoming client request on a
+// public endpoint should be considered untrusted. In such a case, a new
+// trace with its own identity and sampling decision needs to be created,
+// but this new trace needs to be related to the original trace in some
+// form. A Link is used to keep reference to the original SpanContext and
+// track the relationship.
+type Link struct {
+ // SpanContext of the linked Span.
+ SpanContext SpanContext
+
+ // Attributes describe the aspects of the link.
+ Attributes []attribute.KeyValue
+}
+
+// LinkFromContext returns a link encapsulating the SpanContext in the provided
+// ctx.
+func LinkFromContext(ctx context.Context, attrs ...attribute.KeyValue) Link {
+ return Link{
+ SpanContext: SpanContextFromContext(ctx),
+ Attributes: attrs,
+ }
+}
+
+// SpanKind is the role a Span plays in a Trace.
+type SpanKind int
+
+// As a convenience, these match the proto definition, see
+// https://github.com/open-telemetry/opentelemetry-proto/blob/30d237e1ff3ab7aa50e0922b5bebdd93505090af/opentelemetry/proto/trace/v1/trace.proto#L101-L129
+//
+// The unspecified value is not a valid `SpanKind`. Use `ValidateSpanKind()`
+// to coerce a span kind to a valid value.
+const (
+ // SpanKindUnspecified is an unspecified SpanKind and is not a valid
+ // SpanKind. SpanKindUnspecified should be replaced with SpanKindInternal
+ // if it is received.
+ SpanKindUnspecified SpanKind = 0
+ // SpanKindInternal is a SpanKind for a Span that represents an internal
+ // operation within an application.
+ SpanKindInternal SpanKind = 1
+ // SpanKindServer is a SpanKind for a Span that represents the operation
+ // of handling a request from a client.
+ SpanKindServer SpanKind = 2
+ // SpanKindClient is a SpanKind for a Span that represents the operation
+ // of client making a request to a server.
+ SpanKindClient SpanKind = 3
+ // SpanKindProducer is a SpanKind for a Span that represents the operation
+ // of a producer sending a message to a message broker. Unlike
+ // SpanKindClient and SpanKindServer, there is often no direct
+ // relationship between this kind of Span and a SpanKindConsumer kind. A
+ // SpanKindProducer Span will end once the message is accepted by the
+ // message broker which might not overlap with the processing of that
+ // message.
+ SpanKindProducer SpanKind = 4
+ // SpanKindConsumer is a SpanKind for a Span that represents the operation
+ // of a consumer receiving a message from a message broker. Like
+ // SpanKindProducer Spans, there is often no direct relationship between
+ // this Span and the Span that produced the message.
+ SpanKindConsumer SpanKind = 5
+)
+
+// ValidateSpanKind returns a valid span kind value. This will coerce
+// invalid values into the default value, SpanKindInternal.
+func ValidateSpanKind(spanKind SpanKind) SpanKind {
+ switch spanKind {
+ case SpanKindInternal,
+ SpanKindServer,
+ SpanKindClient,
+ SpanKindProducer,
+ SpanKindConsumer:
+ // valid
+ return spanKind
+ default:
+ return SpanKindInternal
+ }
+}
+
+// String returns the specified name of the SpanKind in lower-case.
+func (sk SpanKind) String() string {
+ switch sk {
+ case SpanKindInternal:
+ return "internal"
+ case SpanKindServer:
+ return "server"
+ case SpanKindClient:
+ return "client"
+ case SpanKindProducer:
+ return "producer"
+ case SpanKindConsumer:
+ return "consumer"
+ default:
+ return "unspecified"
+ }
+}
diff --git a/vendor/go.opentelemetry.io/otel/trace/trace.go b/vendor/go.opentelemetry.io/otel/trace/trace.go
new file mode 100644
index 00000000..d49adf67
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/trace.go
@@ -0,0 +1,323 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/trace"
+
+import (
+ "bytes"
+ "encoding/hex"
+ "encoding/json"
+)
+
+const (
+ // FlagsSampled is a bitmask with the sampled bit set. A SpanContext
+ // with the sampling bit set means the span is sampled.
+ FlagsSampled = TraceFlags(0x01)
+
+ errInvalidHexID errorConst = "trace-id and span-id can only contain [0-9a-f] characters, all lowercase"
+
+ errInvalidTraceIDLength errorConst = "hex encoded trace-id must have length equals to 32"
+ errNilTraceID errorConst = "trace-id can't be all zero"
+
+ errInvalidSpanIDLength errorConst = "hex encoded span-id must have length equals to 16"
+ errNilSpanID errorConst = "span-id can't be all zero"
+)
+
+type errorConst string
+
+func (e errorConst) Error() string {
+ return string(e)
+}
+
+// TraceID is a unique identity of a trace.
+// nolint:revive // revive complains about stutter of `trace.TraceID`.
+type TraceID [16]byte
+
+var (
+ nilTraceID TraceID
+ _ json.Marshaler = nilTraceID
+)
+
+// IsValid checks whether the trace TraceID is valid. A valid trace ID does
+// not consist of zeros only.
+func (t TraceID) IsValid() bool {
+ return !bytes.Equal(t[:], nilTraceID[:])
+}
+
+// MarshalJSON implements a custom marshal function to encode TraceID
+// as a hex string.
+func (t TraceID) MarshalJSON() ([]byte, error) {
+ return json.Marshal(t.String())
+}
+
+// String returns the hex string representation form of a TraceID.
+func (t TraceID) String() string {
+ return hex.EncodeToString(t[:])
+}
+
+// SpanID is a unique identity of a span in a trace.
+type SpanID [8]byte
+
+var (
+ nilSpanID SpanID
+ _ json.Marshaler = nilSpanID
+)
+
+// IsValid checks whether the SpanID is valid. A valid SpanID does not consist
+// of zeros only.
+func (s SpanID) IsValid() bool {
+ return !bytes.Equal(s[:], nilSpanID[:])
+}
+
+// MarshalJSON implements a custom marshal function to encode SpanID
+// as a hex string.
+func (s SpanID) MarshalJSON() ([]byte, error) {
+ return json.Marshal(s.String())
+}
+
+// String returns the hex string representation form of a SpanID.
+func (s SpanID) String() string {
+ return hex.EncodeToString(s[:])
+}
+
+// TraceIDFromHex returns a TraceID from a hex string if it is compliant with
+// the W3C trace-context specification. See more at
+// https://www.w3.org/TR/trace-context/#trace-id
+// nolint:revive // revive complains about stutter of `trace.TraceIDFromHex`.
+func TraceIDFromHex(h string) (TraceID, error) {
+ t := TraceID{}
+ if len(h) != 32 {
+ return t, errInvalidTraceIDLength
+ }
+
+ if err := decodeHex(h, t[:]); err != nil {
+ return t, err
+ }
+
+ if !t.IsValid() {
+ return t, errNilTraceID
+ }
+ return t, nil
+}
+
+// SpanIDFromHex returns a SpanID from a hex string if it is compliant
+// with the w3c trace-context specification.
+// See more at https://www.w3.org/TR/trace-context/#parent-id
+func SpanIDFromHex(h string) (SpanID, error) {
+ s := SpanID{}
+ if len(h) != 16 {
+ return s, errInvalidSpanIDLength
+ }
+
+ if err := decodeHex(h, s[:]); err != nil {
+ return s, err
+ }
+
+ if !s.IsValid() {
+ return s, errNilSpanID
+ }
+ return s, nil
+}
+
+func decodeHex(h string, b []byte) error {
+ for _, r := range h {
+ switch {
+ case 'a' <= r && r <= 'f':
+ continue
+ case '0' <= r && r <= '9':
+ continue
+ default:
+ return errInvalidHexID
+ }
+ }
+
+ decoded, err := hex.DecodeString(h)
+ if err != nil {
+ return err
+ }
+
+ copy(b, decoded)
+ return nil
+}
+
+// TraceFlags contains flags that can be set on a SpanContext.
+type TraceFlags byte //nolint:revive // revive complains about stutter of `trace.TraceFlags`.
+
+// IsSampled returns if the sampling bit is set in the TraceFlags.
+func (tf TraceFlags) IsSampled() bool {
+ return tf&FlagsSampled == FlagsSampled
+}
+
+// WithSampled sets the sampling bit in a new copy of the TraceFlags.
+func (tf TraceFlags) WithSampled(sampled bool) TraceFlags { // nolint:revive // sampled is not a control flag.
+ if sampled {
+ return tf | FlagsSampled
+ }
+
+ return tf &^ FlagsSampled
+}
+
+// MarshalJSON implements a custom marshal function to encode TraceFlags
+// as a hex string.
+func (tf TraceFlags) MarshalJSON() ([]byte, error) {
+ return json.Marshal(tf.String())
+}
+
+// String returns the hex string representation form of TraceFlags.
+func (tf TraceFlags) String() string {
+ return hex.EncodeToString([]byte{byte(tf)}[:])
+}
+
+// SpanContextConfig contains mutable fields usable for constructing
+// an immutable SpanContext.
+type SpanContextConfig struct {
+ TraceID TraceID
+ SpanID SpanID
+ TraceFlags TraceFlags
+ TraceState TraceState
+ Remote bool
+}
+
+// NewSpanContext constructs a SpanContext using values from the provided
+// SpanContextConfig.
+func NewSpanContext(config SpanContextConfig) SpanContext {
+ return SpanContext{
+ traceID: config.TraceID,
+ spanID: config.SpanID,
+ traceFlags: config.TraceFlags,
+ traceState: config.TraceState,
+ remote: config.Remote,
+ }
+}
+
+// SpanContext contains identifying trace information about a Span.
+type SpanContext struct {
+ traceID TraceID
+ spanID SpanID
+ traceFlags TraceFlags
+ traceState TraceState
+ remote bool
+}
+
+var _ json.Marshaler = SpanContext{}
+
+// IsValid returns if the SpanContext is valid. A valid span context has a
+// valid TraceID and SpanID.
+func (sc SpanContext) IsValid() bool {
+ return sc.HasTraceID() && sc.HasSpanID()
+}
+
+// IsRemote indicates whether the SpanContext represents a remotely-created Span.
+func (sc SpanContext) IsRemote() bool {
+ return sc.remote
+}
+
+// WithRemote returns a copy of sc with the Remote property set to remote.
+func (sc SpanContext) WithRemote(remote bool) SpanContext {
+ return SpanContext{
+ traceID: sc.traceID,
+ spanID: sc.spanID,
+ traceFlags: sc.traceFlags,
+ traceState: sc.traceState,
+ remote: remote,
+ }
+}
+
+// TraceID returns the TraceID from the SpanContext.
+func (sc SpanContext) TraceID() TraceID {
+ return sc.traceID
+}
+
+// HasTraceID checks if the SpanContext has a valid TraceID.
+func (sc SpanContext) HasTraceID() bool {
+ return sc.traceID.IsValid()
+}
+
+// WithTraceID returns a new SpanContext with the TraceID replaced.
+func (sc SpanContext) WithTraceID(traceID TraceID) SpanContext {
+ return SpanContext{
+ traceID: traceID,
+ spanID: sc.spanID,
+ traceFlags: sc.traceFlags,
+ traceState: sc.traceState,
+ remote: sc.remote,
+ }
+}
+
+// SpanID returns the SpanID from the SpanContext.
+func (sc SpanContext) SpanID() SpanID {
+ return sc.spanID
+}
+
+// HasSpanID checks if the SpanContext has a valid SpanID.
+func (sc SpanContext) HasSpanID() bool {
+ return sc.spanID.IsValid()
+}
+
+// WithSpanID returns a new SpanContext with the SpanID replaced.
+func (sc SpanContext) WithSpanID(spanID SpanID) SpanContext {
+ return SpanContext{
+ traceID: sc.traceID,
+ spanID: spanID,
+ traceFlags: sc.traceFlags,
+ traceState: sc.traceState,
+ remote: sc.remote,
+ }
+}
+
+// TraceFlags returns the flags from the SpanContext.
+func (sc SpanContext) TraceFlags() TraceFlags {
+ return sc.traceFlags
+}
+
+// IsSampled returns if the sampling bit is set in the SpanContext's TraceFlags.
+func (sc SpanContext) IsSampled() bool {
+ return sc.traceFlags.IsSampled()
+}
+
+// WithTraceFlags returns a new SpanContext with the TraceFlags replaced.
+func (sc SpanContext) WithTraceFlags(flags TraceFlags) SpanContext {
+ return SpanContext{
+ traceID: sc.traceID,
+ spanID: sc.spanID,
+ traceFlags: flags,
+ traceState: sc.traceState,
+ remote: sc.remote,
+ }
+}
+
+// TraceState returns the TraceState from the SpanContext.
+func (sc SpanContext) TraceState() TraceState {
+ return sc.traceState
+}
+
+// WithTraceState returns a new SpanContext with the TraceState replaced.
+func (sc SpanContext) WithTraceState(state TraceState) SpanContext {
+ return SpanContext{
+ traceID: sc.traceID,
+ spanID: sc.spanID,
+ traceFlags: sc.traceFlags,
+ traceState: state,
+ remote: sc.remote,
+ }
+}
+
+// Equal is a predicate that determines whether two SpanContext values are equal.
+func (sc SpanContext) Equal(other SpanContext) bool {
+ return sc.traceID == other.traceID &&
+ sc.spanID == other.spanID &&
+ sc.traceFlags == other.traceFlags &&
+ sc.traceState.String() == other.traceState.String() &&
+ sc.remote == other.remote
+}
+
+// MarshalJSON implements a custom marshal function to encode a SpanContext.
+func (sc SpanContext) MarshalJSON() ([]byte, error) {
+ return json.Marshal(SpanContextConfig{
+ TraceID: sc.traceID,
+ SpanID: sc.spanID,
+ TraceFlags: sc.traceFlags,
+ TraceState: sc.traceState,
+ Remote: sc.remote,
+ })
+}
diff --git a/vendor/go.opentelemetry.io/otel/trace/tracer.go b/vendor/go.opentelemetry.io/otel/trace/tracer.go
new file mode 100644
index 00000000..77952d2a
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/tracer.go
@@ -0,0 +1,37 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/trace"
+
+import (
+ "context"
+
+ "go.opentelemetry.io/otel/trace/embedded"
+)
+
+// Tracer is the creator of Spans.
+//
+// Warning: Methods may be added to this interface in minor releases. See
+// package documentation on API implementation for information on how to set
+// default behavior for unimplemented methods.
+type Tracer interface {
+ // Users of the interface can ignore this. This embedded type is only used
+ // by implementations of this interface. See the "API Implementations"
+ // section of the package documentation for more information.
+ embedded.Tracer
+
+ // Start creates a span and a context.Context containing the newly-created span.
+ //
+ // If the context.Context provided in `ctx` contains a Span then the newly-created
+ // Span will be a child of that span, otherwise it will be a root span. This behavior
+ // can be overridden by providing `WithNewRoot()` as a SpanOption, causing the
+ // newly-created Span to be a root span even if `ctx` contains a Span.
+ //
+ // When creating a Span it is recommended to provide all known span attributes using
+ // the `WithAttributes()` SpanOption as samplers will only have access to the
+ // attributes provided when a Span is created.
+ //
+ // Any Span that is created MUST also be ended. This is the responsibility of the user.
+ // Implementations of this API may leak memory or other resources if Spans are not ended.
+ Start(ctx context.Context, spanName string, opts ...SpanStartOption) (context.Context, Span)
+}
diff --git a/vendor/go.opentelemetry.io/otel/trace/tracestate.go b/vendor/go.opentelemetry.io/otel/trace/tracestate.go
new file mode 100644
index 00000000..dc5e34ca
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/trace/tracestate.go
@@ -0,0 +1,330 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package trace // import "go.opentelemetry.io/otel/trace"
+
+import (
+ "encoding/json"
+ "fmt"
+ "strings"
+)
+
+const (
+ maxListMembers = 32
+
+ listDelimiters = ","
+ memberDelimiter = "="
+
+ errInvalidKey errorConst = "invalid tracestate key"
+ errInvalidValue errorConst = "invalid tracestate value"
+ errInvalidMember errorConst = "invalid tracestate list-member"
+ errMemberNumber errorConst = "too many list-members in tracestate"
+ errDuplicate errorConst = "duplicate list-member in tracestate"
+)
+
+type member struct {
+ Key string
+ Value string
+}
+
+// according to (chr = %x20 / (nblk-char = %x21-2B / %x2D-3C / %x3E-7E) )
+// means (chr = %x20-2B / %x2D-3C / %x3E-7E) .
+func checkValueChar(v byte) bool {
+ return v >= '\x20' && v <= '\x7e' && v != '\x2c' && v != '\x3d'
+}
+
+// according to (nblk-chr = %x21-2B / %x2D-3C / %x3E-7E) .
+func checkValueLast(v byte) bool {
+ return v >= '\x21' && v <= '\x7e' && v != '\x2c' && v != '\x3d'
+}
+
+// based on the W3C Trace Context specification
+//
+// value = (0*255(chr)) nblk-chr
+// nblk-chr = %x21-2B / %x2D-3C / %x3E-7E
+// chr = %x20 / nblk-chr
+//
+// see https://www.w3.org/TR/trace-context-1/#value
+func checkValue(val string) bool {
+ n := len(val)
+ if n == 0 || n > 256 {
+ return false
+ }
+ for i := 0; i < n-1; i++ {
+ if !checkValueChar(val[i]) {
+ return false
+ }
+ }
+ return checkValueLast(val[n-1])
+}
+
+func checkKeyRemain(key string) bool {
+ // ( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )
+ for _, v := range key {
+ if isAlphaNum(byte(v)) {
+ continue
+ }
+ switch v {
+ case '_', '-', '*', '/':
+ continue
+ }
+ return false
+ }
+ return true
+}
+
+// according to
+//
+// simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ))
+// system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ))
+//
+// param n is remain part length, should be 255 in simple-key or 13 in system-id.
+func checkKeyPart(key string, n int) bool {
+ if len(key) == 0 {
+ return false
+ }
+ first := key[0] // key's first char
+ ret := len(key[1:]) <= n
+ ret = ret && first >= 'a' && first <= 'z'
+ return ret && checkKeyRemain(key[1:])
+}
+
+func isAlphaNum(c byte) bool {
+ if c >= 'a' && c <= 'z' {
+ return true
+ }
+ return c >= '0' && c <= '9'
+}
+
+// according to
+//
+// tenant-id = ( lcalpha / DIGIT ) 0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )
+//
+// param n is remain part length, should be 240 exactly.
+func checkKeyTenant(key string, n int) bool {
+ if len(key) == 0 {
+ return false
+ }
+ return isAlphaNum(key[0]) && len(key[1:]) <= n && checkKeyRemain(key[1:])
+}
+
+// based on the W3C Trace Context specification
+//
+// key = simple-key / multi-tenant-key
+// simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ))
+// multi-tenant-key = tenant-id "@" system-id
+// tenant-id = ( lcalpha / DIGIT ) (0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ))
+// system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ))
+// lcalpha = %x61-7A ; a-z
+//
+// see https://www.w3.org/TR/trace-context-1/#tracestate-header.
+func checkKey(key string) bool {
+ tenant, system, ok := strings.Cut(key, "@")
+ if !ok {
+ return checkKeyPart(key, 255)
+ }
+ return checkKeyTenant(tenant, 240) && checkKeyPart(system, 13)
+}
+
+func newMember(key, value string) (member, error) {
+ if !checkKey(key) {
+ return member{}, errInvalidKey
+ }
+ if !checkValue(value) {
+ return member{}, errInvalidValue
+ }
+ return member{Key: key, Value: value}, nil
+}
+
+func parseMember(m string) (member, error) {
+ key, val, ok := strings.Cut(m, memberDelimiter)
+ if !ok {
+ return member{}, fmt.Errorf("%w: %s", errInvalidMember, m)
+ }
+ key = strings.TrimLeft(key, " \t")
+ val = strings.TrimRight(val, " \t")
+ result, e := newMember(key, val)
+ if e != nil {
+ return member{}, fmt.Errorf("%w: %s", errInvalidMember, m)
+ }
+ return result, nil
+}
+
+// String encodes member into a string compliant with the W3C Trace Context
+// specification.
+func (m member) String() string {
+ return m.Key + "=" + m.Value
+}
+
+// TraceState provides additional vendor-specific trace identification
+// information across different distributed tracing systems. It represents an
+// immutable list consisting of key/value pairs, each pair is referred to as a
+// list-member.
+//
+// TraceState conforms to the W3C Trace Context specification
+// (https://www.w3.org/TR/trace-context-1). All operations that create or copy
+// a TraceState do so by validating all input and will only produce TraceState
+// that conform to the specification. Specifically, this means that all
+// list-member's key/value pairs are valid, no duplicate list-members exist,
+// and the maximum number of list-members (32) is not exceeded.
+type TraceState struct { //nolint:revive // revive complains about stutter of `trace.TraceState`
+ // list is the members in order.
+ list []member
+}
+
+var _ json.Marshaler = TraceState{}
+
+// ParseTraceState attempts to decode a TraceState from the passed
+// string. It returns an error if the input is invalid according to the W3C
+// Trace Context specification.
+func ParseTraceState(ts string) (TraceState, error) {
+ if ts == "" {
+ return TraceState{}, nil
+ }
+
+ wrapErr := func(err error) error {
+ return fmt.Errorf("failed to parse tracestate: %w", err)
+ }
+
+ var members []member
+ found := make(map[string]struct{})
+ for ts != "" {
+ var memberStr string
+ memberStr, ts, _ = strings.Cut(ts, listDelimiters)
+ if len(memberStr) == 0 {
+ continue
+ }
+
+ m, err := parseMember(memberStr)
+ if err != nil {
+ return TraceState{}, wrapErr(err)
+ }
+
+ if _, ok := found[m.Key]; ok {
+ return TraceState{}, wrapErr(errDuplicate)
+ }
+ found[m.Key] = struct{}{}
+
+ members = append(members, m)
+ if n := len(members); n > maxListMembers {
+ return TraceState{}, wrapErr(errMemberNumber)
+ }
+ }
+
+ return TraceState{list: members}, nil
+}
+
+// MarshalJSON marshals the TraceState into JSON.
+func (ts TraceState) MarshalJSON() ([]byte, error) {
+ return json.Marshal(ts.String())
+}
+
+// String encodes the TraceState into a string compliant with the W3C
+// Trace Context specification. The returned string will be invalid if the
+// TraceState contains any invalid members.
+func (ts TraceState) String() string {
+ if len(ts.list) == 0 {
+ return ""
+ }
+ var n int
+ n += len(ts.list) // member delimiters: '='
+ n += len(ts.list) - 1 // list delimiters: ','
+ for _, mem := range ts.list {
+ n += len(mem.Key)
+ n += len(mem.Value)
+ }
+
+ var sb strings.Builder
+ sb.Grow(n)
+ _, _ = sb.WriteString(ts.list[0].Key)
+ _ = sb.WriteByte('=')
+ _, _ = sb.WriteString(ts.list[0].Value)
+ for i := 1; i < len(ts.list); i++ {
+ _ = sb.WriteByte(listDelimiters[0])
+ _, _ = sb.WriteString(ts.list[i].Key)
+ _ = sb.WriteByte('=')
+ _, _ = sb.WriteString(ts.list[i].Value)
+ }
+ return sb.String()
+}
+
+// Get returns the value paired with key from the corresponding TraceState
+// list-member if it exists, otherwise an empty string is returned.
+func (ts TraceState) Get(key string) string {
+ for _, member := range ts.list {
+ if member.Key == key {
+ return member.Value
+ }
+ }
+
+ return ""
+}
+
+// Walk walks all key value pairs in the TraceState by calling f
+// Iteration stops if f returns false.
+func (ts TraceState) Walk(f func(key, value string) bool) {
+ for _, m := range ts.list {
+ if !f(m.Key, m.Value) {
+ break
+ }
+ }
+}
+
+// Insert adds a new list-member defined by the key/value pair to the
+// TraceState. If a list-member already exists for the given key, that
+// list-member's value is updated. The new or updated list-member is always
+// moved to the beginning of the TraceState as specified by the W3C Trace
+// Context specification.
+//
+// If key or value are invalid according to the W3C Trace Context
+// specification an error is returned with the original TraceState.
+//
+// If adding a new list-member means the TraceState would have more members
+// then is allowed, the new list-member will be inserted and the right-most
+// list-member will be dropped in the returned TraceState.
+func (ts TraceState) Insert(key, value string) (TraceState, error) {
+ m, err := newMember(key, value)
+ if err != nil {
+ return ts, err
+ }
+ n := len(ts.list)
+ found := n
+ for i := range ts.list {
+ if ts.list[i].Key == key {
+ found = i
+ }
+ }
+ cTS := TraceState{}
+ if found == n && n < maxListMembers {
+ cTS.list = make([]member, n+1)
+ } else {
+ cTS.list = make([]member, n)
+ }
+ cTS.list[0] = m
+ // When the number of members exceeds capacity, drop the "right-most".
+ copy(cTS.list[1:], ts.list[0:found])
+ if found < n {
+ copy(cTS.list[1+found:], ts.list[found+1:])
+ }
+ return cTS, nil
+}
+
+// Delete returns a copy of the TraceState with the list-member identified by
+// key removed.
+func (ts TraceState) Delete(key string) TraceState {
+ members := make([]member, ts.Len())
+ copy(members, ts.list)
+ for i, member := range ts.list {
+ if member.Key == key {
+ members = append(members[:i], members[i+1:]...)
+ // TraceState should contain no duplicate members.
+ break
+ }
+ }
+ return TraceState{list: members}
+}
+
+// Len returns the number of list-members in the TraceState.
+func (ts TraceState) Len() int {
+ return len(ts.list)
+}
diff --git a/vendor/go.opentelemetry.io/otel/verify_readmes.sh b/vendor/go.opentelemetry.io/otel/verify_readmes.sh
new file mode 100644
index 00000000..1e87855e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/verify_readmes.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+set -euo pipefail
+
+dirs=$(find . -type d -not -path "*/internal*" -not -path "*/test*" -not -path "*/example*" -not -path "*/.*" | sort)
+
+missingReadme=false
+for dir in $dirs; do
+ if [ ! -f "$dir/README.md" ]; then
+ echo "couldn't find README.md for $dir"
+ missingReadme=true
+ fi
+done
+
+if [ "$missingReadme" = true ] ; then
+ echo "Error: some READMEs couldn't be found."
+ exit 1
+fi
diff --git a/vendor/go.opentelemetry.io/otel/verify_released_changelog.sh b/vendor/go.opentelemetry.io/otel/verify_released_changelog.sh
new file mode 100644
index 00000000..c9b7cdbb
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/verify_released_changelog.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+set -euo pipefail
+
+TARGET="${1:?Must provide target ref}"
+
+FILE="CHANGELOG.md"
+TEMP_DIR=$(mktemp -d)
+echo "Temp folder: $TEMP_DIR"
+
+# Only the latest commit of the feature branch is available
+# automatically. To diff with the base branch, we need to
+# fetch that too (and we only need its latest commit).
+git fetch origin "${TARGET}" --depth=1
+
+# Checkout the previous version on the base branch of the changelog to tmpfolder
+git --work-tree="$TEMP_DIR" checkout FETCH_HEAD $FILE
+
+PREVIOUS_FILE="$TEMP_DIR/$FILE"
+CURRENT_FILE="$FILE"
+PREVIOUS_LOCKED_FILE="$TEMP_DIR/previous_locked_section.md"
+CURRENT_LOCKED_FILE="$TEMP_DIR/current_locked_section.md"
+
+# Extract released sections from the previous version
+awk '/^/ {flag=1} /^/ {flag=0} flag' "$PREVIOUS_FILE" > "$PREVIOUS_LOCKED_FILE"
+
+# Extract released sections from the current version
+awk '/^/ {flag=1} /^/ {flag=0} flag' "$CURRENT_FILE" > "$CURRENT_LOCKED_FILE"
+
+# Compare the released sections
+if ! diff -q "$PREVIOUS_LOCKED_FILE" "$CURRENT_LOCKED_FILE"; then
+ echo "Error: The released sections of the changelog file have been modified."
+ diff "$PREVIOUS_LOCKED_FILE" "$CURRENT_LOCKED_FILE"
+ rm -rf "$TEMP_DIR"
+ false
+fi
+
+rm -rf "$TEMP_DIR"
+echo "The released sections remain unchanged."
diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go
new file mode 100644
index 00000000..eb22002d
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/version.go
@@ -0,0 +1,9 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+package otel // import "go.opentelemetry.io/otel"
+
+// Version is the current release version of OpenTelemetry in use.
+func Version() string {
+ return "1.34.0"
+}
diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml
new file mode 100644
index 00000000..ce4fe59b
--- /dev/null
+++ b/vendor/go.opentelemetry.io/otel/versions.yaml
@@ -0,0 +1,42 @@
+# Copyright The OpenTelemetry Authors
+# SPDX-License-Identifier: Apache-2.0
+
+module-sets:
+ stable-v1:
+ version: v1.34.0
+ modules:
+ - go.opentelemetry.io/otel
+ - go.opentelemetry.io/otel/bridge/opencensus
+ - go.opentelemetry.io/otel/bridge/opencensus/test
+ - go.opentelemetry.io/otel/bridge/opentracing
+ - go.opentelemetry.io/otel/bridge/opentracing/test
+ - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc
+ - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
+ - go.opentelemetry.io/otel/exporters/otlp/otlptrace
+ - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
+ - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
+ - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric
+ - go.opentelemetry.io/otel/exporters/stdout/stdouttrace
+ - go.opentelemetry.io/otel/exporters/zipkin
+ - go.opentelemetry.io/otel/metric
+ - go.opentelemetry.io/otel/sdk
+ - go.opentelemetry.io/otel/sdk/metric
+ - go.opentelemetry.io/otel/trace
+ experimental-metrics:
+ version: v0.56.0
+ modules:
+ - go.opentelemetry.io/otel/exporters/prometheus
+ experimental-logs:
+ version: v0.10.0
+ modules:
+ - go.opentelemetry.io/otel/log
+ - go.opentelemetry.io/otel/sdk/log
+ - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc
+ - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp
+ - go.opentelemetry.io/otel/exporters/stdout/stdoutlog
+ experimental-schema:
+ version: v0.0.12
+ modules:
+ - go.opentelemetry.io/otel/schema
+excluded-modules:
+ - go.opentelemetry.io/otel/internal/tools
diff --git a/vendor/go.opentelemetry.io/proto/otlp/LICENSE b/vendor/go.opentelemetry.io/proto/otlp/LICENSE
new file mode 100644
index 00000000..261eeb9e
--- /dev/null
+++ b/vendor/go.opentelemetry.io/proto/otlp/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.go b/vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.go
new file mode 100644
index 00000000..c1af04e8
--- /dev/null
+++ b/vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.go
@@ -0,0 +1,367 @@
+// Copyright 2019, OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.21.6
+// source: opentelemetry/proto/collector/trace/v1/trace_service.proto
+
+package v1
+
+import (
+ v1 "go.opentelemetry.io/proto/otlp/trace/v1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ExportTraceServiceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // An array of ResourceSpans.
+ // For data coming from a single resource this array will typically contain one
+ // element. Intermediary nodes (such as OpenTelemetry Collector) that receive
+ // data from multiple origins typically batch the data before forwarding further and
+ // in that case this array will contain multiple elements.
+ ResourceSpans []*v1.ResourceSpans `protobuf:"bytes,1,rep,name=resource_spans,json=resourceSpans,proto3" json:"resource_spans,omitempty"`
+}
+
+func (x *ExportTraceServiceRequest) Reset() {
+ *x = ExportTraceServiceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_collector_trace_v1_trace_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExportTraceServiceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExportTraceServiceRequest) ProtoMessage() {}
+
+func (x *ExportTraceServiceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_collector_trace_v1_trace_service_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExportTraceServiceRequest.ProtoReflect.Descriptor instead.
+func (*ExportTraceServiceRequest) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ExportTraceServiceRequest) GetResourceSpans() []*v1.ResourceSpans {
+ if x != nil {
+ return x.ResourceSpans
+ }
+ return nil
+}
+
+type ExportTraceServiceResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The details of a partially successful export request.
+ //
+ // If the request is only partially accepted
+ // (i.e. when the server accepts only parts of the data and rejects the rest)
+ // the server MUST initialize the `partial_success` field and MUST
+ // set the `rejected_` with the number of items it rejected.
+ //
+ // Servers MAY also make use of the `partial_success` field to convey
+ // warnings/suggestions to senders even when the request was fully accepted.
+ // In such cases, the `rejected_` MUST have a value of `0` and
+ // the `error_message` MUST be non-empty.
+ //
+ // A `partial_success` message with an empty value (rejected_ = 0 and
+ // `error_message` = "") is equivalent to it not being set/present. Senders
+ // SHOULD interpret it the same way as in the full success case.
+ PartialSuccess *ExportTracePartialSuccess `protobuf:"bytes,1,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success,omitempty"`
+}
+
+func (x *ExportTraceServiceResponse) Reset() {
+ *x = ExportTraceServiceResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_collector_trace_v1_trace_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExportTraceServiceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExportTraceServiceResponse) ProtoMessage() {}
+
+func (x *ExportTraceServiceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_collector_trace_v1_trace_service_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExportTraceServiceResponse.ProtoReflect.Descriptor instead.
+func (*ExportTraceServiceResponse) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ExportTraceServiceResponse) GetPartialSuccess() *ExportTracePartialSuccess {
+ if x != nil {
+ return x.PartialSuccess
+ }
+ return nil
+}
+
+type ExportTracePartialSuccess struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The number of rejected spans.
+ //
+ // A `rejected_` field holding a `0` value indicates that the
+ // request was fully accepted.
+ RejectedSpans int64 `protobuf:"varint,1,opt,name=rejected_spans,json=rejectedSpans,proto3" json:"rejected_spans,omitempty"`
+ // A developer-facing human-readable message in English. It should be used
+ // either to explain why the server rejected parts of the data during a partial
+ // success or to convey warnings/suggestions during a full success. The message
+ // should offer guidance on how users can address such issues.
+ //
+ // error_message is an optional field. An error_message with an empty value
+ // is equivalent to it not being set.
+ ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
+}
+
+func (x *ExportTracePartialSuccess) Reset() {
+ *x = ExportTracePartialSuccess{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_collector_trace_v1_trace_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ExportTracePartialSuccess) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExportTracePartialSuccess) ProtoMessage() {}
+
+func (x *ExportTracePartialSuccess) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_collector_trace_v1_trace_service_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExportTracePartialSuccess.ProtoReflect.Descriptor instead.
+func (*ExportTracePartialSuccess) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ExportTracePartialSuccess) GetRejectedSpans() int64 {
+ if x != nil {
+ return x.RejectedSpans
+ }
+ return 0
+}
+
+func (x *ExportTracePartialSuccess) GetErrorMessage() string {
+ if x != nil {
+ return x.ErrorMessage
+ }
+ return ""
+}
+
+var File_opentelemetry_proto_collector_trace_v1_trace_service_proto protoreflect.FileDescriptor
+
+var file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDesc = []byte{
+ 0x0a, 0x3a, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f,
+ 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x6f, 0x70,
+ 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x74, 0x72, 0x61, 0x63,
+ 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x28, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65,
+ 0x74, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f,
+ 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f,
+ 0x0a, 0x19, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a, 0x0e, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65,
+ 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73,
+ 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73, 0x22,
+ 0x88, 0x01, 0x0a, 0x1a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a,
+ 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73,
+ 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65,
+ 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f,
+ 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x74,
+ 0x69, 0x61, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x74,
+ 0x69, 0x61, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x67, 0x0a, 0x19, 0x45, 0x78,
+ 0x70, 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c,
+ 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6a, 0x65, 0x63,
+ 0x74, 0x65, 0x64, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x0d, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x70, 0x61, 0x6e, 0x73, 0x12, 0x23,
+ 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x32, 0xa2, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12,
+ 0x41, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e,
+ 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54,
+ 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74,
+ 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f,
+ 0x72, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x9c, 0x01, 0x0a, 0x29, 0x69, 0x6f, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x74, 0x72,
+ 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x6f, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x69, 0x6f,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x74, 0x6c, 0x70, 0x2f, 0x63, 0x6f, 0x6c, 0x6c,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0xaa, 0x02,
+ 0x26, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x54,
+ 0x72, 0x61, 0x63, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDescOnce sync.Once
+ file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDescData = file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDesc
+)
+
+func file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDescGZIP() []byte {
+ file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDescOnce.Do(func() {
+ file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDescData)
+ })
+ return file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDescData
+}
+
+var file_opentelemetry_proto_collector_trace_v1_trace_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_opentelemetry_proto_collector_trace_v1_trace_service_proto_goTypes = []interface{}{
+ (*ExportTraceServiceRequest)(nil), // 0: opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest
+ (*ExportTraceServiceResponse)(nil), // 1: opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse
+ (*ExportTracePartialSuccess)(nil), // 2: opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess
+ (*v1.ResourceSpans)(nil), // 3: opentelemetry.proto.trace.v1.ResourceSpans
+}
+var file_opentelemetry_proto_collector_trace_v1_trace_service_proto_depIdxs = []int32{
+ 3, // 0: opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resource_spans:type_name -> opentelemetry.proto.trace.v1.ResourceSpans
+ 2, // 1: opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partial_success:type_name -> opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess
+ 0, // 2: opentelemetry.proto.collector.trace.v1.TraceService.Export:input_type -> opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest
+ 1, // 3: opentelemetry.proto.collector.trace.v1.TraceService.Export:output_type -> opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse
+ 3, // [3:4] is the sub-list for method output_type
+ 2, // [2:3] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_opentelemetry_proto_collector_trace_v1_trace_service_proto_init() }
+func file_opentelemetry_proto_collector_trace_v1_trace_service_proto_init() {
+ if File_opentelemetry_proto_collector_trace_v1_trace_service_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_opentelemetry_proto_collector_trace_v1_trace_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExportTraceServiceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_collector_trace_v1_trace_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExportTraceServiceResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_collector_trace_v1_trace_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ExportTracePartialSuccess); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_opentelemetry_proto_collector_trace_v1_trace_service_proto_goTypes,
+ DependencyIndexes: file_opentelemetry_proto_collector_trace_v1_trace_service_proto_depIdxs,
+ MessageInfos: file_opentelemetry_proto_collector_trace_v1_trace_service_proto_msgTypes,
+ }.Build()
+ File_opentelemetry_proto_collector_trace_v1_trace_service_proto = out.File
+ file_opentelemetry_proto_collector_trace_v1_trace_service_proto_rawDesc = nil
+ file_opentelemetry_proto_collector_trace_v1_trace_service_proto_goTypes = nil
+ file_opentelemetry_proto_collector_trace_v1_trace_service_proto_depIdxs = nil
+}
diff --git a/vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.gw.go b/vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.gw.go
new file mode 100644
index 00000000..bb1bd261
--- /dev/null
+++ b/vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service.pb.gw.go
@@ -0,0 +1,171 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: opentelemetry/proto/collector/trace/v1/trace_service.proto
+
+/*
+Package v1 is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package v1
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// Suppress "imported and not used" errors
+var _ codes.Code
+var _ io.Reader
+var _ status.Status
+var _ = runtime.String
+var _ = utilities.NewDoubleArray
+var _ = metadata.Join
+
+func request_TraceService_Export_0(ctx context.Context, marshaler runtime.Marshaler, client TraceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ExportTraceServiceRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.Export(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_TraceService_Export_0(ctx context.Context, marshaler runtime.Marshaler, server TraceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ExportTraceServiceRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.Export(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+// RegisterTraceServiceHandlerServer registers the http handlers for service TraceService to "mux".
+// UnaryRPC :call TraceServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTraceServiceHandlerFromEndpoint instead.
+func RegisterTraceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TraceServiceServer) error {
+
+ mux.Handle("POST", pattern_TraceService_Export_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/opentelemetry.proto.collector.trace.v1.TraceService/Export", runtime.WithHTTPPathPattern("/v1/traces"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_TraceService_Export_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_TraceService_Export_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+// RegisterTraceServiceHandlerFromEndpoint is same as RegisterTraceServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterTraceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.Dial(endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+
+ return RegisterTraceServiceHandler(ctx, mux, conn)
+}
+
+// RegisterTraceServiceHandler registers the http handlers for service TraceService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterTraceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterTraceServiceHandlerClient(ctx, mux, NewTraceServiceClient(conn))
+}
+
+// RegisterTraceServiceHandlerClient registers the http handlers for service TraceService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TraceServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TraceServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "TraceServiceClient" to call the correct interceptors.
+func RegisterTraceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TraceServiceClient) error {
+
+ mux.Handle("POST", pattern_TraceService_Export_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/opentelemetry.proto.collector.trace.v1.TraceService/Export", runtime.WithHTTPPathPattern("/v1/traces"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_TraceService_Export_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_TraceService_Export_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+var (
+ pattern_TraceService_Export_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "traces"}, ""))
+)
+
+var (
+ forward_TraceService_Export_0 = runtime.ForwardResponseMessage
+)
diff --git a/vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service_grpc.pb.go b/vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service_grpc.pb.go
new file mode 100644
index 00000000..dd1b73f1
--- /dev/null
+++ b/vendor/go.opentelemetry.io/proto/otlp/collector/trace/v1/trace_service_grpc.pb.go
@@ -0,0 +1,109 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.1.0
+// - protoc v3.21.6
+// source: opentelemetry/proto/collector/trace/v1/trace_service.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// TraceServiceClient is the client API for TraceService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type TraceServiceClient interface {
+ // For performance reasons, it is recommended to keep this RPC
+ // alive for the entire life of the application.
+ Export(ctx context.Context, in *ExportTraceServiceRequest, opts ...grpc.CallOption) (*ExportTraceServiceResponse, error)
+}
+
+type traceServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewTraceServiceClient(cc grpc.ClientConnInterface) TraceServiceClient {
+ return &traceServiceClient{cc}
+}
+
+func (c *traceServiceClient) Export(ctx context.Context, in *ExportTraceServiceRequest, opts ...grpc.CallOption) (*ExportTraceServiceResponse, error) {
+ out := new(ExportTraceServiceResponse)
+ err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.trace.v1.TraceService/Export", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// TraceServiceServer is the server API for TraceService service.
+// All implementations must embed UnimplementedTraceServiceServer
+// for forward compatibility
+type TraceServiceServer interface {
+ // For performance reasons, it is recommended to keep this RPC
+ // alive for the entire life of the application.
+ Export(context.Context, *ExportTraceServiceRequest) (*ExportTraceServiceResponse, error)
+ mustEmbedUnimplementedTraceServiceServer()
+}
+
+// UnimplementedTraceServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedTraceServiceServer struct {
+}
+
+func (UnimplementedTraceServiceServer) Export(context.Context, *ExportTraceServiceRequest) (*ExportTraceServiceResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method Export not implemented")
+}
+func (UnimplementedTraceServiceServer) mustEmbedUnimplementedTraceServiceServer() {}
+
+// UnsafeTraceServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to TraceServiceServer will
+// result in compilation errors.
+type UnsafeTraceServiceServer interface {
+ mustEmbedUnimplementedTraceServiceServer()
+}
+
+func RegisterTraceServiceServer(s grpc.ServiceRegistrar, srv TraceServiceServer) {
+ s.RegisterService(&TraceService_ServiceDesc, srv)
+}
+
+func _TraceService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExportTraceServiceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(TraceServiceServer).Export(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/opentelemetry.proto.collector.trace.v1.TraceService/Export",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(TraceServiceServer).Export(ctx, req.(*ExportTraceServiceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// TraceService_ServiceDesc is the grpc.ServiceDesc for TraceService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var TraceService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "opentelemetry.proto.collector.trace.v1.TraceService",
+ HandlerType: (*TraceServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "Export",
+ Handler: _TraceService_Export_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "opentelemetry/proto/collector/trace/v1/trace_service.proto",
+}
diff --git a/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go b/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go
new file mode 100644
index 00000000..852209b0
--- /dev/null
+++ b/vendor/go.opentelemetry.io/proto/otlp/common/v1/common.pb.go
@@ -0,0 +1,630 @@
+// Copyright 2019, OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.21.6
+// source: opentelemetry/proto/common/v1/common.proto
+
+package v1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// AnyValue is used to represent any type of attribute value. AnyValue may contain a
+// primitive value such as a string or integer or it may contain an arbitrary nested
+// object containing arrays, key-value lists and primitives.
+type AnyValue struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The value is one of the listed fields. It is valid for all values to be unspecified
+ // in which case this AnyValue is considered to be "empty".
+ //
+ // Types that are assignable to Value:
+ // *AnyValue_StringValue
+ // *AnyValue_BoolValue
+ // *AnyValue_IntValue
+ // *AnyValue_DoubleValue
+ // *AnyValue_ArrayValue
+ // *AnyValue_KvlistValue
+ // *AnyValue_BytesValue
+ Value isAnyValue_Value `protobuf_oneof:"value"`
+}
+
+func (x *AnyValue) Reset() {
+ *x = AnyValue{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AnyValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AnyValue) ProtoMessage() {}
+
+func (x *AnyValue) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AnyValue.ProtoReflect.Descriptor instead.
+func (*AnyValue) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *AnyValue) GetValue() isAnyValue_Value {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+func (x *AnyValue) GetStringValue() string {
+ if x, ok := x.GetValue().(*AnyValue_StringValue); ok {
+ return x.StringValue
+ }
+ return ""
+}
+
+func (x *AnyValue) GetBoolValue() bool {
+ if x, ok := x.GetValue().(*AnyValue_BoolValue); ok {
+ return x.BoolValue
+ }
+ return false
+}
+
+func (x *AnyValue) GetIntValue() int64 {
+ if x, ok := x.GetValue().(*AnyValue_IntValue); ok {
+ return x.IntValue
+ }
+ return 0
+}
+
+func (x *AnyValue) GetDoubleValue() float64 {
+ if x, ok := x.GetValue().(*AnyValue_DoubleValue); ok {
+ return x.DoubleValue
+ }
+ return 0
+}
+
+func (x *AnyValue) GetArrayValue() *ArrayValue {
+ if x, ok := x.GetValue().(*AnyValue_ArrayValue); ok {
+ return x.ArrayValue
+ }
+ return nil
+}
+
+func (x *AnyValue) GetKvlistValue() *KeyValueList {
+ if x, ok := x.GetValue().(*AnyValue_KvlistValue); ok {
+ return x.KvlistValue
+ }
+ return nil
+}
+
+func (x *AnyValue) GetBytesValue() []byte {
+ if x, ok := x.GetValue().(*AnyValue_BytesValue); ok {
+ return x.BytesValue
+ }
+ return nil
+}
+
+type isAnyValue_Value interface {
+ isAnyValue_Value()
+}
+
+type AnyValue_StringValue struct {
+ StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`
+}
+
+type AnyValue_BoolValue struct {
+ BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"`
+}
+
+type AnyValue_IntValue struct {
+ IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"`
+}
+
+type AnyValue_DoubleValue struct {
+ DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"`
+}
+
+type AnyValue_ArrayValue struct {
+ ArrayValue *ArrayValue `protobuf:"bytes,5,opt,name=array_value,json=arrayValue,proto3,oneof"`
+}
+
+type AnyValue_KvlistValue struct {
+ KvlistValue *KeyValueList `protobuf:"bytes,6,opt,name=kvlist_value,json=kvlistValue,proto3,oneof"`
+}
+
+type AnyValue_BytesValue struct {
+ BytesValue []byte `protobuf:"bytes,7,opt,name=bytes_value,json=bytesValue,proto3,oneof"`
+}
+
+func (*AnyValue_StringValue) isAnyValue_Value() {}
+
+func (*AnyValue_BoolValue) isAnyValue_Value() {}
+
+func (*AnyValue_IntValue) isAnyValue_Value() {}
+
+func (*AnyValue_DoubleValue) isAnyValue_Value() {}
+
+func (*AnyValue_ArrayValue) isAnyValue_Value() {}
+
+func (*AnyValue_KvlistValue) isAnyValue_Value() {}
+
+func (*AnyValue_BytesValue) isAnyValue_Value() {}
+
+// ArrayValue is a list of AnyValue messages. We need ArrayValue as a message
+// since oneof in AnyValue does not allow repeated fields.
+type ArrayValue struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Array of values. The array may be empty (contain 0 elements).
+ Values []*AnyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
+}
+
+func (x *ArrayValue) Reset() {
+ *x = ArrayValue{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ArrayValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ArrayValue) ProtoMessage() {}
+
+func (x *ArrayValue) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ArrayValue.ProtoReflect.Descriptor instead.
+func (*ArrayValue) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ArrayValue) GetValues() []*AnyValue {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+// KeyValueList is a list of KeyValue messages. We need KeyValueList as a message
+// since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need
+// a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to
+// avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches
+// are semantically equivalent.
+type KeyValueList struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A collection of key/value pairs of key-value pairs. The list may be empty (may
+ // contain 0 elements).
+ // The keys MUST be unique (it is not allowed to have more than one
+ // value with the same key).
+ Values []*KeyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
+}
+
+func (x *KeyValueList) Reset() {
+ *x = KeyValueList{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *KeyValueList) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*KeyValueList) ProtoMessage() {}
+
+func (x *KeyValueList) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use KeyValueList.ProtoReflect.Descriptor instead.
+func (*KeyValueList) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *KeyValueList) GetValues() []*KeyValue {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+// KeyValue is a key-value pair that is used to store Span attributes, Link
+// attributes, etc.
+type KeyValue struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ Value *AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *KeyValue) Reset() {
+ *x = KeyValue{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *KeyValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*KeyValue) ProtoMessage() {}
+
+func (x *KeyValue) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use KeyValue.ProtoReflect.Descriptor instead.
+func (*KeyValue) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *KeyValue) GetKey() string {
+ if x != nil {
+ return x.Key
+ }
+ return ""
+}
+
+func (x *KeyValue) GetValue() *AnyValue {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+// InstrumentationScope is a message representing the instrumentation scope information
+// such as the fully qualified name and version.
+type InstrumentationScope struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // An empty instrumentation scope name means the name is unknown.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
+ // Additional attributes that describe the scope. [Optional].
+ // Attribute keys MUST be unique (it is not allowed to have more than one
+ // attribute with the same key).
+ Attributes []*KeyValue `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"`
+ DroppedAttributesCount uint32 `protobuf:"varint,4,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"`
+}
+
+func (x *InstrumentationScope) Reset() {
+ *x = InstrumentationScope{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InstrumentationScope) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InstrumentationScope) ProtoMessage() {}
+
+func (x *InstrumentationScope) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_common_v1_common_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InstrumentationScope.ProtoReflect.Descriptor instead.
+func (*InstrumentationScope) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *InstrumentationScope) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *InstrumentationScope) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *InstrumentationScope) GetAttributes() []*KeyValue {
+ if x != nil {
+ return x.Attributes
+ }
+ return nil
+}
+
+func (x *InstrumentationScope) GetDroppedAttributesCount() uint32 {
+ if x != nil {
+ return x.DroppedAttributesCount
+ }
+ return 0
+}
+
+var File_opentelemetry_proto_common_v1_common_proto protoreflect.FileDescriptor
+
+var file_opentelemetry_proto_common_v1_common_proto_rawDesc = []byte{
+ 0x0a, 0x2a, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x6f, 0x70,
+ 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0xe0, 0x02, 0x0a, 0x08,
+ 0x41, 0x6e, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69,
+ 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
+ 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a,
+ 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d,
+ 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a,
+ 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65,
+ 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x12, 0x50, 0x0a, 0x0c, 0x6b, 0x76, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c,
+ 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4c,
+ 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x6b, 0x76, 0x6c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4d,
+ 0x0a, 0x0a, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x06,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x79,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x4f, 0x0a,
+ 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3f, 0x0a,
+ 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65,
+ 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x5b,
+ 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
+ 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70,
+ 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x79, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x14,
+ 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
+ 0x63, 0x6f, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
+ 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c,
+ 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
+ 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64,
+ 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
+ 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x64,
+ 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
+ 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x7b, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
+ 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x6f, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x74, 0x6c, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f,
+ 0x76, 0x31, 0xaa, 0x02, 0x1d, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74,
+ 0x72, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
+ 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_opentelemetry_proto_common_v1_common_proto_rawDescOnce sync.Once
+ file_opentelemetry_proto_common_v1_common_proto_rawDescData = file_opentelemetry_proto_common_v1_common_proto_rawDesc
+)
+
+func file_opentelemetry_proto_common_v1_common_proto_rawDescGZIP() []byte {
+ file_opentelemetry_proto_common_v1_common_proto_rawDescOnce.Do(func() {
+ file_opentelemetry_proto_common_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_opentelemetry_proto_common_v1_common_proto_rawDescData)
+ })
+ return file_opentelemetry_proto_common_v1_common_proto_rawDescData
+}
+
+var file_opentelemetry_proto_common_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_opentelemetry_proto_common_v1_common_proto_goTypes = []interface{}{
+ (*AnyValue)(nil), // 0: opentelemetry.proto.common.v1.AnyValue
+ (*ArrayValue)(nil), // 1: opentelemetry.proto.common.v1.ArrayValue
+ (*KeyValueList)(nil), // 2: opentelemetry.proto.common.v1.KeyValueList
+ (*KeyValue)(nil), // 3: opentelemetry.proto.common.v1.KeyValue
+ (*InstrumentationScope)(nil), // 4: opentelemetry.proto.common.v1.InstrumentationScope
+}
+var file_opentelemetry_proto_common_v1_common_proto_depIdxs = []int32{
+ 1, // 0: opentelemetry.proto.common.v1.AnyValue.array_value:type_name -> opentelemetry.proto.common.v1.ArrayValue
+ 2, // 1: opentelemetry.proto.common.v1.AnyValue.kvlist_value:type_name -> opentelemetry.proto.common.v1.KeyValueList
+ 0, // 2: opentelemetry.proto.common.v1.ArrayValue.values:type_name -> opentelemetry.proto.common.v1.AnyValue
+ 3, // 3: opentelemetry.proto.common.v1.KeyValueList.values:type_name -> opentelemetry.proto.common.v1.KeyValue
+ 0, // 4: opentelemetry.proto.common.v1.KeyValue.value:type_name -> opentelemetry.proto.common.v1.AnyValue
+ 3, // 5: opentelemetry.proto.common.v1.InstrumentationScope.attributes:type_name -> opentelemetry.proto.common.v1.KeyValue
+ 6, // [6:6] is the sub-list for method output_type
+ 6, // [6:6] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() { file_opentelemetry_proto_common_v1_common_proto_init() }
+func file_opentelemetry_proto_common_v1_common_proto_init() {
+ if File_opentelemetry_proto_common_v1_common_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_opentelemetry_proto_common_v1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AnyValue); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_common_v1_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ArrayValue); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_common_v1_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*KeyValueList); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_common_v1_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*KeyValue); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_common_v1_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InstrumentationScope); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_opentelemetry_proto_common_v1_common_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*AnyValue_StringValue)(nil),
+ (*AnyValue_BoolValue)(nil),
+ (*AnyValue_IntValue)(nil),
+ (*AnyValue_DoubleValue)(nil),
+ (*AnyValue_ArrayValue)(nil),
+ (*AnyValue_KvlistValue)(nil),
+ (*AnyValue_BytesValue)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_opentelemetry_proto_common_v1_common_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 5,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_opentelemetry_proto_common_v1_common_proto_goTypes,
+ DependencyIndexes: file_opentelemetry_proto_common_v1_common_proto_depIdxs,
+ MessageInfos: file_opentelemetry_proto_common_v1_common_proto_msgTypes,
+ }.Build()
+ File_opentelemetry_proto_common_v1_common_proto = out.File
+ file_opentelemetry_proto_common_v1_common_proto_rawDesc = nil
+ file_opentelemetry_proto_common_v1_common_proto_goTypes = nil
+ file_opentelemetry_proto_common_v1_common_proto_depIdxs = nil
+}
diff --git a/vendor/go.opentelemetry.io/proto/otlp/resource/v1/resource.pb.go b/vendor/go.opentelemetry.io/proto/otlp/resource/v1/resource.pb.go
new file mode 100644
index 00000000..b7545b03
--- /dev/null
+++ b/vendor/go.opentelemetry.io/proto/otlp/resource/v1/resource.pb.go
@@ -0,0 +1,193 @@
+// Copyright 2019, OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.21.6
+// source: opentelemetry/proto/resource/v1/resource.proto
+
+package v1
+
+import (
+ v1 "go.opentelemetry.io/proto/otlp/common/v1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Resource information.
+type Resource struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Set of attributes that describe the resource.
+ // Attribute keys MUST be unique (it is not allowed to have more than one
+ // attribute with the same key).
+ Attributes []*v1.KeyValue `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"`
+ // dropped_attributes_count is the number of dropped attributes. If the value is 0, then
+ // no attributes were dropped.
+ DroppedAttributesCount uint32 `protobuf:"varint,2,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"`
+}
+
+func (x *Resource) Reset() {
+ *x = Resource{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_resource_v1_resource_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Resource) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Resource) ProtoMessage() {}
+
+func (x *Resource) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_resource_v1_resource_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Resource.ProtoReflect.Descriptor instead.
+func (*Resource) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_resource_v1_resource_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Resource) GetAttributes() []*v1.KeyValue {
+ if x != nil {
+ return x.Attributes
+ }
+ return nil
+}
+
+func (x *Resource) GetDroppedAttributesCount() uint32 {
+ if x != nil {
+ return x.DroppedAttributesCount
+ }
+ return 0
+}
+
+var File_opentelemetry_proto_resource_v1_resource_proto protoreflect.FileDescriptor
+
+var file_opentelemetry_proto_resource_v1_resource_proto_rawDesc = []byte{
+ 0x0a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76,
+ 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x1f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76,
+ 0x31, 0x1a, 0x2a, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31,
+ 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x01,
+ 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27,
+ 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b,
+ 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
+ 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61,
+ 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x83, 0x01,
+ 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74,
+ 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65,
+ 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2f, 0x6f, 0x74, 0x6c, 0x70, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76,
+ 0x31, 0xaa, 0x02, 0x1f, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72,
+ 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x2e, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_opentelemetry_proto_resource_v1_resource_proto_rawDescOnce sync.Once
+ file_opentelemetry_proto_resource_v1_resource_proto_rawDescData = file_opentelemetry_proto_resource_v1_resource_proto_rawDesc
+)
+
+func file_opentelemetry_proto_resource_v1_resource_proto_rawDescGZIP() []byte {
+ file_opentelemetry_proto_resource_v1_resource_proto_rawDescOnce.Do(func() {
+ file_opentelemetry_proto_resource_v1_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_opentelemetry_proto_resource_v1_resource_proto_rawDescData)
+ })
+ return file_opentelemetry_proto_resource_v1_resource_proto_rawDescData
+}
+
+var file_opentelemetry_proto_resource_v1_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_opentelemetry_proto_resource_v1_resource_proto_goTypes = []interface{}{
+ (*Resource)(nil), // 0: opentelemetry.proto.resource.v1.Resource
+ (*v1.KeyValue)(nil), // 1: opentelemetry.proto.common.v1.KeyValue
+}
+var file_opentelemetry_proto_resource_v1_resource_proto_depIdxs = []int32{
+ 1, // 0: opentelemetry.proto.resource.v1.Resource.attributes:type_name -> opentelemetry.proto.common.v1.KeyValue
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_opentelemetry_proto_resource_v1_resource_proto_init() }
+func file_opentelemetry_proto_resource_v1_resource_proto_init() {
+ if File_opentelemetry_proto_resource_v1_resource_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_opentelemetry_proto_resource_v1_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Resource); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_opentelemetry_proto_resource_v1_resource_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_opentelemetry_proto_resource_v1_resource_proto_goTypes,
+ DependencyIndexes: file_opentelemetry_proto_resource_v1_resource_proto_depIdxs,
+ MessageInfos: file_opentelemetry_proto_resource_v1_resource_proto_msgTypes,
+ }.Build()
+ File_opentelemetry_proto_resource_v1_resource_proto = out.File
+ file_opentelemetry_proto_resource_v1_resource_proto_rawDesc = nil
+ file_opentelemetry_proto_resource_v1_resource_proto_goTypes = nil
+ file_opentelemetry_proto_resource_v1_resource_proto_depIdxs = nil
+}
diff --git a/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go b/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go
new file mode 100644
index 00000000..b342a0a9
--- /dev/null
+++ b/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go
@@ -0,0 +1,1283 @@
+// Copyright 2019, OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.21.6
+// source: opentelemetry/proto/trace/v1/trace.proto
+
+package v1
+
+import (
+ v11 "go.opentelemetry.io/proto/otlp/common/v1"
+ v1 "go.opentelemetry.io/proto/otlp/resource/v1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// SpanFlags represents constants used to interpret the
+// Span.flags field, which is protobuf 'fixed32' type and is to
+// be used as bit-fields. Each non-zero value defined in this enum is
+// a bit-mask. To extract the bit-field, for example, use an
+// expression like:
+//
+// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK)
+//
+// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
+//
+// Note that Span flags were introduced in version 1.1 of the
+// OpenTelemetry protocol. Older Span producers do not set this
+// field, consequently consumers should not rely on the absence of a
+// particular flag bit to indicate the presence of a particular feature.
+type SpanFlags int32
+
+const (
+ // The zero value for the enum. Should not be used for comparisons.
+ // Instead use bitwise "and" with the appropriate mask as shown above.
+ SpanFlags_SPAN_FLAGS_DO_NOT_USE SpanFlags = 0
+ // Bits 0-7 are used for trace flags.
+ SpanFlags_SPAN_FLAGS_TRACE_FLAGS_MASK SpanFlags = 255
+ // Bits 8 and 9 are used to indicate that the parent span or link span is remote.
+ // Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known.
+ // Bit 9 (`IS_REMOTE`) indicates whether the span or link is remote.
+ SpanFlags_SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK SpanFlags = 256
+ SpanFlags_SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK SpanFlags = 512
+)
+
+// Enum value maps for SpanFlags.
+var (
+ SpanFlags_name = map[int32]string{
+ 0: "SPAN_FLAGS_DO_NOT_USE",
+ 255: "SPAN_FLAGS_TRACE_FLAGS_MASK",
+ 256: "SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK",
+ 512: "SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK",
+ }
+ SpanFlags_value = map[string]int32{
+ "SPAN_FLAGS_DO_NOT_USE": 0,
+ "SPAN_FLAGS_TRACE_FLAGS_MASK": 255,
+ "SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK": 256,
+ "SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK": 512,
+ }
+)
+
+func (x SpanFlags) Enum() *SpanFlags {
+ p := new(SpanFlags)
+ *p = x
+ return p
+}
+
+func (x SpanFlags) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SpanFlags) Descriptor() protoreflect.EnumDescriptor {
+ return file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[0].Descriptor()
+}
+
+func (SpanFlags) Type() protoreflect.EnumType {
+ return &file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[0]
+}
+
+func (x SpanFlags) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use SpanFlags.Descriptor instead.
+func (SpanFlags) EnumDescriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0}
+}
+
+// SpanKind is the type of span. Can be used to specify additional relationships between spans
+// in addition to a parent/child relationship.
+type Span_SpanKind int32
+
+const (
+ // Unspecified. Do NOT use as default.
+ // Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED.
+ Span_SPAN_KIND_UNSPECIFIED Span_SpanKind = 0
+ // Indicates that the span represents an internal operation within an application,
+ // as opposed to an operation happening at the boundaries. Default value.
+ Span_SPAN_KIND_INTERNAL Span_SpanKind = 1
+ // Indicates that the span covers server-side handling of an RPC or other
+ // remote network request.
+ Span_SPAN_KIND_SERVER Span_SpanKind = 2
+ // Indicates that the span describes a request to some remote service.
+ Span_SPAN_KIND_CLIENT Span_SpanKind = 3
+ // Indicates that the span describes a producer sending a message to a broker.
+ // Unlike CLIENT and SERVER, there is often no direct critical path latency relationship
+ // between producer and consumer spans. A PRODUCER span ends when the message was accepted
+ // by the broker while the logical processing of the message might span a much longer time.
+ Span_SPAN_KIND_PRODUCER Span_SpanKind = 4
+ // Indicates that the span describes consumer receiving a message from a broker.
+ // Like the PRODUCER kind, there is often no direct critical path latency relationship
+ // between producer and consumer spans.
+ Span_SPAN_KIND_CONSUMER Span_SpanKind = 5
+)
+
+// Enum value maps for Span_SpanKind.
+var (
+ Span_SpanKind_name = map[int32]string{
+ 0: "SPAN_KIND_UNSPECIFIED",
+ 1: "SPAN_KIND_INTERNAL",
+ 2: "SPAN_KIND_SERVER",
+ 3: "SPAN_KIND_CLIENT",
+ 4: "SPAN_KIND_PRODUCER",
+ 5: "SPAN_KIND_CONSUMER",
+ }
+ Span_SpanKind_value = map[string]int32{
+ "SPAN_KIND_UNSPECIFIED": 0,
+ "SPAN_KIND_INTERNAL": 1,
+ "SPAN_KIND_SERVER": 2,
+ "SPAN_KIND_CLIENT": 3,
+ "SPAN_KIND_PRODUCER": 4,
+ "SPAN_KIND_CONSUMER": 5,
+ }
+)
+
+func (x Span_SpanKind) Enum() *Span_SpanKind {
+ p := new(Span_SpanKind)
+ *p = x
+ return p
+}
+
+func (x Span_SpanKind) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Span_SpanKind) Descriptor() protoreflect.EnumDescriptor {
+ return file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[1].Descriptor()
+}
+
+func (Span_SpanKind) Type() protoreflect.EnumType {
+ return &file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[1]
+}
+
+func (x Span_SpanKind) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Span_SpanKind.Descriptor instead.
+func (Span_SpanKind) EnumDescriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP(), []int{3, 0}
+}
+
+// For the semantics of status codes see
+// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status
+type Status_StatusCode int32
+
+const (
+ // The default status.
+ Status_STATUS_CODE_UNSET Status_StatusCode = 0
+ // The Span has been validated by an Application developer or Operator to
+ // have completed successfully.
+ Status_STATUS_CODE_OK Status_StatusCode = 1
+ // The Span contains an error.
+ Status_STATUS_CODE_ERROR Status_StatusCode = 2
+)
+
+// Enum value maps for Status_StatusCode.
+var (
+ Status_StatusCode_name = map[int32]string{
+ 0: "STATUS_CODE_UNSET",
+ 1: "STATUS_CODE_OK",
+ 2: "STATUS_CODE_ERROR",
+ }
+ Status_StatusCode_value = map[string]int32{
+ "STATUS_CODE_UNSET": 0,
+ "STATUS_CODE_OK": 1,
+ "STATUS_CODE_ERROR": 2,
+ }
+)
+
+func (x Status_StatusCode) Enum() *Status_StatusCode {
+ p := new(Status_StatusCode)
+ *p = x
+ return p
+}
+
+func (x Status_StatusCode) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Status_StatusCode) Descriptor() protoreflect.EnumDescriptor {
+ return file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[2].Descriptor()
+}
+
+func (Status_StatusCode) Type() protoreflect.EnumType {
+ return &file_opentelemetry_proto_trace_v1_trace_proto_enumTypes[2]
+}
+
+func (x Status_StatusCode) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Status_StatusCode.Descriptor instead.
+func (Status_StatusCode) EnumDescriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP(), []int{4, 0}
+}
+
+// TracesData represents the traces data that can be stored in a persistent storage,
+// OR can be embedded by other protocols that transfer OTLP traces data but do
+// not implement the OTLP protocol.
+//
+// The main difference between this message and collector protocol is that
+// in this message there will not be any "control" or "metadata" specific to
+// OTLP protocol.
+//
+// When new fields are added into this message, the OTLP request MUST be updated
+// as well.
+type TracesData struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // An array of ResourceSpans.
+ // For data coming from a single resource this array will typically contain
+ // one element. Intermediary nodes that receive data from multiple origins
+ // typically batch the data before forwarding further and in that case this
+ // array will contain multiple elements.
+ ResourceSpans []*ResourceSpans `protobuf:"bytes,1,rep,name=resource_spans,json=resourceSpans,proto3" json:"resource_spans,omitempty"`
+}
+
+func (x *TracesData) Reset() {
+ *x = TracesData{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TracesData) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TracesData) ProtoMessage() {}
+
+func (x *TracesData) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TracesData.ProtoReflect.Descriptor instead.
+func (*TracesData) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *TracesData) GetResourceSpans() []*ResourceSpans {
+ if x != nil {
+ return x.ResourceSpans
+ }
+ return nil
+}
+
+// A collection of ScopeSpans from a Resource.
+type ResourceSpans struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The resource for the spans in this message.
+ // If this field is not set then no resource info is known.
+ Resource *v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ // A list of ScopeSpans that originate from a resource.
+ ScopeSpans []*ScopeSpans `protobuf:"bytes,2,rep,name=scope_spans,json=scopeSpans,proto3" json:"scope_spans,omitempty"`
+ // The Schema URL, if known. This is the identifier of the Schema that the resource data
+ // is recorded in. Notably, the last part of the URL path is the version number of the
+ // schema: http[s]://server[:port]/path/. To learn more about Schema URL see
+ // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
+ // This schema_url applies to the data in the "resource" field. It does not apply
+ // to the data in the "scope_spans" field which have their own schema_url field.
+ SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"`
+}
+
+func (x *ResourceSpans) Reset() {
+ *x = ResourceSpans{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ResourceSpans) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceSpans) ProtoMessage() {}
+
+func (x *ResourceSpans) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceSpans.ProtoReflect.Descriptor instead.
+func (*ResourceSpans) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ResourceSpans) GetResource() *v1.Resource {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+func (x *ResourceSpans) GetScopeSpans() []*ScopeSpans {
+ if x != nil {
+ return x.ScopeSpans
+ }
+ return nil
+}
+
+func (x *ResourceSpans) GetSchemaUrl() string {
+ if x != nil {
+ return x.SchemaUrl
+ }
+ return ""
+}
+
+// A collection of Spans produced by an InstrumentationScope.
+type ScopeSpans struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The instrumentation scope information for the spans in this message.
+ // Semantically when InstrumentationScope isn't set, it is equivalent with
+ // an empty instrumentation scope name (unknown).
+ Scope *v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
+ // A list of Spans that originate from an instrumentation scope.
+ Spans []*Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"`
+ // The Schema URL, if known. This is the identifier of the Schema that the span data
+ // is recorded in. Notably, the last part of the URL path is the version number of the
+ // schema: http[s]://server[:port]/path/. To learn more about Schema URL see
+ // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
+ // This schema_url applies to all spans and span events in the "spans" field.
+ SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"`
+}
+
+func (x *ScopeSpans) Reset() {
+ *x = ScopeSpans{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ScopeSpans) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ScopeSpans) ProtoMessage() {}
+
+func (x *ScopeSpans) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ScopeSpans.ProtoReflect.Descriptor instead.
+func (*ScopeSpans) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ScopeSpans) GetScope() *v11.InstrumentationScope {
+ if x != nil {
+ return x.Scope
+ }
+ return nil
+}
+
+func (x *ScopeSpans) GetSpans() []*Span {
+ if x != nil {
+ return x.Spans
+ }
+ return nil
+}
+
+func (x *ScopeSpans) GetSchemaUrl() string {
+ if x != nil {
+ return x.SchemaUrl
+ }
+ return ""
+}
+
+// A Span represents a single operation performed by a single component of the system.
+//
+// The next available field id is 17.
+type Span struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A unique identifier for a trace. All spans from the same trace share
+ // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
+ // of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
+ // is zero-length and thus is also invalid).
+ //
+ // This field is required.
+ TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
+ // A unique identifier for a span within a trace, assigned when the span
+ // is created. The ID is an 8-byte array. An ID with all zeroes OR of length
+ // other than 8 bytes is considered invalid (empty string in OTLP/JSON
+ // is zero-length and thus is also invalid).
+ //
+ // This field is required.
+ SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
+ // trace_state conveys information about request position in multiple distributed tracing graphs.
+ // It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
+ // See also https://github.com/w3c/distributed-tracing for more details about this field.
+ TraceState string `protobuf:"bytes,3,opt,name=trace_state,json=traceState,proto3" json:"trace_state,omitempty"`
+ // The `span_id` of this span's parent span. If this is a root span, then this
+ // field must be empty. The ID is an 8-byte array.
+ ParentSpanId []byte `protobuf:"bytes,4,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"`
+ // Flags, a bit field.
+ //
+ // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace
+ // Context specification. To read the 8-bit W3C trace flag, use
+ // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.
+ //
+ // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
+ //
+ // Bits 8 and 9 represent the 3 states of whether a span's parent
+ // is remote. The states are (unknown, is not remote, is remote).
+ // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.
+ // To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.
+ //
+ // When creating span messages, if the message is logically forwarded from another source
+ // with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD
+ // be copied as-is. If creating from a source that does not have an equivalent flags field
+ // (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST
+ // be set to zero.
+ // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.
+ //
+ // [Optional].
+ Flags uint32 `protobuf:"fixed32,16,opt,name=flags,proto3" json:"flags,omitempty"`
+ // A description of the span's operation.
+ //
+ // For example, the name can be a qualified method name or a file name
+ // and a line number where the operation is called. A best practice is to use
+ // the same display name at the same call point in an application.
+ // This makes it easier to correlate spans in different traces.
+ //
+ // This field is semantically required to be set to non-empty string.
+ // Empty value is equivalent to an unknown span name.
+ //
+ // This field is required.
+ Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
+ // Distinguishes between spans generated in a particular context. For example,
+ // two spans with the same name may be distinguished using `CLIENT` (caller)
+ // and `SERVER` (callee) to identify queueing latency associated with the span.
+ Kind Span_SpanKind `protobuf:"varint,6,opt,name=kind,proto3,enum=opentelemetry.proto.trace.v1.Span_SpanKind" json:"kind,omitempty"`
+ // start_time_unix_nano is the start time of the span. On the client side, this is the time
+ // kept by the local machine where the span execution starts. On the server side, this
+ // is the time when the server's application handler starts running.
+ // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ //
+ // This field is semantically required and it is expected that end_time >= start_time.
+ StartTimeUnixNano uint64 `protobuf:"fixed64,7,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"`
+ // end_time_unix_nano is the end time of the span. On the client side, this is the time
+ // kept by the local machine where the span execution ends. On the server side, this
+ // is the time when the server application handler stops running.
+ // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
+ //
+ // This field is semantically required and it is expected that end_time >= start_time.
+ EndTimeUnixNano uint64 `protobuf:"fixed64,8,opt,name=end_time_unix_nano,json=endTimeUnixNano,proto3" json:"end_time_unix_nano,omitempty"`
+ // attributes is a collection of key/value pairs. Note, global attributes
+ // like server name can be set using the resource API. Examples of attributes:
+ //
+ // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
+ // "/http/server_latency": 300
+ // "example.com/myattribute": true
+ // "example.com/score": 10.239
+ //
+ // The OpenTelemetry API specification further restricts the allowed value types:
+ // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
+ // Attribute keys MUST be unique (it is not allowed to have more than one
+ // attribute with the same key).
+ Attributes []*v11.KeyValue `protobuf:"bytes,9,rep,name=attributes,proto3" json:"attributes,omitempty"`
+ // dropped_attributes_count is the number of attributes that were discarded. Attributes
+ // can be discarded because their keys are too long or because there are too many
+ // attributes. If this value is 0, then no attributes were dropped.
+ DroppedAttributesCount uint32 `protobuf:"varint,10,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"`
+ // events is a collection of Event items.
+ Events []*Span_Event `protobuf:"bytes,11,rep,name=events,proto3" json:"events,omitempty"`
+ // dropped_events_count is the number of dropped events. If the value is 0, then no
+ // events were dropped.
+ DroppedEventsCount uint32 `protobuf:"varint,12,opt,name=dropped_events_count,json=droppedEventsCount,proto3" json:"dropped_events_count,omitempty"`
+ // links is a collection of Links, which are references from this span to a span
+ // in the same or different trace.
+ Links []*Span_Link `protobuf:"bytes,13,rep,name=links,proto3" json:"links,omitempty"`
+ // dropped_links_count is the number of dropped links after the maximum size was
+ // enforced. If this value is 0, then no links were dropped.
+ DroppedLinksCount uint32 `protobuf:"varint,14,opt,name=dropped_links_count,json=droppedLinksCount,proto3" json:"dropped_links_count,omitempty"`
+ // An optional final status for this span. Semantically when Status isn't set, it means
+ // span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
+ Status *Status `protobuf:"bytes,15,opt,name=status,proto3" json:"status,omitempty"`
+}
+
+func (x *Span) Reset() {
+ *x = Span{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span) ProtoMessage() {}
+
+func (x *Span) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span.ProtoReflect.Descriptor instead.
+func (*Span) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *Span) GetTraceId() []byte {
+ if x != nil {
+ return x.TraceId
+ }
+ return nil
+}
+
+func (x *Span) GetSpanId() []byte {
+ if x != nil {
+ return x.SpanId
+ }
+ return nil
+}
+
+func (x *Span) GetTraceState() string {
+ if x != nil {
+ return x.TraceState
+ }
+ return ""
+}
+
+func (x *Span) GetParentSpanId() []byte {
+ if x != nil {
+ return x.ParentSpanId
+ }
+ return nil
+}
+
+func (x *Span) GetFlags() uint32 {
+ if x != nil {
+ return x.Flags
+ }
+ return 0
+}
+
+func (x *Span) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Span) GetKind() Span_SpanKind {
+ if x != nil {
+ return x.Kind
+ }
+ return Span_SPAN_KIND_UNSPECIFIED
+}
+
+func (x *Span) GetStartTimeUnixNano() uint64 {
+ if x != nil {
+ return x.StartTimeUnixNano
+ }
+ return 0
+}
+
+func (x *Span) GetEndTimeUnixNano() uint64 {
+ if x != nil {
+ return x.EndTimeUnixNano
+ }
+ return 0
+}
+
+func (x *Span) GetAttributes() []*v11.KeyValue {
+ if x != nil {
+ return x.Attributes
+ }
+ return nil
+}
+
+func (x *Span) GetDroppedAttributesCount() uint32 {
+ if x != nil {
+ return x.DroppedAttributesCount
+ }
+ return 0
+}
+
+func (x *Span) GetEvents() []*Span_Event {
+ if x != nil {
+ return x.Events
+ }
+ return nil
+}
+
+func (x *Span) GetDroppedEventsCount() uint32 {
+ if x != nil {
+ return x.DroppedEventsCount
+ }
+ return 0
+}
+
+func (x *Span) GetLinks() []*Span_Link {
+ if x != nil {
+ return x.Links
+ }
+ return nil
+}
+
+func (x *Span) GetDroppedLinksCount() uint32 {
+ if x != nil {
+ return x.DroppedLinksCount
+ }
+ return 0
+}
+
+func (x *Span) GetStatus() *Status {
+ if x != nil {
+ return x.Status
+ }
+ return nil
+}
+
+// The Status type defines a logical error model that is suitable for different
+// programming environments, including REST APIs and RPC APIs.
+type Status struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A developer-facing human readable error message.
+ Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
+ // The status code.
+ Code Status_StatusCode `protobuf:"varint,3,opt,name=code,proto3,enum=opentelemetry.proto.trace.v1.Status_StatusCode" json:"code,omitempty"`
+}
+
+func (x *Status) Reset() {
+ *x = Status{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Status) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Status) ProtoMessage() {}
+
+func (x *Status) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Status.ProtoReflect.Descriptor instead.
+func (*Status) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *Status) GetMessage() string {
+ if x != nil {
+ return x.Message
+ }
+ return ""
+}
+
+func (x *Status) GetCode() Status_StatusCode {
+ if x != nil {
+ return x.Code
+ }
+ return Status_STATUS_CODE_UNSET
+}
+
+// Event is a time-stamped annotation of the span, consisting of user-supplied
+// text description and key-value pairs.
+type Span_Event struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // time_unix_nano is the time the event occurred.
+ TimeUnixNano uint64 `protobuf:"fixed64,1,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"`
+ // name of the event.
+ // This field is semantically required to be set to non-empty string.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // attributes is a collection of attribute key/value pairs on the event.
+ // Attribute keys MUST be unique (it is not allowed to have more than one
+ // attribute with the same key).
+ Attributes []*v11.KeyValue `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"`
+ // dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ // then no attributes were dropped.
+ DroppedAttributesCount uint32 `protobuf:"varint,4,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"`
+}
+
+func (x *Span_Event) Reset() {
+ *x = Span_Event{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span_Event) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span_Event) ProtoMessage() {}
+
+func (x *Span_Event) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span_Event.ProtoReflect.Descriptor instead.
+func (*Span_Event) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP(), []int{3, 0}
+}
+
+func (x *Span_Event) GetTimeUnixNano() uint64 {
+ if x != nil {
+ return x.TimeUnixNano
+ }
+ return 0
+}
+
+func (x *Span_Event) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Span_Event) GetAttributes() []*v11.KeyValue {
+ if x != nil {
+ return x.Attributes
+ }
+ return nil
+}
+
+func (x *Span_Event) GetDroppedAttributesCount() uint32 {
+ if x != nil {
+ return x.DroppedAttributesCount
+ }
+ return 0
+}
+
+// A pointer from the current span to another span in the same trace or in a
+// different trace. For example, this can be used in batching operations,
+// where a single batch handler processes multiple requests from different
+// traces or when the handler receives a request from a different project.
+type Span_Link struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A unique identifier of a trace that this linked span is part of. The ID is a
+ // 16-byte array.
+ TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
+ // A unique identifier for the linked span. The ID is an 8-byte array.
+ SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
+ // The trace_state associated with the link.
+ TraceState string `protobuf:"bytes,3,opt,name=trace_state,json=traceState,proto3" json:"trace_state,omitempty"`
+ // attributes is a collection of attribute key/value pairs on the link.
+ // Attribute keys MUST be unique (it is not allowed to have more than one
+ // attribute with the same key).
+ Attributes []*v11.KeyValue `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"`
+ // dropped_attributes_count is the number of dropped attributes. If the value is 0,
+ // then no attributes were dropped.
+ DroppedAttributesCount uint32 `protobuf:"varint,5,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"`
+ // Flags, a bit field.
+ //
+ // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace
+ // Context specification. To read the 8-bit W3C trace flag, use
+ // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.
+ //
+ // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
+ //
+ // Bits 8 and 9 represent the 3 states of whether the link is remote.
+ // The states are (unknown, is not remote, is remote).
+ // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.
+ // To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.
+ //
+ // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.
+ // When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero.
+ //
+ // [Optional].
+ Flags uint32 `protobuf:"fixed32,6,opt,name=flags,proto3" json:"flags,omitempty"`
+}
+
+func (x *Span_Link) Reset() {
+ *x = Span_Link{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span_Link) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span_Link) ProtoMessage() {}
+
+func (x *Span_Link) ProtoReflect() protoreflect.Message {
+ mi := &file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span_Link.ProtoReflect.Descriptor instead.
+func (*Span_Link) Descriptor() ([]byte, []int) {
+ return file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP(), []int{3, 1}
+}
+
+func (x *Span_Link) GetTraceId() []byte {
+ if x != nil {
+ return x.TraceId
+ }
+ return nil
+}
+
+func (x *Span_Link) GetSpanId() []byte {
+ if x != nil {
+ return x.SpanId
+ }
+ return nil
+}
+
+func (x *Span_Link) GetTraceState() string {
+ if x != nil {
+ return x.TraceState
+ }
+ return ""
+}
+
+func (x *Span_Link) GetAttributes() []*v11.KeyValue {
+ if x != nil {
+ return x.Attributes
+ }
+ return nil
+}
+
+func (x *Span_Link) GetDroppedAttributesCount() uint32 {
+ if x != nil {
+ return x.DroppedAttributesCount
+ }
+ return 0
+}
+
+func (x *Span_Link) GetFlags() uint32 {
+ if x != nil {
+ return x.Flags
+ }
+ return 0
+}
+
+var File_opentelemetry_proto_trace_v1_trace_proto protoreflect.FileDescriptor
+
+var file_opentelemetry_proto_trace_v1_trace_proto_rawDesc = []byte{
+ 0x0a, 0x28, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74,
+ 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x6f, 0x70, 0x65, 0x6e,
+ 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
+ 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x2a, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65,
+ 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65,
+ 0x74, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x44, 0x61,
+ 0x74, 0x61, 0x12, 0x52, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73,
+ 0x70, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73, 0x12, 0x45, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
+ 0x49, 0x0a, 0x0b, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x02,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d,
+ 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73, 0x52, 0x0a,
+ 0x73, 0x63, 0x6f, 0x70, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x55, 0x72, 0x6c, 0x4a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0xe9,
+ 0x07, 0x22, 0xb0, 0x01, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73,
+ 0x12, 0x49, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x33, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
+ 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
+ 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x73,
+ 0x70, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x05,
+ 0x73, 0x70, 0x61, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f,
+ 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x55, 0x72, 0x6c, 0x22, 0xc8, 0x0a, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x19, 0x0a,
+ 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
+ 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e,
+ 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49,
+ 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61,
+ 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x61,
+ 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67,
+ 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x12,
+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x2b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b,
+ 0x69, 0x6e, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d,
+ 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28,
+ 0x06, 0x52, 0x11, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x78,
+ 0x4e, 0x61, 0x6e, 0x6f, 0x12, 0x2b, 0x0a, 0x12, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65,
+ 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x06,
+ 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x4e, 0x61, 0x6e,
+ 0x6f, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18,
+ 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65,
+ 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a,
+ 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x72,
+ 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
+ 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x64, 0x72,
+ 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43,
+ 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0b,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d,
+ 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06,
+ 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65,
+ 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0c,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x45, 0x76, 0x65,
+ 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b,
+ 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65,
+ 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72,
+ 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x4c, 0x69, 0x6e, 0x6b,
+ 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x72, 0x6f, 0x70, 0x70,
+ 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x4c, 0x69, 0x6e,
+ 0x6b, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65,
+ 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72,
+ 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0xc4, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12,
+ 0x24, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x6e, 0x61, 0x6e,
+ 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69,
+ 0x78, 0x4e, 0x61, 0x6e, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65,
+ 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0xf4, 0x01, 0x0a,
+ 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64,
+ 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61,
+ 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+ 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27,
+ 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b,
+ 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
+ 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61,
+ 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x16, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a,
+ 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x66, 0x6c,
+ 0x61, 0x67, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x08, 0x53, 0x70, 0x61, 0x6e, 0x4b, 0x69, 0x6e, 0x64,
+ 0x12, 0x19, 0x0a, 0x15, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e,
+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x53,
+ 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41,
+ 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44,
+ 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x50, 0x41,
+ 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12,
+ 0x16, 0x0a, 0x12, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x52, 0x4f,
+ 0x44, 0x55, 0x43, 0x45, 0x52, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x50, 0x41, 0x4e, 0x5f,
+ 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x55, 0x4d, 0x45, 0x52, 0x10, 0x05, 0x22,
+ 0xbd, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65,
+ 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74,
+ 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43,
+ 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x4e, 0x0a, 0x0a, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55,
+ 0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x12,
+ 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4f, 0x4b,
+ 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x44,
+ 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x2a,
+ 0x9c, 0x01, 0x0a, 0x09, 0x53, 0x70, 0x61, 0x6e, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x19, 0x0a,
+ 0x15, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x53, 0x5f, 0x44, 0x4f, 0x5f, 0x4e,
+ 0x4f, 0x54, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1b, 0x53, 0x50, 0x41, 0x4e,
+ 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x53, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x5f, 0x46, 0x4c, 0x41,
+ 0x47, 0x53, 0x5f, 0x4d, 0x41, 0x53, 0x4b, 0x10, 0xff, 0x01, 0x12, 0x2a, 0x0a, 0x25, 0x53, 0x50,
+ 0x41, 0x4e, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54,
+ 0x5f, 0x48, 0x41, 0x53, 0x5f, 0x49, 0x53, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x4d,
+ 0x41, 0x53, 0x4b, 0x10, 0x80, 0x02, 0x12, 0x26, 0x0a, 0x21, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x46,
+ 0x4c, 0x41, 0x47, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x49, 0x53, 0x5f,
+ 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x4d, 0x41, 0x53, 0x4b, 0x10, 0x80, 0x04, 0x42, 0x77,
+ 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74,
+ 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76,
+ 0x31, 0x42, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
+ 0x27, 0x67, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72,
+ 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x74, 0x6c, 0x70, 0x2f,
+ 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0xaa, 0x02, 0x1c, 0x4f, 0x70, 0x65, 0x6e, 0x54,
+ 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54,
+ 0x72, 0x61, 0x63, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_opentelemetry_proto_trace_v1_trace_proto_rawDescOnce sync.Once
+ file_opentelemetry_proto_trace_v1_trace_proto_rawDescData = file_opentelemetry_proto_trace_v1_trace_proto_rawDesc
+)
+
+func file_opentelemetry_proto_trace_v1_trace_proto_rawDescGZIP() []byte {
+ file_opentelemetry_proto_trace_v1_trace_proto_rawDescOnce.Do(func() {
+ file_opentelemetry_proto_trace_v1_trace_proto_rawDescData = protoimpl.X.CompressGZIP(file_opentelemetry_proto_trace_v1_trace_proto_rawDescData)
+ })
+ return file_opentelemetry_proto_trace_v1_trace_proto_rawDescData
+}
+
+var file_opentelemetry_proto_trace_v1_trace_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
+var file_opentelemetry_proto_trace_v1_trace_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_opentelemetry_proto_trace_v1_trace_proto_goTypes = []interface{}{
+ (SpanFlags)(0), // 0: opentelemetry.proto.trace.v1.SpanFlags
+ (Span_SpanKind)(0), // 1: opentelemetry.proto.trace.v1.Span.SpanKind
+ (Status_StatusCode)(0), // 2: opentelemetry.proto.trace.v1.Status.StatusCode
+ (*TracesData)(nil), // 3: opentelemetry.proto.trace.v1.TracesData
+ (*ResourceSpans)(nil), // 4: opentelemetry.proto.trace.v1.ResourceSpans
+ (*ScopeSpans)(nil), // 5: opentelemetry.proto.trace.v1.ScopeSpans
+ (*Span)(nil), // 6: opentelemetry.proto.trace.v1.Span
+ (*Status)(nil), // 7: opentelemetry.proto.trace.v1.Status
+ (*Span_Event)(nil), // 8: opentelemetry.proto.trace.v1.Span.Event
+ (*Span_Link)(nil), // 9: opentelemetry.proto.trace.v1.Span.Link
+ (*v1.Resource)(nil), // 10: opentelemetry.proto.resource.v1.Resource
+ (*v11.InstrumentationScope)(nil), // 11: opentelemetry.proto.common.v1.InstrumentationScope
+ (*v11.KeyValue)(nil), // 12: opentelemetry.proto.common.v1.KeyValue
+}
+var file_opentelemetry_proto_trace_v1_trace_proto_depIdxs = []int32{
+ 4, // 0: opentelemetry.proto.trace.v1.TracesData.resource_spans:type_name -> opentelemetry.proto.trace.v1.ResourceSpans
+ 10, // 1: opentelemetry.proto.trace.v1.ResourceSpans.resource:type_name -> opentelemetry.proto.resource.v1.Resource
+ 5, // 2: opentelemetry.proto.trace.v1.ResourceSpans.scope_spans:type_name -> opentelemetry.proto.trace.v1.ScopeSpans
+ 11, // 3: opentelemetry.proto.trace.v1.ScopeSpans.scope:type_name -> opentelemetry.proto.common.v1.InstrumentationScope
+ 6, // 4: opentelemetry.proto.trace.v1.ScopeSpans.spans:type_name -> opentelemetry.proto.trace.v1.Span
+ 1, // 5: opentelemetry.proto.trace.v1.Span.kind:type_name -> opentelemetry.proto.trace.v1.Span.SpanKind
+ 12, // 6: opentelemetry.proto.trace.v1.Span.attributes:type_name -> opentelemetry.proto.common.v1.KeyValue
+ 8, // 7: opentelemetry.proto.trace.v1.Span.events:type_name -> opentelemetry.proto.trace.v1.Span.Event
+ 9, // 8: opentelemetry.proto.trace.v1.Span.links:type_name -> opentelemetry.proto.trace.v1.Span.Link
+ 7, // 9: opentelemetry.proto.trace.v1.Span.status:type_name -> opentelemetry.proto.trace.v1.Status
+ 2, // 10: opentelemetry.proto.trace.v1.Status.code:type_name -> opentelemetry.proto.trace.v1.Status.StatusCode
+ 12, // 11: opentelemetry.proto.trace.v1.Span.Event.attributes:type_name -> opentelemetry.proto.common.v1.KeyValue
+ 12, // 12: opentelemetry.proto.trace.v1.Span.Link.attributes:type_name -> opentelemetry.proto.common.v1.KeyValue
+ 13, // [13:13] is the sub-list for method output_type
+ 13, // [13:13] is the sub-list for method input_type
+ 13, // [13:13] is the sub-list for extension type_name
+ 13, // [13:13] is the sub-list for extension extendee
+ 0, // [0:13] is the sub-list for field type_name
+}
+
+func init() { file_opentelemetry_proto_trace_v1_trace_proto_init() }
+func file_opentelemetry_proto_trace_v1_trace_proto_init() {
+ if File_opentelemetry_proto_trace_v1_trace_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TracesData); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ResourceSpans); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ScopeSpans); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Status); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span_Event); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opentelemetry_proto_trace_v1_trace_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span_Link); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_opentelemetry_proto_trace_v1_trace_proto_rawDesc,
+ NumEnums: 3,
+ NumMessages: 7,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_opentelemetry_proto_trace_v1_trace_proto_goTypes,
+ DependencyIndexes: file_opentelemetry_proto_trace_v1_trace_proto_depIdxs,
+ EnumInfos: file_opentelemetry_proto_trace_v1_trace_proto_enumTypes,
+ MessageInfos: file_opentelemetry_proto_trace_v1_trace_proto_msgTypes,
+ }.Build()
+ File_opentelemetry_proto_trace_v1_trace_proto = out.File
+ file_opentelemetry_proto_trace_v1_trace_proto_rawDesc = nil
+ file_opentelemetry_proto_trace_v1_trace_proto_goTypes = nil
+ file_opentelemetry_proto_trace_v1_trace_proto_depIdxs = nil
+}
diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/golang.org/x/crypto/ed25519/ed25519.go
deleted file mode 100644
index 59b3a95a..00000000
--- a/vendor/golang.org/x/crypto/ed25519/ed25519.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package ed25519 implements the Ed25519 signature algorithm. See
-// https://ed25519.cr.yp.to/.
-//
-// These functions are also compatible with the “Ed25519†function defined in
-// RFC 8032. However, unlike RFC 8032's formulation, this package's private key
-// representation includes a public key suffix to make multiple signing
-// operations with the same key more efficient. This package refers to the RFC
-// 8032 private key as the “seedâ€.
-//
-// This package is a wrapper around the standard library crypto/ed25519 package.
-package ed25519
-
-import (
- "crypto/ed25519"
- "io"
-)
-
-const (
- // PublicKeySize is the size, in bytes, of public keys as used in this package.
- PublicKeySize = 32
- // PrivateKeySize is the size, in bytes, of private keys as used in this package.
- PrivateKeySize = 64
- // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
- SignatureSize = 64
- // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032.
- SeedSize = 32
-)
-
-// PublicKey is the type of Ed25519 public keys.
-//
-// This type is an alias for crypto/ed25519's PublicKey type.
-// See the crypto/ed25519 package for the methods on this type.
-type PublicKey = ed25519.PublicKey
-
-// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer.
-//
-// This type is an alias for crypto/ed25519's PrivateKey type.
-// See the crypto/ed25519 package for the methods on this type.
-type PrivateKey = ed25519.PrivateKey
-
-// GenerateKey generates a public/private key pair using entropy from rand.
-// If rand is nil, crypto/rand.Reader will be used.
-func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) {
- return ed25519.GenerateKey(rand)
-}
-
-// NewKeyFromSeed calculates a private key from a seed. It will panic if
-// len(seed) is not SeedSize. This function is provided for interoperability
-// with RFC 8032. RFC 8032's private keys correspond to seeds in this
-// package.
-func NewKeyFromSeed(seed []byte) PrivateKey {
- return ed25519.NewKeyFromSeed(seed)
-}
-
-// Sign signs the message with privateKey and returns a signature. It will
-// panic if len(privateKey) is not PrivateKeySize.
-func Sign(privateKey PrivateKey, message []byte) []byte {
- return ed25519.Sign(privateKey, message)
-}
-
-// Verify reports whether sig is a valid signature of message by publicKey. It
-// will panic if len(publicKey) is not PublicKeySize.
-func Verify(publicKey PublicKey, message, sig []byte) bool {
- return ed25519.Verify(publicKey, message, sig)
-}
diff --git a/vendor/golang.org/x/crypto/ssh/handshake.go b/vendor/golang.org/x/crypto/ssh/handshake.go
index 56cdc7c2..fef687db 100644
--- a/vendor/golang.org/x/crypto/ssh/handshake.go
+++ b/vendor/golang.org/x/crypto/ssh/handshake.go
@@ -80,6 +80,7 @@ type handshakeTransport struct {
pendingPackets [][]byte // Used when a key exchange is in progress.
writePacketsLeft uint32
writeBytesLeft int64
+ userAuthComplete bool // whether the user authentication phase is complete
// If the read loop wants to schedule a kex, it pings this
// channel, and the write loop will send out a kex
@@ -552,16 +553,25 @@ func (t *handshakeTransport) sendKexInit() error {
return nil
}
+var errSendBannerPhase = errors.New("ssh: SendAuthBanner outside of authentication phase")
+
func (t *handshakeTransport) writePacket(p []byte) error {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
switch p[0] {
case msgKexInit:
return errors.New("ssh: only handshakeTransport can send kexInit")
case msgNewKeys:
return errors.New("ssh: only handshakeTransport can send newKeys")
+ case msgUserAuthBanner:
+ if t.userAuthComplete {
+ return errSendBannerPhase
+ }
+ case msgUserAuthSuccess:
+ t.userAuthComplete = true
}
- t.mu.Lock()
- defer t.mu.Unlock()
if t.writeError != nil {
return t.writeError
}
diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go
index 5b5ccd96..1839ddc6 100644
--- a/vendor/golang.org/x/crypto/ssh/server.go
+++ b/vendor/golang.org/x/crypto/ssh/server.go
@@ -59,6 +59,27 @@ type GSSAPIWithMICConfig struct {
Server GSSAPIServer
}
+// SendAuthBanner implements [ServerPreAuthConn].
+func (s *connection) SendAuthBanner(msg string) error {
+ return s.transport.writePacket(Marshal(&userAuthBannerMsg{
+ Message: msg,
+ }))
+}
+
+func (*connection) unexportedMethodForFutureProofing() {}
+
+// ServerPreAuthConn is the interface available on an incoming server
+// connection before authentication has completed.
+type ServerPreAuthConn interface {
+ unexportedMethodForFutureProofing() // permits growing ServerPreAuthConn safely later, ala testing.TB
+
+ ConnMetadata
+
+ // SendAuthBanner sends a banner message to the client.
+ // It returns an error once the authentication phase has ended.
+ SendAuthBanner(string) error
+}
+
// ServerConfig holds server specific configuration data.
type ServerConfig struct {
// Config contains configuration shared between client and server.
@@ -118,6 +139,12 @@ type ServerConfig struct {
// attempts.
AuthLogCallback func(conn ConnMetadata, method string, err error)
+ // PreAuthConnCallback, if non-nil, is called upon receiving a new connection
+ // before any authentication has started. The provided ServerPreAuthConn
+ // can be used at any time before authentication is complete, including
+ // after this callback has returned.
+ PreAuthConnCallback func(ServerPreAuthConn)
+
// ServerVersion is the version identification string to announce in
// the public handshake.
// If empty, a reasonable default is used.
@@ -488,6 +515,10 @@ func (b *BannerError) Error() string {
}
func (s *connection) serverAuthenticate(config *ServerConfig) (*Permissions, error) {
+ if config.PreAuthConnCallback != nil {
+ config.PreAuthConnCallback(s)
+ }
+
sessionID := s.transport.getSessionID()
var cache pubKeyCache
var perms *Permissions
@@ -495,7 +526,7 @@ func (s *connection) serverAuthenticate(config *ServerConfig) (*Permissions, err
authFailures := 0
noneAuthCount := 0
var authErrs []error
- var displayedBanner bool
+ var calledBannerCallback bool
partialSuccessReturned := false
// Set the initial authentication callbacks from the config. They can be
// changed if a PartialSuccessError is returned.
@@ -542,14 +573,10 @@ userAuthLoop:
s.user = userAuthReq.User
- if !displayedBanner && config.BannerCallback != nil {
- displayedBanner = true
- msg := config.BannerCallback(s)
- if msg != "" {
- bannerMsg := &userAuthBannerMsg{
- Message: msg,
- }
- if err := s.transport.writePacket(Marshal(bannerMsg)); err != nil {
+ if !calledBannerCallback && config.BannerCallback != nil {
+ calledBannerCallback = true
+ if msg := config.BannerCallback(s); msg != "" {
+ if err := s.SendAuthBanner(msg); err != nil {
return nil, err
}
}
@@ -762,10 +789,7 @@ userAuthLoop:
var bannerErr *BannerError
if errors.As(authErr, &bannerErr) {
if bannerErr.Message != "" {
- bannerMsg := &userAuthBannerMsg{
- Message: bannerErr.Message,
- }
- if err := s.transport.writePacket(Marshal(bannerMsg)); err != nil {
+ if err := s.SendAuthBanner(bannerErr.Message); err != nil {
return nil, err
}
}
diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go
index c7601c90..6c18ea23 100644
--- a/vendor/golang.org/x/net/http2/http2.go
+++ b/vendor/golang.org/x/net/http2/http2.go
@@ -34,11 +34,19 @@ import (
)
var (
- VerboseLogs bool
- logFrameWrites bool
- logFrameReads bool
- inTests bool
- disableExtendedConnectProtocol bool
+ VerboseLogs bool
+ logFrameWrites bool
+ logFrameReads bool
+ inTests bool
+
+ // Enabling extended CONNECT by causes browsers to attempt to use
+ // WebSockets-over-HTTP/2. This results in problems when the server's websocket
+ // package doesn't support extended CONNECT.
+ //
+ // Disable extended CONNECT by default for now.
+ //
+ // Issue #71128.
+ disableExtendedConnectProtocol = true
)
func init() {
@@ -51,8 +59,8 @@ func init() {
logFrameWrites = true
logFrameReads = true
}
- if strings.Contains(e, "http2xconnect=0") {
- disableExtendedConnectProtocol = true
+ if strings.Contains(e, "http2xconnect=1") {
+ disableExtendedConnectProtocol = false
}
}
@@ -407,23 +415,6 @@ func (s *sorter) SortStrings(ss []string) {
s.v = save
}
-// validPseudoPath reports whether v is a valid :path pseudo-header
-// value. It must be either:
-//
-// - a non-empty string starting with '/'
-// - the string '*', for OPTIONS requests.
-//
-// For now this is only used a quick check for deciding when to clean
-// up Opaque URLs before sending requests from the Transport.
-// See golang.org/issue/16847
-//
-// We used to enforce that the path also didn't start with "//", but
-// Google's GFE accepts such paths and Chrome sends them, so ignore
-// that part of the spec. See golang.org/issue/19103.
-func validPseudoPath(v string) bool {
- return (len(v) > 0 && v[0] == '/') || v == "*"
-}
-
// incomparable is a zero-width, non-comparable type. Adding it to a struct
// makes that struct also non-comparable, and generally doesn't add
// any size (as long as it's first).
diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go
index b55547ae..7434b878 100644
--- a/vendor/golang.org/x/net/http2/server.go
+++ b/vendor/golang.org/x/net/http2/server.go
@@ -50,6 +50,7 @@ import (
"golang.org/x/net/http/httpguts"
"golang.org/x/net/http2/hpack"
+ "golang.org/x/net/internal/httpcommon"
)
const (
@@ -812,8 +813,7 @@ const maxCachedCanonicalHeadersKeysSize = 2048
func (sc *serverConn) canonicalHeader(v string) string {
sc.serveG.check()
- buildCommonHeaderMapsOnce()
- cv, ok := commonCanonHeader[v]
+ cv, ok := httpcommon.CachedCanonicalHeader(v)
if ok {
return cv
}
diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go
index b2e2ed33..f2c166b6 100644
--- a/vendor/golang.org/x/net/http2/transport.go
+++ b/vendor/golang.org/x/net/http2/transport.go
@@ -25,7 +25,6 @@ import (
"net/http"
"net/http/httptrace"
"net/textproto"
- "sort"
"strconv"
"strings"
"sync"
@@ -35,6 +34,7 @@ import (
"golang.org/x/net/http/httpguts"
"golang.org/x/net/http2/hpack"
"golang.org/x/net/idna"
+ "golang.org/x/net/internal/httpcommon"
)
const (
@@ -1275,23 +1275,6 @@ func (cc *ClientConn) closeForLostPing() {
// exported. At least they'll be DeepEqual for h1-vs-h2 comparisons tests.
var errRequestCanceled = errors.New("net/http: request canceled")
-func commaSeparatedTrailers(req *http.Request) (string, error) {
- keys := make([]string, 0, len(req.Trailer))
- for k := range req.Trailer {
- k = canonicalHeader(k)
- switch k {
- case "Transfer-Encoding", "Trailer", "Content-Length":
- return "", fmt.Errorf("invalid Trailer key %q", k)
- }
- keys = append(keys, k)
- }
- if len(keys) > 0 {
- sort.Strings(keys)
- return strings.Join(keys, ","), nil
- }
- return "", nil
-}
-
func (cc *ClientConn) responseHeaderTimeout() time.Duration {
if cc.t.t1 != nil {
return cc.t.t1.ResponseHeaderTimeout
@@ -1303,35 +1286,6 @@ func (cc *ClientConn) responseHeaderTimeout() time.Duration {
return 0
}
-// checkConnHeaders checks whether req has any invalid connection-level headers.
-// per RFC 7540 section 8.1.2.2: Connection-Specific Header Fields.
-// Certain headers are special-cased as okay but not transmitted later.
-func checkConnHeaders(req *http.Request) error {
- if v := req.Header.Get("Upgrade"); v != "" {
- return fmt.Errorf("http2: invalid Upgrade request header: %q", req.Header["Upgrade"])
- }
- if vv := req.Header["Transfer-Encoding"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && vv[0] != "chunked") {
- return fmt.Errorf("http2: invalid Transfer-Encoding request header: %q", vv)
- }
- if vv := req.Header["Connection"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && !asciiEqualFold(vv[0], "close") && !asciiEqualFold(vv[0], "keep-alive")) {
- return fmt.Errorf("http2: invalid Connection request header: %q", vv)
- }
- return nil
-}
-
-// actualContentLength returns a sanitized version of
-// req.ContentLength, where 0 actually means zero (not unknown) and -1
-// means unknown.
-func actualContentLength(req *http.Request) int64 {
- if req.Body == nil || req.Body == http.NoBody {
- return 0
- }
- if req.ContentLength != 0 {
- return req.ContentLength
- }
- return -1
-}
-
func (cc *ClientConn) decrStreamReservations() {
cc.mu.Lock()
defer cc.mu.Unlock()
@@ -1356,7 +1310,7 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream))
reqCancel: req.Cancel,
isHead: req.Method == "HEAD",
reqBody: req.Body,
- reqBodyContentLength: actualContentLength(req),
+ reqBodyContentLength: httpcommon.ActualContentLength(req),
trace: httptrace.ContextClientTrace(ctx),
peerClosed: make(chan struct{}),
abort: make(chan struct{}),
@@ -1364,25 +1318,7 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream))
donec: make(chan struct{}),
}
- // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
- if !cc.t.disableCompression() &&
- req.Header.Get("Accept-Encoding") == "" &&
- req.Header.Get("Range") == "" &&
- !cs.isHead {
- // Request gzip only, not deflate. Deflate is ambiguous and
- // not as universally supported anyway.
- // See: https://zlib.net/zlib_faq.html#faq39
- //
- // Note that we don't request this for HEAD requests,
- // due to a bug in nginx:
- // http://trac.nginx.org/nginx/ticket/358
- // https://golang.org/issue/5522
- //
- // We don't request gzip if the request is for a range, since
- // auto-decoding a portion of a gzipped document will just fail
- // anyway. See https://golang.org/issue/8923
- cs.requestedGzip = true
- }
+ cs.requestedGzip = httpcommon.IsRequestGzip(req, cc.t.disableCompression())
go cs.doRequest(req, streamf)
@@ -1413,7 +1349,7 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream))
}
res.Request = req
res.TLS = cc.tlsState
- if res.Body == noBody && actualContentLength(req) == 0 {
+ if res.Body == noBody && httpcommon.ActualContentLength(req) == 0 {
// If there isn't a request or response body still being
// written, then wait for the stream to be closed before
// RoundTrip returns.
@@ -1496,10 +1432,6 @@ func (cs *clientStream) writeRequest(req *http.Request, streamf func(*clientStre
cc := cs.cc
ctx := cs.ctx
- if err := checkConnHeaders(req); err != nil {
- return err
- }
-
// wait for setting frames to be received, a server can change this value later,
// but we just wait for the first settings frame
var isExtendedConnect bool
@@ -1663,20 +1595,22 @@ func (cs *clientStream) encodeAndWriteHeaders(req *http.Request) error {
// we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is
// sent by writeRequestBody below, along with any Trailers,
// again in form HEADERS{1}, CONTINUATION{0,})
- trailers, err := commaSeparatedTrailers(req)
- if err != nil {
- return err
- }
- hasTrailers := trailers != ""
- contentLen := actualContentLength(req)
- hasBody := contentLen != 0
- hdrs, err := cc.encodeHeaders(req, cs.requestedGzip, trailers, contentLen)
+ cc.hbuf.Reset()
+ res, err := httpcommon.EncodeHeaders(httpcommon.EncodeHeadersParam{
+ Request: req,
+ AddGzipHeader: cs.requestedGzip,
+ PeerMaxHeaderListSize: cc.peerMaxHeaderListSize,
+ DefaultUserAgent: defaultUserAgent,
+ }, func(name, value string) {
+ cc.writeHeader(name, value)
+ })
if err != nil {
- return err
+ return fmt.Errorf("http2: %w", err)
}
+ hdrs := cc.hbuf.Bytes()
// Write the request.
- endStream := !hasBody && !hasTrailers
+ endStream := !res.HasBody && !res.HasTrailers
cs.sentHeaders = true
err = cc.writeHeaders(cs.ID, endStream, int(cc.maxFrameSize), hdrs)
traceWroteHeaders(cs.trace)
@@ -2070,218 +2004,6 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
}
}
-func validateHeaders(hdrs http.Header) string {
- for k, vv := range hdrs {
- if !httpguts.ValidHeaderFieldName(k) && k != ":protocol" {
- return fmt.Sprintf("name %q", k)
- }
- for _, v := range vv {
- if !httpguts.ValidHeaderFieldValue(v) {
- // Don't include the value in the error,
- // because it may be sensitive.
- return fmt.Sprintf("value for header %q", k)
- }
- }
- }
- return ""
-}
-
-var errNilRequestURL = errors.New("http2: Request.URI is nil")
-
-func isNormalConnect(req *http.Request) bool {
- return req.Method == "CONNECT" && req.Header.Get(":protocol") == ""
-}
-
-// requires cc.wmu be held.
-func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trailers string, contentLength int64) ([]byte, error) {
- cc.hbuf.Reset()
- if req.URL == nil {
- return nil, errNilRequestURL
- }
-
- host := req.Host
- if host == "" {
- host = req.URL.Host
- }
- host, err := httpguts.PunycodeHostPort(host)
- if err != nil {
- return nil, err
- }
- if !httpguts.ValidHostHeader(host) {
- return nil, errors.New("http2: invalid Host header")
- }
-
- var path string
- if !isNormalConnect(req) {
- path = req.URL.RequestURI()
- if !validPseudoPath(path) {
- orig := path
- path = strings.TrimPrefix(path, req.URL.Scheme+"://"+host)
- if !validPseudoPath(path) {
- if req.URL.Opaque != "" {
- return nil, fmt.Errorf("invalid request :path %q from URL.Opaque = %q", orig, req.URL.Opaque)
- } else {
- return nil, fmt.Errorf("invalid request :path %q", orig)
- }
- }
- }
- }
-
- // Check for any invalid headers+trailers and return an error before we
- // potentially pollute our hpack state. (We want to be able to
- // continue to reuse the hpack encoder for future requests)
- if err := validateHeaders(req.Header); err != "" {
- return nil, fmt.Errorf("invalid HTTP header %s", err)
- }
- if err := validateHeaders(req.Trailer); err != "" {
- return nil, fmt.Errorf("invalid HTTP trailer %s", err)
- }
-
- enumerateHeaders := func(f func(name, value string)) {
- // 8.1.2.3 Request Pseudo-Header Fields
- // The :path pseudo-header field includes the path and query parts of the
- // target URI (the path-absolute production and optionally a '?' character
- // followed by the query production, see Sections 3.3 and 3.4 of
- // [RFC3986]).
- f(":authority", host)
- m := req.Method
- if m == "" {
- m = http.MethodGet
- }
- f(":method", m)
- if !isNormalConnect(req) {
- f(":path", path)
- f(":scheme", req.URL.Scheme)
- }
- if trailers != "" {
- f("trailer", trailers)
- }
-
- var didUA bool
- for k, vv := range req.Header {
- if asciiEqualFold(k, "host") || asciiEqualFold(k, "content-length") {
- // Host is :authority, already sent.
- // Content-Length is automatic, set below.
- continue
- } else if asciiEqualFold(k, "connection") ||
- asciiEqualFold(k, "proxy-connection") ||
- asciiEqualFold(k, "transfer-encoding") ||
- asciiEqualFold(k, "upgrade") ||
- asciiEqualFold(k, "keep-alive") {
- // Per 8.1.2.2 Connection-Specific Header
- // Fields, don't send connection-specific
- // fields. We have already checked if any
- // are error-worthy so just ignore the rest.
- continue
- } else if asciiEqualFold(k, "user-agent") {
- // Match Go's http1 behavior: at most one
- // User-Agent. If set to nil or empty string,
- // then omit it. Otherwise if not mentioned,
- // include the default (below).
- didUA = true
- if len(vv) < 1 {
- continue
- }
- vv = vv[:1]
- if vv[0] == "" {
- continue
- }
- } else if asciiEqualFold(k, "cookie") {
- // Per 8.1.2.5 To allow for better compression efficiency, the
- // Cookie header field MAY be split into separate header fields,
- // each with one or more cookie-pairs.
- for _, v := range vv {
- for {
- p := strings.IndexByte(v, ';')
- if p < 0 {
- break
- }
- f("cookie", v[:p])
- p++
- // strip space after semicolon if any.
- for p+1 <= len(v) && v[p] == ' ' {
- p++
- }
- v = v[p:]
- }
- if len(v) > 0 {
- f("cookie", v)
- }
- }
- continue
- }
-
- for _, v := range vv {
- f(k, v)
- }
- }
- if shouldSendReqContentLength(req.Method, contentLength) {
- f("content-length", strconv.FormatInt(contentLength, 10))
- }
- if addGzipHeader {
- f("accept-encoding", "gzip")
- }
- if !didUA {
- f("user-agent", defaultUserAgent)
- }
- }
-
- // Do a first pass over the headers counting bytes to ensure
- // we don't exceed cc.peerMaxHeaderListSize. This is done as a
- // separate pass before encoding the headers to prevent
- // modifying the hpack state.
- hlSize := uint64(0)
- enumerateHeaders(func(name, value string) {
- hf := hpack.HeaderField{Name: name, Value: value}
- hlSize += uint64(hf.Size())
- })
-
- if hlSize > cc.peerMaxHeaderListSize {
- return nil, errRequestHeaderListSize
- }
-
- trace := httptrace.ContextClientTrace(req.Context())
- traceHeaders := traceHasWroteHeaderField(trace)
-
- // Header list size is ok. Write the headers.
- enumerateHeaders(func(name, value string) {
- name, ascii := lowerHeader(name)
- if !ascii {
- // Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header
- // field names have to be ASCII characters (just as in HTTP/1.x).
- return
- }
- cc.writeHeader(name, value)
- if traceHeaders {
- traceWroteHeaderField(trace, name, value)
- }
- })
-
- return cc.hbuf.Bytes(), nil
-}
-
-// shouldSendReqContentLength reports whether the http2.Transport should send
-// a "content-length" request header. This logic is basically a copy of the net/http
-// transferWriter.shouldSendContentLength.
-// The contentLength is the corrected contentLength (so 0 means actually 0, not unknown).
-// -1 means unknown.
-func shouldSendReqContentLength(method string, contentLength int64) bool {
- if contentLength > 0 {
- return true
- }
- if contentLength < 0 {
- return false
- }
- // For zero bodies, whether we send a content-length depends on the method.
- // It also kinda doesn't matter for http2 either way, with END_STREAM.
- switch method {
- case "POST", "PUT", "PATCH":
- return true
- default:
- return false
- }
-}
-
// requires cc.wmu be held.
func (cc *ClientConn) encodeTrailers(trailer http.Header) ([]byte, error) {
cc.hbuf.Reset()
@@ -2298,7 +2020,7 @@ func (cc *ClientConn) encodeTrailers(trailer http.Header) ([]byte, error) {
}
for k, vv := range trailer {
- lowKey, ascii := lowerHeader(k)
+ lowKey, ascii := httpcommon.LowerHeader(k)
if !ascii {
// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header
// field names have to be ASCII characters (just as in HTTP/1.x).
@@ -2653,7 +2375,7 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
Status: status + " " + http.StatusText(statusCode),
}
for _, hf := range regularFields {
- key := canonicalHeader(hf.Name)
+ key := httpcommon.CanonicalHeader(hf.Name)
if key == "Trailer" {
t := res.Trailer
if t == nil {
@@ -2661,7 +2383,7 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
res.Trailer = t
}
foreachHeaderElement(hf.Value, func(v string) {
- t[canonicalHeader(v)] = nil
+ t[httpcommon.CanonicalHeader(v)] = nil
})
} else {
vv := header[key]
@@ -2785,7 +2507,7 @@ func (rl *clientConnReadLoop) processTrailers(cs *clientStream, f *MetaHeadersFr
trailer := make(http.Header)
for _, hf := range f.RegularFields() {
- key := canonicalHeader(hf.Name)
+ key := httpcommon.CanonicalHeader(hf.Name)
trailer[key] = append(trailer[key], hf.Value)
}
cs.trailer = trailer
@@ -3331,7 +3053,7 @@ func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, ping bool,
var (
errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit")
- errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit")
+ errRequestHeaderListSize = httpcommon.ErrRequestHeaderListSize
)
func (cc *ClientConn) logf(format string, args ...interface{}) {
@@ -3515,16 +3237,6 @@ func traceFirstResponseByte(trace *httptrace.ClientTrace) {
}
}
-func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool {
- return trace != nil && trace.WroteHeaderField != nil
-}
-
-func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) {
- if trace != nil && trace.WroteHeaderField != nil {
- trace.WroteHeaderField(k, []string{v})
- }
-}
-
func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error {
if trace != nil {
return trace.Got1xxResponse
diff --git a/vendor/golang.org/x/net/http2/write.go b/vendor/golang.org/x/net/http2/write.go
index 6ff6bee7..fdb35b94 100644
--- a/vendor/golang.org/x/net/http2/write.go
+++ b/vendor/golang.org/x/net/http2/write.go
@@ -13,6 +13,7 @@ import (
"golang.org/x/net/http/httpguts"
"golang.org/x/net/http2/hpack"
+ "golang.org/x/net/internal/httpcommon"
)
// writeFramer is implemented by any type that is used to write frames.
@@ -351,7 +352,7 @@ func encodeHeaders(enc *hpack.Encoder, h http.Header, keys []string) {
}
for _, k := range keys {
vv := h[k]
- k, ascii := lowerHeader(k)
+ k, ascii := httpcommon.LowerHeader(k)
if !ascii {
// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header
// field names have to be ASCII characters (just as in HTTP/1.x).
diff --git a/vendor/golang.org/x/net/internal/httpcommon/ascii.go b/vendor/golang.org/x/net/internal/httpcommon/ascii.go
new file mode 100644
index 00000000..ed14da5a
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/httpcommon/ascii.go
@@ -0,0 +1,53 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package httpcommon
+
+import "strings"
+
+// The HTTP protocols are defined in terms of ASCII, not Unicode. This file
+// contains helper functions which may use Unicode-aware functions which would
+// otherwise be unsafe and could introduce vulnerabilities if used improperly.
+
+// asciiEqualFold is strings.EqualFold, ASCII only. It reports whether s and t
+// are equal, ASCII-case-insensitively.
+func asciiEqualFold(s, t string) bool {
+ if len(s) != len(t) {
+ return false
+ }
+ for i := 0; i < len(s); i++ {
+ if lower(s[i]) != lower(t[i]) {
+ return false
+ }
+ }
+ return true
+}
+
+// lower returns the ASCII lowercase version of b.
+func lower(b byte) byte {
+ if 'A' <= b && b <= 'Z' {
+ return b + ('a' - 'A')
+ }
+ return b
+}
+
+// isASCIIPrint returns whether s is ASCII and printable according to
+// https://tools.ietf.org/html/rfc20#section-4.2.
+func isASCIIPrint(s string) bool {
+ for i := 0; i < len(s); i++ {
+ if s[i] < ' ' || s[i] > '~' {
+ return false
+ }
+ }
+ return true
+}
+
+// asciiToLower returns the lowercase version of s if s is ASCII and printable,
+// and whether or not it was.
+func asciiToLower(s string) (lower string, ok bool) {
+ if !isASCIIPrint(s) {
+ return "", false
+ }
+ return strings.ToLower(s), true
+}
diff --git a/vendor/golang.org/x/net/http2/headermap.go b/vendor/golang.org/x/net/internal/httpcommon/headermap.go
similarity index 77%
rename from vendor/golang.org/x/net/http2/headermap.go
rename to vendor/golang.org/x/net/internal/httpcommon/headermap.go
index 149b3dd2..ad3fbacd 100644
--- a/vendor/golang.org/x/net/http2/headermap.go
+++ b/vendor/golang.org/x/net/internal/httpcommon/headermap.go
@@ -1,8 +1,8 @@
-// Copyright 2014 The Go Authors. All rights reserved.
+// Copyright 2025 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package http2
+package httpcommon
import (
"net/http"
@@ -88,7 +88,9 @@ func buildCommonHeaderMaps() {
}
}
-func lowerHeader(v string) (lower string, ascii bool) {
+// LowerHeader returns the lowercase form of a header name,
+// used on the wire for HTTP/2 and HTTP/3 requests.
+func LowerHeader(v string) (lower string, ascii bool) {
buildCommonHeaderMapsOnce()
if s, ok := commonLowerHeader[v]; ok {
return s, true
@@ -96,10 +98,18 @@ func lowerHeader(v string) (lower string, ascii bool) {
return asciiToLower(v)
}
-func canonicalHeader(v string) string {
+// CanonicalHeader canonicalizes a header name. (For example, "host" becomes "Host".)
+func CanonicalHeader(v string) string {
buildCommonHeaderMapsOnce()
if s, ok := commonCanonHeader[v]; ok {
return s
}
return http.CanonicalHeaderKey(v)
}
+
+// CachedCanonicalHeader returns the canonical form of a well-known header name.
+func CachedCanonicalHeader(v string) (string, bool) {
+ buildCommonHeaderMapsOnce()
+ s, ok := commonCanonHeader[v]
+ return s, ok
+}
diff --git a/vendor/golang.org/x/net/internal/httpcommon/request.go b/vendor/golang.org/x/net/internal/httpcommon/request.go
new file mode 100644
index 00000000..34391477
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/httpcommon/request.go
@@ -0,0 +1,379 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package httpcommon
+
+import (
+ "errors"
+ "fmt"
+ "net/http"
+ "net/http/httptrace"
+ "sort"
+ "strconv"
+ "strings"
+
+ "golang.org/x/net/http/httpguts"
+ "golang.org/x/net/http2/hpack"
+)
+
+var (
+ ErrRequestHeaderListSize = errors.New("request header list larger than peer's advertised limit")
+)
+
+// EncodeHeadersParam is parameters to EncodeHeaders.
+type EncodeHeadersParam struct {
+ Request *http.Request
+
+ // AddGzipHeader indicates that an "accept-encoding: gzip" header should be
+ // added to the request.
+ AddGzipHeader bool
+
+ // PeerMaxHeaderListSize, when non-zero, is the peer's MAX_HEADER_LIST_SIZE setting.
+ PeerMaxHeaderListSize uint64
+
+ // DefaultUserAgent is the User-Agent header to send when the request
+ // neither contains a User-Agent nor disables it.
+ DefaultUserAgent string
+}
+
+// EncodeHeadersParam is the result of EncodeHeaders.
+type EncodeHeadersResult struct {
+ HasBody bool
+ HasTrailers bool
+}
+
+// EncodeHeaders constructs request headers common to HTTP/2 and HTTP/3.
+// It validates a request and calls headerf with each pseudo-header and header
+// for the request.
+// The headerf function is called with the validated, canonicalized header name.
+func EncodeHeaders(param EncodeHeadersParam, headerf func(name, value string)) (res EncodeHeadersResult, _ error) {
+ req := param.Request
+
+ // Check for invalid connection-level headers.
+ if err := checkConnHeaders(req); err != nil {
+ return res, err
+ }
+
+ if req.URL == nil {
+ return res, errors.New("Request.URL is nil")
+ }
+
+ host := req.Host
+ if host == "" {
+ host = req.URL.Host
+ }
+ host, err := httpguts.PunycodeHostPort(host)
+ if err != nil {
+ return res, err
+ }
+ if !httpguts.ValidHostHeader(host) {
+ return res, errors.New("invalid Host header")
+ }
+
+ // isNormalConnect is true if this is a non-extended CONNECT request.
+ isNormalConnect := false
+ protocol := req.Header.Get(":protocol")
+ if req.Method == "CONNECT" && protocol == "" {
+ isNormalConnect = true
+ } else if protocol != "" && req.Method != "CONNECT" {
+ return res, errors.New("invalid :protocol header in non-CONNECT request")
+ }
+
+ // Validate the path, except for non-extended CONNECT requests which have no path.
+ var path string
+ if !isNormalConnect {
+ path = req.URL.RequestURI()
+ if !validPseudoPath(path) {
+ orig := path
+ path = strings.TrimPrefix(path, req.URL.Scheme+"://"+host)
+ if !validPseudoPath(path) {
+ if req.URL.Opaque != "" {
+ return res, fmt.Errorf("invalid request :path %q from URL.Opaque = %q", orig, req.URL.Opaque)
+ } else {
+ return res, fmt.Errorf("invalid request :path %q", orig)
+ }
+ }
+ }
+ }
+
+ // Check for any invalid headers+trailers and return an error before we
+ // potentially pollute our hpack state. (We want to be able to
+ // continue to reuse the hpack encoder for future requests)
+ if err := validateHeaders(req.Header); err != "" {
+ return res, fmt.Errorf("invalid HTTP header %s", err)
+ }
+ if err := validateHeaders(req.Trailer); err != "" {
+ return res, fmt.Errorf("invalid HTTP trailer %s", err)
+ }
+
+ contentLength := ActualContentLength(req)
+
+ trailers, err := commaSeparatedTrailers(req)
+ if err != nil {
+ return res, err
+ }
+
+ enumerateHeaders := func(f func(name, value string)) {
+ // 8.1.2.3 Request Pseudo-Header Fields
+ // The :path pseudo-header field includes the path and query parts of the
+ // target URI (the path-absolute production and optionally a '?' character
+ // followed by the query production, see Sections 3.3 and 3.4 of
+ // [RFC3986]).
+ f(":authority", host)
+ m := req.Method
+ if m == "" {
+ m = http.MethodGet
+ }
+ f(":method", m)
+ if !isNormalConnect {
+ f(":path", path)
+ f(":scheme", req.URL.Scheme)
+ }
+ if protocol != "" {
+ f(":protocol", protocol)
+ }
+ if trailers != "" {
+ f("trailer", trailers)
+ }
+
+ var didUA bool
+ for k, vv := range req.Header {
+ if asciiEqualFold(k, "host") || asciiEqualFold(k, "content-length") {
+ // Host is :authority, already sent.
+ // Content-Length is automatic, set below.
+ continue
+ } else if asciiEqualFold(k, "connection") ||
+ asciiEqualFold(k, "proxy-connection") ||
+ asciiEqualFold(k, "transfer-encoding") ||
+ asciiEqualFold(k, "upgrade") ||
+ asciiEqualFold(k, "keep-alive") {
+ // Per 8.1.2.2 Connection-Specific Header
+ // Fields, don't send connection-specific
+ // fields. We have already checked if any
+ // are error-worthy so just ignore the rest.
+ continue
+ } else if asciiEqualFold(k, "user-agent") {
+ // Match Go's http1 behavior: at most one
+ // User-Agent. If set to nil or empty string,
+ // then omit it. Otherwise if not mentioned,
+ // include the default (below).
+ didUA = true
+ if len(vv) < 1 {
+ continue
+ }
+ vv = vv[:1]
+ if vv[0] == "" {
+ continue
+ }
+ } else if asciiEqualFold(k, "cookie") {
+ // Per 8.1.2.5 To allow for better compression efficiency, the
+ // Cookie header field MAY be split into separate header fields,
+ // each with one or more cookie-pairs.
+ for _, v := range vv {
+ for {
+ p := strings.IndexByte(v, ';')
+ if p < 0 {
+ break
+ }
+ f("cookie", v[:p])
+ p++
+ // strip space after semicolon if any.
+ for p+1 <= len(v) && v[p] == ' ' {
+ p++
+ }
+ v = v[p:]
+ }
+ if len(v) > 0 {
+ f("cookie", v)
+ }
+ }
+ continue
+ } else if k == ":protocol" {
+ // :protocol pseudo-header was already sent above.
+ continue
+ }
+
+ for _, v := range vv {
+ f(k, v)
+ }
+ }
+ if shouldSendReqContentLength(req.Method, contentLength) {
+ f("content-length", strconv.FormatInt(contentLength, 10))
+ }
+ if param.AddGzipHeader {
+ f("accept-encoding", "gzip")
+ }
+ if !didUA {
+ f("user-agent", param.DefaultUserAgent)
+ }
+ }
+
+ // Do a first pass over the headers counting bytes to ensure
+ // we don't exceed cc.peerMaxHeaderListSize. This is done as a
+ // separate pass before encoding the headers to prevent
+ // modifying the hpack state.
+ if param.PeerMaxHeaderListSize > 0 {
+ hlSize := uint64(0)
+ enumerateHeaders(func(name, value string) {
+ hf := hpack.HeaderField{Name: name, Value: value}
+ hlSize += uint64(hf.Size())
+ })
+
+ if hlSize > param.PeerMaxHeaderListSize {
+ return res, ErrRequestHeaderListSize
+ }
+ }
+
+ trace := httptrace.ContextClientTrace(req.Context())
+
+ // Header list size is ok. Write the headers.
+ enumerateHeaders(func(name, value string) {
+ name, ascii := LowerHeader(name)
+ if !ascii {
+ // Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header
+ // field names have to be ASCII characters (just as in HTTP/1.x).
+ return
+ }
+
+ headerf(name, value)
+
+ if trace != nil && trace.WroteHeaderField != nil {
+ trace.WroteHeaderField(name, []string{value})
+ }
+ })
+
+ res.HasBody = contentLength != 0
+ res.HasTrailers = trailers != ""
+ return res, nil
+}
+
+// IsRequestGzip reports whether we should add an Accept-Encoding: gzip header
+// for a request.
+func IsRequestGzip(req *http.Request, disableCompression bool) bool {
+ // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
+ if !disableCompression &&
+ req.Header.Get("Accept-Encoding") == "" &&
+ req.Header.Get("Range") == "" &&
+ req.Method != "HEAD" {
+ // Request gzip only, not deflate. Deflate is ambiguous and
+ // not as universally supported anyway.
+ // See: https://zlib.net/zlib_faq.html#faq39
+ //
+ // Note that we don't request this for HEAD requests,
+ // due to a bug in nginx:
+ // http://trac.nginx.org/nginx/ticket/358
+ // https://golang.org/issue/5522
+ //
+ // We don't request gzip if the request is for a range, since
+ // auto-decoding a portion of a gzipped document will just fail
+ // anyway. See https://golang.org/issue/8923
+ return true
+ }
+ return false
+}
+
+// checkConnHeaders checks whether req has any invalid connection-level headers.
+//
+// https://www.rfc-editor.org/rfc/rfc9114.html#section-4.2-3
+// https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.2-1
+//
+// Certain headers are special-cased as okay but not transmitted later.
+// For example, we allow "Transfer-Encoding: chunked", but drop the header when encoding.
+func checkConnHeaders(req *http.Request) error {
+ if v := req.Header.Get("Upgrade"); v != "" {
+ return fmt.Errorf("invalid Upgrade request header: %q", req.Header["Upgrade"])
+ }
+ if vv := req.Header["Transfer-Encoding"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && vv[0] != "chunked") {
+ return fmt.Errorf("invalid Transfer-Encoding request header: %q", vv)
+ }
+ if vv := req.Header["Connection"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && !asciiEqualFold(vv[0], "close") && !asciiEqualFold(vv[0], "keep-alive")) {
+ return fmt.Errorf("invalid Connection request header: %q", vv)
+ }
+ return nil
+}
+
+func commaSeparatedTrailers(req *http.Request) (string, error) {
+ keys := make([]string, 0, len(req.Trailer))
+ for k := range req.Trailer {
+ k = CanonicalHeader(k)
+ switch k {
+ case "Transfer-Encoding", "Trailer", "Content-Length":
+ return "", fmt.Errorf("invalid Trailer key %q", k)
+ }
+ keys = append(keys, k)
+ }
+ if len(keys) > 0 {
+ sort.Strings(keys)
+ return strings.Join(keys, ","), nil
+ }
+ return "", nil
+}
+
+// ActualContentLength returns a sanitized version of
+// req.ContentLength, where 0 actually means zero (not unknown) and -1
+// means unknown.
+func ActualContentLength(req *http.Request) int64 {
+ if req.Body == nil || req.Body == http.NoBody {
+ return 0
+ }
+ if req.ContentLength != 0 {
+ return req.ContentLength
+ }
+ return -1
+}
+
+// validPseudoPath reports whether v is a valid :path pseudo-header
+// value. It must be either:
+//
+// - a non-empty string starting with '/'
+// - the string '*', for OPTIONS requests.
+//
+// For now this is only used a quick check for deciding when to clean
+// up Opaque URLs before sending requests from the Transport.
+// See golang.org/issue/16847
+//
+// We used to enforce that the path also didn't start with "//", but
+// Google's GFE accepts such paths and Chrome sends them, so ignore
+// that part of the spec. See golang.org/issue/19103.
+func validPseudoPath(v string) bool {
+ return (len(v) > 0 && v[0] == '/') || v == "*"
+}
+
+func validateHeaders(hdrs http.Header) string {
+ for k, vv := range hdrs {
+ if !httpguts.ValidHeaderFieldName(k) && k != ":protocol" {
+ return fmt.Sprintf("name %q", k)
+ }
+ for _, v := range vv {
+ if !httpguts.ValidHeaderFieldValue(v) {
+ // Don't include the value in the error,
+ // because it may be sensitive.
+ return fmt.Sprintf("value for header %q", k)
+ }
+ }
+ }
+ return ""
+}
+
+// shouldSendReqContentLength reports whether we should send
+// a "content-length" request header. This logic is basically a copy of the net/http
+// transferWriter.shouldSendContentLength.
+// The contentLength is the corrected contentLength (so 0 means actually 0, not unknown).
+// -1 means unknown.
+func shouldSendReqContentLength(method string, contentLength int64) bool {
+ if contentLength > 0 {
+ return true
+ }
+ if contentLength < 0 {
+ return false
+ }
+ // For zero bodies, whether we send a content-length depends on the method.
+ // It also kinda doesn't matter for http2 either way, with END_STREAM.
+ switch method {
+ case "POST", "PUT", "PATCH":
+ return true
+ default:
+ return false
+ }
+}
diff --git a/vendor/golang.org/x/sync/singleflight/singleflight.go b/vendor/golang.org/x/sync/singleflight/singleflight.go
new file mode 100644
index 00000000..40518309
--- /dev/null
+++ b/vendor/golang.org/x/sync/singleflight/singleflight.go
@@ -0,0 +1,214 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package singleflight provides a duplicate function call suppression
+// mechanism.
+package singleflight // import "golang.org/x/sync/singleflight"
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "runtime"
+ "runtime/debug"
+ "sync"
+)
+
+// errGoexit indicates the runtime.Goexit was called in
+// the user given function.
+var errGoexit = errors.New("runtime.Goexit was called")
+
+// A panicError is an arbitrary value recovered from a panic
+// with the stack trace during the execution of given function.
+type panicError struct {
+ value interface{}
+ stack []byte
+}
+
+// Error implements error interface.
+func (p *panicError) Error() string {
+ return fmt.Sprintf("%v\n\n%s", p.value, p.stack)
+}
+
+func (p *panicError) Unwrap() error {
+ err, ok := p.value.(error)
+ if !ok {
+ return nil
+ }
+
+ return err
+}
+
+func newPanicError(v interface{}) error {
+ stack := debug.Stack()
+
+ // The first line of the stack trace is of the form "goroutine N [status]:"
+ // but by the time the panic reaches Do the goroutine may no longer exist
+ // and its status will have changed. Trim out the misleading line.
+ if line := bytes.IndexByte(stack[:], '\n'); line >= 0 {
+ stack = stack[line+1:]
+ }
+ return &panicError{value: v, stack: stack}
+}
+
+// call is an in-flight or completed singleflight.Do call
+type call struct {
+ wg sync.WaitGroup
+
+ // These fields are written once before the WaitGroup is done
+ // and are only read after the WaitGroup is done.
+ val interface{}
+ err error
+
+ // These fields are read and written with the singleflight
+ // mutex held before the WaitGroup is done, and are read but
+ // not written after the WaitGroup is done.
+ dups int
+ chans []chan<- Result
+}
+
+// Group represents a class of work and forms a namespace in
+// which units of work can be executed with duplicate suppression.
+type Group struct {
+ mu sync.Mutex // protects m
+ m map[string]*call // lazily initialized
+}
+
+// Result holds the results of Do, so they can be passed
+// on a channel.
+type Result struct {
+ Val interface{}
+ Err error
+ Shared bool
+}
+
+// Do executes and returns the results of the given function, making
+// sure that only one execution is in-flight for a given key at a
+// time. If a duplicate comes in, the duplicate caller waits for the
+// original to complete and receives the same results.
+// The return value shared indicates whether v was given to multiple callers.
+func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) {
+ g.mu.Lock()
+ if g.m == nil {
+ g.m = make(map[string]*call)
+ }
+ if c, ok := g.m[key]; ok {
+ c.dups++
+ g.mu.Unlock()
+ c.wg.Wait()
+
+ if e, ok := c.err.(*panicError); ok {
+ panic(e)
+ } else if c.err == errGoexit {
+ runtime.Goexit()
+ }
+ return c.val, c.err, true
+ }
+ c := new(call)
+ c.wg.Add(1)
+ g.m[key] = c
+ g.mu.Unlock()
+
+ g.doCall(c, key, fn)
+ return c.val, c.err, c.dups > 0
+}
+
+// DoChan is like Do but returns a channel that will receive the
+// results when they are ready.
+//
+// The returned channel will not be closed.
+func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result {
+ ch := make(chan Result, 1)
+ g.mu.Lock()
+ if g.m == nil {
+ g.m = make(map[string]*call)
+ }
+ if c, ok := g.m[key]; ok {
+ c.dups++
+ c.chans = append(c.chans, ch)
+ g.mu.Unlock()
+ return ch
+ }
+ c := &call{chans: []chan<- Result{ch}}
+ c.wg.Add(1)
+ g.m[key] = c
+ g.mu.Unlock()
+
+ go g.doCall(c, key, fn)
+
+ return ch
+}
+
+// doCall handles the single call for a key.
+func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) {
+ normalReturn := false
+ recovered := false
+
+ // use double-defer to distinguish panic from runtime.Goexit,
+ // more details see https://golang.org/cl/134395
+ defer func() {
+ // the given function invoked runtime.Goexit
+ if !normalReturn && !recovered {
+ c.err = errGoexit
+ }
+
+ g.mu.Lock()
+ defer g.mu.Unlock()
+ c.wg.Done()
+ if g.m[key] == c {
+ delete(g.m, key)
+ }
+
+ if e, ok := c.err.(*panicError); ok {
+ // In order to prevent the waiting channels from being blocked forever,
+ // needs to ensure that this panic cannot be recovered.
+ if len(c.chans) > 0 {
+ go panic(e)
+ select {} // Keep this goroutine around so that it will appear in the crash dump.
+ } else {
+ panic(e)
+ }
+ } else if c.err == errGoexit {
+ // Already in the process of goexit, no need to call again
+ } else {
+ // Normal return
+ for _, ch := range c.chans {
+ ch <- Result{c.val, c.err, c.dups > 0}
+ }
+ }
+ }()
+
+ func() {
+ defer func() {
+ if !normalReturn {
+ // Ideally, we would wait to take a stack trace until we've determined
+ // whether this is a panic or a runtime.Goexit.
+ //
+ // Unfortunately, the only way we can distinguish the two is to see
+ // whether the recover stopped the goroutine from terminating, and by
+ // the time we know that, the part of the stack trace relevant to the
+ // panic has been discarded.
+ if r := recover(); r != nil {
+ c.err = newPanicError(r)
+ }
+ }
+ }()
+
+ c.val, c.err = fn()
+ normalReturn = true
+ }()
+
+ if !normalReturn {
+ recovered = true
+ }
+}
+
+// Forget tells the singleflight to forget about a key. Future calls
+// to Do for this key will call the function rather than waiting for
+// an earlier call to complete.
+func (g *Group) Forget(key string) {
+ g.mu.Lock()
+ delete(g.m, key)
+ g.mu.Unlock()
+}
diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go
index 02609d5b..9c105f23 100644
--- a/vendor/golang.org/x/sys/cpu/cpu.go
+++ b/vendor/golang.org/x/sys/cpu/cpu.go
@@ -72,6 +72,9 @@ var X86 struct {
HasSSSE3 bool // Supplemental streaming SIMD extension 3
HasSSE41 bool // Streaming SIMD extension 4 and 4.1
HasSSE42 bool // Streaming SIMD extension 4 and 4.2
+ HasAVXIFMA bool // Advanced vector extension Integer Fused Multiply Add
+ HasAVXVNNI bool // Advanced vector extension Vector Neural Network Instructions
+ HasAVXVNNIInt8 bool // Advanced vector extension Vector Neural Network Int8 instructions
_ CacheLinePad
}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.go b/vendor/golang.org/x/sys/cpu/cpu_x86.go
index 600a6807..1e642f33 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_x86.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_x86.go
@@ -53,6 +53,9 @@ func initOptions() {
{Name: "sse41", Feature: &X86.HasSSE41},
{Name: "sse42", Feature: &X86.HasSSE42},
{Name: "ssse3", Feature: &X86.HasSSSE3},
+ {Name: "avxifma", Feature: &X86.HasAVXIFMA},
+ {Name: "avxvnni", Feature: &X86.HasAVXVNNI},
+ {Name: "avxvnniint8", Feature: &X86.HasAVXVNNIInt8},
// These capabilities should always be enabled on amd64:
{Name: "sse2", Feature: &X86.HasSSE2, Required: runtime.GOARCH == "amd64"},
@@ -106,7 +109,7 @@ func archInit() {
return
}
- _, ebx7, ecx7, edx7 := cpuid(7, 0)
+ eax7, ebx7, ecx7, edx7 := cpuid(7, 0)
X86.HasBMI1 = isSet(3, ebx7)
X86.HasAVX2 = isSet(5, ebx7) && osSupportsAVX
X86.HasBMI2 = isSet(8, ebx7)
@@ -134,14 +137,24 @@ func archInit() {
X86.HasAVX512VAES = isSet(9, ecx7)
X86.HasAVX512VBMI2 = isSet(6, ecx7)
X86.HasAVX512BITALG = isSet(12, ecx7)
-
- eax71, _, _, _ := cpuid(7, 1)
- X86.HasAVX512BF16 = isSet(5, eax71)
}
X86.HasAMXTile = isSet(24, edx7)
X86.HasAMXInt8 = isSet(25, edx7)
X86.HasAMXBF16 = isSet(22, edx7)
+
+ // These features depend on the second level of extended features.
+ if eax7 >= 1 {
+ eax71, _, _, edx71 := cpuid(7, 1)
+ if X86.HasAVX512 {
+ X86.HasAVX512BF16 = isSet(5, eax71)
+ }
+ if X86.HasAVX {
+ X86.HasAVXIFMA = isSet(23, eax71)
+ X86.HasAVXVNNI = isSet(4, eax71)
+ X86.HasAVXVNNIInt8 = isSet(4, edx71)
+ }
+ }
}
func isSet(bitpos uint, value uint32) bool {
diff --git a/vendor/golang.org/x/sys/unix/auxv.go b/vendor/golang.org/x/sys/unix/auxv.go
new file mode 100644
index 00000000..37a82528
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/auxv.go
@@ -0,0 +1,36 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos)
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+//go:linkname runtime_getAuxv runtime.getAuxv
+func runtime_getAuxv() []uintptr
+
+// Auxv returns the ELF auxiliary vector as a sequence of key/value pairs.
+// The returned slice is always a fresh copy, owned by the caller.
+// It returns an error on non-ELF platforms, or if the auxiliary vector cannot be accessed,
+// which happens in some locked-down environments and build modes.
+func Auxv() ([][2]uintptr, error) {
+ vec := runtime_getAuxv()
+ vecLen := len(vec)
+
+ if vecLen == 0 {
+ return nil, syscall.ENOENT
+ }
+
+ if vecLen%2 != 0 {
+ return nil, syscall.EINVAL
+ }
+
+ result := make([]uintptr, vecLen)
+ copy(result, vec)
+ return unsafe.Slice((*[2]uintptr)(unsafe.Pointer(&result[0])), vecLen/2), nil
+}
diff --git a/vendor/golang.org/x/sys/unix/auxv_unsupported.go b/vendor/golang.org/x/sys/unix/auxv_unsupported.go
new file mode 100644
index 00000000..1200487f
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/auxv_unsupported.go
@@ -0,0 +1,13 @@
+// Copyright 2025 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos)
+
+package unix
+
+import "syscall"
+
+func Auxv() ([][2]uintptr, error) {
+ return nil, syscall.ENOTSUP
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
index 21974af0..abc39554 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -1102,3 +1102,90 @@ func (s *Strioctl) SetInt(i int) {
func IoctlSetStrioctlRetInt(fd int, req int, s *Strioctl) (int, error) {
return ioctlPtrRet(fd, req, unsafe.Pointer(s))
}
+
+// Ucred Helpers
+// See ucred(3c) and getpeerucred(3c)
+
+//sys getpeerucred(fd uintptr, ucred *uintptr) (err error)
+//sys ucredFree(ucred uintptr) = ucred_free
+//sys ucredGet(pid int) (ucred uintptr, err error) = ucred_get
+//sys ucredGeteuid(ucred uintptr) (uid int) = ucred_geteuid
+//sys ucredGetegid(ucred uintptr) (gid int) = ucred_getegid
+//sys ucredGetruid(ucred uintptr) (uid int) = ucred_getruid
+//sys ucredGetrgid(ucred uintptr) (gid int) = ucred_getrgid
+//sys ucredGetsuid(ucred uintptr) (uid int) = ucred_getsuid
+//sys ucredGetsgid(ucred uintptr) (gid int) = ucred_getsgid
+//sys ucredGetpid(ucred uintptr) (pid int) = ucred_getpid
+
+// Ucred is an opaque struct that holds user credentials.
+type Ucred struct {
+ ucred uintptr
+}
+
+// We need to ensure that ucredFree is called on the underlying ucred
+// when the Ucred is garbage collected.
+func ucredFinalizer(u *Ucred) {
+ ucredFree(u.ucred)
+}
+
+func GetPeerUcred(fd uintptr) (*Ucred, error) {
+ var ucred uintptr
+ err := getpeerucred(fd, &ucred)
+ if err != nil {
+ return nil, err
+ }
+ result := &Ucred{
+ ucred: ucred,
+ }
+ // set the finalizer on the result so that the ucred will be freed
+ runtime.SetFinalizer(result, ucredFinalizer)
+ return result, nil
+}
+
+func UcredGet(pid int) (*Ucred, error) {
+ ucred, err := ucredGet(pid)
+ if err != nil {
+ return nil, err
+ }
+ result := &Ucred{
+ ucred: ucred,
+ }
+ // set the finalizer on the result so that the ucred will be freed
+ runtime.SetFinalizer(result, ucredFinalizer)
+ return result, nil
+}
+
+func (u *Ucred) Geteuid() int {
+ defer runtime.KeepAlive(u)
+ return ucredGeteuid(u.ucred)
+}
+
+func (u *Ucred) Getruid() int {
+ defer runtime.KeepAlive(u)
+ return ucredGetruid(u.ucred)
+}
+
+func (u *Ucred) Getsuid() int {
+ defer runtime.KeepAlive(u)
+ return ucredGetsuid(u.ucred)
+}
+
+func (u *Ucred) Getegid() int {
+ defer runtime.KeepAlive(u)
+ return ucredGetegid(u.ucred)
+}
+
+func (u *Ucred) Getrgid() int {
+ defer runtime.KeepAlive(u)
+ return ucredGetrgid(u.ucred)
+}
+
+func (u *Ucred) Getsgid() int {
+ defer runtime.KeepAlive(u)
+ return ucredGetsgid(u.ucred)
+}
+
+func (u *Ucred) Getpid() int {
+ defer runtime.KeepAlive(u)
+ return ucredGetpid(u.ucred)
+}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
index 6ebc48b3..4f432bfe 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -1245,6 +1245,7 @@ const (
FAN_REPORT_DFID_NAME = 0xc00
FAN_REPORT_DFID_NAME_TARGET = 0x1e00
FAN_REPORT_DIR_FID = 0x400
+ FAN_REPORT_FD_ERROR = 0x2000
FAN_REPORT_FID = 0x200
FAN_REPORT_NAME = 0x800
FAN_REPORT_PIDFD = 0x80
@@ -1330,8 +1331,10 @@ const (
FUSE_SUPER_MAGIC = 0x65735546
FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409
+ F_CREATED_QUERY = 0x404
F_DUPFD = 0x0
F_DUPFD_CLOEXEC = 0x406
+ F_DUPFD_QUERY = 0x403
F_EXLCK = 0x4
F_GETFD = 0x1
F_GETFL = 0x3
@@ -1551,6 +1554,7 @@ const (
IPPROTO_ROUTING = 0x2b
IPPROTO_RSVP = 0x2e
IPPROTO_SCTP = 0x84
+ IPPROTO_SMC = 0x100
IPPROTO_TCP = 0x6
IPPROTO_TP = 0x1d
IPPROTO_UDP = 0x11
@@ -1623,6 +1627,8 @@ const (
IPV6_UNICAST_IF = 0x4c
IPV6_USER_FLOW = 0xe
IPV6_V6ONLY = 0x1a
+ IPV6_VERSION = 0x60
+ IPV6_VERSION_MASK = 0xf0
IPV6_XFRM_POLICY = 0x23
IP_ADD_MEMBERSHIP = 0x23
IP_ADD_SOURCE_MEMBERSHIP = 0x27
@@ -1867,6 +1873,7 @@ const (
MADV_UNMERGEABLE = 0xd
MADV_WILLNEED = 0x3
MADV_WIPEONFORK = 0x12
+ MAP_DROPPABLE = 0x8
MAP_FILE = 0x0
MAP_FIXED = 0x10
MAP_FIXED_NOREPLACE = 0x100000
@@ -1967,6 +1974,7 @@ const (
MSG_PEEK = 0x2
MSG_PROXY = 0x10
MSG_RST = 0x1000
+ MSG_SOCK_DEVMEM = 0x2000000
MSG_SYN = 0x400
MSG_TRUNC = 0x20
MSG_TRYHARD = 0x4
@@ -2083,6 +2091,7 @@ const (
NFC_ATR_REQ_MAXSIZE = 0x40
NFC_ATR_RES_GB_MAXSIZE = 0x2f
NFC_ATR_RES_MAXSIZE = 0x40
+ NFC_ATS_MAXSIZE = 0x14
NFC_COMM_ACTIVE = 0x0
NFC_COMM_PASSIVE = 0x1
NFC_DEVICE_NAME_MAXSIZE = 0x8
@@ -2163,6 +2172,7 @@ const (
NFNL_SUBSYS_QUEUE = 0x3
NFNL_SUBSYS_ULOG = 0x4
NFS_SUPER_MAGIC = 0x6969
+ NFT_BITWISE_BOOL = 0x0
NFT_CHAIN_FLAGS = 0x7
NFT_CHAIN_MAXNAMELEN = 0x100
NFT_CT_MAX = 0x17
@@ -2491,6 +2501,7 @@ const (
PR_GET_PDEATHSIG = 0x2
PR_GET_SECCOMP = 0x15
PR_GET_SECUREBITS = 0x1b
+ PR_GET_SHADOW_STACK_STATUS = 0x4a
PR_GET_SPECULATION_CTRL = 0x34
PR_GET_TAGGED_ADDR_CTRL = 0x38
PR_GET_THP_DISABLE = 0x2a
@@ -2499,6 +2510,7 @@ const (
PR_GET_TIMING = 0xd
PR_GET_TSC = 0x19
PR_GET_UNALIGN = 0x5
+ PR_LOCK_SHADOW_STACK_STATUS = 0x4c
PR_MCE_KILL = 0x21
PR_MCE_KILL_CLEAR = 0x0
PR_MCE_KILL_DEFAULT = 0x2
@@ -2525,6 +2537,8 @@ const (
PR_PAC_GET_ENABLED_KEYS = 0x3d
PR_PAC_RESET_KEYS = 0x36
PR_PAC_SET_ENABLED_KEYS = 0x3c
+ PR_PMLEN_MASK = 0x7f000000
+ PR_PMLEN_SHIFT = 0x18
PR_PPC_DEXCR_CTRL_CLEAR = 0x4
PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC = 0x10
PR_PPC_DEXCR_CTRL_EDITABLE = 0x1
@@ -2592,6 +2606,7 @@ const (
PR_SET_PTRACER = 0x59616d61
PR_SET_SECCOMP = 0x16
PR_SET_SECUREBITS = 0x1c
+ PR_SET_SHADOW_STACK_STATUS = 0x4b
PR_SET_SPECULATION_CTRL = 0x35
PR_SET_SYSCALL_USER_DISPATCH = 0x3b
PR_SET_TAGGED_ADDR_CTRL = 0x37
@@ -2602,6 +2617,9 @@ const (
PR_SET_UNALIGN = 0x6
PR_SET_VMA = 0x53564d41
PR_SET_VMA_ANON_NAME = 0x0
+ PR_SHADOW_STACK_ENABLE = 0x1
+ PR_SHADOW_STACK_PUSH = 0x4
+ PR_SHADOW_STACK_WRITE = 0x2
PR_SME_GET_VL = 0x40
PR_SME_SET_VL = 0x3f
PR_SME_SET_VL_ONEXEC = 0x40000
@@ -2911,7 +2929,6 @@ const (
RTM_NEWNEXTHOP = 0x68
RTM_NEWNEXTHOPBUCKET = 0x74
RTM_NEWNSID = 0x58
- RTM_NEWNVLAN = 0x70
RTM_NEWPREFIX = 0x34
RTM_NEWQDISC = 0x24
RTM_NEWROUTE = 0x18
@@ -2920,6 +2937,7 @@ const (
RTM_NEWTCLASS = 0x28
RTM_NEWTFILTER = 0x2c
RTM_NEWTUNNEL = 0x78
+ RTM_NEWVLAN = 0x70
RTM_NR_FAMILIES = 0x1b
RTM_NR_MSGTYPES = 0x6c
RTM_SETDCB = 0x4f
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index c0d45e32..75207613 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -116,6 +116,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x800
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -304,6 +306,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index c731d24f..c68acda5 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -116,6 +116,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x800
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -305,6 +307,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index 680018a4..a8c607ab 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -115,6 +115,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x800
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -310,6 +312,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index a63909f3..18563dd8 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -109,6 +109,7 @@ const (
F_SETOWN = 0x8
F_UNLCK = 0x2
F_WRLCK = 0x1
+ GCS_MAGIC = 0x47435300
HIDIOCGRAWINFO = 0x80084803
HIDIOCGRDESC = 0x90044802
HIDIOCGRDESCSIZE = 0x80044801
@@ -119,6 +120,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x800
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -302,6 +305,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
index 9b0a2573..22912cda 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
@@ -116,6 +116,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x800
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -297,6 +299,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index 958e6e06..29344eb3 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -115,6 +115,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x80
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ IPV6_FLOWINFO_MASK = 0xfffffff
+ IPV6_FLOWLABEL_MASK = 0xfffff
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -303,6 +305,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index 50c7f25b..20d51fb9 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -115,6 +115,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x80
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ IPV6_FLOWINFO_MASK = 0xfffffff
+ IPV6_FLOWLABEL_MASK = 0xfffff
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -303,6 +305,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index ced21d66..321b6090 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -115,6 +115,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x80
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -303,6 +305,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index 226c0441..9bacdf1e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -115,6 +115,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x80
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -303,6 +305,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
index 3122737c..c2242726 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
@@ -115,6 +115,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x800
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ IPV6_FLOWINFO_MASK = 0xfffffff
+ IPV6_FLOWLABEL_MASK = 0xfffff
ISIG = 0x80
IUCLC = 0x1000
IXOFF = 0x400
@@ -358,6 +360,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index eb5d3467..6270c8ee 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -115,6 +115,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x800
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ IPV6_FLOWINFO_MASK = 0xfffffff
+ IPV6_FLOWLABEL_MASK = 0xfffff
ISIG = 0x80
IUCLC = 0x1000
IXOFF = 0x400
@@ -362,6 +364,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index e921ebc6..9966c194 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -115,6 +115,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x800
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
ISIG = 0x80
IUCLC = 0x1000
IXOFF = 0x400
@@ -362,6 +364,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
index 38ba81c5..848e5fcc 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -115,6 +115,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x800
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -294,6 +296,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index 71f04009..669b2adb 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -115,6 +115,8 @@ const (
IN_CLOEXEC = 0x80000
IN_NONBLOCK = 0x800
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ IPV6_FLOWINFO_MASK = 0xfffffff
+ IPV6_FLOWLABEL_MASK = 0xfffff
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -366,6 +368,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x36
SCM_TIMESTAMPING_PKTINFO = 0x3a
SCM_TIMESTAMPNS = 0x23
+ SCM_TS_OPT_ID = 0x51
SCM_TXTIME = 0x3d
SCM_WIFI_STATUS = 0x29
SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index c44a3133..4834e575 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -119,6 +119,8 @@ const (
IN_CLOEXEC = 0x400000
IN_NONBLOCK = 0x4000
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ IPV6_FLOWINFO_MASK = 0xfffffff
+ IPV6_FLOWLABEL_MASK = 0xfffff
ISIG = 0x1
IUCLC = 0x200
IXOFF = 0x1000
@@ -357,6 +359,7 @@ const (
SCM_TIMESTAMPING_OPT_STATS = 0x38
SCM_TIMESTAMPING_PKTINFO = 0x3c
SCM_TIMESTAMPNS = 0x21
+ SCM_TS_OPT_ID = 0x5a
SCM_TXTIME = 0x3f
SCM_WIFI_STATUS = 0x25
SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index 829b87fe..c6545413 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -141,6 +141,16 @@ import (
//go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
+//go:cgo_import_dynamic libc_getpeerucred getpeerucred "libc.so"
+//go:cgo_import_dynamic libc_ucred_get ucred_get "libc.so"
+//go:cgo_import_dynamic libc_ucred_geteuid ucred_geteuid "libc.so"
+//go:cgo_import_dynamic libc_ucred_getegid ucred_getegid "libc.so"
+//go:cgo_import_dynamic libc_ucred_getruid ucred_getruid "libc.so"
+//go:cgo_import_dynamic libc_ucred_getrgid ucred_getrgid "libc.so"
+//go:cgo_import_dynamic libc_ucred_getsuid ucred_getsuid "libc.so"
+//go:cgo_import_dynamic libc_ucred_getsgid ucred_getsgid "libc.so"
+//go:cgo_import_dynamic libc_ucred_getpid ucred_getpid "libc.so"
+//go:cgo_import_dynamic libc_ucred_free ucred_free "libc.so"
//go:cgo_import_dynamic libc_port_create port_create "libc.so"
//go:cgo_import_dynamic libc_port_associate port_associate "libc.so"
//go:cgo_import_dynamic libc_port_dissociate port_dissociate "libc.so"
@@ -280,6 +290,16 @@ import (
//go:linkname procgetpeername libc_getpeername
//go:linkname procsetsockopt libc_setsockopt
//go:linkname procrecvfrom libc_recvfrom
+//go:linkname procgetpeerucred libc_getpeerucred
+//go:linkname procucred_get libc_ucred_get
+//go:linkname procucred_geteuid libc_ucred_geteuid
+//go:linkname procucred_getegid libc_ucred_getegid
+//go:linkname procucred_getruid libc_ucred_getruid
+//go:linkname procucred_getrgid libc_ucred_getrgid
+//go:linkname procucred_getsuid libc_ucred_getsuid
+//go:linkname procucred_getsgid libc_ucred_getsgid
+//go:linkname procucred_getpid libc_ucred_getpid
+//go:linkname procucred_free libc_ucred_free
//go:linkname procport_create libc_port_create
//go:linkname procport_associate libc_port_associate
//go:linkname procport_dissociate libc_port_dissociate
@@ -420,6 +440,16 @@ var (
procgetpeername,
procsetsockopt,
procrecvfrom,
+ procgetpeerucred,
+ procucred_get,
+ procucred_geteuid,
+ procucred_getegid,
+ procucred_getruid,
+ procucred_getrgid,
+ procucred_getsuid,
+ procucred_getsgid,
+ procucred_getpid,
+ procucred_free,
procport_create,
procport_associate,
procport_dissociate,
@@ -2029,6 +2059,90 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func getpeerucred(fd uintptr, ucred *uintptr) (err error) {
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetpeerucred)), 2, uintptr(fd), uintptr(unsafe.Pointer(ucred)), 0, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ucredGet(pid int) (ucred uintptr, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procucred_get)), 1, uintptr(pid), 0, 0, 0, 0, 0)
+ ucred = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ucredGeteuid(ucred uintptr) (uid int) {
+ r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_geteuid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ucredGetegid(ucred uintptr) (gid int) {
+ r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getegid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ucredGetruid(ucred uintptr) (uid int) {
+ r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getruid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ucredGetrgid(ucred uintptr) (gid int) {
+ r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getrgid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ucredGetsuid(ucred uintptr) (uid int) {
+ r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getsuid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ucredGetsgid(ucred uintptr) (gid int) {
+ r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getsgid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ucredGetpid(ucred uintptr) (pid int) {
+ r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procucred_getpid)), 1, uintptr(ucred), 0, 0, 0, 0, 0)
+ pid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ucredFree(ucred uintptr) {
+ sysvicall6(uintptr(unsafe.Pointer(&procucred_free)), 1, uintptr(ucred), 0, 0, 0, 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func port_create() (n int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_create)), 0, 0, 0, 0, 0, 0, 0)
n = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index 524b0820..c79aaff3 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
@@ -458,4 +458,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
SYS_MSEAL = 462
+ SYS_SETXATTRAT = 463
+ SYS_GETXATTRAT = 464
+ SYS_LISTXATTRAT = 465
+ SYS_REMOVEXATTRAT = 466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index f485dbf4..5eb45069 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
@@ -381,4 +381,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
SYS_MSEAL = 462
+ SYS_SETXATTRAT = 463
+ SYS_GETXATTRAT = 464
+ SYS_LISTXATTRAT = 465
+ SYS_REMOVEXATTRAT = 466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index 70b35bf3..05e50297 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
@@ -422,4 +422,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
SYS_MSEAL = 462
+ SYS_SETXATTRAT = 463
+ SYS_GETXATTRAT = 464
+ SYS_LISTXATTRAT = 465
+ SYS_REMOVEXATTRAT = 466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index 1893e2fe..38c53ec5 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
@@ -325,4 +325,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
SYS_MSEAL = 462
+ SYS_SETXATTRAT = 463
+ SYS_GETXATTRAT = 464
+ SYS_LISTXATTRAT = 465
+ SYS_REMOVEXATTRAT = 466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
index 16a4017d..31d2e71a 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
@@ -321,4 +321,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
SYS_MSEAL = 462
+ SYS_SETXATTRAT = 463
+ SYS_GETXATTRAT = 464
+ SYS_LISTXATTRAT = 465
+ SYS_REMOVEXATTRAT = 466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
index 7e567f1e..f4184a33 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
@@ -442,4 +442,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 4460
SYS_LSM_LIST_MODULES = 4461
SYS_MSEAL = 4462
+ SYS_SETXATTRAT = 4463
+ SYS_GETXATTRAT = 4464
+ SYS_LISTXATTRAT = 4465
+ SYS_REMOVEXATTRAT = 4466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index 38ae55e5..05b99622 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
@@ -372,4 +372,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 5460
SYS_LSM_LIST_MODULES = 5461
SYS_MSEAL = 5462
+ SYS_SETXATTRAT = 5463
+ SYS_GETXATTRAT = 5464
+ SYS_LISTXATTRAT = 5465
+ SYS_REMOVEXATTRAT = 5466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index 55e92e60..43a256e9 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
@@ -372,4 +372,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 5460
SYS_LSM_LIST_MODULES = 5461
SYS_MSEAL = 5462
+ SYS_SETXATTRAT = 5463
+ SYS_GETXATTRAT = 5464
+ SYS_LISTXATTRAT = 5465
+ SYS_REMOVEXATTRAT = 5466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
index 60658d6a..eea5ddfc 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
@@ -442,4 +442,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 4460
SYS_LSM_LIST_MODULES = 4461
SYS_MSEAL = 4462
+ SYS_SETXATTRAT = 4463
+ SYS_GETXATTRAT = 4464
+ SYS_LISTXATTRAT = 4465
+ SYS_REMOVEXATTRAT = 4466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
index e203e8a7..0d777bfb 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
@@ -449,4 +449,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
SYS_MSEAL = 462
+ SYS_SETXATTRAT = 463
+ SYS_GETXATTRAT = 464
+ SYS_LISTXATTRAT = 465
+ SYS_REMOVEXATTRAT = 466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index 5944b97d..b4463650 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
@@ -421,4 +421,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
SYS_MSEAL = 462
+ SYS_SETXATTRAT = 463
+ SYS_GETXATTRAT = 464
+ SYS_LISTXATTRAT = 465
+ SYS_REMOVEXATTRAT = 466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index c66d416d..0c7d21c1 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
@@ -421,4 +421,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
SYS_MSEAL = 462
+ SYS_SETXATTRAT = 463
+ SYS_GETXATTRAT = 464
+ SYS_LISTXATTRAT = 465
+ SYS_REMOVEXATTRAT = 466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
index a5459e76..84053916 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -326,4 +326,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
SYS_MSEAL = 462
+ SYS_SETXATTRAT = 463
+ SYS_GETXATTRAT = 464
+ SYS_LISTXATTRAT = 465
+ SYS_REMOVEXATTRAT = 466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index 01d86825..fcf1b790 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
@@ -387,4 +387,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
SYS_MSEAL = 462
+ SYS_SETXATTRAT = 463
+ SYS_GETXATTRAT = 464
+ SYS_LISTXATTRAT = 465
+ SYS_REMOVEXATTRAT = 466
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
index 7b703e77..52d15b5f 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -400,4 +400,8 @@ const (
SYS_LSM_SET_SELF_ATTR = 460
SYS_LSM_LIST_MODULES = 461
SYS_MSEAL = 462
+ SYS_SETXATTRAT = 463
+ SYS_GETXATTRAT = 464
+ SYS_LISTXATTRAT = 465
+ SYS_REMOVEXATTRAT = 466
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go
index 5537148d..a46abe64 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -4747,7 +4747,7 @@ const (
NL80211_ATTR_MAC_HINT = 0xc8
NL80211_ATTR_MAC_MASK = 0xd7
NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
- NL80211_ATTR_MAX = 0x14c
+ NL80211_ATTR_MAX = 0x14d
NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
NL80211_ATTR_MAX_MATCH_SETS = 0x85
@@ -5519,7 +5519,7 @@ const (
NL80211_MNTR_FLAG_CONTROL = 0x3
NL80211_MNTR_FLAG_COOK_FRAMES = 0x5
NL80211_MNTR_FLAG_FCSFAIL = 0x1
- NL80211_MNTR_FLAG_MAX = 0x6
+ NL80211_MNTR_FLAG_MAX = 0x7
NL80211_MNTR_FLAG_OTHER_BSS = 0x4
NL80211_MNTR_FLAG_PLCPFAIL = 0x2
NL80211_MPATH_FLAG_ACTIVE = 0x1
@@ -6174,3 +6174,5 @@ type SockDiagReq struct {
Family uint8
Protocol uint8
}
+
+const RTM_NEWNVLAN = 0x70
diff --git a/vendor/google.golang.org/genproto/googleapis/api/LICENSE b/vendor/google.golang.org/genproto/googleapis/api/LICENSE
new file mode 100644
index 00000000..d6456956
--- /dev/null
+++ b/vendor/google.golang.org/genproto/googleapis/api/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go b/vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go
new file mode 100644
index 00000000..f388426b
--- /dev/null
+++ b/vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go
@@ -0,0 +1,235 @@
+// Copyright 2024 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v4.24.4
+// source: google/api/httpbody.proto
+
+package httpbody
+
+import (
+ reflect "reflect"
+ sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Message that represents an arbitrary HTTP body. It should only be used for
+// payload formats that can't be represented as JSON, such as raw binary or
+// an HTML page.
+//
+// This message can be used both in streaming and non-streaming API methods in
+// the request as well as the response.
+//
+// It can be used as a top-level request field, which is convenient if one
+// wants to extract parameters from either the URL or HTTP template into the
+// request fields and also want access to the raw HTTP body.
+//
+// Example:
+//
+// message GetResourceRequest {
+// // A unique request id.
+// string request_id = 1;
+//
+// // The raw HTTP body is bound to this field.
+// google.api.HttpBody http_body = 2;
+//
+// }
+//
+// service ResourceService {
+// rpc GetResource(GetResourceRequest)
+// returns (google.api.HttpBody);
+// rpc UpdateResource(google.api.HttpBody)
+// returns (google.protobuf.Empty);
+//
+// }
+//
+// Example with streaming methods:
+//
+// service CaldavService {
+// rpc GetCalendar(stream google.api.HttpBody)
+// returns (stream google.api.HttpBody);
+// rpc UpdateCalendar(stream google.api.HttpBody)
+// returns (stream google.api.HttpBody);
+//
+// }
+//
+// Use of this type only changes how the request and response bodies are
+// handled, all other features will continue to work unchanged.
+type HttpBody struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The HTTP Content-Type header value specifying the content type of the body.
+ ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
+ // The HTTP request/response body as raw binary.
+ Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+ // Application specific response metadata. Must be set in the first response
+ // for streaming APIs.
+ Extensions []*anypb.Any `protobuf:"bytes,3,rep,name=extensions,proto3" json:"extensions,omitempty"`
+}
+
+func (x *HttpBody) Reset() {
+ *x = HttpBody{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_api_httpbody_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HttpBody) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HttpBody) ProtoMessage() {}
+
+func (x *HttpBody) ProtoReflect() protoreflect.Message {
+ mi := &file_google_api_httpbody_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HttpBody.ProtoReflect.Descriptor instead.
+func (*HttpBody) Descriptor() ([]byte, []int) {
+ return file_google_api_httpbody_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *HttpBody) GetContentType() string {
+ if x != nil {
+ return x.ContentType
+ }
+ return ""
+}
+
+func (x *HttpBody) GetData() []byte {
+ if x != nil {
+ return x.Data
+ }
+ return nil
+}
+
+func (x *HttpBody) GetExtensions() []*anypb.Any {
+ if x != nil {
+ return x.Extensions
+ }
+ return nil
+}
+
+var File_google_api_httpbody_proto protoreflect.FileDescriptor
+
+var file_google_api_httpbody_proto_rawDesc = []byte{
+ 0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74,
+ 0x70, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21,
+ 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
+ 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
+ 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x65, 0x0a, 0x0e, 0x63,
+ 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0d, 0x48,
+ 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72,
+ 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f,
+ 0x64, 0x79, 0x3b, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f, 0x64, 0x79, 0xa2, 0x02, 0x04, 0x47, 0x41,
+ 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_google_api_httpbody_proto_rawDescOnce sync.Once
+ file_google_api_httpbody_proto_rawDescData = file_google_api_httpbody_proto_rawDesc
+)
+
+func file_google_api_httpbody_proto_rawDescGZIP() []byte {
+ file_google_api_httpbody_proto_rawDescOnce.Do(func() {
+ file_google_api_httpbody_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_httpbody_proto_rawDescData)
+ })
+ return file_google_api_httpbody_proto_rawDescData
+}
+
+var file_google_api_httpbody_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_google_api_httpbody_proto_goTypes = []interface{}{
+ (*HttpBody)(nil), // 0: google.api.HttpBody
+ (*anypb.Any)(nil), // 1: google.protobuf.Any
+}
+var file_google_api_httpbody_proto_depIdxs = []int32{
+ 1, // 0: google.api.HttpBody.extensions:type_name -> google.protobuf.Any
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_google_api_httpbody_proto_init() }
+func file_google_api_httpbody_proto_init() {
+ if File_google_api_httpbody_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_google_api_httpbody_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpBody); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_google_api_httpbody_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_google_api_httpbody_proto_goTypes,
+ DependencyIndexes: file_google_api_httpbody_proto_depIdxs,
+ MessageInfos: file_google_api_httpbody_proto_msgTypes,
+ }.Build()
+ File_google_api_httpbody_proto = out.File
+ file_google_api_httpbody_proto_rawDesc = nil
+ file_google_api_httpbody_proto_goTypes = nil
+ file_google_api_httpbody_proto_depIdxs = nil
+}
diff --git a/vendor/google.golang.org/genproto/googleapis/rpc/errdetails/error_details.pb.go b/vendor/google.golang.org/genproto/googleapis/rpc/errdetails/error_details.pb.go
new file mode 100644
index 00000000..3cd9a5bb
--- /dev/null
+++ b/vendor/google.golang.org/genproto/googleapis/rpc/errdetails/error_details.pb.go
@@ -0,0 +1,1346 @@
+// Copyright 2024 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v4.24.4
+// source: google/rpc/error_details.proto
+
+package errdetails
+
+import (
+ reflect "reflect"
+ sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Describes the cause of the error with structured details.
+//
+// Example of an error when contacting the "pubsub.googleapis.com" API when it
+// is not enabled:
+//
+// { "reason": "API_DISABLED"
+// "domain": "googleapis.com"
+// "metadata": {
+// "resource": "projects/123",
+// "service": "pubsub.googleapis.com"
+// }
+// }
+//
+// This response indicates that the pubsub.googleapis.com API is not enabled.
+//
+// Example of an error that is returned when attempting to create a Spanner
+// instance in a region that is out of stock:
+//
+// { "reason": "STOCKOUT"
+// "domain": "spanner.googleapis.com",
+// "metadata": {
+// "availableRegions": "us-central1,us-east2"
+// }
+// }
+type ErrorInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The reason of the error. This is a constant value that identifies the
+ // proximate cause of the error. Error reasons are unique within a particular
+ // domain of errors. This should be at most 63 characters and match a
+ // regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents
+ // UPPER_SNAKE_CASE.
+ Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"`
+ // The logical grouping to which the "reason" belongs. The error domain
+ // is typically the registered service name of the tool or product that
+ // generates the error. Example: "pubsub.googleapis.com". If the error is
+ // generated by some common infrastructure, the error domain must be a
+ // globally unique value that identifies the infrastructure. For Google API
+ // infrastructure, the error domain is "googleapis.com".
+ Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
+ // Additional structured details about this error.
+ //
+ // Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should
+ // ideally be lowerCamelCase. Also, they must be limited to 64 characters in
+ // length. When identifying the current value of an exceeded limit, the units
+ // should be contained in the key, not the value. For example, rather than
+ // `{"instanceLimit": "100/request"}`, should be returned as,
+ // `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of
+ // instances that can be created in a single (batch) request.
+ Metadata map[string]string `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (x *ErrorInfo) Reset() {
+ *x = ErrorInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ErrorInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ErrorInfo) ProtoMessage() {}
+
+func (x *ErrorInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ErrorInfo.ProtoReflect.Descriptor instead.
+func (*ErrorInfo) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ErrorInfo) GetReason() string {
+ if x != nil {
+ return x.Reason
+ }
+ return ""
+}
+
+func (x *ErrorInfo) GetDomain() string {
+ if x != nil {
+ return x.Domain
+ }
+ return ""
+}
+
+func (x *ErrorInfo) GetMetadata() map[string]string {
+ if x != nil {
+ return x.Metadata
+ }
+ return nil
+}
+
+// Describes when the clients can retry a failed request. Clients could ignore
+// the recommendation here or retry when this information is missing from error
+// responses.
+//
+// It's always recommended that clients should use exponential backoff when
+// retrying.
+//
+// Clients should wait until `retry_delay` amount of time has passed since
+// receiving the error response before retrying. If retrying requests also
+// fail, clients should use an exponential backoff scheme to gradually increase
+// the delay between retries based on `retry_delay`, until either a maximum
+// number of retries have been reached or a maximum retry delay cap has been
+// reached.
+type RetryInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Clients should wait at least this long between retrying the same request.
+ RetryDelay *durationpb.Duration `protobuf:"bytes,1,opt,name=retry_delay,json=retryDelay,proto3" json:"retry_delay,omitempty"`
+}
+
+func (x *RetryInfo) Reset() {
+ *x = RetryInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RetryInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RetryInfo) ProtoMessage() {}
+
+func (x *RetryInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RetryInfo.ProtoReflect.Descriptor instead.
+func (*RetryInfo) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *RetryInfo) GetRetryDelay() *durationpb.Duration {
+ if x != nil {
+ return x.RetryDelay
+ }
+ return nil
+}
+
+// Describes additional debugging info.
+type DebugInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The stack trace entries indicating where the error occurred.
+ StackEntries []string `protobuf:"bytes,1,rep,name=stack_entries,json=stackEntries,proto3" json:"stack_entries,omitempty"`
+ // Additional debugging information provided by the server.
+ Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"`
+}
+
+func (x *DebugInfo) Reset() {
+ *x = DebugInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DebugInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DebugInfo) ProtoMessage() {}
+
+func (x *DebugInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DebugInfo.ProtoReflect.Descriptor instead.
+func (*DebugInfo) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *DebugInfo) GetStackEntries() []string {
+ if x != nil {
+ return x.StackEntries
+ }
+ return nil
+}
+
+func (x *DebugInfo) GetDetail() string {
+ if x != nil {
+ return x.Detail
+ }
+ return ""
+}
+
+// Describes how a quota check failed.
+//
+// For example if a daily limit was exceeded for the calling project,
+// a service could respond with a QuotaFailure detail containing the project
+// id and the description of the quota limit that was exceeded. If the
+// calling project hasn't enabled the service in the developer console, then
+// a service could respond with the project id and set `service_disabled`
+// to true.
+//
+// Also see RetryInfo and Help types for other details about handling a
+// quota failure.
+type QuotaFailure struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Describes all quota violations.
+ Violations []*QuotaFailure_Violation `protobuf:"bytes,1,rep,name=violations,proto3" json:"violations,omitempty"`
+}
+
+func (x *QuotaFailure) Reset() {
+ *x = QuotaFailure{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *QuotaFailure) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*QuotaFailure) ProtoMessage() {}
+
+func (x *QuotaFailure) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use QuotaFailure.ProtoReflect.Descriptor instead.
+func (*QuotaFailure) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *QuotaFailure) GetViolations() []*QuotaFailure_Violation {
+ if x != nil {
+ return x.Violations
+ }
+ return nil
+}
+
+// Describes what preconditions have failed.
+//
+// For example, if an RPC failed because it required the Terms of Service to be
+// acknowledged, it could list the terms of service violation in the
+// PreconditionFailure message.
+type PreconditionFailure struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Describes all precondition violations.
+ Violations []*PreconditionFailure_Violation `protobuf:"bytes,1,rep,name=violations,proto3" json:"violations,omitempty"`
+}
+
+func (x *PreconditionFailure) Reset() {
+ *x = PreconditionFailure{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PreconditionFailure) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PreconditionFailure) ProtoMessage() {}
+
+func (x *PreconditionFailure) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PreconditionFailure.ProtoReflect.Descriptor instead.
+func (*PreconditionFailure) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *PreconditionFailure) GetViolations() []*PreconditionFailure_Violation {
+ if x != nil {
+ return x.Violations
+ }
+ return nil
+}
+
+// Describes violations in a client request. This error type focuses on the
+// syntactic aspects of the request.
+type BadRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Describes all violations in a client request.
+ FieldViolations []*BadRequest_FieldViolation `protobuf:"bytes,1,rep,name=field_violations,json=fieldViolations,proto3" json:"field_violations,omitempty"`
+}
+
+func (x *BadRequest) Reset() {
+ *x = BadRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BadRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BadRequest) ProtoMessage() {}
+
+func (x *BadRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BadRequest.ProtoReflect.Descriptor instead.
+func (*BadRequest) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *BadRequest) GetFieldViolations() []*BadRequest_FieldViolation {
+ if x != nil {
+ return x.FieldViolations
+ }
+ return nil
+}
+
+// Contains metadata about the request that clients can attach when filing a bug
+// or providing other forms of feedback.
+type RequestInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // An opaque string that should only be interpreted by the service generating
+ // it. For example, it can be used to identify requests in the service's logs.
+ RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
+ // Any data that was used to serve this request. For example, an encrypted
+ // stack trace that can be sent back to the service provider for debugging.
+ ServingData string `protobuf:"bytes,2,opt,name=serving_data,json=servingData,proto3" json:"serving_data,omitempty"`
+}
+
+func (x *RequestInfo) Reset() {
+ *x = RequestInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RequestInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RequestInfo) ProtoMessage() {}
+
+func (x *RequestInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RequestInfo.ProtoReflect.Descriptor instead.
+func (*RequestInfo) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *RequestInfo) GetRequestId() string {
+ if x != nil {
+ return x.RequestId
+ }
+ return ""
+}
+
+func (x *RequestInfo) GetServingData() string {
+ if x != nil {
+ return x.ServingData
+ }
+ return ""
+}
+
+// Describes the resource that is being accessed.
+type ResourceInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A name for the type of resource being accessed, e.g. "sql table",
+ // "cloud storage bucket", "file", "Google calendar"; or the type URL
+ // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
+ ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
+ // The name of the resource being accessed. For example, a shared calendar
+ // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
+ // error is
+ // [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
+ ResourceName string `protobuf:"bytes,2,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
+ // The owner of the resource (optional).
+ // For example, "user:" or "project:".
+ Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
+ // Describes what error is encountered when accessing this resource.
+ // For example, updating a cloud project may require the `writer` permission
+ // on the developer console project.
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+}
+
+func (x *ResourceInfo) Reset() {
+ *x = ResourceInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ResourceInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceInfo) ProtoMessage() {}
+
+func (x *ResourceInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceInfo.ProtoReflect.Descriptor instead.
+func (*ResourceInfo) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *ResourceInfo) GetResourceType() string {
+ if x != nil {
+ return x.ResourceType
+ }
+ return ""
+}
+
+func (x *ResourceInfo) GetResourceName() string {
+ if x != nil {
+ return x.ResourceName
+ }
+ return ""
+}
+
+func (x *ResourceInfo) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *ResourceInfo) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+// Provides links to documentation or for performing an out of band action.
+//
+// For example, if a quota check failed with an error indicating the calling
+// project hasn't enabled the accessed service, this can contain a URL pointing
+// directly to the right place in the developer console to flip the bit.
+type Help struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // URL(s) pointing to additional information on handling the current error.
+ Links []*Help_Link `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"`
+}
+
+func (x *Help) Reset() {
+ *x = Help{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Help) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Help) ProtoMessage() {}
+
+func (x *Help) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Help.ProtoReflect.Descriptor instead.
+func (*Help) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *Help) GetLinks() []*Help_Link {
+ if x != nil {
+ return x.Links
+ }
+ return nil
+}
+
+// Provides a localized error message that is safe to return to the user
+// which can be attached to an RPC error.
+type LocalizedMessage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The locale used following the specification defined at
+ // https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
+ // Examples are: "en-US", "fr-CH", "es-MX"
+ Locale string `protobuf:"bytes,1,opt,name=locale,proto3" json:"locale,omitempty"`
+ // The localized error message in the above locale.
+ Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
+}
+
+func (x *LocalizedMessage) Reset() {
+ *x = LocalizedMessage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LocalizedMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LocalizedMessage) ProtoMessage() {}
+
+func (x *LocalizedMessage) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LocalizedMessage.ProtoReflect.Descriptor instead.
+func (*LocalizedMessage) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *LocalizedMessage) GetLocale() string {
+ if x != nil {
+ return x.Locale
+ }
+ return ""
+}
+
+func (x *LocalizedMessage) GetMessage() string {
+ if x != nil {
+ return x.Message
+ }
+ return ""
+}
+
+// A message type used to describe a single quota violation. For example, a
+// daily quota or a custom quota that was exceeded.
+type QuotaFailure_Violation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The subject on which the quota check failed.
+ // For example, "clientip:" or "project:".
+ Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
+ // A description of how the quota check failed. Clients can use this
+ // description to find more about the quota configuration in the service's
+ // public documentation, or find the relevant quota limit to adjust through
+ // developer console.
+ //
+ // For example: "Service disabled" or "Daily Limit for read operations
+ // exceeded".
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+}
+
+func (x *QuotaFailure_Violation) Reset() {
+ *x = QuotaFailure_Violation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *QuotaFailure_Violation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*QuotaFailure_Violation) ProtoMessage() {}
+
+func (x *QuotaFailure_Violation) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use QuotaFailure_Violation.ProtoReflect.Descriptor instead.
+func (*QuotaFailure_Violation) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{3, 0}
+}
+
+func (x *QuotaFailure_Violation) GetSubject() string {
+ if x != nil {
+ return x.Subject
+ }
+ return ""
+}
+
+func (x *QuotaFailure_Violation) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+// A message type used to describe a single precondition failure.
+type PreconditionFailure_Violation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The type of PreconditionFailure. We recommend using a service-specific
+ // enum type to define the supported precondition violation subjects. For
+ // example, "TOS" for "Terms of Service violation".
+ Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
+ // The subject, relative to the type, that failed.
+ // For example, "google.com/cloud" relative to the "TOS" type would indicate
+ // which terms of service is being referenced.
+ Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
+ // A description of how the precondition failed. Developers can use this
+ // description to understand how to fix the failure.
+ //
+ // For example: "Terms of service not accepted".
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
+}
+
+func (x *PreconditionFailure_Violation) Reset() {
+ *x = PreconditionFailure_Violation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PreconditionFailure_Violation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PreconditionFailure_Violation) ProtoMessage() {}
+
+func (x *PreconditionFailure_Violation) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PreconditionFailure_Violation.ProtoReflect.Descriptor instead.
+func (*PreconditionFailure_Violation) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{4, 0}
+}
+
+func (x *PreconditionFailure_Violation) GetType() string {
+ if x != nil {
+ return x.Type
+ }
+ return ""
+}
+
+func (x *PreconditionFailure_Violation) GetSubject() string {
+ if x != nil {
+ return x.Subject
+ }
+ return ""
+}
+
+func (x *PreconditionFailure_Violation) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+// A message type used to describe a single bad request field.
+type BadRequest_FieldViolation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A path that leads to a field in the request body. The value will be a
+ // sequence of dot-separated identifiers that identify a protocol buffer
+ // field.
+ //
+ // Consider the following:
+ //
+ // message CreateContactRequest {
+ // message EmailAddress {
+ // enum Type {
+ // TYPE_UNSPECIFIED = 0;
+ // HOME = 1;
+ // WORK = 2;
+ // }
+ //
+ // optional string email = 1;
+ // repeated EmailType type = 2;
+ // }
+ //
+ // string full_name = 1;
+ // repeated EmailAddress email_addresses = 2;
+ // }
+ //
+ // In this example, in proto `field` could take one of the following values:
+ //
+ // - `full_name` for a violation in the `full_name` value
+ // - `email_addresses[1].email` for a violation in the `email` field of the
+ // first `email_addresses` message
+ // - `email_addresses[3].type[2]` for a violation in the second `type`
+ // value in the third `email_addresses` message.
+ //
+ // In JSON, the same values are represented as:
+ //
+ // - `fullName` for a violation in the `fullName` value
+ // - `emailAddresses[1].email` for a violation in the `email` field of the
+ // first `emailAddresses` message
+ // - `emailAddresses[3].type[2]` for a violation in the second `type`
+ // value in the third `emailAddresses` message.
+ Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
+ // A description of why the request element is bad.
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ // The reason of the field-level error. This is a constant value that
+ // identifies the proximate cause of the field-level error. It should
+ // uniquely identify the type of the FieldViolation within the scope of the
+ // google.rpc.ErrorInfo.domain. This should be at most 63
+ // characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`,
+ // which represents UPPER_SNAKE_CASE.
+ Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
+ // Provides a localized error message for field-level errors that is safe to
+ // return to the API consumer.
+ LocalizedMessage *LocalizedMessage `protobuf:"bytes,4,opt,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"`
+}
+
+func (x *BadRequest_FieldViolation) Reset() {
+ *x = BadRequest_FieldViolation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BadRequest_FieldViolation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BadRequest_FieldViolation) ProtoMessage() {}
+
+func (x *BadRequest_FieldViolation) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[13]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BadRequest_FieldViolation.ProtoReflect.Descriptor instead.
+func (*BadRequest_FieldViolation) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{5, 0}
+}
+
+func (x *BadRequest_FieldViolation) GetField() string {
+ if x != nil {
+ return x.Field
+ }
+ return ""
+}
+
+func (x *BadRequest_FieldViolation) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *BadRequest_FieldViolation) GetReason() string {
+ if x != nil {
+ return x.Reason
+ }
+ return ""
+}
+
+func (x *BadRequest_FieldViolation) GetLocalizedMessage() *LocalizedMessage {
+ if x != nil {
+ return x.LocalizedMessage
+ }
+ return nil
+}
+
+// Describes a URL link.
+type Help_Link struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Describes what the link offers.
+ Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
+ // The URL of the link.
+ Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
+}
+
+func (x *Help_Link) Reset() {
+ *x = Help_Link{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_rpc_error_details_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Help_Link) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Help_Link) ProtoMessage() {}
+
+func (x *Help_Link) ProtoReflect() protoreflect.Message {
+ mi := &file_google_rpc_error_details_proto_msgTypes[14]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Help_Link.ProtoReflect.Descriptor instead.
+func (*Help_Link) Descriptor() ([]byte, []int) {
+ return file_google_rpc_error_details_proto_rawDescGZIP(), []int{8, 0}
+}
+
+func (x *Help_Link) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Help_Link) GetUrl() string {
+ if x != nil {
+ return x.Url
+ }
+ return ""
+}
+
+var File_google_rpc_error_details_proto protoreflect.FileDescriptor
+
+var file_google_rpc_error_details_proto_rawDesc = []byte{
+ 0x0a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72,
+ 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x1e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x01, 0x0a,
+ 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65,
+ 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73,
+ 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49,
+ 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
+ 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
+ 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x47, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x72,
+ 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x64,
+ 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x61,
+ 0x79, 0x22, 0x48, 0x0a, 0x09, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23,
+ 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72,
+ 0x69, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0x9b, 0x01, 0x0a, 0x0c,
+ 0x51, 0x75, 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x42, 0x0a, 0x0a,
+ 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75,
+ 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x2e, 0x56, 0x69, 0x6f, 0x6c, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x1a, 0x47, 0x0a, 0x09, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a,
+ 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+ 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbd, 0x01, 0x0a, 0x13, 0x50, 0x72,
+ 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72,
+ 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72,
+ 0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46,
+ 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x2e, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x52, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x5b, 0x0a, 0x09,
+ 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a,
+ 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+ 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8c, 0x02, 0x0a, 0x0a, 0x42, 0x61,
+ 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x10, 0x66, 0x69, 0x65, 0x6c,
+ 0x64, 0x5f, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e,
+ 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,
+ 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xab, 0x01, 0x0a, 0x0e, 0x46,
+ 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a,
+ 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69,
+ 0x65, 0x6c, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x49, 0x0a,
+ 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65,
+ 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x4f, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e,
+ 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65,
+ 0x72, 0x76, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x22, 0x90, 0x01, 0x0a, 0x0c, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
+ 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x04,
+ 0x48, 0x65, 0x6c, 0x70, 0x12, 0x2b, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63,
+ 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b,
+ 0x73, 0x1a, 0x3a, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
+ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75,
+ 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x44, 0x0a,
+ 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x42, 0x6c, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x11, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61,
+ 0x69, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65,
+ 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69,
+ 0x73, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,
+ 0x3b, 0x65, 0x72, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0xa2, 0x02, 0x03, 0x52, 0x50,
+ 0x43, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_google_rpc_error_details_proto_rawDescOnce sync.Once
+ file_google_rpc_error_details_proto_rawDescData = file_google_rpc_error_details_proto_rawDesc
+)
+
+func file_google_rpc_error_details_proto_rawDescGZIP() []byte {
+ file_google_rpc_error_details_proto_rawDescOnce.Do(func() {
+ file_google_rpc_error_details_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_rpc_error_details_proto_rawDescData)
+ })
+ return file_google_rpc_error_details_proto_rawDescData
+}
+
+var file_google_rpc_error_details_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
+var file_google_rpc_error_details_proto_goTypes = []interface{}{
+ (*ErrorInfo)(nil), // 0: google.rpc.ErrorInfo
+ (*RetryInfo)(nil), // 1: google.rpc.RetryInfo
+ (*DebugInfo)(nil), // 2: google.rpc.DebugInfo
+ (*QuotaFailure)(nil), // 3: google.rpc.QuotaFailure
+ (*PreconditionFailure)(nil), // 4: google.rpc.PreconditionFailure
+ (*BadRequest)(nil), // 5: google.rpc.BadRequest
+ (*RequestInfo)(nil), // 6: google.rpc.RequestInfo
+ (*ResourceInfo)(nil), // 7: google.rpc.ResourceInfo
+ (*Help)(nil), // 8: google.rpc.Help
+ (*LocalizedMessage)(nil), // 9: google.rpc.LocalizedMessage
+ nil, // 10: google.rpc.ErrorInfo.MetadataEntry
+ (*QuotaFailure_Violation)(nil), // 11: google.rpc.QuotaFailure.Violation
+ (*PreconditionFailure_Violation)(nil), // 12: google.rpc.PreconditionFailure.Violation
+ (*BadRequest_FieldViolation)(nil), // 13: google.rpc.BadRequest.FieldViolation
+ (*Help_Link)(nil), // 14: google.rpc.Help.Link
+ (*durationpb.Duration)(nil), // 15: google.protobuf.Duration
+}
+var file_google_rpc_error_details_proto_depIdxs = []int32{
+ 10, // 0: google.rpc.ErrorInfo.metadata:type_name -> google.rpc.ErrorInfo.MetadataEntry
+ 15, // 1: google.rpc.RetryInfo.retry_delay:type_name -> google.protobuf.Duration
+ 11, // 2: google.rpc.QuotaFailure.violations:type_name -> google.rpc.QuotaFailure.Violation
+ 12, // 3: google.rpc.PreconditionFailure.violations:type_name -> google.rpc.PreconditionFailure.Violation
+ 13, // 4: google.rpc.BadRequest.field_violations:type_name -> google.rpc.BadRequest.FieldViolation
+ 14, // 5: google.rpc.Help.links:type_name -> google.rpc.Help.Link
+ 9, // 6: google.rpc.BadRequest.FieldViolation.localized_message:type_name -> google.rpc.LocalizedMessage
+ 7, // [7:7] is the sub-list for method output_type
+ 7, // [7:7] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
+}
+
+func init() { file_google_rpc_error_details_proto_init() }
+func file_google_rpc_error_details_proto_init() {
+ if File_google_rpc_error_details_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_google_rpc_error_details_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ErrorInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RetryInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DebugInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*QuotaFailure); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PreconditionFailure); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BadRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RequestInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ResourceInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Help); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LocalizedMessage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*QuotaFailure_Violation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PreconditionFailure_Violation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BadRequest_FieldViolation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_rpc_error_details_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Help_Link); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_google_rpc_error_details_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 15,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_google_rpc_error_details_proto_goTypes,
+ DependencyIndexes: file_google_rpc_error_details_proto_depIdxs,
+ MessageInfos: file_google_rpc_error_details_proto_msgTypes,
+ }.Build()
+ File_google_rpc_error_details_proto = out.File
+ file_google_rpc_error_details_proto_rawDesc = nil
+ file_google_rpc_error_details_proto_goTypes = nil
+ file_google_rpc_error_details_proto_depIdxs = nil
+}
diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go
index 3a2092f1..382ad694 100644
--- a/vendor/google.golang.org/grpc/balancer/balancer.go
+++ b/vendor/google.golang.org/grpc/balancer/balancer.go
@@ -73,17 +73,6 @@ func unregisterForTesting(name string) {
delete(m, name)
}
-// connectedAddress returns the connected address for a SubConnState. The
-// address is only valid if the state is READY.
-func connectedAddress(scs SubConnState) resolver.Address {
- return scs.connectedAddress
-}
-
-// setConnectedAddress sets the connected address for a SubConnState.
-func setConnectedAddress(scs *SubConnState, addr resolver.Address) {
- scs.connectedAddress = addr
-}
-
func init() {
internal.BalancerUnregister = unregisterForTesting
internal.ConnectedAddress = connectedAddress
@@ -106,57 +95,6 @@ func Get(name string) Builder {
return nil
}
-// A SubConn represents a single connection to a gRPC backend service.
-//
-// Each SubConn contains a list of addresses.
-//
-// All SubConns start in IDLE, and will not try to connect. To trigger the
-// connecting, Balancers must call Connect. If a connection re-enters IDLE,
-// Balancers must call Connect again to trigger a new connection attempt.
-//
-// gRPC will try to connect to the addresses in sequence, and stop trying the
-// remainder once the first connection is successful. If an attempt to connect
-// to all addresses encounters an error, the SubConn will enter
-// TRANSIENT_FAILURE for a backoff period, and then transition to IDLE.
-//
-// Once established, if a connection is lost, the SubConn will transition
-// directly to IDLE.
-//
-// This interface is to be implemented by gRPC. Users should not need their own
-// implementation of this interface. For situations like testing, any
-// implementations should embed this interface. This allows gRPC to add new
-// methods to this interface.
-type SubConn interface {
- // UpdateAddresses updates the addresses used in this SubConn.
- // gRPC checks if currently-connected address is still in the new list.
- // If it's in the list, the connection will be kept.
- // If it's not in the list, the connection will gracefully close, and
- // a new connection will be created.
- //
- // This will trigger a state transition for the SubConn.
- //
- // Deprecated: this method will be removed. Create new SubConns for new
- // addresses instead.
- UpdateAddresses([]resolver.Address)
- // Connect starts the connecting for this SubConn.
- Connect()
- // GetOrBuildProducer returns a reference to the existing Producer for this
- // ProducerBuilder in this SubConn, or, if one does not currently exist,
- // creates a new one and returns it. Returns a close function which may be
- // called when the Producer is no longer needed. Otherwise the producer
- // will automatically be closed upon connection loss or subchannel close.
- // Should only be called on a SubConn in state Ready. Otherwise the
- // producer will be unable to create streams.
- GetOrBuildProducer(ProducerBuilder) (p Producer, close func())
- // Shutdown shuts down the SubConn gracefully. Any started RPCs will be
- // allowed to complete. No future calls should be made on the SubConn.
- // One final state update will be delivered to the StateListener (or
- // UpdateSubConnState; deprecated) with ConnectivityState of Shutdown to
- // indicate the shutdown operation. This may be delivered before
- // in-progress RPCs are complete and the actual connection is closed.
- Shutdown()
-}
-
// NewSubConnOptions contains options to create new SubConn.
type NewSubConnOptions struct {
// CredsBundle is the credentials bundle that will be used in the created
@@ -424,18 +362,6 @@ type ExitIdler interface {
ExitIdle()
}
-// SubConnState describes the state of a SubConn.
-type SubConnState struct {
- // ConnectivityState is the connectivity state of the SubConn.
- ConnectivityState connectivity.State
- // ConnectionError is set if the ConnectivityState is TransientFailure,
- // describing the reason the SubConn failed. Otherwise, it is nil.
- ConnectionError error
- // connectedAddr contains the connected address when ConnectivityState is
- // Ready. Otherwise, it is indeterminate.
- connectedAddress resolver.Address
-}
-
// ClientConnState describes the state of a ClientConn relevant to the
// balancer.
type ClientConnState struct {
@@ -448,22 +374,3 @@ type ClientConnState struct {
// ErrBadResolverState may be returned by UpdateClientConnState to indicate a
// problem with the provided name resolver data.
var ErrBadResolverState = errors.New("bad resolver state")
-
-// A ProducerBuilder is a simple constructor for a Producer. It is used by the
-// SubConn to create producers when needed.
-type ProducerBuilder interface {
- // Build creates a Producer. The first parameter is always a
- // grpc.ClientConnInterface (a type to allow creating RPCs/streams on the
- // associated SubConn), but is declared as `any` to avoid a dependency
- // cycle. Build also returns a close function that will be called when all
- // references to the Producer have been given up for a SubConn, or when a
- // connectivity state change occurs on the SubConn. The close function
- // should always block until all asynchronous cleanup work is completed.
- Build(grpcClientConnInterface any) (p Producer, close func())
-}
-
-// A Producer is a type shared among potentially many consumers. It is
-// associated with a SubConn, and an implementation will typically contain
-// other methods to provide additional functionality, e.g. configuration or
-// subscription registration.
-type Producer any
diff --git a/vendor/google.golang.org/grpc/balancer/pickfirst/internal/internal.go b/vendor/google.golang.org/grpc/balancer/pickfirst/internal/internal.go
index c5197894..7d66cb49 100644
--- a/vendor/google.golang.org/grpc/balancer/pickfirst/internal/internal.go
+++ b/vendor/google.golang.org/grpc/balancer/pickfirst/internal/internal.go
@@ -18,7 +18,18 @@
// Package internal contains code internal to the pickfirst package.
package internal
-import "math/rand"
+import (
+ rand "math/rand/v2"
+ "time"
+)
-// RandShuffle pseudo-randomizes the order of addresses.
-var RandShuffle = rand.Shuffle
+var (
+ // RandShuffle pseudo-randomizes the order of addresses.
+ RandShuffle = rand.Shuffle
+ // TimeAfterFunc allows mocking the timer for testing connection delay
+ // related functionality.
+ TimeAfterFunc = func(d time.Duration, f func()) func() {
+ timer := time.AfterFunc(d, f)
+ return func() { timer.Stop() }
+ }
+)
diff --git a/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go b/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go
index e069346a..ea889981 100644
--- a/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go
+++ b/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirst.go
@@ -23,7 +23,7 @@ import (
"encoding/json"
"errors"
"fmt"
- "math/rand"
+ rand "math/rand/v2"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/balancer/pickfirst/internal"
diff --git a/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go b/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go
index 985b6edc..76fa5fea 100644
--- a/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go
+++ b/vendor/google.golang.org/grpc/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go
@@ -29,11 +29,15 @@ import (
"encoding/json"
"errors"
"fmt"
+ "net"
+ "net/netip"
"sync"
+ "time"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/balancer/pickfirst/internal"
"google.golang.org/grpc/connectivity"
+ expstats "google.golang.org/grpc/experimental/stats"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/internal/envconfig"
internalgrpclog "google.golang.org/grpc/internal/grpclog"
@@ -50,26 +54,77 @@ func init() {
balancer.Register(pickfirstBuilder{})
}
+type (
+ // enableHealthListenerKeyType is a unique key type used in resolver
+ // attributes to indicate whether the health listener usage is enabled.
+ enableHealthListenerKeyType struct{}
+ // managedByPickfirstKeyType is an attribute key type to inform Outlier
+ // Detection that the generic health listener is being used.
+ // TODO: https://github.com/grpc/grpc-go/issues/7915 - Remove this when
+ // implementing the dualstack design. This is a hack. Once Dualstack is
+ // completed, outlier detection will stop sending ejection updates through
+ // the connectivity listener.
+ managedByPickfirstKeyType struct{}
+)
+
var (
logger = grpclog.Component("pick-first-leaf-lb")
// Name is the name of the pick_first_leaf balancer.
// It is changed to "pick_first" in init() if this balancer is to be
// registered as the default pickfirst.
- Name = "pick_first_leaf"
+ Name = "pick_first_leaf"
+ disconnectionsMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{
+ Name: "grpc.lb.pick_first.disconnections",
+ Description: "EXPERIMENTAL. Number of times the selected subchannel becomes disconnected.",
+ Unit: "disconnection",
+ Labels: []string{"grpc.target"},
+ Default: false,
+ })
+ connectionAttemptsSucceededMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{
+ Name: "grpc.lb.pick_first.connection_attempts_succeeded",
+ Description: "EXPERIMENTAL. Number of successful connection attempts.",
+ Unit: "attempt",
+ Labels: []string{"grpc.target"},
+ Default: false,
+ })
+ connectionAttemptsFailedMetric = expstats.RegisterInt64Count(expstats.MetricDescriptor{
+ Name: "grpc.lb.pick_first.connection_attempts_failed",
+ Description: "EXPERIMENTAL. Number of failed connection attempts.",
+ Unit: "attempt",
+ Labels: []string{"grpc.target"},
+ Default: false,
+ })
+)
+
+const (
+ // TODO: change to pick-first when this becomes the default pick_first policy.
+ logPrefix = "[pick-first-leaf-lb %p] "
+ // connectionDelayInterval is the time to wait for during the happy eyeballs
+ // pass before starting the next connection attempt.
+ connectionDelayInterval = 250 * time.Millisecond
)
-// TODO: change to pick-first when this becomes the default pick_first policy.
-const logPrefix = "[pick-first-leaf-lb %p] "
+type ipAddrFamily int
+
+const (
+ // ipAddrFamilyUnknown represents strings that can't be parsed as an IP
+ // address.
+ ipAddrFamilyUnknown ipAddrFamily = iota
+ ipAddrFamilyV4
+ ipAddrFamilyV6
+)
type pickfirstBuilder struct{}
-func (pickfirstBuilder) Build(cc balancer.ClientConn, _ balancer.BuildOptions) balancer.Balancer {
+func (pickfirstBuilder) Build(cc balancer.ClientConn, bo balancer.BuildOptions) balancer.Balancer {
b := &pickfirstBalancer{
- cc: cc,
- addressList: addressList{},
- subConns: resolver.NewAddressMap(),
- state: connectivity.Connecting,
- mu: sync.Mutex{},
+ cc: cc,
+ target: bo.Target.String(),
+ metricsRecorder: bo.MetricsRecorder, // ClientConn will always create a Metrics Recorder.
+
+ subConns: resolver.NewAddressMap(),
+ state: connectivity.Connecting,
+ cancelConnectionTimer: func() {},
}
b.logger = internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf(logPrefix, b))
return b
@@ -87,6 +142,24 @@ func (pickfirstBuilder) ParseConfig(js json.RawMessage) (serviceconfig.LoadBalan
return cfg, nil
}
+// EnableHealthListener updates the state to configure pickfirst for using a
+// generic health listener.
+func EnableHealthListener(state resolver.State) resolver.State {
+ state.Attributes = state.Attributes.WithValue(enableHealthListenerKeyType{}, true)
+ return state
+}
+
+// IsManagedByPickfirst returns whether an address belongs to a SubConn
+// managed by the pickfirst LB policy.
+// TODO: https://github.com/grpc/grpc-go/issues/7915 - This is a hack to disable
+// outlier_detection via the with connectivity listener when using pick_first.
+// Once Dualstack changes are complete, all SubConns will be created by
+// pick_first and outlier detection will only use the health listener for
+// ejection. This hack can then be removed.
+func IsManagedByPickfirst(addr resolver.Address) bool {
+ return addr.BalancerAttributes.Value(managedByPickfirstKeyType{}) != nil
+}
+
type pfConfig struct {
serviceconfig.LoadBalancingConfig `json:"-"`
@@ -104,14 +177,20 @@ type scData struct {
subConn balancer.SubConn
addr resolver.Address
- state connectivity.State
- lastErr error
+ rawConnectivityState connectivity.State
+ // The effective connectivity state based on raw connectivity, health state
+ // and after following sticky TransientFailure behaviour defined in A62.
+ effectiveState connectivity.State
+ lastErr error
+ connectionFailedInFirstPass bool
}
func (b *pickfirstBalancer) newSCData(addr resolver.Address) (*scData, error) {
+ addr.BalancerAttributes = addr.BalancerAttributes.WithValue(managedByPickfirstKeyType{}, true)
sd := &scData{
- state: connectivity.Idle,
- addr: addr,
+ rawConnectivityState: connectivity.Idle,
+ effectiveState: connectivity.Idle,
+ addr: addr,
}
sc, err := b.cc.NewSubConn([]resolver.Address{addr}, balancer.NewSubConnOptions{
StateListener: func(state balancer.SubConnState) {
@@ -128,19 +207,25 @@ func (b *pickfirstBalancer) newSCData(addr resolver.Address) (*scData, error) {
type pickfirstBalancer struct {
// The following fields are initialized at build time and read-only after
// that and therefore do not need to be guarded by a mutex.
- logger *internalgrpclog.PrefixLogger
- cc balancer.ClientConn
+ logger *internalgrpclog.PrefixLogger
+ cc balancer.ClientConn
+ target string
+ metricsRecorder expstats.MetricsRecorder // guaranteed to be non nil
// The mutex is used to ensure synchronization of updates triggered
// from the idle picker and the already serialized resolver,
// SubConn state updates.
- mu sync.Mutex
+ mu sync.Mutex
+ // State reported to the channel based on SubConn states and resolver
+ // updates.
state connectivity.State
// scData for active subonns mapped by address.
- subConns *resolver.AddressMap
- addressList addressList
- firstPass bool
- numTF int
+ subConns *resolver.AddressMap
+ addressList addressList
+ firstPass bool
+ numTF int
+ cancelConnectionTimer func()
+ healthCheckingEnabled bool
}
// ResolverError is called by the ClientConn when the name resolver produces
@@ -166,7 +251,7 @@ func (b *pickfirstBalancer) resolverErrorLocked(err error) {
return
}
- b.cc.UpdateState(balancer.State{
+ b.updateBalancerState(balancer.State{
ConnectivityState: connectivity.TransientFailure,
Picker: &picker{err: fmt.Errorf("name resolver error: %v", err)},
})
@@ -175,15 +260,16 @@ func (b *pickfirstBalancer) resolverErrorLocked(err error) {
func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState) error {
b.mu.Lock()
defer b.mu.Unlock()
+ b.cancelConnectionTimer()
if len(state.ResolverState.Addresses) == 0 && len(state.ResolverState.Endpoints) == 0 {
// Cleanup state pertaining to the previous resolver state.
// Treat an empty address list like an error by calling b.ResolverError.
- b.state = connectivity.TransientFailure
b.closeSubConnsLocked()
b.addressList.updateAddrs(nil)
b.resolverErrorLocked(errors.New("produced zero addresses"))
return balancer.ErrBadResolverState
}
+ b.healthCheckingEnabled = state.ResolverState.Attributes.Value(enableHealthListenerKeyType{}) != nil
cfg, ok := state.BalancerConfig.(pfConfig)
if state.BalancerConfig != nil && !ok {
return fmt.Errorf("pickfirst: received illegal BalancerConfig (type %T): %v: %w", state.BalancerConfig, state.BalancerConfig, balancer.ErrBadResolverState)
@@ -206,9 +292,6 @@ func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState
// "Flatten the list by concatenating the ordered list of addresses for
// each of the endpoints, in order." - A61
for _, endpoint := range endpoints {
- // "In the flattened list, interleave addresses from the two address
- // families, as per RFC-8305 section 4." - A61
- // TODO: support the above language.
newAddrs = append(newAddrs, endpoint.Addresses...)
}
} else {
@@ -231,16 +314,17 @@ func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState
// Not de-duplicating would result in attempting to connect to the same
// SubConn multiple times in the same pass. We don't want this.
newAddrs = deDupAddresses(newAddrs)
+ newAddrs = interleaveAddresses(newAddrs)
- // Since we have a new set of addresses, we are again at first pass.
- b.firstPass = true
-
- // If the previous ready SubConn exists in new address list,
- // keep this connection and don't create new SubConns.
prevAddr := b.addressList.currentAddress()
+ prevSCData, found := b.subConns.Get(prevAddr)
prevAddrsCount := b.addressList.size()
+ isPrevRawConnectivityStateReady := found && prevSCData.(*scData).rawConnectivityState == connectivity.Ready
b.addressList.updateAddrs(newAddrs)
- if b.state == connectivity.Ready && b.addressList.seekTo(prevAddr) {
+
+ // If the previous ready SubConn exists in new address list,
+ // keep this connection and don't create new SubConns.
+ if isPrevRawConnectivityStateReady && b.addressList.seekTo(prevAddr) {
return nil
}
@@ -252,18 +336,17 @@ func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState
// we should still enter CONNECTING because the sticky TF behaviour
// mentioned in A62 applies only when the TRANSIENT_FAILURE is reported
// due to connectivity failures.
- if b.state == connectivity.Ready || b.state == connectivity.Connecting || prevAddrsCount == 0 {
+ if isPrevRawConnectivityStateReady || b.state == connectivity.Connecting || prevAddrsCount == 0 {
// Start connection attempt at first address.
- b.state = connectivity.Connecting
- b.cc.UpdateState(balancer.State{
+ b.forceUpdateConcludedStateLocked(balancer.State{
ConnectivityState: connectivity.Connecting,
Picker: &picker{err: balancer.ErrNoSubConnAvailable},
})
- b.requestConnectionLocked()
+ b.startFirstPassLocked()
} else if b.state == connectivity.TransientFailure {
// If we're in TRANSIENT_FAILURE, we stay in TRANSIENT_FAILURE until
// we're READY. See A62.
- b.requestConnectionLocked()
+ b.startFirstPassLocked()
}
return nil
}
@@ -278,6 +361,7 @@ func (b *pickfirstBalancer) Close() {
b.mu.Lock()
defer b.mu.Unlock()
b.closeSubConnsLocked()
+ b.cancelConnectionTimer()
b.state = connectivity.Shutdown
}
@@ -287,10 +371,19 @@ func (b *pickfirstBalancer) Close() {
func (b *pickfirstBalancer) ExitIdle() {
b.mu.Lock()
defer b.mu.Unlock()
- if b.state == connectivity.Idle && b.addressList.currentAddress() == b.addressList.first() {
- b.firstPass = true
- b.requestConnectionLocked()
+ if b.state == connectivity.Idle {
+ b.startFirstPassLocked()
+ }
+}
+
+func (b *pickfirstBalancer) startFirstPassLocked() {
+ b.firstPass = true
+ b.numTF = 0
+ // Reset the connection attempt record for existing SubConns.
+ for _, sd := range b.subConns.Values() {
+ sd.(*scData).connectionFailedInFirstPass = false
}
+ b.requestConnectionLocked()
}
func (b *pickfirstBalancer) closeSubConnsLocked() {
@@ -314,6 +407,70 @@ func deDupAddresses(addrs []resolver.Address) []resolver.Address {
return retAddrs
}
+// interleaveAddresses interleaves addresses of both families (IPv4 and IPv6)
+// as per RFC-8305 section 4.
+// Whichever address family is first in the list is followed by an address of
+// the other address family; that is, if the first address in the list is IPv6,
+// then the first IPv4 address should be moved up in the list to be second in
+// the list. It doesn't support configuring "First Address Family Count", i.e.
+// there will always be a single member of the first address family at the
+// beginning of the interleaved list.
+// Addresses that are neither IPv4 nor IPv6 are treated as part of a third
+// "unknown" family for interleaving.
+// See: https://datatracker.ietf.org/doc/html/rfc8305#autoid-6
+func interleaveAddresses(addrs []resolver.Address) []resolver.Address {
+ familyAddrsMap := map[ipAddrFamily][]resolver.Address{}
+ interleavingOrder := []ipAddrFamily{}
+ for _, addr := range addrs {
+ family := addressFamily(addr.Addr)
+ if _, found := familyAddrsMap[family]; !found {
+ interleavingOrder = append(interleavingOrder, family)
+ }
+ familyAddrsMap[family] = append(familyAddrsMap[family], addr)
+ }
+
+ interleavedAddrs := make([]resolver.Address, 0, len(addrs))
+
+ for curFamilyIdx := 0; len(interleavedAddrs) < len(addrs); curFamilyIdx = (curFamilyIdx + 1) % len(interleavingOrder) {
+ // Some IP types may have fewer addresses than others, so we look for
+ // the next type that has a remaining member to add to the interleaved
+ // list.
+ family := interleavingOrder[curFamilyIdx]
+ remainingMembers := familyAddrsMap[family]
+ if len(remainingMembers) > 0 {
+ interleavedAddrs = append(interleavedAddrs, remainingMembers[0])
+ familyAddrsMap[family] = remainingMembers[1:]
+ }
+ }
+
+ return interleavedAddrs
+}
+
+// addressFamily returns the ipAddrFamily after parsing the address string.
+// If the address isn't of the format "ip-address:port", it returns
+// ipAddrFamilyUnknown. The address may be valid even if it's not an IP when
+// using a resolver like passthrough where the address may be a hostname in
+// some format that the dialer can resolve.
+func addressFamily(address string) ipAddrFamily {
+ // Parse the IP after removing the port.
+ host, _, err := net.SplitHostPort(address)
+ if err != nil {
+ return ipAddrFamilyUnknown
+ }
+ ip, err := netip.ParseAddr(host)
+ if err != nil {
+ return ipAddrFamilyUnknown
+ }
+ switch {
+ case ip.Is4() || ip.Is4In6():
+ return ipAddrFamilyV4
+ case ip.Is6():
+ return ipAddrFamilyV6
+ default:
+ return ipAddrFamilyUnknown
+ }
+}
+
// reconcileSubConnsLocked updates the active subchannels based on a new address
// list from the resolver. It does this by:
// - closing subchannels: any existing subchannels associated with addresses
@@ -342,6 +499,7 @@ func (b *pickfirstBalancer) reconcileSubConnsLocked(newAddrs []resolver.Address)
// shutdownRemainingLocked shuts down remaining subConns. Called when a subConn
// becomes ready, which means that all other subConn must be shutdown.
func (b *pickfirstBalancer) shutdownRemainingLocked(selected *scData) {
+ b.cancelConnectionTimer()
for _, v := range b.subConns.Values() {
sd := v.(*scData)
if sd.subConn != selected.subConn {
@@ -382,46 +540,89 @@ func (b *pickfirstBalancer) requestConnectionLocked() {
}
scd := sd.(*scData)
- switch scd.state {
+ switch scd.rawConnectivityState {
case connectivity.Idle:
scd.subConn.Connect()
+ b.scheduleNextConnectionLocked()
+ return
case connectivity.TransientFailure:
- // Try the next address.
+ // The SubConn is being re-used and failed during a previous pass
+ // over the addressList. It has not completed backoff yet.
+ // Mark it as having failed and try the next address.
+ scd.connectionFailedInFirstPass = true
lastErr = scd.lastErr
continue
- case connectivity.Ready:
- // Should never happen.
- b.logger.Errorf("Requesting a connection even though we have a READY SubConn")
- case connectivity.Shutdown:
- // Should never happen.
- b.logger.Errorf("SubConn with state SHUTDOWN present in SubConns map")
case connectivity.Connecting:
- // Wait for the SubConn to report success or failure.
+ // Wait for the connection attempt to complete or the timer to fire
+ // before attempting the next address.
+ b.scheduleNextConnectionLocked()
+ return
+ default:
+ b.logger.Errorf("SubConn with unexpected state %v present in SubConns map.", scd.rawConnectivityState)
+ return
+
}
- return
}
+
// All the remaining addresses in the list are in TRANSIENT_FAILURE, end the
- // first pass.
- b.endFirstPassLocked(lastErr)
+ // first pass if possible.
+ b.endFirstPassIfPossibleLocked(lastErr)
+}
+
+func (b *pickfirstBalancer) scheduleNextConnectionLocked() {
+ b.cancelConnectionTimer()
+ if !b.addressList.hasNext() {
+ return
+ }
+ curAddr := b.addressList.currentAddress()
+ cancelled := false // Access to this is protected by the balancer's mutex.
+ closeFn := internal.TimeAfterFunc(connectionDelayInterval, func() {
+ b.mu.Lock()
+ defer b.mu.Unlock()
+ // If the scheduled task is cancelled while acquiring the mutex, return.
+ if cancelled {
+ return
+ }
+ if b.logger.V(2) {
+ b.logger.Infof("Happy Eyeballs timer expired while waiting for connection to %q.", curAddr.Addr)
+ }
+ if b.addressList.increment() {
+ b.requestConnectionLocked()
+ }
+ })
+ // Access to the cancellation callback held by the balancer is guarded by
+ // the balancer's mutex, so it's safe to set the boolean from the callback.
+ b.cancelConnectionTimer = sync.OnceFunc(func() {
+ cancelled = true
+ closeFn()
+ })
}
func (b *pickfirstBalancer) updateSubConnState(sd *scData, newState balancer.SubConnState) {
b.mu.Lock()
defer b.mu.Unlock()
- oldState := sd.state
- sd.state = newState.ConnectivityState
+ oldState := sd.rawConnectivityState
+ sd.rawConnectivityState = newState.ConnectivityState
// Previously relevant SubConns can still callback with state updates.
// To prevent pickers from returning these obsolete SubConns, this logic
// is included to check if the current list of active SubConns includes this
// SubConn.
- if activeSD, found := b.subConns.Get(sd.addr); !found || activeSD != sd {
+ if !b.isActiveSCData(sd) {
return
}
if newState.ConnectivityState == connectivity.Shutdown {
+ sd.effectiveState = connectivity.Shutdown
return
}
+ // Record a connection attempt when exiting CONNECTING.
+ if newState.ConnectivityState == connectivity.TransientFailure {
+ sd.connectionFailedInFirstPass = true
+ connectionAttemptsFailedMetric.Record(b.metricsRecorder, 1, b.target)
+ }
+
if newState.ConnectivityState == connectivity.Ready {
+ connectionAttemptsSucceededMetric.Record(b.metricsRecorder, 1, b.target)
b.shutdownRemainingLocked(sd)
if !b.addressList.seekTo(sd.addr) {
// This should not fail as we should have only one SubConn after
@@ -429,10 +630,30 @@ func (b *pickfirstBalancer) updateSubConnState(sd *scData, newState balancer.Sub
b.logger.Errorf("Address %q not found address list in %v", sd.addr, b.addressList.addresses)
return
}
- b.state = connectivity.Ready
- b.cc.UpdateState(balancer.State{
- ConnectivityState: connectivity.Ready,
- Picker: &picker{result: balancer.PickResult{SubConn: sd.subConn}},
+ if !b.healthCheckingEnabled {
+ if b.logger.V(2) {
+ b.logger.Infof("SubConn %p reported connectivity state READY and the health listener is disabled. Transitioning SubConn to READY.", sd.subConn)
+ }
+
+ sd.effectiveState = connectivity.Ready
+ b.updateBalancerState(balancer.State{
+ ConnectivityState: connectivity.Ready,
+ Picker: &picker{result: balancer.PickResult{SubConn: sd.subConn}},
+ })
+ return
+ }
+ if b.logger.V(2) {
+ b.logger.Infof("SubConn %p reported connectivity state READY. Registering health listener.", sd.subConn)
+ }
+ // Send a CONNECTING update to take the SubConn out of sticky-TF if
+ // required.
+ sd.effectiveState = connectivity.Connecting
+ b.updateBalancerState(balancer.State{
+ ConnectivityState: connectivity.Connecting,
+ Picker: &picker{err: balancer.ErrNoSubConnAvailable},
+ })
+ sd.subConn.RegisterHealthListener(func(scs balancer.SubConnState) {
+ b.updateSubConnHealthState(sd, scs)
})
return
}
@@ -443,13 +664,24 @@ func (b *pickfirstBalancer) updateSubConnState(sd *scData, newState balancer.Sub
// a transport is successfully created, but the connection fails
// before the SubConn can send the notification for READY. We treat
// this as a successful connection and transition to IDLE.
- if (b.state == connectivity.Ready && newState.ConnectivityState != connectivity.Ready) || (oldState == connectivity.Connecting && newState.ConnectivityState == connectivity.Idle) {
+ // TODO: https://github.com/grpc/grpc-go/issues/7862 - Remove the second
+ // part of the if condition below once the issue is fixed.
+ if oldState == connectivity.Ready || (oldState == connectivity.Connecting && newState.ConnectivityState == connectivity.Idle) {
// Once a transport fails, the balancer enters IDLE and starts from
// the first address when the picker is used.
b.shutdownRemainingLocked(sd)
- b.state = connectivity.Idle
+ sd.effectiveState = newState.ConnectivityState
+ // READY SubConn interspliced in between CONNECTING and IDLE, need to
+ // account for that.
+ if oldState == connectivity.Connecting {
+ // A known issue (https://github.com/grpc/grpc-go/issues/7862)
+ // causes a race that prevents the READY state change notification.
+ // This works around it.
+ connectionAttemptsSucceededMetric.Record(b.metricsRecorder, 1, b.target)
+ }
+ disconnectionsMetric.Record(b.metricsRecorder, 1, b.target)
b.addressList.reset()
- b.cc.UpdateState(balancer.State{
+ b.updateBalancerState(balancer.State{
ConnectivityState: connectivity.Idle,
Picker: &idlePicker{exitIdle: sync.OnceFunc(b.ExitIdle)},
})
@@ -459,32 +691,35 @@ func (b *pickfirstBalancer) updateSubConnState(sd *scData, newState balancer.Sub
if b.firstPass {
switch newState.ConnectivityState {
case connectivity.Connecting:
- // The balancer can be in either IDLE, CONNECTING or
- // TRANSIENT_FAILURE. If it's in TRANSIENT_FAILURE, stay in
+ // The effective state can be in either IDLE, CONNECTING or
+ // TRANSIENT_FAILURE. If it's TRANSIENT_FAILURE, stay in
// TRANSIENT_FAILURE until it's READY. See A62.
- // If the balancer is already in CONNECTING, no update is needed.
- if b.state == connectivity.Idle {
- b.state = connectivity.Connecting
- b.cc.UpdateState(balancer.State{
+ if sd.effectiveState != connectivity.TransientFailure {
+ sd.effectiveState = connectivity.Connecting
+ b.updateBalancerState(balancer.State{
ConnectivityState: connectivity.Connecting,
Picker: &picker{err: balancer.ErrNoSubConnAvailable},
})
}
case connectivity.TransientFailure:
sd.lastErr = newState.ConnectionError
+ sd.effectiveState = connectivity.TransientFailure
// Since we're re-using common SubConns while handling resolver
// updates, we could receive an out of turn TRANSIENT_FAILURE from
- // a pass over the previous address list. We ignore such updates.
-
- if curAddr := b.addressList.currentAddress(); !equalAddressIgnoringBalAttributes(&curAddr, &sd.addr) {
- return
- }
- if b.addressList.increment() {
- b.requestConnectionLocked()
- return
+ // a pass over the previous address list. Happy Eyeballs will also
+ // cause out of order updates to arrive.
+
+ if curAddr := b.addressList.currentAddress(); equalAddressIgnoringBalAttributes(&curAddr, &sd.addr) {
+ b.cancelConnectionTimer()
+ if b.addressList.increment() {
+ b.requestConnectionLocked()
+ return
+ }
}
- // End of the first pass.
- b.endFirstPassLocked(newState.ConnectionError)
+
+ // End the first pass if we've seen a TRANSIENT_FAILURE from all
+ // SubConns once.
+ b.endFirstPassIfPossibleLocked(newState.ConnectionError)
}
return
}
@@ -495,7 +730,7 @@ func (b *pickfirstBalancer) updateSubConnState(sd *scData, newState balancer.Sub
b.numTF = (b.numTF + 1) % b.subConns.Len()
sd.lastErr = newState.ConnectionError
if b.numTF%b.subConns.Len() == 0 {
- b.cc.UpdateState(balancer.State{
+ b.updateBalancerState(balancer.State{
ConnectivityState: connectivity.TransientFailure,
Picker: &picker{err: newState.ConnectionError},
})
@@ -509,24 +744,95 @@ func (b *pickfirstBalancer) updateSubConnState(sd *scData, newState balancer.Sub
}
}
-func (b *pickfirstBalancer) endFirstPassLocked(lastErr error) {
+// endFirstPassIfPossibleLocked ends the first happy-eyeballs pass if all the
+// addresses are tried and their SubConns have reported a failure.
+func (b *pickfirstBalancer) endFirstPassIfPossibleLocked(lastErr error) {
+ // An optimization to avoid iterating over the entire SubConn map.
+ if b.addressList.isValid() {
+ return
+ }
+ // Connect() has been called on all the SubConns. The first pass can be
+ // ended if all the SubConns have reported a failure.
+ for _, v := range b.subConns.Values() {
+ sd := v.(*scData)
+ if !sd.connectionFailedInFirstPass {
+ return
+ }
+ }
b.firstPass = false
- b.numTF = 0
- b.state = connectivity.TransientFailure
-
- b.cc.UpdateState(balancer.State{
+ b.updateBalancerState(balancer.State{
ConnectivityState: connectivity.TransientFailure,
Picker: &picker{err: lastErr},
})
// Start re-connecting all the SubConns that are already in IDLE.
for _, v := range b.subConns.Values() {
sd := v.(*scData)
- if sd.state == connectivity.Idle {
+ if sd.rawConnectivityState == connectivity.Idle {
sd.subConn.Connect()
}
}
}
+func (b *pickfirstBalancer) isActiveSCData(sd *scData) bool {
+ activeSD, found := b.subConns.Get(sd.addr)
+ return found && activeSD == sd
+}
+
+func (b *pickfirstBalancer) updateSubConnHealthState(sd *scData, state balancer.SubConnState) {
+ b.mu.Lock()
+ defer b.mu.Unlock()
+ // Previously relevant SubConns can still callback with state updates.
+ // To prevent pickers from returning these obsolete SubConns, this logic
+ // is included to check if the current list of active SubConns includes
+ // this SubConn.
+ if !b.isActiveSCData(sd) {
+ return
+ }
+ sd.effectiveState = state.ConnectivityState
+ switch state.ConnectivityState {
+ case connectivity.Ready:
+ b.updateBalancerState(balancer.State{
+ ConnectivityState: connectivity.Ready,
+ Picker: &picker{result: balancer.PickResult{SubConn: sd.subConn}},
+ })
+ case connectivity.TransientFailure:
+ b.updateBalancerState(balancer.State{
+ ConnectivityState: connectivity.TransientFailure,
+ Picker: &picker{err: fmt.Errorf("pickfirst: health check failure: %v", state.ConnectionError)},
+ })
+ case connectivity.Connecting:
+ b.updateBalancerState(balancer.State{
+ ConnectivityState: connectivity.Connecting,
+ Picker: &picker{err: balancer.ErrNoSubConnAvailable},
+ })
+ default:
+ b.logger.Errorf("Got unexpected health update for SubConn %p: %v", state)
+ }
+}
+
+// updateBalancerState stores the state reported to the channel and calls
+// ClientConn.UpdateState(). As an optimization, it avoids sending duplicate
+// updates to the channel.
+func (b *pickfirstBalancer) updateBalancerState(newState balancer.State) {
+ // In case of TransientFailures allow the picker to be updated to update
+ // the connectivity error, in all other cases don't send duplicate state
+ // updates.
+ if newState.ConnectivityState == b.state && b.state != connectivity.TransientFailure {
+ return
+ }
+ b.forceUpdateConcludedStateLocked(newState)
+}
+
+// forceUpdateConcludedStateLocked stores the state reported to the channel and
+// calls ClientConn.UpdateState().
+// A separate function is defined to force update the ClientConn state since the
+// channel doesn't correctly assume that LB policies start in CONNECTING and
+// relies on LB policy to send an initial CONNECTING update.
+func (b *pickfirstBalancer) forceUpdateConcludedStateLocked(newState balancer.State) {
+ b.state = newState.ConnectivityState
+ b.cc.UpdateState(newState)
+}
+
type picker struct {
result balancer.PickResult
err error
@@ -583,15 +889,6 @@ func (al *addressList) currentAddress() resolver.Address {
return al.addresses[al.idx]
}
-// first returns the first address in the list. If the list is empty, it returns
-// an empty address instead.
-func (al *addressList) first() resolver.Address {
- if len(al.addresses) == 0 {
- return resolver.Address{}
- }
- return al.addresses[0]
-}
-
func (al *addressList) reset() {
al.idx = 0
}
@@ -614,6 +911,16 @@ func (al *addressList) seekTo(needle resolver.Address) bool {
return false
}
+// hasNext returns whether incrementing the addressList will result in moving
+// past the end of the list. If the list has already moved past the end, it
+// returns false.
+func (al *addressList) hasNext() bool {
+ if !al.isValid() {
+ return false
+ }
+ return al.idx+1 < len(al.addresses)
+}
+
// equalAddressIgnoringBalAttributes returns true is a and b are considered
// equal. This is different from the Equal method on the resolver.Address type
// which considers all fields to determine equality. Here, we only consider
diff --git a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go b/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
index 260255d3..80a42d22 100644
--- a/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
+++ b/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
@@ -22,7 +22,7 @@
package roundrobin
import (
- "math/rand"
+ rand "math/rand/v2"
"sync/atomic"
"google.golang.org/grpc/balancer"
@@ -60,7 +60,7 @@ func (*rrPickerBuilder) Build(info base.PickerBuildInfo) balancer.Picker {
// Start at a random index, as the same RR balancer rebuilds a new
// picker when SubConn states change, and we don't want to apply excess
// load to the first server in the list.
- next: uint32(rand.Intn(len(scs))),
+ next: uint32(rand.IntN(len(scs))),
}
}
diff --git a/vendor/google.golang.org/grpc/balancer/subconn.go b/vendor/google.golang.org/grpc/balancer/subconn.go
new file mode 100644
index 00000000..ea27c4fa
--- /dev/null
+++ b/vendor/google.golang.org/grpc/balancer/subconn.go
@@ -0,0 +1,134 @@
+/*
+ *
+ * Copyright 2024 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package balancer
+
+import (
+ "google.golang.org/grpc/connectivity"
+ "google.golang.org/grpc/internal"
+ "google.golang.org/grpc/resolver"
+)
+
+// A SubConn represents a single connection to a gRPC backend service.
+//
+// All SubConns start in IDLE, and will not try to connect. To trigger a
+// connection attempt, Balancers must call Connect.
+//
+// If the connection attempt fails, the SubConn will transition to
+// TRANSIENT_FAILURE for a backoff period, and then return to IDLE. If the
+// connection attempt succeeds, it will transition to READY.
+//
+// If a READY SubConn becomes disconnected, the SubConn will transition to IDLE.
+//
+// If a connection re-enters IDLE, Balancers must call Connect again to trigger
+// a new connection attempt.
+//
+// Each SubConn contains a list of addresses. gRPC will try to connect to the
+// addresses in sequence, and stop trying the remainder once the first
+// connection is successful. However, this behavior is deprecated. SubConns
+// should only use a single address.
+//
+// NOTICE: This interface is intended to be implemented by gRPC, or intercepted
+// by custom load balancing poilices. Users should not need their own complete
+// implementation of this interface -- they should always delegate to a SubConn
+// returned by ClientConn.NewSubConn() by embedding it in their implementations.
+// An embedded SubConn must never be nil, or runtime panics will occur.
+type SubConn interface {
+ // UpdateAddresses updates the addresses used in this SubConn.
+ // gRPC checks if currently-connected address is still in the new list.
+ // If it's in the list, the connection will be kept.
+ // If it's not in the list, the connection will gracefully close, and
+ // a new connection will be created.
+ //
+ // This will trigger a state transition for the SubConn.
+ //
+ // Deprecated: this method will be removed. Create new SubConns for new
+ // addresses instead.
+ UpdateAddresses([]resolver.Address)
+ // Connect starts the connecting for this SubConn.
+ Connect()
+ // GetOrBuildProducer returns a reference to the existing Producer for this
+ // ProducerBuilder in this SubConn, or, if one does not currently exist,
+ // creates a new one and returns it. Returns a close function which may be
+ // called when the Producer is no longer needed. Otherwise the producer
+ // will automatically be closed upon connection loss or subchannel close.
+ // Should only be called on a SubConn in state Ready. Otherwise the
+ // producer will be unable to create streams.
+ GetOrBuildProducer(ProducerBuilder) (p Producer, close func())
+ // Shutdown shuts down the SubConn gracefully. Any started RPCs will be
+ // allowed to complete. No future calls should be made on the SubConn.
+ // One final state update will be delivered to the StateListener (or
+ // UpdateSubConnState; deprecated) with ConnectivityState of Shutdown to
+ // indicate the shutdown operation. This may be delivered before
+ // in-progress RPCs are complete and the actual connection is closed.
+ Shutdown()
+ // RegisterHealthListener registers a health listener that receives health
+ // updates for a Ready SubConn. Only one health listener can be registered
+ // at a time. A health listener should be registered each time the SubConn's
+ // connectivity state changes to READY. Registering a health listener when
+ // the connectivity state is not READY may result in undefined behaviour.
+ // This method must not be called synchronously while handling an update
+ // from a previously registered health listener.
+ RegisterHealthListener(func(SubConnState))
+ // EnforceSubConnEmbedding is included to force implementers to embed
+ // another implementation of this interface, allowing gRPC to add methods
+ // without breaking users.
+ internal.EnforceSubConnEmbedding
+}
+
+// A ProducerBuilder is a simple constructor for a Producer. It is used by the
+// SubConn to create producers when needed.
+type ProducerBuilder interface {
+ // Build creates a Producer. The first parameter is always a
+ // grpc.ClientConnInterface (a type to allow creating RPCs/streams on the
+ // associated SubConn), but is declared as `any` to avoid a dependency
+ // cycle. Build also returns a close function that will be called when all
+ // references to the Producer have been given up for a SubConn, or when a
+ // connectivity state change occurs on the SubConn. The close function
+ // should always block until all asynchronous cleanup work is completed.
+ Build(grpcClientConnInterface any) (p Producer, close func())
+}
+
+// SubConnState describes the state of a SubConn.
+type SubConnState struct {
+ // ConnectivityState is the connectivity state of the SubConn.
+ ConnectivityState connectivity.State
+ // ConnectionError is set if the ConnectivityState is TransientFailure,
+ // describing the reason the SubConn failed. Otherwise, it is nil.
+ ConnectionError error
+ // connectedAddr contains the connected address when ConnectivityState is
+ // Ready. Otherwise, it is indeterminate.
+ connectedAddress resolver.Address
+}
+
+// connectedAddress returns the connected address for a SubConnState. The
+// address is only valid if the state is READY.
+func connectedAddress(scs SubConnState) resolver.Address {
+ return scs.connectedAddress
+}
+
+// setConnectedAddress sets the connected address for a SubConnState.
+func setConnectedAddress(scs *SubConnState, addr resolver.Address) {
+ scs.connectedAddress = addr
+}
+
+// A Producer is a type shared among potentially many consumers. It is
+// associated with a SubConn, and an implementation will typically contain
+// other methods to provide additional functionality, e.g. configuration or
+// subscription registration.
+type Producer any
diff --git a/vendor/google.golang.org/grpc/balancer_wrapper.go b/vendor/google.golang.org/grpc/balancer_wrapper.go
index 2a4f2878..c2688376 100644
--- a/vendor/google.golang.org/grpc/balancer_wrapper.go
+++ b/vendor/google.golang.org/grpc/balancer_wrapper.go
@@ -34,7 +34,15 @@ import (
"google.golang.org/grpc/status"
)
-var setConnectedAddress = internal.SetConnectedAddress.(func(*balancer.SubConnState, resolver.Address))
+var (
+ setConnectedAddress = internal.SetConnectedAddress.(func(*balancer.SubConnState, resolver.Address))
+ // noOpRegisterHealthListenerFn is used when client side health checking is
+ // disabled. It sends a single READY update on the registered listener.
+ noOpRegisterHealthListenerFn = func(_ context.Context, listener func(balancer.SubConnState)) func() {
+ listener(balancer.SubConnState{ConnectivityState: connectivity.Ready})
+ return func() {}
+ }
+)
// ccBalancerWrapper sits between the ClientConn and the Balancer.
//
@@ -189,6 +197,7 @@ func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer
ac: ac,
producers: make(map[balancer.ProducerBuilder]*refCountedProducer),
stateListener: opts.StateListener,
+ healthData: newHealthData(connectivity.Idle),
}
ac.acbw = acbw
return acbw, nil
@@ -254,12 +263,39 @@ func (ccb *ccBalancerWrapper) Target() string {
// acBalancerWrapper is a wrapper on top of ac for balancers.
// It implements balancer.SubConn interface.
type acBalancerWrapper struct {
+ internal.EnforceSubConnEmbedding
ac *addrConn // read-only
ccb *ccBalancerWrapper // read-only
stateListener func(balancer.SubConnState)
producersMu sync.Mutex
producers map[balancer.ProducerBuilder]*refCountedProducer
+
+ // Access to healthData is protected by healthMu.
+ healthMu sync.Mutex
+ // healthData is stored as a pointer to detect when the health listener is
+ // dropped or updated. This is required as closures can't be compared for
+ // equality.
+ healthData *healthData
+}
+
+// healthData holds data related to health state reporting.
+type healthData struct {
+ // connectivityState stores the most recent connectivity state delivered
+ // to the LB policy. This is stored to avoid sending updates when the
+ // SubConn has already exited connectivity state READY.
+ connectivityState connectivity.State
+ // closeHealthProducer stores function to close the ref counted health
+ // producer. The health producer is automatically closed when the SubConn
+ // state changes.
+ closeHealthProducer func()
+}
+
+func newHealthData(s connectivity.State) *healthData {
+ return &healthData{
+ connectivityState: s,
+ closeHealthProducer: func() {},
+ }
}
// updateState is invoked by grpc to push a subConn state update to the
@@ -279,6 +315,24 @@ func (acbw *acBalancerWrapper) updateState(s connectivity.State, curAddr resolve
if s == connectivity.Ready {
setConnectedAddress(&scs, curAddr)
}
+ // Invalidate the health listener by updating the healthData.
+ acbw.healthMu.Lock()
+ // A race may occur if a health listener is registered soon after the
+ // connectivity state is set but before the stateListener is called.
+ // Two cases may arise:
+ // 1. The new state is not READY: RegisterHealthListener has checks to
+ // ensure no updates are sent when the connectivity state is not
+ // READY.
+ // 2. The new state is READY: This means that the old state wasn't Ready.
+ // The RegisterHealthListener API mentions that a health listener
+ // must not be registered when a SubConn is not ready to avoid such
+ // races. When this happens, the LB policy would get health updates
+ // on the old listener. When the LB policy registers a new listener
+ // on receiving the connectivity update, the health updates will be
+ // sent to the new health listener.
+ acbw.healthData = newHealthData(scs.ConnectivityState)
+ acbw.healthMu.Unlock()
+
acbw.stateListener(scs)
})
}
@@ -373,3 +427,89 @@ func (acbw *acBalancerWrapper) closeProducers() {
delete(acbw.producers, pb)
}
}
+
+// healthProducerRegisterFn is a type alias for the health producer's function
+// for registering listeners.
+type healthProducerRegisterFn = func(context.Context, balancer.SubConn, string, func(balancer.SubConnState)) func()
+
+// healthListenerRegFn returns a function to register a listener for health
+// updates. If client side health checks are disabled, the registered listener
+// will get a single READY (raw connectivity state) update.
+//
+// Client side health checking is enabled when all the following
+// conditions are satisfied:
+// 1. Health checking is not disabled using the dial option.
+// 2. The health package is imported.
+// 3. The health check config is present in the service config.
+func (acbw *acBalancerWrapper) healthListenerRegFn() func(context.Context, func(balancer.SubConnState)) func() {
+ if acbw.ccb.cc.dopts.disableHealthCheck {
+ return noOpRegisterHealthListenerFn
+ }
+ regHealthLisFn := internal.RegisterClientHealthCheckListener
+ if regHealthLisFn == nil {
+ // The health package is not imported.
+ return noOpRegisterHealthListenerFn
+ }
+ cfg := acbw.ac.cc.healthCheckConfig()
+ if cfg == nil {
+ return noOpRegisterHealthListenerFn
+ }
+ return func(ctx context.Context, listener func(balancer.SubConnState)) func() {
+ return regHealthLisFn.(healthProducerRegisterFn)(ctx, acbw, cfg.ServiceName, listener)
+ }
+}
+
+// RegisterHealthListener accepts a health listener from the LB policy. It sends
+// updates to the health listener as long as the SubConn's connectivity state
+// doesn't change and a new health listener is not registered. To invalidate
+// the currently registered health listener, acbw updates the healthData. If a
+// nil listener is registered, the active health listener is dropped.
+func (acbw *acBalancerWrapper) RegisterHealthListener(listener func(balancer.SubConnState)) {
+ acbw.healthMu.Lock()
+ defer acbw.healthMu.Unlock()
+ acbw.healthData.closeHealthProducer()
+ // listeners should not be registered when the connectivity state
+ // isn't Ready. This may happen when the balancer registers a listener
+ // after the connectivityState is updated, but before it is notified
+ // of the update.
+ if acbw.healthData.connectivityState != connectivity.Ready {
+ return
+ }
+ // Replace the health data to stop sending updates to any previously
+ // registered health listeners.
+ hd := newHealthData(connectivity.Ready)
+ acbw.healthData = hd
+ if listener == nil {
+ return
+ }
+
+ registerFn := acbw.healthListenerRegFn()
+ acbw.ccb.serializer.TrySchedule(func(ctx context.Context) {
+ if ctx.Err() != nil || acbw.ccb.balancer == nil {
+ return
+ }
+ // Don't send updates if a new listener is registered.
+ acbw.healthMu.Lock()
+ defer acbw.healthMu.Unlock()
+ if acbw.healthData != hd {
+ return
+ }
+ // Serialize the health updates from the health producer with
+ // other calls into the LB policy.
+ listenerWrapper := func(scs balancer.SubConnState) {
+ acbw.ccb.serializer.TrySchedule(func(ctx context.Context) {
+ if ctx.Err() != nil || acbw.ccb.balancer == nil {
+ return
+ }
+ acbw.healthMu.Lock()
+ defer acbw.healthMu.Unlock()
+ if acbw.healthData != hd {
+ return
+ }
+ listener(scs)
+ })
+ }
+
+ hd.closeHealthProducer = registerFn(ctx, listenerWrapper)
+ })
+}
diff --git a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
index 55bffaa7..21dd7296 100644
--- a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
+++ b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
@@ -18,7 +18,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.2
+// protoc-gen-go v1.35.2
// protoc v5.27.1
// source: grpc/binlog/v1/binarylog.proto
@@ -274,11 +274,9 @@ type GrpcLogEntry struct {
func (x *GrpcLogEntry) Reset() {
*x = GrpcLogEntry{}
- if protoimpl.UnsafeEnabled {
- mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *GrpcLogEntry) String() string {
@@ -289,7 +287,7 @@ func (*GrpcLogEntry) ProtoMessage() {}
func (x *GrpcLogEntry) ProtoReflect() protoreflect.Message {
mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -440,11 +438,9 @@ type ClientHeader struct {
func (x *ClientHeader) Reset() {
*x = ClientHeader{}
- if protoimpl.UnsafeEnabled {
- mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ClientHeader) String() string {
@@ -455,7 +451,7 @@ func (*ClientHeader) ProtoMessage() {}
func (x *ClientHeader) ProtoReflect() protoreflect.Message {
mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -509,11 +505,9 @@ type ServerHeader struct {
func (x *ServerHeader) Reset() {
*x = ServerHeader{}
- if protoimpl.UnsafeEnabled {
- mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *ServerHeader) String() string {
@@ -524,7 +518,7 @@ func (*ServerHeader) ProtoMessage() {}
func (x *ServerHeader) ProtoReflect() protoreflect.Message {
mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[2]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -565,11 +559,9 @@ type Trailer struct {
func (x *Trailer) Reset() {
*x = Trailer{}
- if protoimpl.UnsafeEnabled {
- mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Trailer) String() string {
@@ -580,7 +572,7 @@ func (*Trailer) ProtoMessage() {}
func (x *Trailer) ProtoReflect() protoreflect.Message {
mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[3]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -638,11 +630,9 @@ type Message struct {
func (x *Message) Reset() {
*x = Message{}
- if protoimpl.UnsafeEnabled {
- mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Message) String() string {
@@ -653,7 +643,7 @@ func (*Message) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message {
mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[4]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -713,11 +703,9 @@ type Metadata struct {
func (x *Metadata) Reset() {
*x = Metadata{}
- if protoimpl.UnsafeEnabled {
- mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Metadata) String() string {
@@ -728,7 +716,7 @@ func (*Metadata) ProtoMessage() {}
func (x *Metadata) ProtoReflect() protoreflect.Message {
mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[5]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -762,11 +750,9 @@ type MetadataEntry struct {
func (x *MetadataEntry) Reset() {
*x = MetadataEntry{}
- if protoimpl.UnsafeEnabled {
- mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *MetadataEntry) String() string {
@@ -777,7 +763,7 @@ func (*MetadataEntry) ProtoMessage() {}
func (x *MetadataEntry) ProtoReflect() protoreflect.Message {
mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[6]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -820,11 +806,9 @@ type Address struct {
func (x *Address) Reset() {
*x = Address{}
- if protoimpl.UnsafeEnabled {
- mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
+ mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
func (x *Address) String() string {
@@ -835,7 +819,7 @@ func (*Address) ProtoMessage() {}
func (x *Address) ProtoReflect() protoreflect.Message {
mi := &file_grpc_binlog_v1_binarylog_proto_msgTypes[7]
- if protoimpl.UnsafeEnabled && x != nil {
+ if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -1057,104 +1041,6 @@ func file_grpc_binlog_v1_binarylog_proto_init() {
if File_grpc_binlog_v1_binarylog_proto != nil {
return
}
- if !protoimpl.UnsafeEnabled {
- file_grpc_binlog_v1_binarylog_proto_msgTypes[0].Exporter = func(v any, i int) any {
- switch v := v.(*GrpcLogEntry); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_grpc_binlog_v1_binarylog_proto_msgTypes[1].Exporter = func(v any, i int) any {
- switch v := v.(*ClientHeader); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_grpc_binlog_v1_binarylog_proto_msgTypes[2].Exporter = func(v any, i int) any {
- switch v := v.(*ServerHeader); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_grpc_binlog_v1_binarylog_proto_msgTypes[3].Exporter = func(v any, i int) any {
- switch v := v.(*Trailer); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_grpc_binlog_v1_binarylog_proto_msgTypes[4].Exporter = func(v any, i int) any {
- switch v := v.(*Message); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_grpc_binlog_v1_binarylog_proto_msgTypes[5].Exporter = func(v any, i int) any {
- switch v := v.(*Metadata); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_grpc_binlog_v1_binarylog_proto_msgTypes[6].Exporter = func(v any, i int) any {
- switch v := v.(*MetadataEntry); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_grpc_binlog_v1_binarylog_proto_msgTypes[7].Exporter = func(v any, i int) any {
- switch v := v.(*Address); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
file_grpc_binlog_v1_binarylog_proto_msgTypes[0].OneofWrappers = []any{
(*GrpcLogEntry_ClientHeader)(nil),
(*GrpcLogEntry_ServerHeader)(nil),
diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go
index 19763f8e..4f57b554 100644
--- a/vendor/google.golang.org/grpc/clientconn.go
+++ b/vendor/google.golang.org/grpc/clientconn.go
@@ -775,10 +775,7 @@ func (cc *ClientConn) updateResolverStateAndUnlock(s resolver.State, err error)
}
}
- var balCfg serviceconfig.LoadBalancingConfig
- if cc.sc != nil && cc.sc.lbConfig != nil {
- balCfg = cc.sc.lbConfig
- }
+ balCfg := cc.sc.lbConfig
bw := cc.balancerWrapper
cc.mu.Unlock()
@@ -1374,7 +1371,7 @@ func (ac *addrConn) createTransport(ctx context.Context, addr resolver.Address,
defer cancel()
copts.ChannelzParent = ac.channelz
- newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onClose)
+ newTr, err := transport.NewHTTP2Client(connectCtx, ac.cc.ctx, addr, copts, onClose)
if err != nil {
if logger.V(2) {
logger.Infof("Creating new client transport to %q: %v", addr, err)
@@ -1448,7 +1445,7 @@ func (ac *addrConn) startHealthCheck(ctx context.Context) {
if !ac.scopts.HealthCheckEnabled {
return
}
- healthCheckFunc := ac.cc.dopts.healthCheckFunc
+ healthCheckFunc := internal.HealthCheckFunc
if healthCheckFunc == nil {
// The health package is not imported to set health check function.
//
@@ -1480,7 +1477,7 @@ func (ac *addrConn) startHealthCheck(ctx context.Context) {
}
// Start the health checking stream.
go func() {
- err := ac.cc.dopts.healthCheckFunc(ctx, newStream, setConnectivityState, healthCheckConfig.ServiceName)
+ err := healthCheckFunc(ctx, newStream, setConnectivityState, healthCheckConfig.ServiceName)
if err != nil {
if status.Code(err) == codes.Unimplemented {
channelz.Error(logger, ac.channelz, "Subchannel health check is unimplemented at server side, thus health check is disabled")
diff --git a/vendor/google.golang.org/grpc/codec.go b/vendor/google.golang.org/grpc/codec.go
index e840858b..959c2f99 100644
--- a/vendor/google.golang.org/grpc/codec.go
+++ b/vendor/google.golang.org/grpc/codec.go
@@ -71,7 +71,7 @@ func (c codecV0Bridge) Marshal(v any) (mem.BufferSlice, error) {
if err != nil {
return nil, err
}
- return mem.BufferSlice{mem.NewBuffer(&data, nil)}, nil
+ return mem.BufferSlice{mem.SliceBuffer(data)}, nil
}
func (c codecV0Bridge) Unmarshal(data mem.BufferSlice, v any) (err error) {
diff --git a/vendor/google.golang.org/grpc/credentials/tls.go b/vendor/google.golang.org/grpc/credentials/tls.go
index e163a473..bd5fe22b 100644
--- a/vendor/google.golang.org/grpc/credentials/tls.go
+++ b/vendor/google.golang.org/grpc/credentials/tls.go
@@ -32,6 +32,8 @@ import (
"google.golang.org/grpc/internal/envconfig"
)
+const alpnFailureHelpMessage = "If you upgraded from a grpc-go version earlier than 1.67, your TLS connections may have stopped working due to ALPN enforcement. For more details, see: https://github.com/grpc/grpc-go/issues/434"
+
var logger = grpclog.Component("credentials")
// TLSInfo contains the auth information for a TLS authenticated connection.
@@ -128,7 +130,7 @@ func (c *tlsCreds) ClientHandshake(ctx context.Context, authority string, rawCon
if np == "" {
if envconfig.EnforceALPNEnabled {
conn.Close()
- return nil, nil, fmt.Errorf("credentials: cannot check peer: missing selected ALPN property")
+ return nil, nil, fmt.Errorf("credentials: cannot check peer: missing selected ALPN property. %s", alpnFailureHelpMessage)
}
logger.Warningf("Allowing TLS connection to server %q with ALPN disabled. TLS connections to servers with ALPN disabled will be disallowed in future grpc-go releases", cfg.ServerName)
}
@@ -158,7 +160,7 @@ func (c *tlsCreds) ServerHandshake(rawConn net.Conn) (net.Conn, AuthInfo, error)
if cs.NegotiatedProtocol == "" {
if envconfig.EnforceALPNEnabled {
conn.Close()
- return nil, nil, fmt.Errorf("credentials: cannot check peer: missing selected ALPN property")
+ return nil, nil, fmt.Errorf("credentials: cannot check peer: missing selected ALPN property. %s", alpnFailureHelpMessage)
} else if logger.V(2) {
logger.Info("Allowing TLS connection from client with ALPN disabled. TLS connections with ALPN disabled will be disallowed in future grpc-go releases")
}
diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go
index 518692c3..f3a04529 100644
--- a/vendor/google.golang.org/grpc/dialoptions.go
+++ b/vendor/google.golang.org/grpc/dialoptions.go
@@ -87,7 +87,6 @@ type dialOptions struct {
disableServiceConfig bool
disableRetry bool
disableHealthCheck bool
- healthCheckFunc internal.HealthChecker
minConnectTimeout func() time.Duration
defaultServiceConfig *ServiceConfig // defaultServiceConfig is parsed from defaultServiceConfigRawJSON.
defaultServiceConfigRawJSON *string
@@ -429,6 +428,11 @@ func WithTimeout(d time.Duration) DialOption {
// returned by f, gRPC checks the error's Temporary() method to decide if it
// should try to reconnect to the network address.
//
+// Note that gRPC by default performs name resolution on the target passed to
+// NewClient. To bypass name resolution and cause the target string to be
+// passed directly to the dialer here instead, use the "passthrough" resolver
+// by specifying it in the target string, e.g. "passthrough:target".
+//
// Note: All supported releases of Go (as of December 2023) override the OS
// defaults for TCP keepalive time and interval to 15s. To enable TCP keepalive
// with OS defaults for keepalive time and interval, use a net.Dialer that sets
@@ -445,10 +449,6 @@ func WithContextDialer(f func(context.Context, string) (net.Conn, error)) DialOp
})
}
-func init() {
- internal.WithHealthCheckFunc = withHealthCheckFunc
-}
-
// WithDialer returns a DialOption that specifies a function to use for dialing
// network addresses. If FailOnNonTempDialError() is set to true, and an error
// is returned by f, gRPC checks the error's Temporary() method to decide if it
@@ -662,16 +662,6 @@ func WithDisableHealthCheck() DialOption {
})
}
-// withHealthCheckFunc replaces the default health check function with the
-// provided one. It makes tests easier to change the health check function.
-//
-// For testing purpose only.
-func withHealthCheckFunc(f internal.HealthChecker) DialOption {
- return newFuncDialOption(func(o *dialOptions) {
- o.healthCheckFunc = f
- })
-}
-
func defaultDialOptions() dialOptions {
return dialOptions{
copts: transport.ConnectOptions{
@@ -682,7 +672,6 @@ func defaultDialOptions() dialOptions {
BufferPool: mem.DefaultBufferPool(),
},
bs: internalbackoff.DefaultExponential,
- healthCheckFunc: internal.HealthCheckFunc,
idleTimeout: 30 * time.Minute,
defaultScheme: "dns",
maxCallAttempts: defaultMaxCallAttempts,
diff --git a/vendor/google.golang.org/grpc/encoding/gzip/gzip.go b/vendor/google.golang.org/grpc/encoding/gzip/gzip.go
new file mode 100644
index 00000000..6306e8bb
--- /dev/null
+++ b/vendor/google.golang.org/grpc/encoding/gzip/gzip.go
@@ -0,0 +1,132 @@
+/*
+ *
+ * Copyright 2017 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// Package gzip implements and registers the gzip compressor
+// during the initialization.
+//
+// # Experimental
+//
+// Notice: This package is EXPERIMENTAL and may be changed or removed in a
+// later release.
+package gzip
+
+import (
+ "compress/gzip"
+ "encoding/binary"
+ "fmt"
+ "io"
+ "sync"
+
+ "google.golang.org/grpc/encoding"
+)
+
+// Name is the name registered for the gzip compressor.
+const Name = "gzip"
+
+func init() {
+ c := &compressor{}
+ c.poolCompressor.New = func() any {
+ return &writer{Writer: gzip.NewWriter(io.Discard), pool: &c.poolCompressor}
+ }
+ encoding.RegisterCompressor(c)
+}
+
+type writer struct {
+ *gzip.Writer
+ pool *sync.Pool
+}
+
+// SetLevel updates the registered gzip compressor to use the compression level specified (gzip.HuffmanOnly is not supported).
+// NOTE: this function must only be called during initialization time (i.e. in an init() function),
+// and is not thread-safe.
+//
+// The error returned will be nil if the specified level is valid.
+func SetLevel(level int) error {
+ if level < gzip.DefaultCompression || level > gzip.BestCompression {
+ return fmt.Errorf("grpc: invalid gzip compression level: %d", level)
+ }
+ c := encoding.GetCompressor(Name).(*compressor)
+ c.poolCompressor.New = func() any {
+ w, err := gzip.NewWriterLevel(io.Discard, level)
+ if err != nil {
+ panic(err)
+ }
+ return &writer{Writer: w, pool: &c.poolCompressor}
+ }
+ return nil
+}
+
+func (c *compressor) Compress(w io.Writer) (io.WriteCloser, error) {
+ z := c.poolCompressor.Get().(*writer)
+ z.Writer.Reset(w)
+ return z, nil
+}
+
+func (z *writer) Close() error {
+ defer z.pool.Put(z)
+ return z.Writer.Close()
+}
+
+type reader struct {
+ *gzip.Reader
+ pool *sync.Pool
+}
+
+func (c *compressor) Decompress(r io.Reader) (io.Reader, error) {
+ z, inPool := c.poolDecompressor.Get().(*reader)
+ if !inPool {
+ newZ, err := gzip.NewReader(r)
+ if err != nil {
+ return nil, err
+ }
+ return &reader{Reader: newZ, pool: &c.poolDecompressor}, nil
+ }
+ if err := z.Reset(r); err != nil {
+ c.poolDecompressor.Put(z)
+ return nil, err
+ }
+ return z, nil
+}
+
+func (z *reader) Read(p []byte) (n int, err error) {
+ n, err = z.Reader.Read(p)
+ if err == io.EOF {
+ z.pool.Put(z)
+ }
+ return n, err
+}
+
+// RFC1952 specifies that the last four bytes "contains the size of
+// the original (uncompressed) input data modulo 2^32."
+// gRPC has a max message size of 2GB so we don't need to worry about wraparound.
+func (c *compressor) DecompressedSize(buf []byte) int {
+ last := len(buf)
+ if last < 4 {
+ return -1
+ }
+ return int(binary.LittleEndian.Uint32(buf[last-4 : last]))
+}
+
+func (c *compressor) Name() string {
+ return Name
+}
+
+type compressor struct {
+ poolCompressor sync.Pool
+ poolDecompressor sync.Pool
+}
diff --git a/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go b/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go
index 1d827dd5..ad75313a 100644
--- a/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go
+++ b/vendor/google.golang.org/grpc/experimental/stats/metricregistry.go
@@ -23,6 +23,7 @@ import (
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/internal"
+ "google.golang.org/grpc/stats"
)
func init() {
@@ -34,7 +35,7 @@ var logger = grpclog.Component("metrics-registry")
// DefaultMetrics are the default metrics registered through global metrics
// registry. This is written to at initialization time only, and is read only
// after initialization.
-var DefaultMetrics = NewMetrics()
+var DefaultMetrics = stats.NewMetricSet()
// MetricDescriptor is the data for a registered metric.
type MetricDescriptor struct {
@@ -42,7 +43,7 @@ type MetricDescriptor struct {
// (including any per call metrics). See
// https://github.com/grpc/proposal/blob/master/A79-non-per-call-metrics-architecture.md#metric-instrument-naming-conventions
// for metric naming conventions.
- Name Metric
+ Name string
// The description of this metric.
Description string
// The unit (e.g. entries, seconds) of this metric.
@@ -154,27 +155,27 @@ func (h *Int64GaugeHandle) Record(recorder MetricsRecorder, incr int64, labels .
}
// registeredMetrics are the registered metric descriptor names.
-var registeredMetrics = make(map[Metric]bool)
+var registeredMetrics = make(map[string]bool)
// metricsRegistry contains all of the registered metrics.
//
// This is written to only at init time, and read only after that.
-var metricsRegistry = make(map[Metric]*MetricDescriptor)
+var metricsRegistry = make(map[string]*MetricDescriptor)
// DescriptorForMetric returns the MetricDescriptor from the global registry.
//
// Returns nil if MetricDescriptor not present.
-func DescriptorForMetric(metric Metric) *MetricDescriptor {
- return metricsRegistry[metric]
+func DescriptorForMetric(metricName string) *MetricDescriptor {
+ return metricsRegistry[metricName]
}
-func registerMetric(name Metric, def bool) {
- if registeredMetrics[name] {
- logger.Fatalf("metric %v already registered", name)
+func registerMetric(metricName string, def bool) {
+ if registeredMetrics[metricName] {
+ logger.Fatalf("metric %v already registered", metricName)
}
- registeredMetrics[name] = true
+ registeredMetrics[metricName] = true
if def {
- DefaultMetrics = DefaultMetrics.Add(name)
+ DefaultMetrics = DefaultMetrics.Add(metricName)
}
}
@@ -256,8 +257,8 @@ func snapshotMetricsRegistryForTesting() func() {
oldRegisteredMetrics := registeredMetrics
oldMetricsRegistry := metricsRegistry
- registeredMetrics = make(map[Metric]bool)
- metricsRegistry = make(map[Metric]*MetricDescriptor)
+ registeredMetrics = make(map[string]bool)
+ metricsRegistry = make(map[string]*MetricDescriptor)
maps.Copy(registeredMetrics, registeredMetrics)
maps.Copy(metricsRegistry, metricsRegistry)
diff --git a/vendor/google.golang.org/grpc/experimental/stats/metrics.go b/vendor/google.golang.org/grpc/experimental/stats/metrics.go
index 3221f7a6..ee142360 100644
--- a/vendor/google.golang.org/grpc/experimental/stats/metrics.go
+++ b/vendor/google.golang.org/grpc/experimental/stats/metrics.go
@@ -19,7 +19,7 @@
// Package stats contains experimental metrics/stats API's.
package stats
-import "maps"
+import "google.golang.org/grpc/stats"
// MetricsRecorder records on metrics derived from metric registry.
type MetricsRecorder interface {
@@ -40,75 +40,15 @@ type MetricsRecorder interface {
RecordInt64Gauge(handle *Int64GaugeHandle, incr int64, labels ...string)
}
-// Metric is an identifier for a metric.
-type Metric string
+// Metrics is an experimental legacy alias of the now-stable stats.MetricSet.
+// Metrics will be deleted in a future release.
+type Metrics = stats.MetricSet
-// Metrics is a set of metrics to record. Once created, Metrics is immutable,
-// however Add and Remove can make copies with specific metrics added or
-// removed, respectively.
-//
-// Do not construct directly; use NewMetrics instead.
-type Metrics struct {
- // metrics are the set of metrics to initialize.
- metrics map[Metric]bool
-}
+// Metric was replaced by direct usage of strings.
+type Metric = string
-// NewMetrics returns a Metrics containing Metrics.
+// NewMetrics is an experimental legacy alias of the now-stable
+// stats.NewMetricSet. NewMetrics will be deleted in a future release.
func NewMetrics(metrics ...Metric) *Metrics {
- newMetrics := make(map[Metric]bool)
- for _, metric := range metrics {
- newMetrics[metric] = true
- }
- return &Metrics{
- metrics: newMetrics,
- }
-}
-
-// Metrics returns the metrics set. The returned map is read-only and must not
-// be modified.
-func (m *Metrics) Metrics() map[Metric]bool {
- return m.metrics
-}
-
-// Add adds the metrics to the metrics set and returns a new copy with the
-// additional metrics.
-func (m *Metrics) Add(metrics ...Metric) *Metrics {
- newMetrics := make(map[Metric]bool)
- for metric := range m.metrics {
- newMetrics[metric] = true
- }
-
- for _, metric := range metrics {
- newMetrics[metric] = true
- }
- return &Metrics{
- metrics: newMetrics,
- }
-}
-
-// Join joins the metrics passed in with the metrics set, and returns a new copy
-// with the merged metrics.
-func (m *Metrics) Join(metrics *Metrics) *Metrics {
- newMetrics := make(map[Metric]bool)
- maps.Copy(newMetrics, m.metrics)
- maps.Copy(newMetrics, metrics.metrics)
- return &Metrics{
- metrics: newMetrics,
- }
-}
-
-// Remove removes the metrics from the metrics set and returns a new copy with
-// the metrics removed.
-func (m *Metrics) Remove(metrics ...Metric) *Metrics {
- newMetrics := make(map[Metric]bool)
- for metric := range m.metrics {
- newMetrics[metric] = true
- }
-
- for _, metric := range metrics {
- delete(newMetrics, metric)
- }
- return &Metrics{
- metrics: newMetrics,
- }
+ return stats.NewMetricSet(metrics...)
}
diff --git a/vendor/google.golang.org/grpc/grpclog/internal/loggerv2.go b/vendor/google.golang.org/grpc/grpclog/internal/loggerv2.go
index 07df71e9..ed90060c 100644
--- a/vendor/google.golang.org/grpc/grpclog/internal/loggerv2.go
+++ b/vendor/google.golang.org/grpc/grpclog/internal/loggerv2.go
@@ -101,6 +101,22 @@ var severityName = []string{
fatalLog: "FATAL",
}
+// sprintf is fmt.Sprintf.
+// These vars exist to make it possible to test that expensive format calls aren't made unnecessarily.
+var sprintf = fmt.Sprintf
+
+// sprint is fmt.Sprint.
+// These vars exist to make it possible to test that expensive format calls aren't made unnecessarily.
+var sprint = fmt.Sprint
+
+// sprintln is fmt.Sprintln.
+// These vars exist to make it possible to test that expensive format calls aren't made unnecessarily.
+var sprintln = fmt.Sprintln
+
+// exit is os.Exit.
+// This var exists to make it possible to test functions calling os.Exit.
+var exit = os.Exit
+
// loggerT is the default logger used by grpclog.
type loggerT struct {
m []*log.Logger
@@ -111,7 +127,7 @@ type loggerT struct {
func (g *loggerT) output(severity int, s string) {
sevStr := severityName[severity]
if !g.jsonFormat {
- g.m[severity].Output(2, fmt.Sprintf("%v: %v", sevStr, s))
+ g.m[severity].Output(2, sevStr+": "+s)
return
}
// TODO: we can also include the logging component, but that needs more
@@ -123,55 +139,79 @@ func (g *loggerT) output(severity int, s string) {
g.m[severity].Output(2, string(b))
}
+func (g *loggerT) printf(severity int, format string, args ...any) {
+ // Note the discard check is duplicated in each print func, rather than in
+ // output, to avoid the expensive Sprint calls.
+ // De-duplicating this by moving to output would be a significant performance regression!
+ if lg := g.m[severity]; lg.Writer() == io.Discard {
+ return
+ }
+ g.output(severity, sprintf(format, args...))
+}
+
+func (g *loggerT) print(severity int, v ...any) {
+ if lg := g.m[severity]; lg.Writer() == io.Discard {
+ return
+ }
+ g.output(severity, sprint(v...))
+}
+
+func (g *loggerT) println(severity int, v ...any) {
+ if lg := g.m[severity]; lg.Writer() == io.Discard {
+ return
+ }
+ g.output(severity, sprintln(v...))
+}
+
func (g *loggerT) Info(args ...any) {
- g.output(infoLog, fmt.Sprint(args...))
+ g.print(infoLog, args...)
}
func (g *loggerT) Infoln(args ...any) {
- g.output(infoLog, fmt.Sprintln(args...))
+ g.println(infoLog, args...)
}
func (g *loggerT) Infof(format string, args ...any) {
- g.output(infoLog, fmt.Sprintf(format, args...))
+ g.printf(infoLog, format, args...)
}
func (g *loggerT) Warning(args ...any) {
- g.output(warningLog, fmt.Sprint(args...))
+ g.print(warningLog, args...)
}
func (g *loggerT) Warningln(args ...any) {
- g.output(warningLog, fmt.Sprintln(args...))
+ g.println(warningLog, args...)
}
func (g *loggerT) Warningf(format string, args ...any) {
- g.output(warningLog, fmt.Sprintf(format, args...))
+ g.printf(warningLog, format, args...)
}
func (g *loggerT) Error(args ...any) {
- g.output(errorLog, fmt.Sprint(args...))
+ g.print(errorLog, args...)
}
func (g *loggerT) Errorln(args ...any) {
- g.output(errorLog, fmt.Sprintln(args...))
+ g.println(errorLog, args...)
}
func (g *loggerT) Errorf(format string, args ...any) {
- g.output(errorLog, fmt.Sprintf(format, args...))
+ g.printf(errorLog, format, args...)
}
func (g *loggerT) Fatal(args ...any) {
- g.output(fatalLog, fmt.Sprint(args...))
- os.Exit(1)
+ g.print(fatalLog, args...)
+ exit(1)
}
func (g *loggerT) Fatalln(args ...any) {
- g.output(fatalLog, fmt.Sprintln(args...))
- os.Exit(1)
+ g.println(fatalLog, args...)
+ exit(1)
}
func (g *loggerT) Fatalf(format string, args ...any) {
- g.output(fatalLog, fmt.Sprintf(format, args...))
- os.Exit(1)
+ g.printf(fatalLog, format, args...)
+ exit(1)
}
func (g *loggerT) V(l int) bool {
@@ -186,19 +226,42 @@ type LoggerV2Config struct {
FormatJSON bool
}
+// combineLoggers returns a combined logger for both higher & lower severity logs,
+// or only one if the other is io.Discard.
+//
+// This uses io.Discard instead of io.MultiWriter when all loggers
+// are set to io.Discard. Both this package and the standard log package have
+// significant optimizations for io.Discard, which io.MultiWriter lacks (as of
+// this writing).
+func combineLoggers(lower, higher io.Writer) io.Writer {
+ if lower == io.Discard {
+ return higher
+ }
+ if higher == io.Discard {
+ return lower
+ }
+ return io.MultiWriter(lower, higher)
+}
+
// NewLoggerV2 creates a new LoggerV2 instance with the provided configuration.
// The infoW, warningW, and errorW writers are used to write log messages of
// different severity levels.
func NewLoggerV2(infoW, warningW, errorW io.Writer, c LoggerV2Config) LoggerV2 {
- var m []*log.Logger
flag := log.LstdFlags
if c.FormatJSON {
flag = 0
}
- m = append(m, log.New(infoW, "", flag))
- m = append(m, log.New(io.MultiWriter(infoW, warningW), "", flag))
- ew := io.MultiWriter(infoW, warningW, errorW) // ew will be used for error and fatal.
- m = append(m, log.New(ew, "", flag))
- m = append(m, log.New(ew, "", flag))
+
+ warningW = combineLoggers(infoW, warningW)
+ errorW = combineLoggers(errorW, warningW)
+
+ fatalW := errorW
+
+ m := []*log.Logger{
+ log.New(infoW, "", flag),
+ log.New(warningW, "", flag),
+ log.New(errorW, "", flag),
+ log.New(fatalW, "", flag),
+ }
return &loggerT{m: m, v: c.Verbosity, jsonFormat: c.FormatJSON}
}
diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go
new file mode 100644
index 00000000..467de16b
--- /dev/null
+++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go
@@ -0,0 +1,278 @@
+// Copyright 2015 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// The canonical version of this proto can be found at
+// https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.35.2
+// protoc v5.27.1
+// source: grpc/health/v1/health.proto
+
+package grpc_health_v1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type HealthCheckResponse_ServingStatus int32
+
+const (
+ HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0
+ HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1
+ HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2
+ HealthCheckResponse_SERVICE_UNKNOWN HealthCheckResponse_ServingStatus = 3 // Used only by the Watch method.
+)
+
+// Enum value maps for HealthCheckResponse_ServingStatus.
+var (
+ HealthCheckResponse_ServingStatus_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "SERVING",
+ 2: "NOT_SERVING",
+ 3: "SERVICE_UNKNOWN",
+ }
+ HealthCheckResponse_ServingStatus_value = map[string]int32{
+ "UNKNOWN": 0,
+ "SERVING": 1,
+ "NOT_SERVING": 2,
+ "SERVICE_UNKNOWN": 3,
+ }
+)
+
+func (x HealthCheckResponse_ServingStatus) Enum() *HealthCheckResponse_ServingStatus {
+ p := new(HealthCheckResponse_ServingStatus)
+ *p = x
+ return p
+}
+
+func (x HealthCheckResponse_ServingStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (HealthCheckResponse_ServingStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_grpc_health_v1_health_proto_enumTypes[0].Descriptor()
+}
+
+func (HealthCheckResponse_ServingStatus) Type() protoreflect.EnumType {
+ return &file_grpc_health_v1_health_proto_enumTypes[0]
+}
+
+func (x HealthCheckResponse_ServingStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use HealthCheckResponse_ServingStatus.Descriptor instead.
+func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) {
+ return file_grpc_health_v1_health_proto_rawDescGZIP(), []int{1, 0}
+}
+
+type HealthCheckRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
+}
+
+func (x *HealthCheckRequest) Reset() {
+ *x = HealthCheckRequest{}
+ mi := &file_grpc_health_v1_health_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *HealthCheckRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HealthCheckRequest) ProtoMessage() {}
+
+func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_health_v1_health_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
+func (*HealthCheckRequest) Descriptor() ([]byte, []int) {
+ return file_grpc_health_v1_health_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *HealthCheckRequest) GetService() string {
+ if x != nil {
+ return x.Service
+ }
+ return ""
+}
+
+type HealthCheckResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=grpc.health.v1.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
+}
+
+func (x *HealthCheckResponse) Reset() {
+ *x = HealthCheckResponse{}
+ mi := &file_grpc_health_v1_health_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *HealthCheckResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HealthCheckResponse) ProtoMessage() {}
+
+func (x *HealthCheckResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_grpc_health_v1_health_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.
+func (*HealthCheckResponse) Descriptor() ([]byte, []int) {
+ return file_grpc_health_v1_health_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus {
+ if x != nil {
+ return x.Status
+ }
+ return HealthCheckResponse_UNKNOWN
+}
+
+var File_grpc_health_v1_health_proto protoreflect.FileDescriptor
+
+var file_grpc_health_v1_health_proto_rawDesc = []byte{
+ 0x0a, 0x1b, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x31,
+ 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67,
+ 0x72, 0x70, 0x63, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x22, 0x2e, 0x0a,
+ 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0xb1, 0x01,
+ 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x68, 0x65, 0x61,
+ 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65,
+ 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x22, 0x4f, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b,
+ 0x0a, 0x07, 0x53, 0x45, 0x52, 0x56, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e,
+ 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f,
+ 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10,
+ 0x03, 0x32, 0xae, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x50, 0x0a, 0x05,
+ 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x68, 0x65, 0x61,
+ 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65,
+ 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63,
+ 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74,
+ 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52,
+ 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x68,
+ 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43,
+ 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72,
+ 0x70, 0x63, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61,
+ 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x30, 0x01, 0x42, 0x61, 0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x68, 0x65,
+ 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67,
+ 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x68,
+ 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74,
+ 0x68, 0x5f, 0x76, 0x31, 0xaa, 0x02, 0x0e, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x65, 0x61, 0x6c,
+ 0x74, 0x68, 0x2e, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_grpc_health_v1_health_proto_rawDescOnce sync.Once
+ file_grpc_health_v1_health_proto_rawDescData = file_grpc_health_v1_health_proto_rawDesc
+)
+
+func file_grpc_health_v1_health_proto_rawDescGZIP() []byte {
+ file_grpc_health_v1_health_proto_rawDescOnce.Do(func() {
+ file_grpc_health_v1_health_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_health_v1_health_proto_rawDescData)
+ })
+ return file_grpc_health_v1_health_proto_rawDescData
+}
+
+var file_grpc_health_v1_health_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_grpc_health_v1_health_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_grpc_health_v1_health_proto_goTypes = []any{
+ (HealthCheckResponse_ServingStatus)(0), // 0: grpc.health.v1.HealthCheckResponse.ServingStatus
+ (*HealthCheckRequest)(nil), // 1: grpc.health.v1.HealthCheckRequest
+ (*HealthCheckResponse)(nil), // 2: grpc.health.v1.HealthCheckResponse
+}
+var file_grpc_health_v1_health_proto_depIdxs = []int32{
+ 0, // 0: grpc.health.v1.HealthCheckResponse.status:type_name -> grpc.health.v1.HealthCheckResponse.ServingStatus
+ 1, // 1: grpc.health.v1.Health.Check:input_type -> grpc.health.v1.HealthCheckRequest
+ 1, // 2: grpc.health.v1.Health.Watch:input_type -> grpc.health.v1.HealthCheckRequest
+ 2, // 3: grpc.health.v1.Health.Check:output_type -> grpc.health.v1.HealthCheckResponse
+ 2, // 4: grpc.health.v1.Health.Watch:output_type -> grpc.health.v1.HealthCheckResponse
+ 3, // [3:5] is the sub-list for method output_type
+ 1, // [1:3] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_grpc_health_v1_health_proto_init() }
+func file_grpc_health_v1_health_proto_init() {
+ if File_grpc_health_v1_health_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_grpc_health_v1_health_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_grpc_health_v1_health_proto_goTypes,
+ DependencyIndexes: file_grpc_health_v1_health_proto_depIdxs,
+ EnumInfos: file_grpc_health_v1_health_proto_enumTypes,
+ MessageInfos: file_grpc_health_v1_health_proto_msgTypes,
+ }.Build()
+ File_grpc_health_v1_health_proto = out.File
+ file_grpc_health_v1_health_proto_rawDesc = nil
+ file_grpc_health_v1_health_proto_goTypes = nil
+ file_grpc_health_v1_health_proto_depIdxs = nil
+}
diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go
new file mode 100644
index 00000000..f96b8ab4
--- /dev/null
+++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go
@@ -0,0 +1,234 @@
+// Copyright 2015 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// The canonical version of this proto can be found at
+// https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto
+
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc v5.27.1
+// source: grpc/health/v1/health.proto
+
+package grpc_health_v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ Health_Check_FullMethodName = "/grpc.health.v1.Health/Check"
+ Health_Watch_FullMethodName = "/grpc.health.v1.Health/Watch"
+)
+
+// HealthClient is the client API for Health service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// Health is gRPC's mechanism for checking whether a server is able to handle
+// RPCs. Its semantics are documented in
+// https://github.com/grpc/grpc/blob/master/doc/health-checking.md.
+type HealthClient interface {
+ // Check gets the health of the specified service. If the requested service
+ // is unknown, the call will fail with status NOT_FOUND. If the caller does
+ // not specify a service name, the server should respond with its overall
+ // health status.
+ //
+ // Clients should set a deadline when calling Check, and can declare the
+ // server unhealthy if they do not receive a timely response.
+ //
+ // Check implementations should be idempotent and side effect free.
+ Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
+ // Performs a watch for the serving status of the requested service.
+ // The server will immediately send back a message indicating the current
+ // serving status. It will then subsequently send a new message whenever
+ // the service's serving status changes.
+ //
+ // If the requested service is unknown when the call is received, the
+ // server will send a message setting the serving status to
+ // SERVICE_UNKNOWN but will *not* terminate the call. If at some
+ // future point, the serving status of the service becomes known, the
+ // server will send a new message with the service's serving status.
+ //
+ // If the call terminates with status UNIMPLEMENTED, then clients
+ // should assume this method is not supported and should not retry the
+ // call. If the call terminates with any other status (including OK),
+ // clients should retry the call with appropriate exponential backoff.
+ Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[HealthCheckResponse], error)
+}
+
+type healthClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewHealthClient(cc grpc.ClientConnInterface) HealthClient {
+ return &healthClient{cc}
+}
+
+func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(HealthCheckResponse)
+ err := c.cc.Invoke(ctx, Health_Check_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *healthClient) Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[HealthCheckResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &Health_ServiceDesc.Streams[0], Health_Watch_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[HealthCheckRequest, HealthCheckResponse]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Health_WatchClient = grpc.ServerStreamingClient[HealthCheckResponse]
+
+// HealthServer is the server API for Health service.
+// All implementations should embed UnimplementedHealthServer
+// for forward compatibility.
+//
+// Health is gRPC's mechanism for checking whether a server is able to handle
+// RPCs. Its semantics are documented in
+// https://github.com/grpc/grpc/blob/master/doc/health-checking.md.
+type HealthServer interface {
+ // Check gets the health of the specified service. If the requested service
+ // is unknown, the call will fail with status NOT_FOUND. If the caller does
+ // not specify a service name, the server should respond with its overall
+ // health status.
+ //
+ // Clients should set a deadline when calling Check, and can declare the
+ // server unhealthy if they do not receive a timely response.
+ //
+ // Check implementations should be idempotent and side effect free.
+ Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
+ // Performs a watch for the serving status of the requested service.
+ // The server will immediately send back a message indicating the current
+ // serving status. It will then subsequently send a new message whenever
+ // the service's serving status changes.
+ //
+ // If the requested service is unknown when the call is received, the
+ // server will send a message setting the serving status to
+ // SERVICE_UNKNOWN but will *not* terminate the call. If at some
+ // future point, the serving status of the service becomes known, the
+ // server will send a new message with the service's serving status.
+ //
+ // If the call terminates with status UNIMPLEMENTED, then clients
+ // should assume this method is not supported and should not retry the
+ // call. If the call terminates with any other status (including OK),
+ // clients should retry the call with appropriate exponential backoff.
+ Watch(*HealthCheckRequest, grpc.ServerStreamingServer[HealthCheckResponse]) error
+}
+
+// UnimplementedHealthServer should be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedHealthServer struct{}
+
+func (UnimplementedHealthServer) Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
+}
+func (UnimplementedHealthServer) Watch(*HealthCheckRequest, grpc.ServerStreamingServer[HealthCheckResponse]) error {
+ return status.Errorf(codes.Unimplemented, "method Watch not implemented")
+}
+func (UnimplementedHealthServer) testEmbeddedByValue() {}
+
+// UnsafeHealthServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to HealthServer will
+// result in compilation errors.
+type UnsafeHealthServer interface {
+ mustEmbedUnimplementedHealthServer()
+}
+
+func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer) {
+ // If the following call panics, it indicates UnimplementedHealthServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&Health_ServiceDesc, srv)
+}
+
+func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(HealthCheckRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(HealthServer).Check(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: Health_Check_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(HealthServer).Check(ctx, req.(*HealthCheckRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Health_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(HealthCheckRequest)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(HealthServer).Watch(m, &grpc.GenericServerStream[HealthCheckRequest, HealthCheckResponse]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type Health_WatchServer = grpc.ServerStreamingServer[HealthCheckResponse]
+
+// Health_ServiceDesc is the grpc.ServiceDesc for Health service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Health_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "grpc.health.v1.Health",
+ HandlerType: (*HealthServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "Check",
+ Handler: _Health_Check_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "Watch",
+ Handler: _Health_Watch_Handler,
+ ServerStreams: true,
+ },
+ },
+ Metadata: "grpc/health/v1/health.proto",
+}
diff --git a/vendor/google.golang.org/grpc/internal/backoff/backoff.go b/vendor/google.golang.org/grpc/internal/backoff/backoff.go
index b15cf482..b6ae7f25 100644
--- a/vendor/google.golang.org/grpc/internal/backoff/backoff.go
+++ b/vendor/google.golang.org/grpc/internal/backoff/backoff.go
@@ -25,7 +25,7 @@ package backoff
import (
"context"
"errors"
- "math/rand"
+ rand "math/rand/v2"
"time"
grpcbackoff "google.golang.org/grpc/backoff"
diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
index 6e7dd6b7..1e42b6fd 100644
--- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
+++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
@@ -49,7 +49,7 @@ var (
// XDSFallbackSupport is the env variable that controls whether support for
// xDS fallback is turned on. If this is unset or is false, only the first
// xDS server in the list of server configs will be used.
- XDSFallbackSupport = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FALLBACK", false)
+ XDSFallbackSupport = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FALLBACK", true)
// NewPickFirstEnabled is set if the new pickfirst leaf policy is to be used
// instead of the exiting pickfirst implementation. This can be enabled by
// setting the environment variable "GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST"
diff --git a/vendor/google.golang.org/grpc/internal/envconfig/xds.go b/vendor/google.golang.org/grpc/internal/envconfig/xds.go
index 29f234ac..9afeb444 100644
--- a/vendor/google.golang.org/grpc/internal/envconfig/xds.go
+++ b/vendor/google.golang.org/grpc/internal/envconfig/xds.go
@@ -53,4 +53,10 @@ var (
// C2PResolverTestOnlyTrafficDirectorURI is the TD URI for testing.
C2PResolverTestOnlyTrafficDirectorURI = os.Getenv("GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI")
+
+ // XDSDualstackEndpointsEnabled is true if gRPC should read the
+ // "additional addresses" in the xDS endpoint resource.
+ // TODO: https://github.com/grpc/grpc-go/issues/7866 - Control this using
+ // an env variable when all LB policies handle endpoints.
+ XDSDualstackEndpointsEnabled = false
)
diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go
index 20b4dc3d..c17b9819 100644
--- a/vendor/google.golang.org/grpc/internal/internal.go
+++ b/vendor/google.golang.org/grpc/internal/internal.go
@@ -29,10 +29,12 @@ import (
)
var (
- // WithHealthCheckFunc is set by dialoptions.go
- WithHealthCheckFunc any // func (HealthChecker) DialOption
// HealthCheckFunc is used to provide client-side LB channel health checking
HealthCheckFunc HealthChecker
+ // RegisterClientHealthCheckListener is used to provide a listener for
+ // updates from the client-side health checking service. It returns a
+ // function that can be called to stop the health producer.
+ RegisterClientHealthCheckListener any // func(ctx context.Context, sc balancer.SubConn, serviceName string, listener func(balancer.SubConnState)) func()
// BalancerUnregister is exported by package balancer to unregister a balancer.
BalancerUnregister func(name string)
// KeepaliveMinPingTime is the minimum ping interval. This must be 10s by
@@ -149,6 +151,20 @@ var (
// other features, including the CSDS service.
NewXDSResolverWithConfigForTesting any // func([]byte) (resolver.Builder, error)
+ // NewXDSResolverWithClientForTesting creates a new xDS resolver builder
+ // using the provided xDS client instead of creating a new one using the
+ // bootstrap configuration specified by the supported environment variables.
+ // The resolver.Builder is meant to be used in conjunction with the
+ // grpc.WithResolvers DialOption. The resolver.Builder does not take
+ // ownership of the provided xDS client and it is the responsibility of the
+ // caller to close the client when no longer required.
+ //
+ // Testing Only
+ //
+ // This function should ONLY be used for testing and may not work with some
+ // other features, including the CSDS service.
+ NewXDSResolverWithClientForTesting any // func(xdsclient.XDSClient) (resolver.Builder, error)
+
// RegisterRLSClusterSpecifierPluginForTesting registers the RLS Cluster
// Specifier Plugin for testing purposes, regardless of the XDSRLS environment
// variable.
@@ -255,3 +271,9 @@ const (
// It currently has an experimental suffix which would be removed once
// end-to-end testing of the policy is completed.
const RLSLoadBalancingPolicyName = "rls_experimental"
+
+// EnforceSubConnEmbedding is used to enforce proper SubConn implementation
+// embedding.
+type EnforceSubConnEmbedding interface {
+ enforceSubConnEmbedding()
+}
diff --git a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go
index 8691698e..ba5c5a95 100644
--- a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go
+++ b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go
@@ -24,8 +24,9 @@ import (
"context"
"encoding/json"
"fmt"
- "math/rand"
+ rand "math/rand/v2"
"net"
+ "net/netip"
"os"
"strconv"
"strings"
@@ -122,7 +123,7 @@ func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts
}
// IP address.
- if ipAddr, ok := formatIP(host); ok {
+ if ipAddr, err := formatIP(host); err == nil {
addr := []resolver.Address{{Addr: ipAddr + ":" + port}}
cc.UpdateState(resolver.State{Addresses: addr})
return deadResolver{}, nil
@@ -237,7 +238,9 @@ func (d *dnsResolver) watcher() {
}
func (d *dnsResolver) lookupSRV(ctx context.Context) ([]resolver.Address, error) {
- if !EnableSRVLookups {
+ // Skip this particular host to avoid timeouts with some versions of
+ // systemd-resolved.
+ if !EnableSRVLookups || d.host == "metadata.google.internal." {
return nil, nil
}
var newAddrs []resolver.Address
@@ -258,9 +261,9 @@ func (d *dnsResolver) lookupSRV(ctx context.Context) ([]resolver.Address, error)
return nil, err
}
for _, a := range lbAddrs {
- ip, ok := formatIP(a)
- if !ok {
- return nil, fmt.Errorf("dns: error parsing A record IP address %v", a)
+ ip, err := formatIP(a)
+ if err != nil {
+ return nil, fmt.Errorf("dns: error parsing A record IP address %v: %v", a, err)
}
addr := ip + ":" + strconv.Itoa(int(s.Port))
newAddrs = append(newAddrs, resolver.Address{Addr: addr, ServerName: s.Target})
@@ -320,9 +323,9 @@ func (d *dnsResolver) lookupHost(ctx context.Context) ([]resolver.Address, error
}
newAddrs := make([]resolver.Address, 0, len(addrs))
for _, a := range addrs {
- ip, ok := formatIP(a)
- if !ok {
- return nil, fmt.Errorf("dns: error parsing A record IP address %v", a)
+ ip, err := formatIP(a)
+ if err != nil {
+ return nil, fmt.Errorf("dns: error parsing A record IP address %v: %v", a, err)
}
addr := ip + ":" + d.port
newAddrs = append(newAddrs, resolver.Address{Addr: addr})
@@ -349,19 +352,19 @@ func (d *dnsResolver) lookup() (*resolver.State, error) {
return &state, nil
}
-// formatIP returns ok = false if addr is not a valid textual representation of
-// an IP address. If addr is an IPv4 address, return the addr and ok = true.
+// formatIP returns an error if addr is not a valid textual representation of
+// an IP address. If addr is an IPv4 address, return the addr and error = nil.
// If addr is an IPv6 address, return the addr enclosed in square brackets and
-// ok = true.
-func formatIP(addr string) (addrIP string, ok bool) {
- ip := net.ParseIP(addr)
- if ip == nil {
- return "", false
+// error = nil.
+func formatIP(addr string) (string, error) {
+ ip, err := netip.ParseAddr(addr)
+ if err != nil {
+ return "", err
}
- if ip.To4() != nil {
- return addr, true
+ if ip.Is4() {
+ return addr, nil
}
- return "[" + addr + "]", true
+ return "[" + addr + "]", nil
}
// parseTarget takes the user input target string and default port, returns
@@ -377,7 +380,7 @@ func parseTarget(target, defaultPort string) (host, port string, err error) {
if target == "" {
return "", "", internal.ErrMissingAddr
}
- if ip := net.ParseIP(target); ip != nil {
+ if _, err := netip.ParseAddr(target); err == nil {
// target is an IPv4 or IPv6(without brackets) address
return target, defaultPort, nil
}
@@ -425,7 +428,7 @@ func chosenByPercentage(a *int) bool {
if a == nil {
return true
}
- return rand.Intn(100)+1 <= *a
+ return rand.IntN(100)+1 <= *a
}
func canaryingSC(js string) string {
diff --git a/vendor/google.golang.org/grpc/internal/transport/client_stream.go b/vendor/google.golang.org/grpc/internal/transport/client_stream.go
new file mode 100644
index 00000000..8ed347c5
--- /dev/null
+++ b/vendor/google.golang.org/grpc/internal/transport/client_stream.go
@@ -0,0 +1,144 @@
+/*
+ *
+ * Copyright 2024 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package transport
+
+import (
+ "sync/atomic"
+
+ "golang.org/x/net/http2"
+ "google.golang.org/grpc/mem"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+)
+
+// ClientStream implements streaming functionality for a gRPC client.
+type ClientStream struct {
+ *Stream // Embed for common stream functionality.
+
+ ct *http2Client
+ done chan struct{} // closed at the end of stream to unblock writers.
+ doneFunc func() // invoked at the end of stream.
+
+ headerChan chan struct{} // closed to indicate the end of header metadata.
+ headerChanClosed uint32 // set when headerChan is closed. Used to avoid closing headerChan multiple times.
+ // headerValid indicates whether a valid header was received. Only
+ // meaningful after headerChan is closed (always call waitOnHeader() before
+ // reading its value).
+ headerValid bool
+ header metadata.MD // the received header metadata
+ noHeaders bool // set if the client never received headers (set only after the stream is done).
+
+ bytesReceived atomic.Bool // indicates whether any bytes have been received on this stream
+ unprocessed atomic.Bool // set if the server sends a refused stream or GOAWAY including this stream
+
+ status *status.Status // the status error received from the server
+}
+
+// Read reads an n byte message from the input stream.
+func (s *ClientStream) Read(n int) (mem.BufferSlice, error) {
+ b, err := s.Stream.read(n)
+ if err == nil {
+ s.ct.incrMsgRecv()
+ }
+ return b, err
+}
+
+// Close closes the stream and popagates err to any readers.
+func (s *ClientStream) Close(err error) {
+ var (
+ rst bool
+ rstCode http2.ErrCode
+ )
+ if err != nil {
+ rst = true
+ rstCode = http2.ErrCodeCancel
+ }
+ s.ct.closeStream(s, err, rst, rstCode, status.Convert(err), nil, false)
+}
+
+// Write writes the hdr and data bytes to the output stream.
+func (s *ClientStream) Write(hdr []byte, data mem.BufferSlice, opts *WriteOptions) error {
+ return s.ct.write(s, hdr, data, opts)
+}
+
+// BytesReceived indicates whether any bytes have been received on this stream.
+func (s *ClientStream) BytesReceived() bool {
+ return s.bytesReceived.Load()
+}
+
+// Unprocessed indicates whether the server did not process this stream --
+// i.e. it sent a refused stream or GOAWAY including this stream ID.
+func (s *ClientStream) Unprocessed() bool {
+ return s.unprocessed.Load()
+}
+
+func (s *ClientStream) waitOnHeader() {
+ select {
+ case <-s.ctx.Done():
+ // Close the stream to prevent headers/trailers from changing after
+ // this function returns.
+ s.Close(ContextErr(s.ctx.Err()))
+ // headerChan could possibly not be closed yet if closeStream raced
+ // with operateHeaders; wait until it is closed explicitly here.
+ <-s.headerChan
+ case <-s.headerChan:
+ }
+}
+
+// RecvCompress returns the compression algorithm applied to the inbound
+// message. It is empty string if there is no compression applied.
+func (s *ClientStream) RecvCompress() string {
+ s.waitOnHeader()
+ return s.recvCompress
+}
+
+// Done returns a channel which is closed when it receives the final status
+// from the server.
+func (s *ClientStream) Done() <-chan struct{} {
+ return s.done
+}
+
+// Header returns the header metadata of the stream. Acquires the key-value
+// pairs of header metadata once it is available. It blocks until i) the
+// metadata is ready or ii) there is no header metadata or iii) the stream is
+// canceled/expired.
+func (s *ClientStream) Header() (metadata.MD, error) {
+ s.waitOnHeader()
+
+ if !s.headerValid || s.noHeaders {
+ return nil, s.status.Err()
+ }
+
+ return s.header.Copy(), nil
+}
+
+// TrailersOnly blocks until a header or trailers-only frame is received and
+// then returns true if the stream was trailers-only. If the stream ends
+// before headers are received, returns true, nil.
+func (s *ClientStream) TrailersOnly() bool {
+ s.waitOnHeader()
+ return s.noHeaders
+}
+
+// Status returns the status received from the server.
+// Status can be read safely only after the stream has ended,
+// that is, after Done() is closed.
+func (s *ClientStream) Status() *status.Status {
+ return s.status
+}
diff --git a/vendor/google.golang.org/grpc/internal/transport/flowcontrol.go b/vendor/google.golang.org/grpc/internal/transport/flowcontrol.go
index 97198c51..dfc0f224 100644
--- a/vendor/google.golang.org/grpc/internal/transport/flowcontrol.go
+++ b/vendor/google.golang.org/grpc/internal/transport/flowcontrol.go
@@ -92,14 +92,11 @@ func (f *trInFlow) newLimit(n uint32) uint32 {
func (f *trInFlow) onData(n uint32) uint32 {
f.unacked += n
- if f.unacked >= f.limit/4 {
- w := f.unacked
- f.unacked = 0
+ if f.unacked < f.limit/4 {
f.updateEffectiveWindowSize()
- return w
+ return 0
}
- f.updateEffectiveWindowSize()
- return 0
+ return f.reset()
}
func (f *trInFlow) reset() uint32 {
diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
index ce878693..3dea2357 100644
--- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
@@ -225,7 +225,7 @@ func (ht *serverHandlerTransport) do(fn func()) error {
}
}
-func (ht *serverHandlerTransport) WriteStatus(s *Stream, st *status.Status) error {
+func (ht *serverHandlerTransport) writeStatus(s *ServerStream, st *status.Status) error {
ht.writeStatusMu.Lock()
defer ht.writeStatusMu.Unlock()
@@ -289,14 +289,14 @@ func (ht *serverHandlerTransport) WriteStatus(s *Stream, st *status.Status) erro
// writePendingHeaders sets common and custom headers on the first
// write call (Write, WriteHeader, or WriteStatus)
-func (ht *serverHandlerTransport) writePendingHeaders(s *Stream) {
+func (ht *serverHandlerTransport) writePendingHeaders(s *ServerStream) {
ht.writeCommonHeaders(s)
ht.writeCustomHeaders(s)
}
// writeCommonHeaders sets common headers on the first write
// call (Write, WriteHeader, or WriteStatus).
-func (ht *serverHandlerTransport) writeCommonHeaders(s *Stream) {
+func (ht *serverHandlerTransport) writeCommonHeaders(s *ServerStream) {
h := ht.rw.Header()
h["Date"] = nil // suppress Date to make tests happy; TODO: restore
h.Set("Content-Type", ht.contentType)
@@ -317,7 +317,7 @@ func (ht *serverHandlerTransport) writeCommonHeaders(s *Stream) {
// writeCustomHeaders sets custom headers set on the stream via SetHeader
// on the first write call (Write, WriteHeader, or WriteStatus)
-func (ht *serverHandlerTransport) writeCustomHeaders(s *Stream) {
+func (ht *serverHandlerTransport) writeCustomHeaders(s *ServerStream) {
h := ht.rw.Header()
s.hdrMu.Lock()
@@ -333,7 +333,7 @@ func (ht *serverHandlerTransport) writeCustomHeaders(s *Stream) {
s.hdrMu.Unlock()
}
-func (ht *serverHandlerTransport) Write(s *Stream, hdr []byte, data mem.BufferSlice, _ *Options) error {
+func (ht *serverHandlerTransport) write(s *ServerStream, hdr []byte, data mem.BufferSlice, _ *WriteOptions) error {
// Always take a reference because otherwise there is no guarantee the data will
// be available after this function returns. This is what callers to Write
// expect.
@@ -357,7 +357,7 @@ func (ht *serverHandlerTransport) Write(s *Stream, hdr []byte, data mem.BufferSl
return nil
}
-func (ht *serverHandlerTransport) WriteHeader(s *Stream, md metadata.MD) error {
+func (ht *serverHandlerTransport) writeHeader(s *ServerStream, md metadata.MD) error {
if err := s.SetHeader(md); err != nil {
return err
}
@@ -385,7 +385,7 @@ func (ht *serverHandlerTransport) WriteHeader(s *Stream, md metadata.MD) error {
return err
}
-func (ht *serverHandlerTransport) HandleStreams(ctx context.Context, startStream func(*Stream)) {
+func (ht *serverHandlerTransport) HandleStreams(ctx context.Context, startStream func(*ServerStream)) {
// With this transport type there will be exactly 1 stream: this HTTP request.
var cancel context.CancelFunc
if ht.timeoutSet {
@@ -408,16 +408,18 @@ func (ht *serverHandlerTransport) HandleStreams(ctx context.Context, startStream
ctx = metadata.NewIncomingContext(ctx, ht.headerMD)
req := ht.req
- s := &Stream{
- id: 0, // irrelevant
- ctx: ctx,
- requestRead: func(int) {},
+ s := &ServerStream{
+ Stream: &Stream{
+ id: 0, // irrelevant
+ ctx: ctx,
+ requestRead: func(int) {},
+ buf: newRecvBuffer(),
+ method: req.URL.Path,
+ recvCompress: req.Header.Get("grpc-encoding"),
+ contentSubtype: ht.contentSubtype,
+ },
cancel: cancel,
- buf: newRecvBuffer(),
st: ht,
- method: req.URL.Path,
- recvCompress: req.Header.Get("grpc-encoding"),
- contentSubtype: ht.contentSubtype,
headerWireLength: 0, // won't have access to header wire length until golang/go#18997.
}
s.trReader = &transportReader{
@@ -471,9 +473,7 @@ func (ht *serverHandlerTransport) runStream() {
}
}
-func (ht *serverHandlerTransport) IncrMsgSent() {}
-
-func (ht *serverHandlerTransport) IncrMsgRecv() {}
+func (ht *serverHandlerTransport) incrMsgRecv() {}
func (ht *serverHandlerTransport) Drain(string) {
panic("Drain() is not implemented")
@@ -498,5 +498,5 @@ func mapRecvMsgError(err error) error {
if strings.Contains(err.Error(), "body closed by handler") {
return status.Error(codes.Canceled, err.Error())
}
- return connectionErrorf(true, err, err.Error())
+ return connectionErrorf(true, err, "%s", err.Error())
}
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
index 62b81885..f323ab7f 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
@@ -123,7 +123,7 @@ type http2Client struct {
mu sync.Mutex // guard the following variables
nextID uint32
state transportState
- activeStreams map[uint32]*Stream
+ activeStreams map[uint32]*ClientStream
// prevGoAway ID records the Last-Stream-ID in the previous GOAway frame.
prevGoAwayID uint32
// goAwayReason records the http2.ErrCode and debug data received with the
@@ -199,10 +199,10 @@ func isTemporary(err error) bool {
return true
}
-// newHTTP2Client constructs a connected ClientTransport to addr based on HTTP2
+// NewHTTP2Client constructs a connected ClientTransport to addr based on HTTP2
// and starts to receive messages on it. Non-nil error returns if construction
// fails.
-func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onClose func(GoAwayReason)) (_ *http2Client, err error) {
+func NewHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onClose func(GoAwayReason)) (_ ClientTransport, err error) {
scheme := "http"
ctx, cancel := context.WithCancel(ctx)
defer func() {
@@ -339,7 +339,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
framer: newFramer(conn, writeBufSize, readBufSize, opts.SharedWriteBuffer, maxHeaderListSize),
fc: &trInFlow{limit: uint32(icwz)},
scheme: scheme,
- activeStreams: make(map[uint32]*Stream),
+ activeStreams: make(map[uint32]*ClientStream),
isSecure: isSecure,
perRPCCreds: perRPCCreds,
kp: kp,
@@ -480,17 +480,19 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
return t, nil
}
-func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream {
+func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *ClientStream {
// TODO(zhaoq): Handle uint32 overflow of Stream.id.
- s := &Stream{
- ct: t,
- done: make(chan struct{}),
- method: callHdr.Method,
- sendCompress: callHdr.SendCompress,
- buf: newRecvBuffer(),
- headerChan: make(chan struct{}),
- contentSubtype: callHdr.ContentSubtype,
- doneFunc: callHdr.DoneFunc,
+ s := &ClientStream{
+ Stream: &Stream{
+ method: callHdr.Method,
+ sendCompress: callHdr.SendCompress,
+ buf: newRecvBuffer(),
+ contentSubtype: callHdr.ContentSubtype,
+ },
+ ct: t,
+ done: make(chan struct{}),
+ headerChan: make(chan struct{}),
+ doneFunc: callHdr.DoneFunc,
}
s.wq = newWriteQuota(defaultWriteQuota, s.done)
s.requestRead = func(n int) {
@@ -506,7 +508,7 @@ func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream {
ctxDone: s.ctx.Done(),
recv: s.buf,
closeStream: func(err error) {
- t.CloseStream(s, err)
+ s.Close(err)
},
},
windowHandler: func(n int) {
@@ -597,12 +599,6 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr)
for k, v := range callAuthData {
headerFields = append(headerFields, hpack.HeaderField{Name: k, Value: encodeMetadataHeader(k, v)})
}
- if b := stats.OutgoingTags(ctx); b != nil {
- headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-tags-bin", Value: encodeBinHeader(b)})
- }
- if b := stats.OutgoingTrace(ctx); b != nil {
- headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-trace-bin", Value: encodeBinHeader(b)})
- }
if md, added, ok := metadataFromOutgoingContextRaw(ctx); ok {
var k string
@@ -738,7 +734,7 @@ func (e NewStreamError) Error() string {
// NewStream creates a stream and registers it into the transport as "active"
// streams. All non-nil errors returned will be *NewStreamError.
-func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, error) {
+func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*ClientStream, error) {
ctx = peer.NewContext(ctx, t.getPeer())
// ServerName field of the resolver returned address takes precedence over
@@ -763,7 +759,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream,
return
}
// The stream was unprocessed by the server.
- atomic.StoreUint32(&s.unprocessed, 1)
+ s.unprocessed.Store(true)
s.write(recvMsg{err: err})
close(s.done)
// If headerChan isn't closed, then close it.
@@ -908,21 +904,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream,
return s, nil
}
-// CloseStream clears the footprint of a stream when the stream is not needed any more.
-// This must not be executed in reader's goroutine.
-func (t *http2Client) CloseStream(s *Stream, err error) {
- var (
- rst bool
- rstCode http2.ErrCode
- )
- if err != nil {
- rst = true
- rstCode = http2.ErrCodeCancel
- }
- t.closeStream(s, err, rst, rstCode, status.Convert(err), nil, false)
-}
-
-func (t *http2Client) closeStream(s *Stream, err error, rst bool, rstCode http2.ErrCode, st *status.Status, mdata map[string][]string, eosReceived bool) {
+func (t *http2Client) closeStream(s *ClientStream, err error, rst bool, rstCode http2.ErrCode, st *status.Status, mdata map[string][]string, eosReceived bool) {
// Set stream status to done.
if s.swapState(streamDone) == streamDone {
// If it was already done, return. If multiple closeStream calls
@@ -1085,7 +1067,7 @@ func (t *http2Client) GracefulClose() {
// Write formats the data into HTTP2 data frame(s) and sends it out. The caller
// should proceed only if Write returns nil.
-func (t *http2Client) Write(s *Stream, hdr []byte, data mem.BufferSlice, opts *Options) error {
+func (t *http2Client) write(s *ClientStream, hdr []byte, data mem.BufferSlice, opts *WriteOptions) error {
reader := data.Reader()
if opts.Last {
@@ -1114,10 +1096,11 @@ func (t *http2Client) Write(s *Stream, hdr []byte, data mem.BufferSlice, opts *O
_ = reader.Close()
return err
}
+ t.incrMsgSent()
return nil
}
-func (t *http2Client) getStream(f http2.Frame) *Stream {
+func (t *http2Client) getStream(f http2.Frame) *ClientStream {
t.mu.Lock()
s := t.activeStreams[f.Header().StreamID]
t.mu.Unlock()
@@ -1127,7 +1110,7 @@ func (t *http2Client) getStream(f http2.Frame) *Stream {
// adjustWindow sends out extra window update over the initial window size
// of stream if the application is requesting data larger in size than
// the window.
-func (t *http2Client) adjustWindow(s *Stream, n uint32) {
+func (t *http2Client) adjustWindow(s *ClientStream, n uint32) {
if w := s.fc.maybeAdjust(n); w > 0 {
t.controlBuf.put(&outgoingWindowUpdate{streamID: s.id, increment: w})
}
@@ -1136,7 +1119,7 @@ func (t *http2Client) adjustWindow(s *Stream, n uint32) {
// updateWindow adjusts the inbound quota for the stream.
// Window updates will be sent out when the cumulative quota
// exceeds the corresponding threshold.
-func (t *http2Client) updateWindow(s *Stream, n uint32) {
+func (t *http2Client) updateWindow(s *ClientStream, n uint32) {
if w := s.fc.onRead(n); w > 0 {
t.controlBuf.put(&outgoingWindowUpdate{streamID: s.id, increment: w})
}
@@ -1242,7 +1225,7 @@ func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) {
}
if f.ErrCode == http2.ErrCodeRefusedStream {
// The stream was unprocessed by the server.
- atomic.StoreUint32(&s.unprocessed, 1)
+ s.unprocessed.Store(true)
}
statusCode, ok := http2ErrConvTab[f.ErrCode]
if !ok {
@@ -1383,11 +1366,11 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) error {
return connectionErrorf(true, nil, "received goaway and there are no active streams")
}
- streamsToClose := make([]*Stream, 0)
+ streamsToClose := make([]*ClientStream, 0)
for streamID, stream := range t.activeStreams {
if streamID > id && streamID <= upperLimit {
// The stream was unprocessed by the server.
- atomic.StoreUint32(&stream.unprocessed, 1)
+ stream.unprocessed.Store(true)
streamsToClose = append(streamsToClose, stream)
}
}
@@ -1439,7 +1422,7 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
return
}
endStream := frame.StreamEnded()
- atomic.StoreUint32(&s.bytesReceived, 1)
+ s.bytesReceived.Store(true)
initialHeader := atomic.LoadUint32(&s.headerChanClosed) == 0
if !initialHeader && !endStream {
@@ -1809,14 +1792,18 @@ func (t *http2Client) socketMetrics() *channelz.EphemeralSocketMetrics {
func (t *http2Client) RemoteAddr() net.Addr { return t.remoteAddr }
-func (t *http2Client) IncrMsgSent() {
- t.channelz.SocketMetrics.MessagesSent.Add(1)
- t.channelz.SocketMetrics.LastMessageSentTimestamp.Store(time.Now().UnixNano())
+func (t *http2Client) incrMsgSent() {
+ if channelz.IsOn() {
+ t.channelz.SocketMetrics.MessagesSent.Add(1)
+ t.channelz.SocketMetrics.LastMessageSentTimestamp.Store(time.Now().UnixNano())
+ }
}
-func (t *http2Client) IncrMsgRecv() {
- t.channelz.SocketMetrics.MessagesReceived.Add(1)
- t.channelz.SocketMetrics.LastMessageReceivedTimestamp.Store(time.Now().UnixNano())
+func (t *http2Client) incrMsgRecv() {
+ if channelz.IsOn() {
+ t.channelz.SocketMetrics.MessagesReceived.Add(1)
+ t.channelz.SocketMetrics.LastMessageReceivedTimestamp.Store(time.Now().UnixNano())
+ }
}
func (t *http2Client) getOutFlowWindow() int64 {
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index 584b50fe..997b0a59 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -25,7 +25,7 @@ import (
"fmt"
"io"
"math"
- "math/rand"
+ rand "math/rand/v2"
"net"
"net/http"
"strconv"
@@ -111,7 +111,7 @@ type http2Server struct {
// already initialized since draining is already underway.
drainEvent *grpcsync.Event
state transportState
- activeStreams map[uint32]*Stream
+ activeStreams map[uint32]*ServerStream
// idle is the time instant when the connection went idle.
// This is either the beginning of the connection or when the number of
// RPCs go down to 0.
@@ -256,7 +256,7 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
inTapHandle: config.InTapHandle,
fc: &trInFlow{limit: uint32(icwz)},
state: reachable,
- activeStreams: make(map[uint32]*Stream),
+ activeStreams: make(map[uint32]*ServerStream),
stats: config.StatsHandlers,
kp: kp,
idle: time.Now(),
@@ -359,7 +359,7 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
// operateHeaders takes action on the decoded headers. Returns an error if fatal
// error encountered and transport needs to close, otherwise returns nil.
-func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeadersFrame, handle func(*Stream)) error {
+func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeadersFrame, handle func(*ServerStream)) error {
// Acquire max stream ID lock for entire duration
t.maxStreamMu.Lock()
defer t.maxStreamMu.Unlock()
@@ -385,11 +385,13 @@ func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeade
t.maxStreamID = streamID
buf := newRecvBuffer()
- s := &Stream{
- id: streamID,
+ s := &ServerStream{
+ Stream: &Stream{
+ id: streamID,
+ buf: buf,
+ fc: &inFlow{limit: uint32(t.initialWindowSize)},
+ },
st: t,
- buf: buf,
- fc: &inFlow{limit: uint32(t.initialWindowSize)},
headerWireLength: int(frame.Header().Length),
}
var (
@@ -537,12 +539,6 @@ func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeade
// Attach the received metadata to the context.
if len(mdata) > 0 {
s.ctx = metadata.NewIncomingContext(s.ctx, mdata)
- if statsTags := mdata["grpc-tags-bin"]; len(statsTags) > 0 {
- s.ctx = stats.SetIncomingTags(s.ctx, []byte(statsTags[len(statsTags)-1]))
- }
- if statsTrace := mdata["grpc-trace-bin"]; len(statsTrace) > 0 {
- s.ctx = stats.SetIncomingTrace(s.ctx, []byte(statsTrace[len(statsTrace)-1]))
- }
}
t.mu.Lock()
if t.state != reachable {
@@ -568,7 +564,7 @@ func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeade
t.logger.Infof("Aborting the stream early: %v", errMsg)
}
t.controlBuf.put(&earlyAbortStream{
- httpStatus: 405,
+ httpStatus: http.StatusMethodNotAllowed,
streamID: streamID,
contentSubtype: s.contentSubtype,
status: status.New(codes.Internal, errMsg),
@@ -589,7 +585,7 @@ func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeade
stat = status.New(codes.PermissionDenied, err.Error())
}
t.controlBuf.put(&earlyAbortStream{
- httpStatus: 200,
+ httpStatus: http.StatusOK,
streamID: s.id,
contentSubtype: s.contentSubtype,
status: stat,
@@ -634,7 +630,7 @@ func (t *http2Server) operateHeaders(ctx context.Context, frame *http2.MetaHeade
// HandleStreams receives incoming streams using the given handler. This is
// typically run in a separate goroutine.
// traceCtx attaches trace to ctx and returns the new context.
-func (t *http2Server) HandleStreams(ctx context.Context, handle func(*Stream)) {
+func (t *http2Server) HandleStreams(ctx context.Context, handle func(*ServerStream)) {
defer func() {
close(t.readerDone)
<-t.loopyWriterDone
@@ -698,7 +694,7 @@ func (t *http2Server) HandleStreams(ctx context.Context, handle func(*Stream)) {
}
}
-func (t *http2Server) getStream(f http2.Frame) (*Stream, bool) {
+func (t *http2Server) getStream(f http2.Frame) (*ServerStream, bool) {
t.mu.Lock()
defer t.mu.Unlock()
if t.activeStreams == nil {
@@ -716,7 +712,7 @@ func (t *http2Server) getStream(f http2.Frame) (*Stream, bool) {
// adjustWindow sends out extra window update over the initial window size
// of stream if the application is requesting data larger in size than
// the window.
-func (t *http2Server) adjustWindow(s *Stream, n uint32) {
+func (t *http2Server) adjustWindow(s *ServerStream, n uint32) {
if w := s.fc.maybeAdjust(n); w > 0 {
t.controlBuf.put(&outgoingWindowUpdate{streamID: s.id, increment: w})
}
@@ -726,7 +722,7 @@ func (t *http2Server) adjustWindow(s *Stream, n uint32) {
// updateWindow adjusts the inbound quota for the stream and the transport.
// Window updates will deliver to the controller for sending when
// the cumulative quota exceeds the corresponding threshold.
-func (t *http2Server) updateWindow(s *Stream, n uint32) {
+func (t *http2Server) updateWindow(s *ServerStream, n uint32) {
if w := s.fc.onRead(n); w > 0 {
t.controlBuf.put(&outgoingWindowUpdate{streamID: s.id,
increment: w,
@@ -963,7 +959,7 @@ func (t *http2Server) checkForHeaderListSize(it any) bool {
return true
}
-func (t *http2Server) streamContextErr(s *Stream) error {
+func (t *http2Server) streamContextErr(s *ServerStream) error {
select {
case <-t.done:
return ErrConnClosing
@@ -973,7 +969,7 @@ func (t *http2Server) streamContextErr(s *Stream) error {
}
// WriteHeader sends the header metadata md back to the client.
-func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error {
+func (t *http2Server) writeHeader(s *ServerStream, md metadata.MD) error {
s.hdrMu.Lock()
defer s.hdrMu.Unlock()
if s.getState() == streamDone {
@@ -1006,7 +1002,7 @@ func (t *http2Server) setResetPingStrikes() {
atomic.StoreUint32(&t.resetPingStrikes, 1)
}
-func (t *http2Server) writeHeaderLocked(s *Stream) error {
+func (t *http2Server) writeHeaderLocked(s *ServerStream) error {
// TODO(mmukhi): Benchmark if the performance gets better if count the metadata and other header fields
// first and create a slice of that exact size.
headerFields := make([]hpack.HeaderField, 0, 2) // at least :status, content-type will be there if none else.
@@ -1046,7 +1042,7 @@ func (t *http2Server) writeHeaderLocked(s *Stream) error {
// There is no further I/O operations being able to perform on this stream.
// TODO(zhaoq): Now it indicates the end of entire stream. Revisit if early
// OK is adopted.
-func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error {
+func (t *http2Server) writeStatus(s *ServerStream, st *status.Status) error {
s.hdrMu.Lock()
defer s.hdrMu.Unlock()
@@ -1117,11 +1113,11 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error {
// Write converts the data into HTTP2 data frame and sends it out. Non-nil error
// is returns if it fails (e.g., framing error, transport error).
-func (t *http2Server) Write(s *Stream, hdr []byte, data mem.BufferSlice, _ *Options) error {
+func (t *http2Server) write(s *ServerStream, hdr []byte, data mem.BufferSlice, _ *WriteOptions) error {
reader := data.Reader()
if !s.isHeaderSent() { // Headers haven't been written yet.
- if err := t.WriteHeader(s, nil); err != nil {
+ if err := t.writeHeader(s, nil); err != nil {
_ = reader.Close()
return err
}
@@ -1147,6 +1143,7 @@ func (t *http2Server) Write(s *Stream, hdr []byte, data mem.BufferSlice, _ *Opti
_ = reader.Close()
return err
}
+ t.incrMsgSent()
return nil
}
@@ -1276,7 +1273,7 @@ func (t *http2Server) Close(err error) {
}
// deleteStream deletes the stream s from transport's active streams.
-func (t *http2Server) deleteStream(s *Stream, eosReceived bool) {
+func (t *http2Server) deleteStream(s *ServerStream, eosReceived bool) {
t.mu.Lock()
if _, ok := t.activeStreams[s.id]; ok {
@@ -1297,7 +1294,7 @@ func (t *http2Server) deleteStream(s *Stream, eosReceived bool) {
}
// finishStream closes the stream and puts the trailing headerFrame into controlbuf.
-func (t *http2Server) finishStream(s *Stream, rst bool, rstCode http2.ErrCode, hdr *headerFrame, eosReceived bool) {
+func (t *http2Server) finishStream(s *ServerStream, rst bool, rstCode http2.ErrCode, hdr *headerFrame, eosReceived bool) {
// In case stream sending and receiving are invoked in separate
// goroutines (e.g., bi-directional streaming), cancel needs to be
// called to interrupt the potential blocking on other goroutines.
@@ -1321,7 +1318,7 @@ func (t *http2Server) finishStream(s *Stream, rst bool, rstCode http2.ErrCode, h
}
// closeStream clears the footprint of a stream when the stream is not needed any more.
-func (t *http2Server) closeStream(s *Stream, rst bool, rstCode http2.ErrCode, eosReceived bool) {
+func (t *http2Server) closeStream(s *ServerStream, rst bool, rstCode http2.ErrCode, eosReceived bool) {
// In case stream sending and receiving are invoked in separate
// goroutines (e.g., bi-directional streaming), cancel needs to be
// called to interrupt the potential blocking on other goroutines.
@@ -1415,14 +1412,18 @@ func (t *http2Server) socketMetrics() *channelz.EphemeralSocketMetrics {
}
}
-func (t *http2Server) IncrMsgSent() {
- t.channelz.SocketMetrics.MessagesSent.Add(1)
- t.channelz.SocketMetrics.LastMessageSentTimestamp.Add(1)
+func (t *http2Server) incrMsgSent() {
+ if channelz.IsOn() {
+ t.channelz.SocketMetrics.MessagesSent.Add(1)
+ t.channelz.SocketMetrics.LastMessageSentTimestamp.Add(1)
+ }
}
-func (t *http2Server) IncrMsgRecv() {
- t.channelz.SocketMetrics.MessagesReceived.Add(1)
- t.channelz.SocketMetrics.LastMessageReceivedTimestamp.Add(1)
+func (t *http2Server) incrMsgRecv() {
+ if channelz.IsOn() {
+ t.channelz.SocketMetrics.MessagesReceived.Add(1)
+ t.channelz.SocketMetrics.LastMessageReceivedTimestamp.Add(1)
+ }
}
func (t *http2Server) getOutFlowWindow() int64 {
@@ -1455,7 +1456,7 @@ func getJitter(v time.Duration) time.Duration {
}
// Generate a jitter between +/- 10% of the value.
r := int64(v / 10)
- j := rand.Int63n(2*r) - r
+ j := rand.Int64N(2*r) - r
return time.Duration(j)
}
diff --git a/vendor/google.golang.org/grpc/internal/transport/server_stream.go b/vendor/google.golang.org/grpc/internal/transport/server_stream.go
new file mode 100644
index 00000000..a22a9015
--- /dev/null
+++ b/vendor/google.golang.org/grpc/internal/transport/server_stream.go
@@ -0,0 +1,178 @@
+/*
+ *
+ * Copyright 2024 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package transport
+
+import (
+ "context"
+ "errors"
+ "strings"
+ "sync"
+ "sync/atomic"
+
+ "google.golang.org/grpc/mem"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+)
+
+// ServerStream implements streaming functionality for a gRPC server.
+type ServerStream struct {
+ *Stream // Embed for common stream functionality.
+
+ st internalServerTransport
+ ctxDone <-chan struct{} // closed at the end of stream. Cache of ctx.Done() (for performance)
+ cancel context.CancelFunc // invoked at the end of stream to cancel ctx.
+
+ // Holds compressor names passed in grpc-accept-encoding metadata from the
+ // client.
+ clientAdvertisedCompressors string
+ headerWireLength int
+
+ // hdrMu protects outgoing header and trailer metadata.
+ hdrMu sync.Mutex
+ header metadata.MD // the outgoing header metadata. Updated by WriteHeader.
+ headerSent atomic.Bool // atomically set when the headers are sent out.
+}
+
+// Read reads an n byte message from the input stream.
+func (s *ServerStream) Read(n int) (mem.BufferSlice, error) {
+ b, err := s.Stream.read(n)
+ if err == nil {
+ s.st.incrMsgRecv()
+ }
+ return b, err
+}
+
+// SendHeader sends the header metadata for the given stream.
+func (s *ServerStream) SendHeader(md metadata.MD) error {
+ return s.st.writeHeader(s, md)
+}
+
+// Write writes the hdr and data bytes to the output stream.
+func (s *ServerStream) Write(hdr []byte, data mem.BufferSlice, opts *WriteOptions) error {
+ return s.st.write(s, hdr, data, opts)
+}
+
+// WriteStatus sends the status of a stream to the client. WriteStatus is
+// the final call made on a stream and always occurs.
+func (s *ServerStream) WriteStatus(st *status.Status) error {
+ return s.st.writeStatus(s, st)
+}
+
+// isHeaderSent indicates whether headers have been sent.
+func (s *ServerStream) isHeaderSent() bool {
+ return s.headerSent.Load()
+}
+
+// updateHeaderSent updates headerSent and returns true
+// if it was already set.
+func (s *ServerStream) updateHeaderSent() bool {
+ return s.headerSent.Swap(true)
+}
+
+// RecvCompress returns the compression algorithm applied to the inbound
+// message. It is empty string if there is no compression applied.
+func (s *ServerStream) RecvCompress() string {
+ return s.recvCompress
+}
+
+// SendCompress returns the send compressor name.
+func (s *ServerStream) SendCompress() string {
+ return s.sendCompress
+}
+
+// ContentSubtype returns the content-subtype for a request. For example, a
+// content-subtype of "proto" will result in a content-type of
+// "application/grpc+proto". This will always be lowercase. See
+// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for
+// more details.
+func (s *ServerStream) ContentSubtype() string {
+ return s.contentSubtype
+}
+
+// SetSendCompress sets the compression algorithm to the stream.
+func (s *ServerStream) SetSendCompress(name string) error {
+ if s.isHeaderSent() || s.getState() == streamDone {
+ return errors.New("transport: set send compressor called after headers sent or stream done")
+ }
+
+ s.sendCompress = name
+ return nil
+}
+
+// SetContext sets the context of the stream. This will be deleted once the
+// stats handler callouts all move to gRPC layer.
+func (s *ServerStream) SetContext(ctx context.Context) {
+ s.ctx = ctx
+}
+
+// ClientAdvertisedCompressors returns the compressor names advertised by the
+// client via grpc-accept-encoding header.
+func (s *ServerStream) ClientAdvertisedCompressors() []string {
+ values := strings.Split(s.clientAdvertisedCompressors, ",")
+ for i, v := range values {
+ values[i] = strings.TrimSpace(v)
+ }
+ return values
+}
+
+// Header returns the header metadata of the stream. It returns the out header
+// after t.WriteHeader is called. It does not block and must not be called
+// until after WriteHeader.
+func (s *ServerStream) Header() (metadata.MD, error) {
+ // Return the header in stream. It will be the out
+ // header after t.WriteHeader is called.
+ return s.header.Copy(), nil
+}
+
+// HeaderWireLength returns the size of the headers of the stream as received
+// from the wire.
+func (s *ServerStream) HeaderWireLength() int {
+ return s.headerWireLength
+}
+
+// SetHeader sets the header metadata. This can be called multiple times.
+// This should not be called in parallel to other data writes.
+func (s *ServerStream) SetHeader(md metadata.MD) error {
+ if md.Len() == 0 {
+ return nil
+ }
+ if s.isHeaderSent() || s.getState() == streamDone {
+ return ErrIllegalHeaderWrite
+ }
+ s.hdrMu.Lock()
+ s.header = metadata.Join(s.header, md)
+ s.hdrMu.Unlock()
+ return nil
+}
+
+// SetTrailer sets the trailer metadata which will be sent with the RPC status
+// by the server. This can be called multiple times.
+// This should not be called parallel to other data writes.
+func (s *ServerStream) SetTrailer(md metadata.MD) error {
+ if md.Len() == 0 {
+ return nil
+ }
+ if s.getState() == streamDone {
+ return ErrIllegalHeaderWrite
+ }
+ s.hdrMu.Lock()
+ s.trailer = metadata.Join(s.trailer, md)
+ s.hdrMu.Unlock()
+ return nil
+}
diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go
index e12cb0bc..2859b877 100644
--- a/vendor/google.golang.org/grpc/internal/transport/transport.go
+++ b/vendor/google.golang.org/grpc/internal/transport/transport.go
@@ -27,7 +27,6 @@ import (
"fmt"
"io"
"net"
- "strings"
"sync"
"sync/atomic"
"time"
@@ -39,7 +38,6 @@ import (
"google.golang.org/grpc/mem"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/peer"
- "google.golang.org/grpc/resolver"
"google.golang.org/grpc/stats"
"google.golang.org/grpc/status"
"google.golang.org/grpc/tap"
@@ -133,7 +131,7 @@ type recvBufferReader struct {
err error
}
-func (r *recvBufferReader) ReadHeader(header []byte) (n int, err error) {
+func (r *recvBufferReader) ReadMessageHeader(header []byte) (n int, err error) {
if r.err != nil {
return 0, r.err
}
@@ -142,9 +140,9 @@ func (r *recvBufferReader) ReadHeader(header []byte) (n int, err error) {
return n, nil
}
if r.closeStream != nil {
- n, r.err = r.readHeaderClient(header)
+ n, r.err = r.readMessageHeaderClient(header)
} else {
- n, r.err = r.readHeader(header)
+ n, r.err = r.readMessageHeader(header)
}
return n, r.err
}
@@ -174,12 +172,12 @@ func (r *recvBufferReader) Read(n int) (buf mem.Buffer, err error) {
return buf, r.err
}
-func (r *recvBufferReader) readHeader(header []byte) (n int, err error) {
+func (r *recvBufferReader) readMessageHeader(header []byte) (n int, err error) {
select {
case <-r.ctxDone:
return 0, ContextErr(r.ctx.Err())
case m := <-r.recv.get():
- return r.readHeaderAdditional(m, header)
+ return r.readMessageHeaderAdditional(m, header)
}
}
@@ -192,7 +190,7 @@ func (r *recvBufferReader) read(n int) (buf mem.Buffer, err error) {
}
}
-func (r *recvBufferReader) readHeaderClient(header []byte) (n int, err error) {
+func (r *recvBufferReader) readMessageHeaderClient(header []byte) (n int, err error) {
// If the context is canceled, then closes the stream with nil metadata.
// closeStream writes its error parameter to r.recv as a recvMsg.
// r.readAdditional acts on that message and returns the necessary error.
@@ -213,9 +211,9 @@ func (r *recvBufferReader) readHeaderClient(header []byte) (n int, err error) {
// faster.
r.closeStream(ContextErr(r.ctx.Err()))
m := <-r.recv.get()
- return r.readHeaderAdditional(m, header)
+ return r.readMessageHeaderAdditional(m, header)
case m := <-r.recv.get():
- return r.readHeaderAdditional(m, header)
+ return r.readMessageHeaderAdditional(m, header)
}
}
@@ -246,7 +244,7 @@ func (r *recvBufferReader) readClient(n int) (buf mem.Buffer, err error) {
}
}
-func (r *recvBufferReader) readHeaderAdditional(m recvMsg, header []byte) (n int, err error) {
+func (r *recvBufferReader) readMessageHeaderAdditional(m recvMsg, header []byte) (n int, err error) {
r.recv.load()
if m.err != nil {
if m.buffer != nil {
@@ -288,14 +286,8 @@ const (
// Stream represents an RPC in the transport layer.
type Stream struct {
id uint32
- st ServerTransport // nil for client side Stream
- ct ClientTransport // nil for server side Stream
- ctx context.Context // the associated context of the stream
- cancel context.CancelFunc // always nil for client side Stream
- done chan struct{} // closed at the end of stream to unblock writers. On the client side.
- doneFunc func() // invoked at the end of stream on client side.
- ctxDone <-chan struct{} // same as done chan but for server side. Cache of ctx.Done() (for performance)
- method string // the associated RPC method of the stream
+ ctx context.Context // the associated context of the stream
+ method string // the associated RPC method of the stream
recvCompress string
sendCompress string
buf *recvBuffer
@@ -303,58 +295,17 @@ type Stream struct {
fc *inFlow
wq *writeQuota
- // Holds compressor names passed in grpc-accept-encoding metadata from the
- // client. This is empty for the client side stream.
- clientAdvertisedCompressors string
// Callback to state application's intentions to read data. This
// is used to adjust flow control, if needed.
requestRead func(int)
- headerChan chan struct{} // closed to indicate the end of header metadata.
- headerChanClosed uint32 // set when headerChan is closed. Used to avoid closing headerChan multiple times.
- // headerValid indicates whether a valid header was received. Only
- // meaningful after headerChan is closed (always call waitOnHeader() before
- // reading its value). Not valid on server side.
- headerValid bool
- headerWireLength int // Only set on server side.
-
- // hdrMu protects header and trailer metadata on the server-side.
- hdrMu sync.Mutex
- // On client side, header keeps the received header metadata.
- //
- // On server side, header keeps the header set by SetHeader(). The complete
- // header will merged into this after t.WriteHeader() is called.
- header metadata.MD
- trailer metadata.MD // the key-value map of trailer metadata.
-
- noHeaders bool // set if the client never received headers (set only after the stream is done).
-
- // On the server-side, headerSent is atomically set to 1 when the headers are sent out.
- headerSent uint32
-
state streamState
- // On client-side it is the status error received from the server.
- // On server-side it is unused.
- status *status.Status
-
- bytesReceived uint32 // indicates whether any bytes have been received on this stream
- unprocessed uint32 // set if the server sends a refused stream or GOAWAY including this stream
-
// contentSubtype is the content-subtype for requests.
// this must be lowercase or the behavior is undefined.
contentSubtype string
-}
-
-// isHeaderSent is only valid on the server-side.
-func (s *Stream) isHeaderSent() bool {
- return atomic.LoadUint32(&s.headerSent) == 1
-}
-// updateHeaderSent updates headerSent and returns true
-// if it was already set. It is valid only on server-side.
-func (s *Stream) updateHeaderSent() bool {
- return atomic.SwapUint32(&s.headerSent, 1) == 1
+ trailer metadata.MD // the key-value map of trailer metadata.
}
func (s *Stream) swapState(st streamState) streamState {
@@ -369,110 +320,12 @@ func (s *Stream) getState() streamState {
return streamState(atomic.LoadUint32((*uint32)(&s.state)))
}
-func (s *Stream) waitOnHeader() {
- if s.headerChan == nil {
- // On the server headerChan is always nil since a stream originates
- // only after having received headers.
- return
- }
- select {
- case <-s.ctx.Done():
- // Close the stream to prevent headers/trailers from changing after
- // this function returns.
- s.ct.CloseStream(s, ContextErr(s.ctx.Err()))
- // headerChan could possibly not be closed yet if closeStream raced
- // with operateHeaders; wait until it is closed explicitly here.
- <-s.headerChan
- case <-s.headerChan:
- }
-}
-
-// RecvCompress returns the compression algorithm applied to the inbound
-// message. It is empty string if there is no compression applied.
-func (s *Stream) RecvCompress() string {
- s.waitOnHeader()
- return s.recvCompress
-}
-
-// SetSendCompress sets the compression algorithm to the stream.
-func (s *Stream) SetSendCompress(name string) error {
- if s.isHeaderSent() || s.getState() == streamDone {
- return errors.New("transport: set send compressor called after headers sent or stream done")
- }
-
- s.sendCompress = name
- return nil
-}
-
-// SendCompress returns the send compressor name.
-func (s *Stream) SendCompress() string {
- return s.sendCompress
-}
-
-// ClientAdvertisedCompressors returns the compressor names advertised by the
-// client via grpc-accept-encoding header.
-func (s *Stream) ClientAdvertisedCompressors() []string {
- values := strings.Split(s.clientAdvertisedCompressors, ",")
- for i, v := range values {
- values[i] = strings.TrimSpace(v)
- }
- return values
-}
-
-// Done returns a channel which is closed when it receives the final status
-// from the server.
-func (s *Stream) Done() <-chan struct{} {
- return s.done
-}
-
-// Header returns the header metadata of the stream.
-//
-// On client side, it acquires the key-value pairs of header metadata once it is
-// available. It blocks until i) the metadata is ready or ii) there is no header
-// metadata or iii) the stream is canceled/expired.
-//
-// On server side, it returns the out header after t.WriteHeader is called. It
-// does not block and must not be called until after WriteHeader.
-func (s *Stream) Header() (metadata.MD, error) {
- if s.headerChan == nil {
- // On server side, return the header in stream. It will be the out
- // header after t.WriteHeader is called.
- return s.header.Copy(), nil
- }
- s.waitOnHeader()
-
- if !s.headerValid || s.noHeaders {
- return nil, s.status.Err()
- }
-
- return s.header.Copy(), nil
-}
-
-// TrailersOnly blocks until a header or trailers-only frame is received and
-// then returns true if the stream was trailers-only. If the stream ends
-// before headers are received, returns true, nil. Client-side only.
-func (s *Stream) TrailersOnly() bool {
- s.waitOnHeader()
- return s.noHeaders
-}
-
// Trailer returns the cached trailer metadata. Note that if it is not called
-// after the entire stream is done, it could return an empty MD. Client
-// side only.
+// after the entire stream is done, it could return an empty MD.
// It can be safely read only after stream has ended that is either read
// or write have returned io.EOF.
func (s *Stream) Trailer() metadata.MD {
- c := s.trailer.Copy()
- return c
-}
-
-// ContentSubtype returns the content-subtype for a request. For example, a
-// content-subtype of "proto" will result in a content-type of
-// "application/grpc+proto". This will always be lowercase. See
-// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests for
-// more details.
-func (s *Stream) ContentSubtype() string {
- return s.contentSubtype
+ return s.trailer.Copy()
}
// Context returns the context of the stream.
@@ -480,90 +333,31 @@ func (s *Stream) Context() context.Context {
return s.ctx
}
-// SetContext sets the context of the stream. This will be deleted once the
-// stats handler callouts all move to gRPC layer.
-func (s *Stream) SetContext(ctx context.Context) {
- s.ctx = ctx
-}
-
// Method returns the method for the stream.
func (s *Stream) Method() string {
return s.method
}
-// Status returns the status received from the server.
-// Status can be read safely only after the stream has ended,
-// that is, after Done() is closed.
-func (s *Stream) Status() *status.Status {
- return s.status
-}
-
-// HeaderWireLength returns the size of the headers of the stream as received
-// from the wire. Valid only on the server.
-func (s *Stream) HeaderWireLength() int {
- return s.headerWireLength
-}
-
-// SetHeader sets the header metadata. This can be called multiple times.
-// Server side only.
-// This should not be called in parallel to other data writes.
-func (s *Stream) SetHeader(md metadata.MD) error {
- if md.Len() == 0 {
- return nil
- }
- if s.isHeaderSent() || s.getState() == streamDone {
- return ErrIllegalHeaderWrite
- }
- s.hdrMu.Lock()
- s.header = metadata.Join(s.header, md)
- s.hdrMu.Unlock()
- return nil
-}
-
-// SendHeader sends the given header metadata. The given metadata is
-// combined with any metadata set by previous calls to SetHeader and
-// then written to the transport stream.
-func (s *Stream) SendHeader(md metadata.MD) error {
- return s.st.WriteHeader(s, md)
-}
-
-// SetTrailer sets the trailer metadata which will be sent with the RPC status
-// by the server. This can be called multiple times. Server side only.
-// This should not be called parallel to other data writes.
-func (s *Stream) SetTrailer(md metadata.MD) error {
- if md.Len() == 0 {
- return nil
- }
- if s.getState() == streamDone {
- return ErrIllegalHeaderWrite
- }
- s.hdrMu.Lock()
- s.trailer = metadata.Join(s.trailer, md)
- s.hdrMu.Unlock()
- return nil
-}
-
func (s *Stream) write(m recvMsg) {
s.buf.put(m)
}
-// ReadHeader reads data into the provided header slice from the stream. It
-// first checks if there was an error during a previous read operation and
+// ReadMessageHeader reads data into the provided header slice from the stream.
+// It first checks if there was an error during a previous read operation and
// returns it if present. It then requests a read operation for the length of
// the header. It continues to read from the stream until the entire header
-// slice is filled or an error occurs. If an `io.EOF` error is encountered
-// with partially read data, it is converted to `io.ErrUnexpectedEOF` to
-// indicate an unexpected end of the stream. The method returns any error
-// encountered during the read process or nil if the header was successfully
-// read.
-func (s *Stream) ReadHeader(header []byte) (err error) {
+// slice is filled or an error occurs. If an `io.EOF` error is encountered with
+// partially read data, it is converted to `io.ErrUnexpectedEOF` to indicate an
+// unexpected end of the stream. The method returns any error encountered during
+// the read process or nil if the header was successfully read.
+func (s *Stream) ReadMessageHeader(header []byte) (err error) {
// Don't request a read if there was an error earlier
if er := s.trReader.er; er != nil {
return er
}
s.requestRead(len(header))
for len(header) != 0 {
- n, err := s.trReader.ReadHeader(header)
+ n, err := s.trReader.ReadMessageHeader(header)
header = header[n:]
if len(header) == 0 {
err = nil
@@ -579,7 +373,7 @@ func (s *Stream) ReadHeader(header []byte) (err error) {
}
// Read reads n bytes from the wire for this stream.
-func (s *Stream) Read(n int) (data mem.BufferSlice, err error) {
+func (s *Stream) read(n int) (data mem.BufferSlice, err error) {
// Don't request a read if there was an error earlier
if er := s.trReader.er; er != nil {
return nil, er
@@ -619,8 +413,8 @@ type transportReader struct {
er error
}
-func (t *transportReader) ReadHeader(header []byte) (int, error) {
- n, err := t.reader.ReadHeader(header)
+func (t *transportReader) ReadMessageHeader(header []byte) (int, error) {
+ n, err := t.reader.ReadMessageHeader(header)
if err != nil {
t.er = err
return 0, err
@@ -639,17 +433,6 @@ func (t *transportReader) Read(n int) (mem.Buffer, error) {
return buf, nil
}
-// BytesReceived indicates whether any bytes have been received on this stream.
-func (s *Stream) BytesReceived() bool {
- return atomic.LoadUint32(&s.bytesReceived) == 1
-}
-
-// Unprocessed indicates whether the server did not process this stream --
-// i.e. it sent a refused stream or GOAWAY including this stream ID.
-func (s *Stream) Unprocessed() bool {
- return atomic.LoadUint32(&s.unprocessed) == 1
-}
-
// GoString is implemented by Stream so context.String() won't
// race when printing %#v.
func (s *Stream) GoString() string {
@@ -725,15 +508,9 @@ type ConnectOptions struct {
BufferPool mem.BufferPool
}
-// NewClientTransport establishes the transport with the required ConnectOptions
-// and returns it to the caller.
-func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onClose func(GoAwayReason)) (ClientTransport, error) {
- return newHTTP2Client(connectCtx, ctx, addr, opts, onClose)
-}
-
-// Options provides additional hints and information for message
+// WriteOptions provides additional hints and information for message
// transmission.
-type Options struct {
+type WriteOptions struct {
// Last indicates whether this write is the last piece for
// this stream.
Last bool
@@ -782,18 +559,8 @@ type ClientTransport interface {
// It does not block.
GracefulClose()
- // Write sends the data for the given stream. A nil stream indicates
- // the write is to be performed on the transport as a whole.
- Write(s *Stream, hdr []byte, data mem.BufferSlice, opts *Options) error
-
// NewStream creates a Stream for an RPC.
- NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, error)
-
- // CloseStream clears the footprint of a stream when the stream is
- // not needed any more. The err indicates the error incurred when
- // CloseStream is called. Must be called when a stream is finished
- // unless the associated transport is closing.
- CloseStream(stream *Stream, err error)
+ NewStream(ctx context.Context, callHdr *CallHdr) (*ClientStream, error)
// Error returns a channel that is closed when some I/O error
// happens. Typically the caller should have a goroutine to monitor
@@ -813,12 +580,6 @@ type ClientTransport interface {
// RemoteAddr returns the remote network address.
RemoteAddr() net.Addr
-
- // IncrMsgSent increments the number of message sent through this transport.
- IncrMsgSent()
-
- // IncrMsgRecv increments the number of message received through this transport.
- IncrMsgRecv()
}
// ServerTransport is the common interface for all gRPC server-side transport
@@ -828,19 +589,7 @@ type ClientTransport interface {
// Write methods for a given Stream will be called serially.
type ServerTransport interface {
// HandleStreams receives incoming streams using the given handler.
- HandleStreams(context.Context, func(*Stream))
-
- // WriteHeader sends the header metadata for the given stream.
- // WriteHeader may not be called on all streams.
- WriteHeader(s *Stream, md metadata.MD) error
-
- // Write sends the data for the given stream.
- // Write may not be called on all streams.
- Write(s *Stream, hdr []byte, data mem.BufferSlice, opts *Options) error
-
- // WriteStatus sends the status of a stream to the client. WriteStatus is
- // the final call made on a stream and always occurs.
- WriteStatus(s *Stream, st *status.Status) error
+ HandleStreams(context.Context, func(*ServerStream))
// Close tears down the transport. Once it is called, the transport
// should not be accessed any more. All the pending streams and their
@@ -852,12 +601,14 @@ type ServerTransport interface {
// Drain notifies the client this ServerTransport stops accepting new RPCs.
Drain(debugData string)
+}
- // IncrMsgSent increments the number of message sent through this transport.
- IncrMsgSent()
-
- // IncrMsgRecv increments the number of message received through this transport.
- IncrMsgRecv()
+type internalServerTransport interface {
+ ServerTransport
+ writeHeader(s *ServerStream, md metadata.MD) error
+ write(s *ServerStream, hdr []byte, data mem.BufferSlice, opts *WriteOptions) error
+ writeStatus(s *ServerStream, st *status.Status) error
+ incrMsgRecv()
}
// connectionErrorf creates an ConnectionError with the specified error description.
diff --git a/vendor/google.golang.org/grpc/mem/buffer_slice.go b/vendor/google.golang.org/grpc/mem/buffer_slice.go
index 228e9c2f..65002e2c 100644
--- a/vendor/google.golang.org/grpc/mem/buffer_slice.go
+++ b/vendor/google.golang.org/grpc/mem/buffer_slice.go
@@ -22,6 +22,11 @@ import (
"io"
)
+const (
+ // 32 KiB is what io.Copy uses.
+ readAllBufSize = 32 * 1024
+)
+
// BufferSlice offers a means to represent data that spans one or more Buffer
// instances. A BufferSlice is meant to be immutable after creation, and methods
// like Ref create and return copies of the slice. This is why all methods have
@@ -219,8 +224,58 @@ func (w *writer) Write(p []byte) (n int, err error) {
// NewWriter wraps the given BufferSlice and BufferPool to implement the
// io.Writer interface. Every call to Write copies the contents of the given
-// buffer into a new Buffer pulled from the given pool and the Buffer is added to
-// the given BufferSlice.
+// buffer into a new Buffer pulled from the given pool and the Buffer is
+// added to the given BufferSlice.
func NewWriter(buffers *BufferSlice, pool BufferPool) io.Writer {
return &writer{buffers: buffers, pool: pool}
}
+
+// ReadAll reads from r until an error or EOF and returns the data it read.
+// A successful call returns err == nil, not err == EOF. Because ReadAll is
+// defined to read from src until EOF, it does not treat an EOF from Read
+// as an error to be reported.
+//
+// Important: A failed call returns a non-nil error and may also return
+// partially read buffers. It is the responsibility of the caller to free the
+// BufferSlice returned, or its memory will not be reused.
+func ReadAll(r io.Reader, pool BufferPool) (BufferSlice, error) {
+ var result BufferSlice
+ if wt, ok := r.(io.WriterTo); ok {
+ // This is more optimal since wt knows the size of chunks it wants to
+ // write and, hence, we can allocate buffers of an optimal size to fit
+ // them. E.g. might be a single big chunk, and we wouldn't chop it
+ // into pieces.
+ w := NewWriter(&result, pool)
+ _, err := wt.WriteTo(w)
+ return result, err
+ }
+nextBuffer:
+ for {
+ buf := pool.Get(readAllBufSize)
+ // We asked for 32KiB but may have been given a bigger buffer.
+ // Use all of it if that's the case.
+ *buf = (*buf)[:cap(*buf)]
+ usedCap := 0
+ for {
+ n, err := r.Read((*buf)[usedCap:])
+ usedCap += n
+ if err != nil {
+ if usedCap == 0 {
+ // Nothing in this buf, put it back
+ pool.Put(buf)
+ } else {
+ *buf = (*buf)[:usedCap]
+ result = append(result, NewBuffer(buf, pool))
+ }
+ if err == io.EOF {
+ err = nil
+ }
+ return result, err
+ }
+ if len(*buf) == usedCap {
+ result = append(result, NewBuffer(buf, pool))
+ continue nextBuffer
+ }
+ }
+ }
+}
diff --git a/vendor/google.golang.org/grpc/preloader.go b/vendor/google.golang.org/grpc/preloader.go
index e87a17f3..ee0ff969 100644
--- a/vendor/google.golang.org/grpc/preloader.go
+++ b/vendor/google.golang.org/grpc/preloader.go
@@ -62,7 +62,7 @@ func (p *PreparedMsg) Encode(s Stream, msg any) error {
materializedData := data.Materialize()
data.Free()
- p.encodedData = mem.BufferSlice{mem.NewBuffer(&materializedData, nil)}
+ p.encodedData = mem.BufferSlice{mem.SliceBuffer(materializedData)}
// TODO: it should be possible to grab the bufferPool from the underlying
// stream implementation with a type cast to its actual type (such as
@@ -76,7 +76,7 @@ func (p *PreparedMsg) Encode(s Stream, msg any) error {
if p.pf.isCompressed() {
materializedCompData := compData.Materialize()
compData.Free()
- compData = mem.BufferSlice{mem.NewBuffer(&materializedCompData, nil)}
+ compData = mem.BufferSlice{mem.SliceBuffer(materializedCompData)}
}
p.hdr, p.payload = msgHeader(p.encodedData, compData, p.pf)
diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go
index 20285451..8eb1cf3b 100644
--- a/vendor/google.golang.org/grpc/resolver/resolver.go
+++ b/vendor/google.golang.org/grpc/resolver/resolver.go
@@ -22,6 +22,7 @@ package resolver
import (
"context"
+ "errors"
"fmt"
"net"
"net/url"
@@ -237,8 +238,8 @@ type ClientConn interface {
// UpdateState can be omitted.
UpdateState(State) error
// ReportError notifies the ClientConn that the Resolver encountered an
- // error. The ClientConn will notify the load balancer and begin calling
- // ResolveNow on the Resolver with exponential backoff.
+ // error. The ClientConn then forwards this error to the load balancing
+ // policy.
ReportError(error)
// NewAddress is called by resolver to notify ClientConn a new list
// of resolved addresses.
@@ -330,3 +331,20 @@ type AuthorityOverrider interface {
// typically in line, and must keep it unchanged.
OverrideAuthority(Target) string
}
+
+// ValidateEndpoints validates endpoints from a petiole policy's perspective.
+// Petiole policies should call this before calling into their children. See
+// [gRPC A61](https://github.com/grpc/proposal/blob/master/A61-IPv4-IPv6-dualstack-backends.md)
+// for details.
+func ValidateEndpoints(endpoints []Endpoint) error {
+ if len(endpoints) == 0 {
+ return errors.New("endpoints list is empty")
+ }
+
+ for _, endpoint := range endpoints {
+ for range endpoint.Addresses {
+ return nil
+ }
+ }
+ return errors.New("endpoints list contains no addresses")
+}
diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go
index aba1ae3e..9fac2b08 100644
--- a/vendor/google.golang.org/grpc/rpc_util.go
+++ b/vendor/google.golang.org/grpc/rpc_util.go
@@ -622,7 +622,7 @@ func (pf payloadFormat) isCompressed() bool {
}
type streamReader interface {
- ReadHeader(header []byte) error
+ ReadMessageHeader(header []byte) error
Read(n int) (mem.BufferSlice, error)
}
@@ -656,7 +656,7 @@ type parser struct {
// that the underlying streamReader must not return an incompatible
// error.
func (p *parser) recvMsg(maxReceiveMessageSize int) (payloadFormat, mem.BufferSlice, error) {
- err := p.r.ReadHeader(p.header[:])
+ err := p.r.ReadMessageHeader(p.header[:])
if err != nil {
return 0, nil, err
}
@@ -664,9 +664,6 @@ func (p *parser) recvMsg(maxReceiveMessageSize int) (payloadFormat, mem.BufferSl
pf := payloadFormat(p.header[0])
length := binary.BigEndian.Uint32(p.header[1:])
- if length == 0 {
- return pf, nil, nil
- }
if int64(length) > int64(maxInt) {
return 0, nil, status.Errorf(codes.ResourceExhausted, "grpc: received message larger than max length allowed on current machine (%d vs. %d)", length, maxInt)
}
@@ -817,7 +814,7 @@ func (p *payloadInfo) free() {
// the buffer is no longer needed.
// TODO: Refactor this function to reduce the number of arguments.
// See: https://google.github.io/styleguide/go/best-practices.html#function-argument-lists
-func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor, isServer bool,
+func recvAndDecompress(p *parser, s recvCompressor, dc Decompressor, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor, isServer bool,
) (out mem.BufferSlice, err error) {
pf, compressed, err := p.recvMsg(maxReceiveMessageSize)
if err != nil {
@@ -841,7 +838,7 @@ func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxRecei
var uncompressedBuf []byte
uncompressedBuf, err = dc.Do(compressed.Reader())
if err == nil {
- out = mem.BufferSlice{mem.NewBuffer(&uncompressedBuf, nil)}
+ out = mem.BufferSlice{mem.SliceBuffer(uncompressedBuf)}
}
size = len(uncompressedBuf)
} else {
@@ -877,30 +874,7 @@ func decompress(compressor encoding.Compressor, d mem.BufferSlice, maxReceiveMes
return nil, 0, err
}
- // TODO: Can/should this still be preserved with the new BufferSlice API? Are
- // there any actual benefits to allocating a single large buffer instead of
- // multiple smaller ones?
- //if sizer, ok := compressor.(interface {
- // DecompressedSize(compressedBytes []byte) int
- //}); ok {
- // if size := sizer.DecompressedSize(d); size >= 0 {
- // if size > maxReceiveMessageSize {
- // return nil, size, nil
- // }
- // // size is used as an estimate to size the buffer, but we
- // // will read more data if available.
- // // +MinRead so ReadFrom will not reallocate if size is correct.
- // //
- // // TODO: If we ensure that the buffer size is the same as the DecompressedSize,
- // // we can also utilize the recv buffer pool here.
- // buf := bytes.NewBuffer(make([]byte, 0, size+bytes.MinRead))
- // bytesRead, err := buf.ReadFrom(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1))
- // return buf.Bytes(), int(bytesRead), err
- // }
- //}
-
- var out mem.BufferSlice
- _, err = io.Copy(mem.NewWriter(&out, pool), io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1))
+ out, err := mem.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1), pool)
if err != nil {
out.Free()
return nil, 0, err
@@ -908,10 +882,14 @@ func decompress(compressor encoding.Compressor, d mem.BufferSlice, maxReceiveMes
return out, out.Len(), nil
}
+type recvCompressor interface {
+ RecvCompress() string
+}
+
// For the two compressor parameters, both should not be set, but if they are,
// dc takes precedence over compressor.
// TODO(dfawley): wrap the old compressor/decompressor using the new API?
-func recv(p *parser, c baseCodec, s *transport.Stream, dc Decompressor, m any, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor, isServer bool) error {
+func recv(p *parser, c baseCodec, s recvCompressor, dc Decompressor, m any, maxReceiveMessageSize int, payInfo *payloadInfo, compressor encoding.Compressor, isServer bool) error {
data, err := recvAndDecompress(p, s, dc, maxReceiveMessageSize, payInfo, compressor, isServer)
if err != nil {
return err
diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go
index d1e1415a..9d5b2884 100644
--- a/vendor/google.golang.org/grpc/server.go
+++ b/vendor/google.golang.org/grpc/server.go
@@ -87,12 +87,13 @@ func init() {
var statusOK = status.New(codes.OK, "")
var logger = grpclog.Component("core")
-type methodHandler func(srv any, ctx context.Context, dec func(any) error, interceptor UnaryServerInterceptor) (any, error)
+// MethodHandler is a function type that processes a unary RPC method call.
+type MethodHandler func(srv any, ctx context.Context, dec func(any) error, interceptor UnaryServerInterceptor) (any, error)
// MethodDesc represents an RPC service's method specification.
type MethodDesc struct {
MethodName string
- Handler methodHandler
+ Handler MethodHandler
}
// ServiceDesc represents an RPC service's specification.
@@ -621,8 +622,8 @@ func bufferPool(bufferPool mem.BufferPool) ServerOption {
// workload (assuming a QPS of a few thousand requests/sec).
const serverWorkerResetThreshold = 1 << 16
-// serverWorker blocks on a *transport.Stream channel forever and waits for
-// data to be fed by serveStreams. This allows multiple requests to be
+// serverWorker blocks on a *transport.ServerStream channel forever and waits
+// for data to be fed by serveStreams. This allows multiple requests to be
// processed by the same goroutine, removing the need for expensive stack
// re-allocations (see the runtime.morestack problem [1]).
//
@@ -1020,7 +1021,7 @@ func (s *Server) serveStreams(ctx context.Context, st transport.ServerTransport,
}()
streamQuota := newHandlerQuota(s.opts.maxConcurrentStreams)
- st.HandleStreams(ctx, func(stream *transport.Stream) {
+ st.HandleStreams(ctx, func(stream *transport.ServerStream) {
s.handlersWG.Add(1)
streamQuota.acquire()
f := func() {
@@ -1136,7 +1137,7 @@ func (s *Server) incrCallsFailed() {
s.channelz.ServerMetrics.CallsFailed.Add(1)
}
-func (s *Server) sendResponse(ctx context.Context, t transport.ServerTransport, stream *transport.Stream, msg any, cp Compressor, opts *transport.Options, comp encoding.Compressor) error {
+func (s *Server) sendResponse(ctx context.Context, stream *transport.ServerStream, msg any, cp Compressor, opts *transport.WriteOptions, comp encoding.Compressor) error {
data, err := encode(s.getCodec(stream.ContentSubtype()), msg)
if err != nil {
channelz.Error(logger, s.channelz, "grpc: server failed to encode response: ", err)
@@ -1165,7 +1166,7 @@ func (s *Server) sendResponse(ctx context.Context, t transport.ServerTransport,
if payloadLen > s.opts.maxSendMessageSize {
return status.Errorf(codes.ResourceExhausted, "grpc: trying to send message larger than max (%d vs. %d)", payloadLen, s.opts.maxSendMessageSize)
}
- err = t.Write(stream, hdr, payload, opts)
+ err = stream.Write(hdr, payload, opts)
if err == nil {
if len(s.opts.statsHandlers) != 0 {
for _, sh := range s.opts.statsHandlers {
@@ -1212,7 +1213,7 @@ func getChainUnaryHandler(interceptors []UnaryServerInterceptor, curr int, info
}
}
-func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTransport, stream *transport.Stream, info *serviceInfo, md *MethodDesc, trInfo *traceInfo) (err error) {
+func (s *Server) processUnaryRPC(ctx context.Context, stream *transport.ServerStream, info *serviceInfo, md *MethodDesc, trInfo *traceInfo) (err error) {
shs := s.opts.statsHandlers
if len(shs) != 0 || trInfo != nil || channelz.IsOn() {
if channelz.IsOn() {
@@ -1320,7 +1321,7 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor
decomp = encoding.GetCompressor(rc)
if decomp == nil {
st := status.Newf(codes.Unimplemented, "grpc: Decompressor is not installed for grpc-encoding %q", rc)
- t.WriteStatus(stream, st)
+ stream.WriteStatus(st)
return st.Err()
}
}
@@ -1354,16 +1355,21 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor
d, err := recvAndDecompress(&parser{r: stream, bufferPool: s.opts.bufferPool}, stream, dc, s.opts.maxReceiveMessageSize, payInfo, decomp, true)
if err != nil {
- if e := t.WriteStatus(stream, status.Convert(err)); e != nil {
+ if e := stream.WriteStatus(status.Convert(err)); e != nil {
channelz.Warningf(logger, s.channelz, "grpc: Server.processUnaryRPC failed to write status: %v", e)
}
return err
}
- defer d.Free()
- if channelz.IsOn() {
- t.IncrMsgRecv()
+ freed := false
+ dataFree := func() {
+ if !freed {
+ d.Free()
+ freed = true
+ }
}
+ defer dataFree()
df := func(v any) error {
+ defer dataFree()
if err := s.getCodec(stream.ContentSubtype()).Unmarshal(d, v); err != nil {
return status.Errorf(codes.Internal, "grpc: error unmarshalling request: %v", err)
}
@@ -1404,7 +1410,7 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor
trInfo.tr.LazyLog(stringer(appStatus.Message()), true)
trInfo.tr.SetError()
}
- if e := t.WriteStatus(stream, appStatus); e != nil {
+ if e := stream.WriteStatus(appStatus); e != nil {
channelz.Warningf(logger, s.channelz, "grpc: Server.processUnaryRPC failed to write status: %v", e)
}
if len(binlogs) != 0 {
@@ -1431,20 +1437,20 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor
if trInfo != nil {
trInfo.tr.LazyLog(stringer("OK"), false)
}
- opts := &transport.Options{Last: true}
+ opts := &transport.WriteOptions{Last: true}
// Server handler could have set new compressor by calling SetSendCompressor.
// In case it is set, we need to use it for compressing outbound message.
if stream.SendCompress() != sendCompressorName {
comp = encoding.GetCompressor(stream.SendCompress())
}
- if err := s.sendResponse(ctx, t, stream, reply, cp, opts, comp); err != nil {
+ if err := s.sendResponse(ctx, stream, reply, cp, opts, comp); err != nil {
if err == io.EOF {
// The entire stream is done (for unary RPC only).
return err
}
if sts, ok := status.FromError(err); ok {
- if e := t.WriteStatus(stream, sts); e != nil {
+ if e := stream.WriteStatus(sts); e != nil {
channelz.Warningf(logger, s.channelz, "grpc: Server.processUnaryRPC failed to write status: %v", e)
}
} else {
@@ -1484,9 +1490,6 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor
binlog.Log(ctx, sm)
}
}
- if channelz.IsOn() {
- t.IncrMsgSent()
- }
if trInfo != nil {
trInfo.tr.LazyLog(&payload{sent: true, msg: reply}, true)
}
@@ -1502,7 +1505,7 @@ func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTranspor
binlog.Log(ctx, st)
}
}
- return t.WriteStatus(stream, statusOK)
+ return stream.WriteStatus(statusOK)
}
// chainStreamServerInterceptors chains all stream server interceptors into one.
@@ -1541,7 +1544,7 @@ func getChainStreamHandler(interceptors []StreamServerInterceptor, curr int, inf
}
}
-func (s *Server) processStreamingRPC(ctx context.Context, t transport.ServerTransport, stream *transport.Stream, info *serviceInfo, sd *StreamDesc, trInfo *traceInfo) (err error) {
+func (s *Server) processStreamingRPC(ctx context.Context, stream *transport.ServerStream, info *serviceInfo, sd *StreamDesc, trInfo *traceInfo) (err error) {
if channelz.IsOn() {
s.incrCallsStarted()
}
@@ -1561,7 +1564,6 @@ func (s *Server) processStreamingRPC(ctx context.Context, t transport.ServerTran
ctx = NewContextWithServerTransportStream(ctx, stream)
ss := &serverStream{
ctx: ctx,
- t: t,
s: stream,
p: &parser{r: stream, bufferPool: s.opts.bufferPool},
codec: s.getCodec(stream.ContentSubtype()),
@@ -1648,7 +1650,7 @@ func (s *Server) processStreamingRPC(ctx context.Context, t transport.ServerTran
ss.decomp = encoding.GetCompressor(rc)
if ss.decomp == nil {
st := status.Newf(codes.Unimplemented, "grpc: Decompressor is not installed for grpc-encoding %q", rc)
- t.WriteStatus(ss.s, st)
+ ss.s.WriteStatus(st)
return st.Err()
}
}
@@ -1717,7 +1719,7 @@ func (s *Server) processStreamingRPC(ctx context.Context, t transport.ServerTran
binlog.Log(ctx, st)
}
}
- t.WriteStatus(ss.s, appStatus)
+ ss.s.WriteStatus(appStatus)
// TODO: Should we log an error from WriteStatus here and below?
return appErr
}
@@ -1735,10 +1737,10 @@ func (s *Server) processStreamingRPC(ctx context.Context, t transport.ServerTran
binlog.Log(ctx, st)
}
}
- return t.WriteStatus(ss.s, statusOK)
+ return ss.s.WriteStatus(statusOK)
}
-func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Stream) {
+func (s *Server) handleStream(t transport.ServerTransport, stream *transport.ServerStream) {
ctx := stream.Context()
ctx = contextWithServer(ctx, s)
var ti *traceInfo
@@ -1768,7 +1770,7 @@ func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Str
ti.tr.SetError()
}
errDesc := fmt.Sprintf("malformed method name: %q", stream.Method())
- if err := t.WriteStatus(stream, status.New(codes.Unimplemented, errDesc)); err != nil {
+ if err := stream.WriteStatus(status.New(codes.Unimplemented, errDesc)); err != nil {
if ti != nil {
ti.tr.LazyLog(&fmtStringer{"%v", []any{err}}, true)
ti.tr.SetError()
@@ -1783,17 +1785,20 @@ func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Str
service := sm[:pos]
method := sm[pos+1:]
- md, _ := metadata.FromIncomingContext(ctx)
- for _, sh := range s.opts.statsHandlers {
- ctx = sh.TagRPC(ctx, &stats.RPCTagInfo{FullMethodName: stream.Method()})
- sh.HandleRPC(ctx, &stats.InHeader{
- FullMethod: stream.Method(),
- RemoteAddr: t.Peer().Addr,
- LocalAddr: t.Peer().LocalAddr,
- Compression: stream.RecvCompress(),
- WireLength: stream.HeaderWireLength(),
- Header: md,
- })
+ // FromIncomingContext is expensive: skip if there are no statsHandlers
+ if len(s.opts.statsHandlers) > 0 {
+ md, _ := metadata.FromIncomingContext(ctx)
+ for _, sh := range s.opts.statsHandlers {
+ ctx = sh.TagRPC(ctx, &stats.RPCTagInfo{FullMethodName: stream.Method()})
+ sh.HandleRPC(ctx, &stats.InHeader{
+ FullMethod: stream.Method(),
+ RemoteAddr: t.Peer().Addr,
+ LocalAddr: t.Peer().LocalAddr,
+ Compression: stream.RecvCompress(),
+ WireLength: stream.HeaderWireLength(),
+ Header: md,
+ })
+ }
}
// To have calls in stream callouts work. Will delete once all stats handler
// calls come from the gRPC layer.
@@ -1802,17 +1807,17 @@ func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Str
srv, knownService := s.services[service]
if knownService {
if md, ok := srv.methods[method]; ok {
- s.processUnaryRPC(ctx, t, stream, srv, md, ti)
+ s.processUnaryRPC(ctx, stream, srv, md, ti)
return
}
if sd, ok := srv.streams[method]; ok {
- s.processStreamingRPC(ctx, t, stream, srv, sd, ti)
+ s.processStreamingRPC(ctx, stream, srv, sd, ti)
return
}
}
// Unknown service, or known server unknown method.
if unknownDesc := s.opts.unknownStreamDesc; unknownDesc != nil {
- s.processStreamingRPC(ctx, t, stream, nil, unknownDesc, ti)
+ s.processStreamingRPC(ctx, stream, nil, unknownDesc, ti)
return
}
var errDesc string
@@ -1825,7 +1830,7 @@ func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Str
ti.tr.LazyPrintf("%s", errDesc)
ti.tr.SetError()
}
- if err := t.WriteStatus(stream, status.New(codes.Unimplemented, errDesc)); err != nil {
+ if err := stream.WriteStatus(status.New(codes.Unimplemented, errDesc)); err != nil {
if ti != nil {
ti.tr.LazyLog(&fmtStringer{"%v", []any{err}}, true)
ti.tr.SetError()
@@ -2100,7 +2105,7 @@ func SendHeader(ctx context.Context, md metadata.MD) error {
// Notice: This function is EXPERIMENTAL and may be changed or removed in a
// later release.
func SetSendCompressor(ctx context.Context, name string) error {
- stream, ok := ServerTransportStreamFromContext(ctx).(*transport.Stream)
+ stream, ok := ServerTransportStreamFromContext(ctx).(*transport.ServerStream)
if !ok || stream == nil {
return fmt.Errorf("failed to fetch the stream from the given context")
}
@@ -2122,7 +2127,7 @@ func SetSendCompressor(ctx context.Context, name string) error {
// Notice: This function is EXPERIMENTAL and may be changed or removed in a
// later release.
func ClientSupportedCompressors(ctx context.Context) ([]string, error) {
- stream, ok := ServerTransportStreamFromContext(ctx).(*transport.Stream)
+ stream, ok := ServerTransportStreamFromContext(ctx).(*transport.ServerStream)
if !ok || stream == nil {
return nil, fmt.Errorf("failed to fetch the stream from the given context %v", ctx)
}
diff --git a/vendor/google.golang.org/grpc/service_config.go b/vendor/google.golang.org/grpc/service_config.go
index 2671c5ef..8d451e07 100644
--- a/vendor/google.golang.org/grpc/service_config.go
+++ b/vendor/google.golang.org/grpc/service_config.go
@@ -168,6 +168,7 @@ func init() {
return parseServiceConfig(js, defaultMaxCallAttempts)
}
}
+
func parseServiceConfig(js string, maxAttempts int) *serviceconfig.ParseResult {
if len(js) == 0 {
return &serviceconfig.ParseResult{Err: fmt.Errorf("no JSON service config provided")}
@@ -267,18 +268,21 @@ func parseServiceConfig(js string, maxAttempts int) *serviceconfig.ParseResult {
return &serviceconfig.ParseResult{Config: &sc}
}
+func isValidRetryPolicy(jrp *jsonRetryPolicy) bool {
+ return jrp.MaxAttempts > 1 &&
+ jrp.InitialBackoff > 0 &&
+ jrp.MaxBackoff > 0 &&
+ jrp.BackoffMultiplier > 0 &&
+ len(jrp.RetryableStatusCodes) > 0
+}
+
func convertRetryPolicy(jrp *jsonRetryPolicy, maxAttempts int) (p *internalserviceconfig.RetryPolicy, err error) {
if jrp == nil {
return nil, nil
}
- if jrp.MaxAttempts <= 1 ||
- jrp.InitialBackoff <= 0 ||
- jrp.MaxBackoff <= 0 ||
- jrp.BackoffMultiplier <= 0 ||
- len(jrp.RetryableStatusCodes) == 0 {
- logger.Warningf("grpc: ignoring retry policy %v due to illegal configuration", jrp)
- return nil, nil
+ if !isValidRetryPolicy(jrp) {
+ return nil, fmt.Errorf("invalid retry policy (%+v): ", jrp)
}
if jrp.MaxAttempts < maxAttempts {
@@ -297,7 +301,7 @@ func convertRetryPolicy(jrp *jsonRetryPolicy, maxAttempts int) (p *internalservi
return rp, nil
}
-func min(a, b *int) *int {
+func minPointers(a, b *int) *int {
if *a < *b {
return a
}
@@ -309,7 +313,7 @@ func getMaxSize(mcMax, doptMax *int, defaultVal int) *int {
return &defaultVal
}
if mcMax != nil && doptMax != nil {
- return min(mcMax, doptMax)
+ return minPointers(mcMax, doptMax)
}
if mcMax != nil {
return mcMax
diff --git a/vendor/google.golang.org/grpc/stats/metrics.go b/vendor/google.golang.org/grpc/stats/metrics.go
new file mode 100644
index 00000000..641c8e97
--- /dev/null
+++ b/vendor/google.golang.org/grpc/stats/metrics.go
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2024 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package stats
+
+import "maps"
+
+// MetricSet is a set of metrics to record. Once created, MetricSet is immutable,
+// however Add and Remove can make copies with specific metrics added or
+// removed, respectively.
+//
+// Do not construct directly; use NewMetricSet instead.
+type MetricSet struct {
+ // metrics are the set of metrics to initialize.
+ metrics map[string]bool
+}
+
+// NewMetricSet returns a MetricSet containing metricNames.
+func NewMetricSet(metricNames ...string) *MetricSet {
+ newMetrics := make(map[string]bool)
+ for _, metric := range metricNames {
+ newMetrics[metric] = true
+ }
+ return &MetricSet{metrics: newMetrics}
+}
+
+// Metrics returns the metrics set. The returned map is read-only and must not
+// be modified.
+func (m *MetricSet) Metrics() map[string]bool {
+ return m.metrics
+}
+
+// Add adds the metricNames to the metrics set and returns a new copy with the
+// additional metrics.
+func (m *MetricSet) Add(metricNames ...string) *MetricSet {
+ newMetrics := make(map[string]bool)
+ for metric := range m.metrics {
+ newMetrics[metric] = true
+ }
+
+ for _, metric := range metricNames {
+ newMetrics[metric] = true
+ }
+ return &MetricSet{metrics: newMetrics}
+}
+
+// Join joins the metrics passed in with the metrics set, and returns a new copy
+// with the merged metrics.
+func (m *MetricSet) Join(metrics *MetricSet) *MetricSet {
+ newMetrics := make(map[string]bool)
+ maps.Copy(newMetrics, m.metrics)
+ maps.Copy(newMetrics, metrics.metrics)
+ return &MetricSet{metrics: newMetrics}
+}
+
+// Remove removes the metricNames from the metrics set and returns a new copy
+// with the metrics removed.
+func (m *MetricSet) Remove(metricNames ...string) *MetricSet {
+ newMetrics := make(map[string]bool)
+ for metric := range m.metrics {
+ newMetrics[metric] = true
+ }
+
+ for _, metric := range metricNames {
+ delete(newMetrics, metric)
+ }
+ return &MetricSet{metrics: newMetrics}
+}
diff --git a/vendor/google.golang.org/grpc/stats/stats.go b/vendor/google.golang.org/grpc/stats/stats.go
index 71195c49..6f20d2d5 100644
--- a/vendor/google.golang.org/grpc/stats/stats.go
+++ b/vendor/google.golang.org/grpc/stats/stats.go
@@ -260,84 +260,42 @@ func (s *ConnEnd) IsClient() bool { return s.Client }
func (s *ConnEnd) isConnStats() {}
-type incomingTagsKey struct{}
-type outgoingTagsKey struct{}
-
// SetTags attaches stats tagging data to the context, which will be sent in
// the outgoing RPC with the header grpc-tags-bin. Subsequent calls to
// SetTags will overwrite the values from earlier calls.
//
-// NOTE: this is provided only for backward compatibility with existing clients
-// and will likely be removed in an upcoming release. New uses should transmit
-// this type of data using metadata with a different, non-reserved (i.e. does
-// not begin with "grpc-") header name.
+// Deprecated: set the `grpc-tags-bin` header in the metadata instead.
func SetTags(ctx context.Context, b []byte) context.Context {
- return context.WithValue(ctx, outgoingTagsKey{}, b)
+ return metadata.AppendToOutgoingContext(ctx, "grpc-tags-bin", string(b))
}
// Tags returns the tags from the context for the inbound RPC.
//
-// NOTE: this is provided only for backward compatibility with existing clients
-// and will likely be removed in an upcoming release. New uses should transmit
-// this type of data using metadata with a different, non-reserved (i.e. does
-// not begin with "grpc-") header name.
+// Deprecated: obtain the `grpc-tags-bin` header from metadata instead.
func Tags(ctx context.Context) []byte {
- b, _ := ctx.Value(incomingTagsKey{}).([]byte)
- return b
-}
-
-// SetIncomingTags attaches stats tagging data to the context, to be read by
-// the application (not sent in outgoing RPCs).
-//
-// This is intended for gRPC-internal use ONLY.
-func SetIncomingTags(ctx context.Context, b []byte) context.Context {
- return context.WithValue(ctx, incomingTagsKey{}, b)
-}
-
-// OutgoingTags returns the tags from the context for the outbound RPC.
-//
-// This is intended for gRPC-internal use ONLY.
-func OutgoingTags(ctx context.Context) []byte {
- b, _ := ctx.Value(outgoingTagsKey{}).([]byte)
- return b
+ traceValues := metadata.ValueFromIncomingContext(ctx, "grpc-tags-bin")
+ if len(traceValues) == 0 {
+ return nil
+ }
+ return []byte(traceValues[len(traceValues)-1])
}
-type incomingTraceKey struct{}
-type outgoingTraceKey struct{}
-
// SetTrace attaches stats tagging data to the context, which will be sent in
// the outgoing RPC with the header grpc-trace-bin. Subsequent calls to
// SetTrace will overwrite the values from earlier calls.
//
-// NOTE: this is provided only for backward compatibility with existing clients
-// and will likely be removed in an upcoming release. New uses should transmit
-// this type of data using metadata with a different, non-reserved (i.e. does
-// not begin with "grpc-") header name.
+// Deprecated: set the `grpc-trace-bin` header in the metadata instead.
func SetTrace(ctx context.Context, b []byte) context.Context {
- return context.WithValue(ctx, outgoingTraceKey{}, b)
+ return metadata.AppendToOutgoingContext(ctx, "grpc-trace-bin", string(b))
}
// Trace returns the trace from the context for the inbound RPC.
//
-// NOTE: this is provided only for backward compatibility with existing clients
-// and will likely be removed in an upcoming release. New uses should transmit
-// this type of data using metadata with a different, non-reserved (i.e. does
-// not begin with "grpc-") header name.
+// Deprecated: obtain the `grpc-trace-bin` header from metadata instead.
func Trace(ctx context.Context) []byte {
- b, _ := ctx.Value(incomingTraceKey{}).([]byte)
- return b
-}
-
-// SetIncomingTrace attaches stats tagging data to the context, to be read by
-// the application (not sent in outgoing RPCs). It is intended for
-// gRPC-internal use.
-func SetIncomingTrace(ctx context.Context, b []byte) context.Context {
- return context.WithValue(ctx, incomingTraceKey{}, b)
-}
-
-// OutgoingTrace returns the trace from the context for the outbound RPC. It is
-// intended for gRPC-internal use.
-func OutgoingTrace(ctx context.Context) []byte {
- b, _ := ctx.Value(outgoingTraceKey{}).([]byte)
- return b
+ traceValues := metadata.ValueFromIncomingContext(ctx, "grpc-trace-bin")
+ if len(traceValues) == 0 {
+ return nil
+ }
+ return []byte(traceValues[len(traceValues)-1])
}
diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go
index bb2b2a21..54adbbce 100644
--- a/vendor/google.golang.org/grpc/stream.go
+++ b/vendor/google.golang.org/grpc/stream.go
@@ -23,7 +23,7 @@ import (
"errors"
"io"
"math"
- "math/rand"
+ rand "math/rand/v2"
"strconv"
"sync"
"time"
@@ -113,7 +113,9 @@ type ClientStream interface {
// SendMsg is generally called by generated code. On error, SendMsg aborts
// the stream. If the error was generated by the client, the status is
// returned directly; otherwise, io.EOF is returned and the status of
- // the stream may be discovered using RecvMsg.
+ // the stream may be discovered using RecvMsg. For unary or server-streaming
+ // RPCs (StreamDesc.ClientStreams is false), a nil error is returned
+ // unconditionally.
//
// SendMsg blocks until:
// - There is sufficient flow control to schedule m with the transport, or
@@ -216,7 +218,7 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth
var mc serviceconfig.MethodConfig
var onCommit func()
- var newStream = func(ctx context.Context, done func()) (iresolver.ClientStream, error) {
+ newStream := func(ctx context.Context, done func()) (iresolver.ClientStream, error) {
return newClientStreamWithParams(ctx, desc, cc, method, mc, onCommit, done, opts...)
}
@@ -584,7 +586,7 @@ type csAttempt struct {
ctx context.Context
cs *clientStream
t transport.ClientTransport
- s *transport.Stream
+ s *transport.ClientStream
p *parser
pickResult balancer.PickResult
@@ -706,11 +708,10 @@ func (a *csAttempt) shouldRetry(err error) (bool, error) {
cs.numRetriesSincePushback = 0
} else {
fact := math.Pow(rp.BackoffMultiplier, float64(cs.numRetriesSincePushback))
- cur := float64(rp.InitialBackoff) * fact
- if max := float64(rp.MaxBackoff); cur > max {
- cur = max
- }
- dur = time.Duration(rand.Int63n(int64(cur)))
+ cur := min(float64(rp.InitialBackoff)*fact, float64(rp.MaxBackoff))
+ // Apply jitter by multiplying with a random factor between 0.8 and 1.2
+ cur *= 0.8 + 0.4*rand.Float64()
+ dur = time.Duration(int64(cur))
cs.numRetriesSincePushback++
}
@@ -991,7 +992,7 @@ func (cs *clientStream) CloseSend() error {
}
cs.sentLast = true
op := func(a *csAttempt) error {
- a.t.Write(a.s, nil, nil, &transport.Options{Last: true})
+ a.s.Write(nil, nil, &transport.WriteOptions{Last: true})
// Always return nil; io.EOF is the only error that might make sense
// instead, but there is no need to signal the client to call RecvMsg
// as the only use left for the stream after CloseSend is to call
@@ -1083,7 +1084,7 @@ func (a *csAttempt) sendMsg(m any, hdr []byte, payld mem.BufferSlice, dataLength
}
a.mu.Unlock()
}
- if err := a.t.Write(a.s, hdr, payld, &transport.Options{Last: !cs.desc.ClientStreams}); err != nil {
+ if err := a.s.Write(hdr, payld, &transport.WriteOptions{Last: !cs.desc.ClientStreams}); err != nil {
if !cs.desc.ClientStreams {
// For non-client-streaming RPCs, we return nil instead of EOF on error
// because the generated code requires it. finish is not called; RecvMsg()
@@ -1097,9 +1098,6 @@ func (a *csAttempt) sendMsg(m any, hdr []byte, payld mem.BufferSlice, dataLength
sh.HandleRPC(a.ctx, outPayload(true, m, dataLength, payloadLength, time.Now()))
}
}
- if channelz.IsOn() {
- a.t.IncrMsgSent()
- }
return nil
}
@@ -1153,9 +1151,6 @@ func (a *csAttempt) recvMsg(m any, payInfo *payloadInfo) (err error) {
Length: payInfo.uncompressedBytes.Len(),
})
}
- if channelz.IsOn() {
- a.t.IncrMsgRecv()
- }
if cs.desc.ServerStreams {
// Subsequent messages should be received by subsequent RecvMsg calls.
return nil
@@ -1183,7 +1178,7 @@ func (a *csAttempt) finish(err error) {
}
var tr metadata.MD
if a.s != nil {
- a.t.CloseStream(a.s, err)
+ a.s.Close(err)
tr = a.s.Trailer()
}
@@ -1340,7 +1335,7 @@ func newNonRetryClientStream(ctx context.Context, desc *StreamDesc, method strin
}
type addrConnStream struct {
- s *transport.Stream
+ s *transport.ClientStream
ac *addrConn
callHdr *transport.CallHdr
cancel context.CancelFunc
@@ -1380,7 +1375,7 @@ func (as *addrConnStream) CloseSend() error {
}
as.sentLast = true
- as.t.Write(as.s, nil, nil, &transport.Options{Last: true})
+ as.s.Write(nil, nil, &transport.WriteOptions{Last: true})
// Always return nil; io.EOF is the only error that might make sense
// instead, but there is no need to signal the client to call RecvMsg
// as the only use left for the stream after CloseSend is to call
@@ -1430,7 +1425,7 @@ func (as *addrConnStream) SendMsg(m any) (err error) {
return status.Errorf(codes.ResourceExhausted, "trying to send message larger than max (%d vs. %d)", payload.Len(), *as.callInfo.maxSendMessageSize)
}
- if err := as.t.Write(as.s, hdr, payload, &transport.Options{Last: !as.desc.ClientStreams}); err != nil {
+ if err := as.s.Write(hdr, payload, &transport.WriteOptions{Last: !as.desc.ClientStreams}); err != nil {
if !as.desc.ClientStreams {
// For non-client-streaming RPCs, we return nil instead of EOF on error
// because the generated code requires it. finish is not called; RecvMsg()
@@ -1440,9 +1435,6 @@ func (as *addrConnStream) SendMsg(m any) (err error) {
return io.EOF
}
- if channelz.IsOn() {
- as.t.IncrMsgSent()
- }
return nil
}
@@ -1480,9 +1472,6 @@ func (as *addrConnStream) RecvMsg(m any) (err error) {
return toRPCErr(err)
}
- if channelz.IsOn() {
- as.t.IncrMsgRecv()
- }
if as.desc.ServerStreams {
// Subsequent messages should be received by subsequent RecvMsg calls.
return nil
@@ -1510,7 +1499,7 @@ func (as *addrConnStream) finish(err error) {
err = nil
}
if as.s != nil {
- as.t.CloseStream(as.s, err)
+ as.s.Close(err)
}
if err != nil {
@@ -1577,8 +1566,7 @@ type ServerStream interface {
// serverStream implements a server side Stream.
type serverStream struct {
ctx context.Context
- t transport.ServerTransport
- s *transport.Stream
+ s *transport.ServerStream
p *parser
codec baseCodec
@@ -1628,7 +1616,7 @@ func (ss *serverStream) SendHeader(md metadata.MD) error {
return status.Error(codes.Internal, err.Error())
}
- err = ss.t.WriteHeader(ss.s, md)
+ err = ss.s.SendHeader(md)
if len(ss.binlogs) != 0 && !ss.serverHeaderBinlogged {
h, _ := ss.s.Header()
sh := &binarylog.ServerHeader{
@@ -1668,7 +1656,7 @@ func (ss *serverStream) SendMsg(m any) (err error) {
}
if err != nil && err != io.EOF {
st, _ := status.FromError(toRPCErr(err))
- ss.t.WriteStatus(ss.s, st)
+ ss.s.WriteStatus(st)
// Non-user specified status was sent out. This should be an error
// case (as a server side Cancel maybe).
//
@@ -1676,9 +1664,6 @@ func (ss *serverStream) SendMsg(m any) (err error) {
// status from the service handler, we will log that error instead.
// This behavior is similar to an interceptor.
}
- if channelz.IsOn() && err == nil {
- ss.t.IncrMsgSent()
- }
}()
// Server handler could have set new compressor by calling SetSendCompressor.
@@ -1710,7 +1695,7 @@ func (ss *serverStream) SendMsg(m any) (err error) {
if payloadLen > ss.maxSendMessageSize {
return status.Errorf(codes.ResourceExhausted, "trying to send message larger than max (%d vs. %d)", payloadLen, ss.maxSendMessageSize)
}
- if err := ss.t.Write(ss.s, hdr, payload, &transport.Options{Last: false}); err != nil {
+ if err := ss.s.Write(hdr, payload, &transport.WriteOptions{Last: false}); err != nil {
return toRPCErr(err)
}
@@ -1756,7 +1741,7 @@ func (ss *serverStream) RecvMsg(m any) (err error) {
}
if err != nil && err != io.EOF {
st, _ := status.FromError(toRPCErr(err))
- ss.t.WriteStatus(ss.s, st)
+ ss.s.WriteStatus(st)
// Non-user specified status was sent out. This should be an error
// case (as a server side Cancel maybe).
//
@@ -1764,9 +1749,6 @@ func (ss *serverStream) RecvMsg(m any) (err error) {
// status from the service handler, we will log that error instead.
// This behavior is similar to an interceptor.
}
- if channelz.IsOn() && err == nil {
- ss.t.IncrMsgRecv()
- }
}()
var payInfo *payloadInfo
if len(ss.statsHandler) != 0 || len(ss.binlogs) != 0 {
@@ -1784,7 +1766,7 @@ func (ss *serverStream) RecvMsg(m any) (err error) {
return err
}
if err == io.ErrUnexpectedEOF {
- err = status.Errorf(codes.Internal, io.ErrUnexpectedEOF.Error())
+ err = status.Error(codes.Internal, io.ErrUnexpectedEOF.Error())
}
return toRPCErr(err)
}
diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go
index d50e8435..0e03fa4d 100644
--- a/vendor/google.golang.org/grpc/version.go
+++ b/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
package grpc
// Version is the current grpc version.
-const Version = "1.68.0"
+const Version = "1.70.0"
diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go
index cffdfda9..737d6876 100644
--- a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go
+++ b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go
@@ -192,11 +192,6 @@ func (d decoder) unmarshalMessage(m protoreflect.Message, skipTypeURL bool) erro
fd = fieldDescs.ByTextName(name)
}
}
- if flags.ProtoLegacyWeak {
- if fd != nil && fd.IsWeak() && fd.Message().IsPlaceholder() {
- fd = nil // reset since the weak reference is not linked in
- }
- }
if fd == nil {
// Field is unknown.
diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go
index d972a3d9..b5380505 100644
--- a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go
+++ b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go
@@ -185,11 +185,6 @@ func (d decoder) unmarshalMessage(m protoreflect.Message, checkDelims bool) erro
} else if xtErr != nil && xtErr != protoregistry.NotFound {
return d.newError(tok.Pos(), "unable to resolve [%s]: %v", tok.RawString(), xtErr)
}
- if flags.ProtoLegacyWeak {
- if fd != nil && fd.IsWeak() && fd.Message().IsPlaceholder() {
- fd = nil // reset since the weak reference is not linked in
- }
- }
// Handle unknown fields.
if fd == nil {
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go
index 7e87c760..669133d0 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go
@@ -26,7 +26,7 @@ var byteType = reflect.TypeOf(byte(0))
// The type is the underlying field type (e.g., a repeated field may be
// represented by []T, but the Go type passed in is just T).
// A list of enum value descriptors must be provided for enum fields.
-// This does not populate the Enum or Message (except for weak message).
+// This does not populate the Enum or Message.
//
// This function is a best effort attempt; parsing errors are ignored.
func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescriptors) protoreflect.FieldDescriptor {
@@ -109,9 +109,6 @@ func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescri
}
case s == "packed":
f.L1.EditionFeatures.IsPacked = true
- case strings.HasPrefix(s, "weak="):
- f.L1.IsWeak = true
- f.L1.Message = filedesc.PlaceholderMessage(protoreflect.FullName(s[len("weak="):]))
case strings.HasPrefix(s, "def="):
// The default tag is special in that everything afterwards is the
// default regardless of the presence of commas.
@@ -183,9 +180,6 @@ func Marshal(fd protoreflect.FieldDescriptor, enumName string) string {
// the exact same semantics from the previous generator.
tag = append(tag, "json="+jsonName)
}
- if fd.IsWeak() {
- tag = append(tag, "weak="+string(fd.Message().FullName()))
- }
// The previous implementation does not tag extension fields as proto3,
// even when the field is defined in a proto3 file. Match that behavior
// for consistency.
diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
index 378b826f..688aabe4 100644
--- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
+++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go
@@ -19,7 +19,6 @@ import (
"google.golang.org/protobuf/internal/pragma"
"google.golang.org/protobuf/internal/strs"
"google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
)
// Edition is an Enum for proto2.Edition
@@ -275,7 +274,6 @@ type (
Kind protoreflect.Kind
StringName stringName
IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto
- IsWeak bool // promoted from google.protobuf.FieldOptions
IsLazy bool // promoted from google.protobuf.FieldOptions
Default defaultValue
ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields
@@ -369,7 +367,7 @@ func (fd *Field) IsPacked() bool {
return fd.L1.EditionFeatures.IsPacked
}
func (fd *Field) IsExtension() bool { return false }
-func (fd *Field) IsWeak() bool { return fd.L1.IsWeak }
+func (fd *Field) IsWeak() bool { return false }
func (fd *Field) IsLazy() bool { return fd.L1.IsLazy }
func (fd *Field) IsList() bool { return fd.Cardinality() == protoreflect.Repeated && !fd.IsMap() }
func (fd *Field) IsMap() bool { return fd.Message() != nil && fd.Message().IsMapEntry() }
@@ -396,11 +394,6 @@ func (fd *Field) Enum() protoreflect.EnumDescriptor {
return fd.L1.Enum
}
func (fd *Field) Message() protoreflect.MessageDescriptor {
- if fd.L1.IsWeak {
- if d, _ := protoregistry.GlobalFiles.FindDescriptorByName(fd.L1.Message.FullName()); d != nil {
- return d.(protoreflect.MessageDescriptor)
- }
- }
return fd.L1.Message
}
func (fd *Field) IsMapEntry() bool {
diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
index 67a51b32..d4c94458 100644
--- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
+++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
@@ -32,11 +32,6 @@ func (file *File) resolveMessages() {
for j := range md.L2.Fields.List {
fd := &md.L2.Fields.List[j]
- // Weak fields are resolved upon actual use.
- if fd.L1.IsWeak {
- continue
- }
-
// Resolve message field dependency.
switch fd.L1.Kind {
case protoreflect.EnumKind:
@@ -150,8 +145,6 @@ func (fd *File) unmarshalFull(b []byte) {
switch num {
case genid.FileDescriptorProto_PublicDependency_field_number:
fd.L2.Imports[v].IsPublic = true
- case genid.FileDescriptorProto_WeakDependency_field_number:
- fd.L2.Imports[v].IsWeak = true
}
case protowire.BytesType:
v, m := protowire.ConsumeBytes(b)
@@ -502,8 +495,6 @@ func (fd *Field) unmarshalOptions(b []byte) {
switch num {
case genid.FieldOptions_Packed_field_number:
fd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v)
- case genid.FieldOptions_Weak_field_number:
- fd.L1.IsWeak = protowire.DecodeBool(v)
case genid.FieldOptions_Lazy_field_number:
fd.L1.IsLazy = protowire.DecodeBool(v)
case FieldOptions_EnforceUTF8:
diff --git a/vendor/google.golang.org/protobuf/internal/filetype/build.go b/vendor/google.golang.org/protobuf/internal/filetype/build.go
index ba83fea4..e1b4130b 100644
--- a/vendor/google.golang.org/protobuf/internal/filetype/build.go
+++ b/vendor/google.golang.org/protobuf/internal/filetype/build.go
@@ -63,7 +63,7 @@ type Builder struct {
// message declarations in "flattened ordering".
//
// Dependencies are Go types for enums or messages referenced by
- // message fields (excluding weak fields), for parent extended messages of
+ // message fields, for parent extended messages of
// extension fields, for enums or messages referenced by extension fields,
// and for input and output messages referenced by service methods.
// Dependencies must come after declarations, but the ordering of
diff --git a/vendor/google.golang.org/protobuf/internal/flags/flags.go b/vendor/google.golang.org/protobuf/internal/flags/flags.go
index 5cb3ee70..a06ccabc 100644
--- a/vendor/google.golang.org/protobuf/internal/flags/flags.go
+++ b/vendor/google.golang.org/protobuf/internal/flags/flags.go
@@ -6,7 +6,7 @@
package flags
// ProtoLegacy specifies whether to enable support for legacy functionality
-// such as MessageSets, weak fields, and various other obscure behavior
+// such as MessageSets, and various other obscure behavior
// that is necessary to maintain backwards compatibility with proto1 or
// the pre-release variants of proto2 and proto3.
//
@@ -22,8 +22,3 @@ const ProtoLegacy = protoLegacy
// extension fields at unmarshal time, but defers creating the message
// structure until the extension is first accessed.
const LazyUnmarshalExtensions = ProtoLegacy
-
-// ProtoLegacyWeak specifies whether to enable support for weak fields.
-// This flag was split out of ProtoLegacy in preparation for removing
-// support for weak fields (independent of the other protolegacy features).
-const ProtoLegacyWeak = ProtoLegacy
diff --git a/vendor/google.golang.org/protobuf/internal/genid/goname.go b/vendor/google.golang.org/protobuf/internal/genid/goname.go
index 693d2e9e..99bb95ba 100644
--- a/vendor/google.golang.org/protobuf/internal/genid/goname.go
+++ b/vendor/google.golang.org/protobuf/internal/genid/goname.go
@@ -11,15 +11,10 @@ const (
SizeCache_goname = "sizeCache"
SizeCacheA_goname = "XXX_sizecache"
- WeakFields_goname = "weakFields"
- WeakFieldsA_goname = "XXX_weak"
-
UnknownFields_goname = "unknownFields"
UnknownFieldsA_goname = "XXX_unrecognized"
ExtensionFields_goname = "extensionFields"
ExtensionFieldsA_goname = "XXX_InternalExtensions"
ExtensionFieldsB_goname = "XXX_extensions"
-
- WeakFieldPrefix_goname = "XXX_weak_"
)
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go
index 7c1f66c8..d14d7d93 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go
@@ -5,15 +5,12 @@
package impl
import (
- "fmt"
"reflect"
- "sync"
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/errors"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
"google.golang.org/protobuf/runtime/protoiface"
)
@@ -121,78 +118,6 @@ func (mi *MessageInfo) initOneofFieldCoders(od protoreflect.OneofDescriptor, si
}
}
-func makeWeakMessageFieldCoder(fd protoreflect.FieldDescriptor) pointerCoderFuncs {
- var once sync.Once
- var messageType protoreflect.MessageType
- lazyInit := func() {
- once.Do(func() {
- messageName := fd.Message().FullName()
- messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName)
- })
- }
-
- return pointerCoderFuncs{
- size: func(p pointer, f *coderFieldInfo, opts marshalOptions) int {
- m, ok := p.WeakFields().get(f.num)
- if !ok {
- return 0
- }
- lazyInit()
- if messageType == nil {
- panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName()))
- }
- return sizeMessage(m, f.tagsize, opts)
- },
- marshal: func(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {
- m, ok := p.WeakFields().get(f.num)
- if !ok {
- return b, nil
- }
- lazyInit()
- if messageType == nil {
- panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName()))
- }
- return appendMessage(b, m, f.wiretag, opts)
- },
- unmarshal: func(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (unmarshalOutput, error) {
- fs := p.WeakFields()
- m, ok := fs.get(f.num)
- if !ok {
- lazyInit()
- if messageType == nil {
- return unmarshalOutput{}, errUnknown
- }
- m = messageType.New().Interface()
- fs.set(f.num, m)
- }
- return consumeMessage(b, m, wtyp, opts)
- },
- isInit: func(p pointer, f *coderFieldInfo) error {
- m, ok := p.WeakFields().get(f.num)
- if !ok {
- return nil
- }
- return proto.CheckInitialized(m)
- },
- merge: func(dst, src pointer, f *coderFieldInfo, opts mergeOptions) {
- sm, ok := src.WeakFields().get(f.num)
- if !ok {
- return
- }
- dm, ok := dst.WeakFields().get(f.num)
- if !ok {
- lazyInit()
- if messageType == nil {
- panic(fmt.Sprintf("weak message %v is not linked in", fd.Message().FullName()))
- }
- dm = messageType.New().Interface()
- dst.WeakFields().set(f.num, dm)
- }
- opts.Merge(dm, sm)
- },
- }
-}
-
func makeMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs {
if mi := getMessageInfo(ft); mi != nil {
funcs := pointerCoderFuncs{
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go
index 111d9583..f78b57b0 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go
@@ -119,9 +119,6 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) {
}
case isOneof:
fieldOffset = offsetOf(fs)
- case fd.IsWeak():
- fieldOffset = si.weakOffset
- funcs = makeWeakMessageFieldCoder(fd)
default:
fieldOffset = offsetOf(fs)
childMessage, funcs = fieldCoder(fd, ft)
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go
index f81d7d0d..41c1f74e 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go
@@ -46,9 +46,6 @@ func (mi *MessageInfo) makeOpaqueCoderMethods(t reflect.Type, si opaqueStructInf
switch {
case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
fieldOffset = offsetOf(fs)
- case fd.IsWeak():
- fieldOffset = si.weakOffset
- funcs = makeWeakMessageFieldCoder(fd)
case fd.Message() != nil && !fd.IsMap():
fieldOffset = offsetOf(fs)
if fd.IsList() {
diff --git a/vendor/google.golang.org/protobuf/internal/impl/lazy.go b/vendor/google.golang.org/protobuf/internal/impl/lazy.go
index e8fb6c35..c7de31e2 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/lazy.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/lazy.go
@@ -131,7 +131,7 @@ func (mi *MessageInfo) skipField(b []byte, f *coderFieldInfo, wtyp protowire.Typ
fmi := f.validation.mi
if fmi == nil {
fd := mi.Desc.Fields().ByNumber(f.num)
- if fd == nil || !fd.IsWeak() {
+ if fd == nil {
return out, ValidationUnknown
}
messageName := fd.Message().FullName()
diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go
index bf0b6049..a51dffbe 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go
@@ -310,12 +310,9 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey,
fd.L0.Parent = md
fd.L0.Index = n
- if fd.L1.IsWeak || fd.L1.EditionFeatures.IsPacked {
+ if fd.L1.EditionFeatures.IsPacked {
fd.L1.Options = func() protoreflect.ProtoMessage {
opts := descopts.Field.ProtoReflect().New()
- if fd.L1.IsWeak {
- opts.Set(opts.Descriptor().Fields().ByName("weak"), protoreflect.ValueOfBool(true))
- }
if fd.L1.EditionFeatures.IsPacked {
opts.Set(opts.Descriptor().Fields().ByName("packed"), protoreflect.ValueOfBool(fd.L1.EditionFeatures.IsPacked))
}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/message.go b/vendor/google.golang.org/protobuf/internal/impl/message.go
index d1f79b42..d50423dc 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/message.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/message.go
@@ -14,7 +14,6 @@ import (
"google.golang.org/protobuf/internal/genid"
"google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
)
// MessageInfo provides protobuf related functionality for a given Go type
@@ -120,7 +119,6 @@ type (
var (
sizecacheType = reflect.TypeOf(SizeCache(0))
- weakFieldsType = reflect.TypeOf(WeakFields(nil))
unknownFieldsAType = reflect.TypeOf(unknownFieldsA(nil))
unknownFieldsBType = reflect.TypeOf(unknownFieldsB(nil))
extensionFieldsType = reflect.TypeOf(ExtensionFields(nil))
@@ -129,8 +127,6 @@ var (
type structInfo struct {
sizecacheOffset offset
sizecacheType reflect.Type
- weakOffset offset
- weakType reflect.Type
unknownOffset offset
unknownType reflect.Type
extensionOffset offset
@@ -148,7 +144,6 @@ type structInfo struct {
func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo {
si := structInfo{
sizecacheOffset: invalidOffset,
- weakOffset: invalidOffset,
unknownOffset: invalidOffset,
extensionOffset: invalidOffset,
lazyOffset: invalidOffset,
@@ -168,11 +163,6 @@ fieldLoop:
si.sizecacheOffset = offsetOf(f)
si.sizecacheType = f.Type
}
- case genid.WeakFields_goname, genid.WeakFieldsA_goname:
- if f.Type == weakFieldsType {
- si.weakOffset = offsetOf(f)
- si.weakType = f.Type
- }
case genid.UnknownFields_goname, genid.UnknownFieldsA_goname:
if f.Type == unknownFieldsAType || f.Type == unknownFieldsBType {
si.unknownOffset = offsetOf(f)
@@ -256,9 +246,6 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType {
mi.init()
fd := mi.Desc.Fields().Get(i)
switch {
- case fd.IsWeak():
- mt, _ := protoregistry.GlobalTypes.FindMessageByName(fd.Message().FullName())
- return mt
case fd.IsMap():
return mapEntryType{fd.Message(), mi.fieldTypes[fd.Number()]}
default:
diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go b/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go
index d8dcd788..dd55e8e0 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go
@@ -56,9 +56,6 @@ func opaqueInitHook(mi *MessageInfo) bool {
usePresence, _ := usePresenceForField(si, fd)
switch {
- case fd.IsWeak():
- // Weak fields are no different for opaque.
- fi = fieldInfoForWeakMessage(fd, si.weakOffset)
case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
// Oneofs are no different for opaque.
fi = fieldInfoForOneof(fd, si.oneofsByName[fd.ContainingOneof().Name()], mi.Exporter, si.oneofWrappersByNumber[fd.Number()])
@@ -620,8 +617,6 @@ func usePresenceForField(si opaqueStructInfo, fd protoreflect.FieldDescriptor) (
switch {
case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic():
return false, false
- case fd.IsWeak():
- return false, false
case fd.IsMap():
return false, false
case fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind:
diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go
index 31c19b54..0d20132f 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go
@@ -72,8 +72,6 @@ func (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) {
fi = fieldInfoForMap(fd, fs, mi.Exporter)
case fd.IsList():
fi = fieldInfoForList(fd, fs, mi.Exporter)
- case fd.IsWeak():
- fi = fieldInfoForWeakMessage(fd, si.weakOffset)
case fd.Message() != nil:
fi = fieldInfoForMessage(fd, fs, mi.Exporter)
default:
@@ -219,9 +217,6 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) {
}
case fd.Message() != nil:
ft = fs.Type
- if fd.IsWeak() {
- ft = nil
- }
isMessage = true
}
if isMessage && ft != nil && ft.Kind() != reflect.Ptr {
diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go
index 3cd1fbc2..68d4ae32 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go
@@ -8,11 +8,8 @@ import (
"fmt"
"math"
"reflect"
- "sync"
- "google.golang.org/protobuf/internal/flags"
"google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
)
type fieldInfo struct {
@@ -332,79 +329,6 @@ func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField,
}
}
-func fieldInfoForWeakMessage(fd protoreflect.FieldDescriptor, weakOffset offset) fieldInfo {
- if !flags.ProtoLegacyWeak {
- panic("no support for proto1 weak fields")
- }
-
- var once sync.Once
- var messageType protoreflect.MessageType
- lazyInit := func() {
- once.Do(func() {
- messageName := fd.Message().FullName()
- messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName)
- if messageType == nil {
- panic(fmt.Sprintf("weak message %v for field %v is not linked in", messageName, fd.FullName()))
- }
- })
- }
-
- num := fd.Number()
- return fieldInfo{
- fieldDesc: fd,
- has: func(p pointer) bool {
- if p.IsNil() {
- return false
- }
- _, ok := p.Apply(weakOffset).WeakFields().get(num)
- return ok
- },
- clear: func(p pointer) {
- p.Apply(weakOffset).WeakFields().clear(num)
- },
- get: func(p pointer) protoreflect.Value {
- lazyInit()
- if p.IsNil() {
- return protoreflect.ValueOfMessage(messageType.Zero())
- }
- m, ok := p.Apply(weakOffset).WeakFields().get(num)
- if !ok {
- return protoreflect.ValueOfMessage(messageType.Zero())
- }
- return protoreflect.ValueOfMessage(m.ProtoReflect())
- },
- set: func(p pointer, v protoreflect.Value) {
- lazyInit()
- m := v.Message()
- if m.Descriptor() != messageType.Descriptor() {
- if got, want := m.Descriptor().FullName(), messageType.Descriptor().FullName(); got != want {
- panic(fmt.Sprintf("field %v has mismatching message descriptor: got %v, want %v", fd.FullName(), got, want))
- }
- panic(fmt.Sprintf("field %v has mismatching message descriptor: %v", fd.FullName(), m.Descriptor().FullName()))
- }
- p.Apply(weakOffset).WeakFields().set(num, m.Interface())
- },
- mutable: func(p pointer) protoreflect.Value {
- lazyInit()
- fs := p.Apply(weakOffset).WeakFields()
- m, ok := fs.get(num)
- if !ok {
- m = messageType.New().Interface()
- fs.set(num, m)
- }
- return protoreflect.ValueOfMessage(m.ProtoReflect())
- },
- newMessage: func() protoreflect.Message {
- lazyInit()
- return messageType.New()
- },
- newField: func() protoreflect.Value {
- lazyInit()
- return protoreflect.ValueOfMessage(messageType.New())
- },
- }
-}
-
func fieldInfoForMessage(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
ft := fs.Type
conv := NewConverter(ft, fd)
diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
index 6bed45e3..62f8bf66 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
@@ -111,7 +111,6 @@ func (p pointer) StringSlice() *[]string { return (*[]string)(p.p
func (p pointer) Bytes() *[]byte { return (*[]byte)(p.p) }
func (p pointer) BytesPtr() **[]byte { return (**[]byte)(p.p) }
func (p pointer) BytesSlice() *[][]byte { return (*[][]byte)(p.p) }
-func (p pointer) WeakFields() *weakFields { return (*weakFields)(p.p) }
func (p pointer) Extensions() *map[int32]ExtensionField { return (*map[int32]ExtensionField)(p.p) }
func (p pointer) LazyInfoPtr() **protolazy.XXX_lazyUnmarshalInfo {
return (**protolazy.XXX_lazyUnmarshalInfo)(p.p)
diff --git a/vendor/google.golang.org/protobuf/internal/impl/validate.go b/vendor/google.golang.org/protobuf/internal/impl/validate.go
index b534a3d6..7b2995dd 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/validate.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/validate.go
@@ -211,9 +211,7 @@ func newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validat
switch fd.Kind() {
case protoreflect.MessageKind:
vi.typ = validationTypeMessage
- if !fd.IsWeak() {
- vi.mi = getMessageInfo(ft)
- }
+ vi.mi = getMessageInfo(ft)
case protoreflect.GroupKind:
vi.typ = validationTypeGroup
vi.mi = getMessageInfo(ft)
@@ -320,26 +318,6 @@ State:
}
if f != nil {
vi = f.validation
- if vi.typ == validationTypeMessage && vi.mi == nil {
- // Probable weak field.
- //
- // TODO: Consider storing the results of this lookup somewhere
- // rather than recomputing it on every validation.
- fd := st.mi.Desc.Fields().ByNumber(num)
- if fd == nil || !fd.IsWeak() {
- break
- }
- messageName := fd.Message().FullName()
- messageType, err := protoregistry.GlobalTypes.FindMessageByName(messageName)
- switch err {
- case nil:
- vi.mi, _ = messageType.(*MessageInfo)
- case protoregistry.NotFound:
- vi.typ = validationTypeBytes
- default:
- return out, ValidationUnknown
- }
- }
break
}
// Possible extension field.
diff --git a/vendor/google.golang.org/protobuf/internal/impl/weak.go b/vendor/google.golang.org/protobuf/internal/impl/weak.go
deleted file mode 100644
index eb79a7ba..00000000
--- a/vendor/google.golang.org/protobuf/internal/impl/weak.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package impl
-
-import (
- "fmt"
-
- "google.golang.org/protobuf/reflect/protoreflect"
- "google.golang.org/protobuf/reflect/protoregistry"
-)
-
-// weakFields adds methods to the exported WeakFields type for internal use.
-//
-// The exported type is an alias to an unnamed type, so methods can't be
-// defined directly on it.
-type weakFields WeakFields
-
-func (w weakFields) get(num protoreflect.FieldNumber) (protoreflect.ProtoMessage, bool) {
- m, ok := w[int32(num)]
- return m, ok
-}
-
-func (w *weakFields) set(num protoreflect.FieldNumber, m protoreflect.ProtoMessage) {
- if *w == nil {
- *w = make(weakFields)
- }
- (*w)[int32(num)] = m
-}
-
-func (w *weakFields) clear(num protoreflect.FieldNumber) {
- delete(*w, int32(num))
-}
-
-func (Export) HasWeak(w WeakFields, num protoreflect.FieldNumber) bool {
- _, ok := w[int32(num)]
- return ok
-}
-
-func (Export) ClearWeak(w *WeakFields, num protoreflect.FieldNumber) {
- delete(*w, int32(num))
-}
-
-func (Export) GetWeak(w WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName) protoreflect.ProtoMessage {
- if m, ok := w[int32(num)]; ok {
- return m
- }
- mt, _ := protoregistry.GlobalTypes.FindMessageByName(name)
- if mt == nil {
- panic(fmt.Sprintf("message %v for weak field is not linked in", name))
- }
- return mt.Zero().Interface()
-}
-
-func (Export) SetWeak(w *WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName, m protoreflect.ProtoMessage) {
- if m != nil {
- mt, _ := protoregistry.GlobalTypes.FindMessageByName(name)
- if mt == nil {
- panic(fmt.Sprintf("message %v for weak field is not linked in", name))
- }
- if mt != m.ProtoReflect().Type() {
- panic(fmt.Sprintf("invalid message type for weak field: got %T, want %T", m, mt.Zero().Interface()))
- }
- }
- if m == nil || !m.ProtoReflect().IsValid() {
- delete(*w, int32(num))
- return
- }
- if *w == nil {
- *w = make(weakFields)
- }
- (*w)[int32(num)] = m
-}
diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go
index f5c06280..01efc330 100644
--- a/vendor/google.golang.org/protobuf/internal/version/version.go
+++ b/vendor/google.golang.org/protobuf/internal/version/version.go
@@ -52,7 +52,7 @@ import (
const (
Major = 1
Minor = 36
- Patch = 3
+ Patch = 5
PreRelease = ""
)
diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go
index e28d7acb..4cbf1aea 100644
--- a/vendor/google.golang.org/protobuf/proto/decode.go
+++ b/vendor/google.golang.org/protobuf/proto/decode.go
@@ -8,7 +8,6 @@ import (
"google.golang.org/protobuf/encoding/protowire"
"google.golang.org/protobuf/internal/encoding/messageset"
"google.golang.org/protobuf/internal/errors"
- "google.golang.org/protobuf/internal/flags"
"google.golang.org/protobuf/internal/genid"
"google.golang.org/protobuf/internal/pragma"
"google.golang.org/protobuf/reflect/protoreflect"
@@ -172,10 +171,6 @@ func (o UnmarshalOptions) unmarshalMessageSlow(b []byte, m protoreflect.Message)
var err error
if fd == nil {
err = errUnknown
- } else if flags.ProtoLegacyWeak {
- if fd.IsWeak() && fd.Message().IsPlaceholder() {
- err = errUnknown // weak referent is not linked in
- }
}
// Parse the field value.
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go
index 69a05050..823dbf3b 100644
--- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go
@@ -132,17 +132,11 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot
}
f.L2.Imports[i].IsPublic = true
}
- for _, i := range fd.GetWeakDependency() {
- if !(0 <= i && int(i) < len(f.L2.Imports)) || f.L2.Imports[i].IsWeak {
- return nil, errors.New("invalid or duplicate weak import index: %d", i)
- }
- f.L2.Imports[i].IsWeak = true
- }
imps := importSet{f.Path(): true}
for i, path := range fd.GetDependency() {
imp := &f.L2.Imports[i]
f, err := r.FindFileByPath(path)
- if err == protoregistry.NotFound && (o.AllowUnresolvable || imp.IsWeak) {
+ if err == protoregistry.NotFound && o.AllowUnresolvable {
f = filedesc.PlaceholderFile(path)
} else if err != nil {
return nil, errors.New("could not resolve import %q: %v", path, err)
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go
index ebcb4a8a..9da34998 100644
--- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go
@@ -149,7 +149,6 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc
if opts := fd.GetOptions(); opts != nil {
opts = proto.Clone(opts).(*descriptorpb.FieldOptions)
f.L1.Options = func() protoreflect.ProtoMessage { return opts }
- f.L1.IsWeak = opts.GetWeak()
f.L1.IsLazy = opts.GetLazy()
if opts.Packed != nil {
f.L1.EditionFeatures.IsPacked = opts.GetPacked()
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go
index f3cebab2..ff692436 100644
--- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go
@@ -43,7 +43,7 @@ func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*desc
o.L1.Fields.List = append(o.L1.Fields.List, f)
}
- if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil {
+ if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName())); err != nil {
return errors.New("message field %q cannot resolve type: %v", f.FullName(), err)
}
if f.L1.Kind == protoreflect.GroupKind && (f.IsMap() || f.IsMapEntry()) {
@@ -73,10 +73,10 @@ func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*desc
func (r *resolver) resolveExtensionDependencies(xs []filedesc.Extension, xds []*descriptorpb.FieldDescriptorProto) (err error) {
for i, xd := range xds {
x := &xs[i]
- if x.L1.Extendee, err = r.findMessageDescriptor(x.Parent().FullName(), partialName(xd.GetExtendee()), false); err != nil {
+ if x.L1.Extendee, err = r.findMessageDescriptor(x.Parent().FullName(), partialName(xd.GetExtendee())); err != nil {
return errors.New("extension field %q cannot resolve extendee: %v", x.FullName(), err)
}
- if x.L1.Kind, x.L2.Enum, x.L2.Message, err = r.findTarget(x.Kind(), x.Parent().FullName(), partialName(xd.GetTypeName()), false); err != nil {
+ if x.L1.Kind, x.L2.Enum, x.L2.Message, err = r.findTarget(x.Kind(), x.Parent().FullName(), partialName(xd.GetTypeName())); err != nil {
return errors.New("extension field %q cannot resolve type: %v", x.FullName(), err)
}
if xd.DefaultValue != nil {
@@ -95,11 +95,11 @@ func (r *resolver) resolveServiceDependencies(ss []filedesc.Service, sds []*desc
s := &ss[i]
for j, md := range sd.GetMethod() {
m := &s.L2.Methods.List[j]
- m.L1.Input, err = r.findMessageDescriptor(m.Parent().FullName(), partialName(md.GetInputType()), false)
+ m.L1.Input, err = r.findMessageDescriptor(m.Parent().FullName(), partialName(md.GetInputType()))
if err != nil {
return errors.New("service method %q cannot resolve input: %v", m.FullName(), err)
}
- m.L1.Output, err = r.findMessageDescriptor(s.FullName(), partialName(md.GetOutputType()), false)
+ m.L1.Output, err = r.findMessageDescriptor(s.FullName(), partialName(md.GetOutputType()))
if err != nil {
return errors.New("service method %q cannot resolve output: %v", m.FullName(), err)
}
@@ -111,16 +111,16 @@ func (r *resolver) resolveServiceDependencies(ss []filedesc.Service, sds []*desc
// findTarget finds an enum or message descriptor if k is an enum, message,
// group, or unknown. If unknown, and the name could be resolved, the kind
// returned kind is set based on the type of the resolved descriptor.
-func (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.Kind, protoreflect.EnumDescriptor, protoreflect.MessageDescriptor, error) {
+func (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName, ref partialName) (protoreflect.Kind, protoreflect.EnumDescriptor, protoreflect.MessageDescriptor, error) {
switch k {
case protoreflect.EnumKind:
- ed, err := r.findEnumDescriptor(scope, ref, isWeak)
+ ed, err := r.findEnumDescriptor(scope, ref)
if err != nil {
return 0, nil, nil, err
}
return k, ed, nil, nil
case protoreflect.MessageKind, protoreflect.GroupKind:
- md, err := r.findMessageDescriptor(scope, ref, isWeak)
+ md, err := r.findMessageDescriptor(scope, ref)
if err != nil {
return 0, nil, nil, err
}
@@ -129,7 +129,7 @@ func (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName,
// Handle unspecified kinds (possible with parsers that operate
// on a per-file basis without knowledge of dependencies).
d, err := r.findDescriptor(scope, ref)
- if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) {
+ if err == protoregistry.NotFound && r.allowUnresolvable {
return k, filedesc.PlaceholderEnum(ref.FullName()), filedesc.PlaceholderMessage(ref.FullName()), nil
} else if err == protoregistry.NotFound {
return 0, nil, nil, errors.New("%q not found", ref.FullName())
@@ -206,9 +206,9 @@ func (r *resolver) findDescriptor(scope protoreflect.FullName, ref partialName)
}
}
-func (r *resolver) findEnumDescriptor(scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.EnumDescriptor, error) {
+func (r *resolver) findEnumDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.EnumDescriptor, error) {
d, err := r.findDescriptor(scope, ref)
- if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) {
+ if err == protoregistry.NotFound && r.allowUnresolvable {
return filedesc.PlaceholderEnum(ref.FullName()), nil
} else if err == protoregistry.NotFound {
return nil, errors.New("%q not found", ref.FullName())
@@ -222,9 +222,9 @@ func (r *resolver) findEnumDescriptor(scope protoreflect.FullName, ref partialNa
return ed, nil
}
-func (r *resolver) findMessageDescriptor(scope protoreflect.FullName, ref partialName, isWeak bool) (protoreflect.MessageDescriptor, error) {
+func (r *resolver) findMessageDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.MessageDescriptor, error) {
d, err := r.findDescriptor(scope, ref)
- if err == protoregistry.NotFound && (r.allowUnresolvable || isWeak) {
+ if err == protoregistry.NotFound && r.allowUnresolvable {
return filedesc.PlaceholderMessage(ref.FullName()), nil
} else if err == protoregistry.NotFound {
return nil, errors.New("%q not found", ref.FullName())
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go
index 5eaf6521..c343d922 100644
--- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go
@@ -149,12 +149,6 @@ func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds
return errors.New("message field %q under proto3 optional semantics must be within a single element oneof", f.FullName())
}
}
- if f.IsWeak() && !flags.ProtoLegacyWeak {
- return errors.New("message field %q is a weak field, which is a legacy proto1 feature that is no longer supported", f.FullName())
- }
- if f.IsWeak() && (!f.HasPresence() || !isOptionalMessage(f) || f.ContainingOneof() != nil) {
- return errors.New("message field %q may only be weak for an optional message", f.FullName())
- }
if f.IsPacked() && !isPackable(f) {
return errors.New("message field %q is not packable", f.FullName())
}
@@ -199,9 +193,6 @@ func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds
if f.Cardinality() != protoreflect.Optional {
return errors.New("message field %q belongs in a oneof and must be optional", f.FullName())
}
- if f.IsWeak() {
- return errors.New("message field %q belongs in a oneof and must not be a weak reference", f.FullName())
- }
}
}
@@ -254,9 +245,6 @@ func validateExtensionDeclarations(f *filedesc.File, xs []filedesc.Extension, xd
return errors.New("extension field %q has an invalid number: %d", x.FullName(), x.Number())
}
}
- if xd.GetOptions().GetWeak() {
- return errors.New("extension field %q cannot be a weak reference", x.FullName())
- }
if x.IsPacked() && !isPackable(x) {
return errors.New("extension field %q is not packable", x.FullName())
}
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go
index f55b0369..697a61b2 100644
--- a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go
@@ -11,6 +11,7 @@ import (
"google.golang.org/protobuf/internal/editiondefaults"
"google.golang.org/protobuf/internal/filedesc"
+ "google.golang.org/protobuf/internal/genid"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/types/descriptorpb"
@@ -128,23 +129,39 @@ func mergeEditionFeatures(parentDesc protoreflect.Descriptor, child *descriptorp
// We must not use proto.GetExtension(child, gofeaturespb.E_Go)
// because that only works for messages we generated, but not for
// dynamicpb messages. See golang/protobuf#1669.
+ //
+ // Further, we harden this code against adversarial inputs: a
+ // service which accepts descriptors from a possibly malicious
+ // source shouldn't crash.
goFeatures := child.ProtoReflect().Get(gofeaturespb.E_Go.TypeDescriptor())
if !goFeatures.IsValid() {
return parentFS
}
+ gf, ok := goFeatures.Interface().(protoreflect.Message)
+ if !ok {
+ return parentFS
+ }
// gf.Interface() could be *dynamicpb.Message or *gofeaturespb.GoFeatures.
- gf := goFeatures.Message()
fields := gf.Descriptor().Fields()
- if fd := fields.ByName("legacy_unmarshal_json_enum"); gf.Has(fd) {
+ if fd := fields.ByNumber(genid.GoFeatures_LegacyUnmarshalJsonEnum_field_number); fd != nil &&
+ !fd.IsList() &&
+ fd.Kind() == protoreflect.BoolKind &&
+ gf.Has(fd) {
parentFS.GenerateLegacyUnmarshalJSON = gf.Get(fd).Bool()
}
- if fd := fields.ByName("strip_enum_prefix"); gf.Has(fd) {
+ if fd := fields.ByNumber(genid.GoFeatures_StripEnumPrefix_field_number); fd != nil &&
+ !fd.IsList() &&
+ fd.Kind() == protoreflect.EnumKind &&
+ gf.Has(fd) {
parentFS.StripEnumPrefix = int(gf.Get(fd).Enum())
}
- if fd := fields.ByName("api_level"); gf.Has(fd) {
+ if fd := fields.ByNumber(genid.GoFeatures_ApiLevel_field_number); fd != nil &&
+ !fd.IsList() &&
+ fd.Kind() == protoreflect.EnumKind &&
+ gf.Has(fd) {
parentFS.APILevel = int(gf.Get(fd).Enum())
}
diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go b/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go
index a5de8d40..9b880aa8 100644
--- a/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go
+++ b/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go
@@ -32,9 +32,6 @@ func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileD
if imp.IsPublic {
p.PublicDependency = append(p.PublicDependency, int32(i))
}
- if imp.IsWeak {
- p.WeakDependency = append(p.WeakDependency, int32(i))
- }
}
for i, locs := 0, file.SourceLocations(); i < locs.Len(); i++ {
loc := locs.Get(i)
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
index cd8fadba..cd7fbc87 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
@@ -68,7 +68,7 @@ type Descriptor interface {
// dependency is not resolved, in which case only name information is known.
//
// Placeholder types may only be returned by the following accessors
- // as a result of unresolved dependencies or weak imports:
+ // as a result of unresolved dependencies:
//
// â•”â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•╤â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•—
// ║ Accessor │ Descriptor ║
@@ -168,11 +168,7 @@ type FileImport struct {
// The current file and the imported file must be within proto package.
IsPublic bool
- // IsWeak reports whether this is a weak import, which does not impose
- // a direct dependency on the target file.
- //
- // Weak imports are a legacy proto1 feature. Equivalent behavior is
- // achieved using proto2 extension fields or proto3 Any messages.
+ // Deprecated: support for weak fields has been removed.
IsWeak bool
}
@@ -325,9 +321,7 @@ type FieldDescriptor interface {
// specified in the source .proto file.
HasOptionalKeyword() bool
- // IsWeak reports whether this is a weak field, which does not impose a
- // direct dependency on the target type.
- // If true, then Message returns a placeholder type.
+ // Deprecated: support for weak fields has been removed.
IsWeak() bool
// IsPacked reports whether repeated primitive numeric kinds should be
diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
index a551e7ae..a5163376 100644
--- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
+++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
@@ -46,6 +46,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
// The full set of known editions.
@@ -4360,7 +4361,7 @@ func (x *GeneratedCodeInfo_Annotation) GetSemantic() GeneratedCodeInfo_Annotatio
var File_google_protobuf_descriptor_proto protoreflect.FileDescriptor
-var file_google_protobuf_descriptor_proto_rawDesc = []byte{
+var file_google_protobuf_descriptor_proto_rawDesc = string([]byte{
0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
@@ -5130,16 +5131,16 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{
0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65,
0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
-}
+})
var (
file_google_protobuf_descriptor_proto_rawDescOnce sync.Once
- file_google_protobuf_descriptor_proto_rawDescData = file_google_protobuf_descriptor_proto_rawDesc
+ file_google_protobuf_descriptor_proto_rawDescData []byte
)
func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte {
file_google_protobuf_descriptor_proto_rawDescOnce.Do(func() {
- file_google_protobuf_descriptor_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_descriptor_proto_rawDescData)
+ file_google_protobuf_descriptor_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_descriptor_proto_rawDesc), len(file_google_protobuf_descriptor_proto_rawDesc)))
})
return file_google_protobuf_descriptor_proto_rawDescData
}
@@ -5292,7 +5293,7 @@ func file_google_protobuf_descriptor_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_descriptor_proto_rawDesc), len(file_google_protobuf_descriptor_proto_rawDesc)),
NumEnums: 17,
NumMessages: 33,
NumExtensions: 0,
@@ -5304,7 +5305,6 @@ func file_google_protobuf_descriptor_proto_init() {
MessageInfos: file_google_protobuf_descriptor_proto_msgTypes,
}.Build()
File_google_protobuf_descriptor_proto = out.File
- file_google_protobuf_descriptor_proto_rawDesc = nil
file_google_protobuf_descriptor_proto_goTypes = nil
file_google_protobuf_descriptor_proto_depIdxs = nil
}
diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go
index e0b72eaf..28d24bad 100644
--- a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go
+++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go
@@ -16,6 +16,7 @@ import (
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
type GoFeatures_APILevel int32
@@ -227,7 +228,7 @@ var (
var File_google_protobuf_go_features_proto protoreflect.FileDescriptor
-var file_google_protobuf_go_features_proto_rawDesc = []byte{
+var file_google_protobuf_go_features_proto_rawDesc = string([]byte{
0x0a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
@@ -283,16 +284,16 @@ var file_google_protobuf_go_features_proto_rawDesc = []byte{
0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x61, 0x74,
0x75, 0x72, 0x65, 0x73, 0x70, 0x62,
-}
+})
var (
file_google_protobuf_go_features_proto_rawDescOnce sync.Once
- file_google_protobuf_go_features_proto_rawDescData = file_google_protobuf_go_features_proto_rawDesc
+ file_google_protobuf_go_features_proto_rawDescData []byte
)
func file_google_protobuf_go_features_proto_rawDescGZIP() []byte {
file_google_protobuf_go_features_proto_rawDescOnce.Do(func() {
- file_google_protobuf_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_go_features_proto_rawDescData)
+ file_google_protobuf_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_go_features_proto_rawDesc), len(file_google_protobuf_go_features_proto_rawDesc)))
})
return file_google_protobuf_go_features_proto_rawDescData
}
@@ -326,7 +327,7 @@ func file_google_protobuf_go_features_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_google_protobuf_go_features_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_go_features_proto_rawDesc), len(file_google_protobuf_go_features_proto_rawDesc)),
NumEnums: 2,
NumMessages: 1,
NumExtensions: 1,
@@ -339,7 +340,6 @@ func file_google_protobuf_go_features_proto_init() {
ExtensionInfos: file_google_protobuf_go_features_proto_extTypes,
}.Build()
File_google_protobuf_go_features_proto = out.File
- file_google_protobuf_go_features_proto_rawDesc = nil
file_google_protobuf_go_features_proto_goTypes = nil
file_google_protobuf_go_features_proto_depIdxs = nil
}
diff --git a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
index 191552cc..497da66e 100644
--- a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
+++ b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
@@ -122,6 +122,7 @@ import (
reflect "reflect"
strings "strings"
sync "sync"
+ unsafe "unsafe"
)
// `Any` contains an arbitrary serialized protocol buffer message along with a
@@ -411,7 +412,7 @@ func (x *Any) GetValue() []byte {
var File_google_protobuf_any_proto protoreflect.FileDescriptor
-var file_google_protobuf_any_proto_rawDesc = []byte{
+var file_google_protobuf_any_proto_rawDesc = string([]byte{
0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x36, 0x0a, 0x03,
@@ -427,16 +428,16 @@ var file_google_protobuf_any_proto_rawDesc = []byte{
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65,
0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_google_protobuf_any_proto_rawDescOnce sync.Once
- file_google_protobuf_any_proto_rawDescData = file_google_protobuf_any_proto_rawDesc
+ file_google_protobuf_any_proto_rawDescData []byte
)
func file_google_protobuf_any_proto_rawDescGZIP() []byte {
file_google_protobuf_any_proto_rawDescOnce.Do(func() {
- file_google_protobuf_any_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_any_proto_rawDescData)
+ file_google_protobuf_any_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_any_proto_rawDesc), len(file_google_protobuf_any_proto_rawDesc)))
})
return file_google_protobuf_any_proto_rawDescData
}
@@ -462,7 +463,7 @@ func file_google_protobuf_any_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_google_protobuf_any_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_any_proto_rawDesc), len(file_google_protobuf_any_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -473,7 +474,6 @@ func file_google_protobuf_any_proto_init() {
MessageInfos: file_google_protobuf_any_proto_msgTypes,
}.Build()
File_google_protobuf_any_proto = out.File
- file_google_protobuf_any_proto_rawDesc = nil
file_google_protobuf_any_proto_goTypes = nil
file_google_protobuf_any_proto_depIdxs = nil
}
diff --git a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go
index 34d76e6c..193880d1 100644
--- a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go
+++ b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go
@@ -80,6 +80,7 @@ import (
reflect "reflect"
sync "sync"
time "time"
+ unsafe "unsafe"
)
// A Duration represents a signed, fixed-length span of time represented
@@ -288,7 +289,7 @@ func (x *Duration) GetNanos() int32 {
var File_google_protobuf_duration_proto protoreflect.FileDescriptor
-var file_google_protobuf_duration_proto_rawDesc = []byte{
+var file_google_protobuf_duration_proto_rawDesc = string([]byte{
0x0a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
@@ -305,16 +306,16 @@ var file_google_protobuf_duration_proto_rawDesc = []byte{
0x50, 0x42, 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79,
0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_google_protobuf_duration_proto_rawDescOnce sync.Once
- file_google_protobuf_duration_proto_rawDescData = file_google_protobuf_duration_proto_rawDesc
+ file_google_protobuf_duration_proto_rawDescData []byte
)
func file_google_protobuf_duration_proto_rawDescGZIP() []byte {
file_google_protobuf_duration_proto_rawDescOnce.Do(func() {
- file_google_protobuf_duration_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_duration_proto_rawDescData)
+ file_google_protobuf_duration_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_duration_proto_rawDesc), len(file_google_protobuf_duration_proto_rawDesc)))
})
return file_google_protobuf_duration_proto_rawDescData
}
@@ -340,7 +341,7 @@ func file_google_protobuf_duration_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_google_protobuf_duration_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_duration_proto_rawDesc), len(file_google_protobuf_duration_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -351,7 +352,6 @@ func file_google_protobuf_duration_proto_init() {
MessageInfos: file_google_protobuf_duration_proto_msgTypes,
}.Build()
File_google_protobuf_duration_proto = out.File
- file_google_protobuf_duration_proto_rawDesc = nil
file_google_protobuf_duration_proto_goTypes = nil
file_google_protobuf_duration_proto_depIdxs = nil
}
diff --git a/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go
new file mode 100644
index 00000000..041feb0f
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go
@@ -0,0 +1,571 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: google/protobuf/field_mask.proto
+
+// Package fieldmaskpb contains generated types for google/protobuf/field_mask.proto.
+//
+// The FieldMask message represents a set of symbolic field paths.
+// The paths are specific to some target message type,
+// which is not stored within the FieldMask message itself.
+//
+// # Constructing a FieldMask
+//
+// The New function is used construct a FieldMask:
+//
+// var messageType *descriptorpb.DescriptorProto
+// fm, err := fieldmaskpb.New(messageType, "field.name", "field.number")
+// if err != nil {
+// ... // handle error
+// }
+// ... // make use of fm
+//
+// The "field.name" and "field.number" paths are valid paths according to the
+// google.protobuf.DescriptorProto message. Use of a path that does not correlate
+// to valid fields reachable from DescriptorProto would result in an error.
+//
+// Once a FieldMask message has been constructed,
+// the Append method can be used to insert additional paths to the path set:
+//
+// var messageType *descriptorpb.DescriptorProto
+// if err := fm.Append(messageType, "options"); err != nil {
+// ... // handle error
+// }
+//
+// # Type checking a FieldMask
+//
+// In order to verify that a FieldMask represents a set of fields that are
+// reachable from some target message type, use the IsValid method:
+//
+// var messageType *descriptorpb.DescriptorProto
+// if fm.IsValid(messageType) {
+// ... // make use of fm
+// }
+//
+// IsValid needs to be passed the target message type as an input since the
+// FieldMask message itself does not store the message type that the set of paths
+// are for.
+package fieldmaskpb
+
+import (
+ proto "google.golang.org/protobuf/proto"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sort "sort"
+ strings "strings"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+// `FieldMask` represents a set of symbolic field paths, for example:
+//
+// paths: "f.a"
+// paths: "f.b.d"
+//
+// Here `f` represents a field in some root message, `a` and `b`
+// fields in the message found in `f`, and `d` a field found in the
+// message in `f.b`.
+//
+// Field masks are used to specify a subset of fields that should be
+// returned by a get operation or modified by an update operation.
+// Field masks also have a custom JSON encoding (see below).
+//
+// # Field Masks in Projections
+//
+// When used in the context of a projection, a response message or
+// sub-message is filtered by the API to only contain those fields as
+// specified in the mask. For example, if the mask in the previous
+// example is applied to a response message as follows:
+//
+// f {
+// a : 22
+// b {
+// d : 1
+// x : 2
+// }
+// y : 13
+// }
+// z: 8
+//
+// The result will not contain specific values for fields x,y and z
+// (their value will be set to the default, and omitted in proto text
+// output):
+//
+// f {
+// a : 22
+// b {
+// d : 1
+// }
+// }
+//
+// A repeated field is not allowed except at the last position of a
+// paths string.
+//
+// If a FieldMask object is not present in a get operation, the
+// operation applies to all fields (as if a FieldMask of all fields
+// had been specified).
+//
+// Note that a field mask does not necessarily apply to the
+// top-level response message. In case of a REST get operation, the
+// field mask applies directly to the response, but in case of a REST
+// list operation, the mask instead applies to each individual message
+// in the returned resource list. In case of a REST custom method,
+// other definitions may be used. Where the mask applies will be
+// clearly documented together with its declaration in the API. In
+// any case, the effect on the returned resource/resources is required
+// behavior for APIs.
+//
+// # Field Masks in Update Operations
+//
+// A field mask in update operations specifies which fields of the
+// targeted resource are going to be updated. The API is required
+// to only change the values of the fields as specified in the mask
+// and leave the others untouched. If a resource is passed in to
+// describe the updated values, the API ignores the values of all
+// fields not covered by the mask.
+//
+// If a repeated field is specified for an update operation, new values will
+// be appended to the existing repeated field in the target resource. Note that
+// a repeated field is only allowed in the last position of a `paths` string.
+//
+// If a sub-message is specified in the last position of the field mask for an
+// update operation, then new value will be merged into the existing sub-message
+// in the target resource.
+//
+// For example, given the target message:
+//
+// f {
+// b {
+// d: 1
+// x: 2
+// }
+// c: [1]
+// }
+//
+// And an update message:
+//
+// f {
+// b {
+// d: 10
+// }
+// c: [2]
+// }
+//
+// then if the field mask is:
+//
+// paths: ["f.b", "f.c"]
+//
+// then the result will be:
+//
+// f {
+// b {
+// d: 10
+// x: 2
+// }
+// c: [1, 2]
+// }
+//
+// An implementation may provide options to override this default behavior for
+// repeated and message fields.
+//
+// In order to reset a field's value to the default, the field must
+// be in the mask and set to the default value in the provided resource.
+// Hence, in order to reset all fields of a resource, provide a default
+// instance of the resource and set all fields in the mask, or do
+// not provide a mask as described below.
+//
+// If a field mask is not present on update, the operation applies to
+// all fields (as if a field mask of all fields has been specified).
+// Note that in the presence of schema evolution, this may mean that
+// fields the client does not know and has therefore not filled into
+// the request will be reset to their default. If this is unwanted
+// behavior, a specific service may require a client to always specify
+// a field mask, producing an error if not.
+//
+// As with get operations, the location of the resource which
+// describes the updated values in the request message depends on the
+// operation kind. In any case, the effect of the field mask is
+// required to be honored by the API.
+//
+// ## Considerations for HTTP REST
+//
+// The HTTP kind of an update operation which uses a field mask must
+// be set to PATCH instead of PUT in order to satisfy HTTP semantics
+// (PUT must only be used for full updates).
+//
+// # JSON Encoding of Field Masks
+//
+// In JSON, a field mask is encoded as a single string where paths are
+// separated by a comma. Fields name in each path are converted
+// to/from lower-camel naming conventions.
+//
+// As an example, consider the following message declarations:
+//
+// message Profile {
+// User user = 1;
+// Photo photo = 2;
+// }
+// message User {
+// string display_name = 1;
+// string address = 2;
+// }
+//
+// In proto a field mask for `Profile` may look as such:
+//
+// mask {
+// paths: "user.display_name"
+// paths: "photo"
+// }
+//
+// In JSON, the same mask is represented as below:
+//
+// {
+// mask: "user.displayName,photo"
+// }
+//
+// # Field Masks and Oneof Fields
+//
+// Field masks treat fields in oneofs just as regular fields. Consider the
+// following message:
+//
+// message SampleMessage {
+// oneof test_oneof {
+// string name = 4;
+// SubMessage sub_message = 9;
+// }
+// }
+//
+// The field mask can be:
+//
+// mask {
+// paths: "name"
+// }
+//
+// Or:
+//
+// mask {
+// paths: "sub_message"
+// }
+//
+// Note that oneof type names ("test_oneof" in this case) cannot be used in
+// paths.
+//
+// ## Field Mask Verification
+//
+// The implementation of any API method which has a FieldMask type field in the
+// request should verify the included field paths, and return an
+// `INVALID_ARGUMENT` error if any path is unmappable.
+type FieldMask struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The set of field mask paths.
+ Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+// New constructs a field mask from a list of paths and verifies that
+// each one is valid according to the specified message type.
+func New(m proto.Message, paths ...string) (*FieldMask, error) {
+ x := new(FieldMask)
+ return x, x.Append(m, paths...)
+}
+
+// Union returns the union of all the paths in the input field masks.
+func Union(mx *FieldMask, my *FieldMask, ms ...*FieldMask) *FieldMask {
+ var out []string
+ out = append(out, mx.GetPaths()...)
+ out = append(out, my.GetPaths()...)
+ for _, m := range ms {
+ out = append(out, m.GetPaths()...)
+ }
+ return &FieldMask{Paths: normalizePaths(out)}
+}
+
+// Intersect returns the intersection of all the paths in the input field masks.
+func Intersect(mx *FieldMask, my *FieldMask, ms ...*FieldMask) *FieldMask {
+ var ss1, ss2 []string // reused buffers for performance
+ intersect := func(out, in []string) []string {
+ ss1 = normalizePaths(append(ss1[:0], in...))
+ ss2 = normalizePaths(append(ss2[:0], out...))
+ out = out[:0]
+ for i1, i2 := 0, 0; i1 < len(ss1) && i2 < len(ss2); {
+ switch s1, s2 := ss1[i1], ss2[i2]; {
+ case hasPathPrefix(s1, s2):
+ out = append(out, s1)
+ i1++
+ case hasPathPrefix(s2, s1):
+ out = append(out, s2)
+ i2++
+ case lessPath(s1, s2):
+ i1++
+ case lessPath(s2, s1):
+ i2++
+ }
+ }
+ return out
+ }
+
+ out := Union(mx, my, ms...).GetPaths()
+ out = intersect(out, mx.GetPaths())
+ out = intersect(out, my.GetPaths())
+ for _, m := range ms {
+ out = intersect(out, m.GetPaths())
+ }
+ return &FieldMask{Paths: normalizePaths(out)}
+}
+
+// IsValid reports whether all the paths are syntactically valid and
+// refer to known fields in the specified message type.
+// It reports false for a nil FieldMask.
+func (x *FieldMask) IsValid(m proto.Message) bool {
+ paths := x.GetPaths()
+ return x != nil && numValidPaths(m, paths) == len(paths)
+}
+
+// Append appends a list of paths to the mask and verifies that each one
+// is valid according to the specified message type.
+// An invalid path is not appended and breaks insertion of subsequent paths.
+func (x *FieldMask) Append(m proto.Message, paths ...string) error {
+ numValid := numValidPaths(m, paths)
+ x.Paths = append(x.Paths, paths[:numValid]...)
+ paths = paths[numValid:]
+ if len(paths) > 0 {
+ name := m.ProtoReflect().Descriptor().FullName()
+ return protoimpl.X.NewError("invalid path %q for message %q", paths[0], name)
+ }
+ return nil
+}
+
+func numValidPaths(m proto.Message, paths []string) int {
+ md0 := m.ProtoReflect().Descriptor()
+ for i, path := range paths {
+ md := md0
+ if !rangeFields(path, func(field string) bool {
+ // Search the field within the message.
+ if md == nil {
+ return false // not within a message
+ }
+ fd := md.Fields().ByName(protoreflect.Name(field))
+ // The real field name of a group is the message name.
+ if fd == nil {
+ gd := md.Fields().ByName(protoreflect.Name(strings.ToLower(field)))
+ if gd != nil && gd.Kind() == protoreflect.GroupKind && string(gd.Message().Name()) == field {
+ fd = gd
+ }
+ } else if fd.Kind() == protoreflect.GroupKind && string(fd.Message().Name()) != field {
+ fd = nil
+ }
+ if fd == nil {
+ return false // message has does not have this field
+ }
+
+ // Identify the next message to search within.
+ md = fd.Message() // may be nil
+
+ // Repeated fields are only allowed at the last position.
+ if fd.IsList() || fd.IsMap() {
+ md = nil
+ }
+
+ return true
+ }) {
+ return i
+ }
+ }
+ return len(paths)
+}
+
+// Normalize converts the mask to its canonical form where all paths are sorted
+// and redundant paths are removed.
+func (x *FieldMask) Normalize() {
+ x.Paths = normalizePaths(x.Paths)
+}
+
+func normalizePaths(paths []string) []string {
+ sort.Slice(paths, func(i, j int) bool {
+ return lessPath(paths[i], paths[j])
+ })
+
+ // Elide any path that is a prefix match on the previous.
+ out := paths[:0]
+ for _, path := range paths {
+ if len(out) > 0 && hasPathPrefix(path, out[len(out)-1]) {
+ continue
+ }
+ out = append(out, path)
+ }
+ return out
+}
+
+// hasPathPrefix is like strings.HasPrefix, but further checks for either
+// an exact matche or that the prefix is delimited by a dot.
+func hasPathPrefix(path, prefix string) bool {
+ return strings.HasPrefix(path, prefix) && (len(path) == len(prefix) || path[len(prefix)] == '.')
+}
+
+// lessPath is a lexicographical comparison where dot is specially treated
+// as the smallest symbol.
+func lessPath(x, y string) bool {
+ for i := 0; i < len(x) && i < len(y); i++ {
+ if x[i] != y[i] {
+ return (x[i] - '.') < (y[i] - '.')
+ }
+ }
+ return len(x) < len(y)
+}
+
+// rangeFields is like strings.Split(path, "."), but avoids allocations by
+// iterating over each field in place and calling a iterator function.
+func rangeFields(path string, f func(field string) bool) bool {
+ for {
+ var field string
+ if i := strings.IndexByte(path, '.'); i >= 0 {
+ field, path = path[:i], path[i:]
+ } else {
+ field, path = path, ""
+ }
+
+ if !f(field) {
+ return false
+ }
+
+ if len(path) == 0 {
+ return true
+ }
+ path = strings.TrimPrefix(path, ".")
+ }
+}
+
+func (x *FieldMask) Reset() {
+ *x = FieldMask{}
+ mi := &file_google_protobuf_field_mask_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *FieldMask) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldMask) ProtoMessage() {}
+
+func (x *FieldMask) ProtoReflect() protoreflect.Message {
+ mi := &file_google_protobuf_field_mask_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FieldMask.ProtoReflect.Descriptor instead.
+func (*FieldMask) Descriptor() ([]byte, []int) {
+ return file_google_protobuf_field_mask_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FieldMask) GetPaths() []string {
+ if x != nil {
+ return x.Paths
+ }
+ return nil
+}
+
+var File_google_protobuf_field_mask_proto protoreflect.FileDescriptor
+
+var file_google_protobuf_field_mask_proto_rawDesc = string([]byte{
+ 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x22, 0x21, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b,
+ 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52,
+ 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x42, 0x85, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x0e,
+ 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
+ 0x5a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e,
+ 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70,
+ 0x65, 0x73, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6d, 0x61,
+ 0x73, 0x6b, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1e,
+ 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+})
+
+var (
+ file_google_protobuf_field_mask_proto_rawDescOnce sync.Once
+ file_google_protobuf_field_mask_proto_rawDescData []byte
+)
+
+func file_google_protobuf_field_mask_proto_rawDescGZIP() []byte {
+ file_google_protobuf_field_mask_proto_rawDescOnce.Do(func() {
+ file_google_protobuf_field_mask_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_field_mask_proto_rawDesc), len(file_google_protobuf_field_mask_proto_rawDesc)))
+ })
+ return file_google_protobuf_field_mask_proto_rawDescData
+}
+
+var file_google_protobuf_field_mask_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_google_protobuf_field_mask_proto_goTypes = []any{
+ (*FieldMask)(nil), // 0: google.protobuf.FieldMask
+}
+var file_google_protobuf_field_mask_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_google_protobuf_field_mask_proto_init() }
+func file_google_protobuf_field_mask_proto_init() {
+ if File_google_protobuf_field_mask_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_field_mask_proto_rawDesc), len(file_google_protobuf_field_mask_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_google_protobuf_field_mask_proto_goTypes,
+ DependencyIndexes: file_google_protobuf_field_mask_proto_depIdxs,
+ MessageInfos: file_google_protobuf_field_mask_proto_msgTypes,
+ }.Build()
+ File_google_protobuf_field_mask_proto = out.File
+ file_google_protobuf_field_mask_proto_goTypes = nil
+ file_google_protobuf_field_mask_proto_depIdxs = nil
+}
diff --git a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go
index f2c53ea3..ecdd31ab 100644
--- a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go
+++ b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go
@@ -128,6 +128,7 @@ import (
reflect "reflect"
sync "sync"
utf8 "unicode/utf8"
+ unsafe "unsafe"
)
// `NullValue` is a singleton enumeration to represent the null value for the
@@ -671,7 +672,7 @@ func (x *ListValue) GetValues() []*Value {
var File_google_protobuf_struct_proto protoreflect.FileDescriptor
-var file_google_protobuf_struct_proto_rawDesc = []byte{
+var file_google_protobuf_struct_proto_rawDesc = string([]byte{
0x0a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22,
@@ -719,16 +720,16 @@ var file_google_protobuf_struct_proto_rawDesc = []byte{
0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c,
0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
-}
+})
var (
file_google_protobuf_struct_proto_rawDescOnce sync.Once
- file_google_protobuf_struct_proto_rawDescData = file_google_protobuf_struct_proto_rawDesc
+ file_google_protobuf_struct_proto_rawDescData []byte
)
func file_google_protobuf_struct_proto_rawDescGZIP() []byte {
file_google_protobuf_struct_proto_rawDescOnce.Do(func() {
- file_google_protobuf_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_struct_proto_rawDescData)
+ file_google_protobuf_struct_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_struct_proto_rawDesc), len(file_google_protobuf_struct_proto_rawDesc)))
})
return file_google_protobuf_struct_proto_rawDescData
}
@@ -773,7 +774,7 @@ func file_google_protobuf_struct_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_google_protobuf_struct_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_struct_proto_rawDesc), len(file_google_protobuf_struct_proto_rawDesc)),
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
@@ -785,7 +786,6 @@ func file_google_protobuf_struct_proto_init() {
MessageInfos: file_google_protobuf_struct_proto_msgTypes,
}.Build()
File_google_protobuf_struct_proto = out.File
- file_google_protobuf_struct_proto_rawDesc = nil
file_google_protobuf_struct_proto_goTypes = nil
file_google_protobuf_struct_proto_depIdxs = nil
}
diff --git a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go
index 9550109a..00ac835c 100644
--- a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go
+++ b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go
@@ -78,6 +78,7 @@ import (
reflect "reflect"
sync "sync"
time "time"
+ unsafe "unsafe"
)
// A Timestamp represents a point in time independent of any time zone or local
@@ -297,7 +298,7 @@ func (x *Timestamp) GetNanos() int32 {
var File_google_protobuf_timestamp_proto protoreflect.FileDescriptor
-var file_google_protobuf_timestamp_proto_rawDesc = []byte{
+var file_google_protobuf_timestamp_proto_rawDesc = string([]byte{
0x0a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
@@ -314,16 +315,16 @@ var file_google_protobuf_timestamp_proto_rawDesc = []byte{
0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f,
0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_google_protobuf_timestamp_proto_rawDescOnce sync.Once
- file_google_protobuf_timestamp_proto_rawDescData = file_google_protobuf_timestamp_proto_rawDesc
+ file_google_protobuf_timestamp_proto_rawDescData []byte
)
func file_google_protobuf_timestamp_proto_rawDescGZIP() []byte {
file_google_protobuf_timestamp_proto_rawDescOnce.Do(func() {
- file_google_protobuf_timestamp_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_timestamp_proto_rawDescData)
+ file_google_protobuf_timestamp_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_timestamp_proto_rawDesc), len(file_google_protobuf_timestamp_proto_rawDesc)))
})
return file_google_protobuf_timestamp_proto_rawDescData
}
@@ -349,7 +350,7 @@ func file_google_protobuf_timestamp_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_google_protobuf_timestamp_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_timestamp_proto_rawDesc), len(file_google_protobuf_timestamp_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -360,7 +361,6 @@ func file_google_protobuf_timestamp_proto_init() {
MessageInfos: file_google_protobuf_timestamp_proto_msgTypes,
}.Build()
File_google_protobuf_timestamp_proto = out.File
- file_google_protobuf_timestamp_proto_rawDesc = nil
file_google_protobuf_timestamp_proto_goTypes = nil
file_google_protobuf_timestamp_proto_depIdxs = nil
}
diff --git a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go
index 15b424ec..5de53010 100644
--- a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go
+++ b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go
@@ -48,6 +48,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
+ unsafe "unsafe"
)
// Wrapper message for `double`.
@@ -529,7 +530,7 @@ func (x *BytesValue) GetValue() []byte {
var File_google_protobuf_wrappers_proto protoreflect.FileDescriptor
-var file_google_protobuf_wrappers_proto_rawDesc = []byte{
+var file_google_protobuf_wrappers_proto_rawDesc = string([]byte{
0x0a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
@@ -563,16 +564,16 @@ var file_google_protobuf_wrappers_proto_rawDesc = []byte{
0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
+})
var (
file_google_protobuf_wrappers_proto_rawDescOnce sync.Once
- file_google_protobuf_wrappers_proto_rawDescData = file_google_protobuf_wrappers_proto_rawDesc
+ file_google_protobuf_wrappers_proto_rawDescData []byte
)
func file_google_protobuf_wrappers_proto_rawDescGZIP() []byte {
file_google_protobuf_wrappers_proto_rawDescOnce.Do(func() {
- file_google_protobuf_wrappers_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_wrappers_proto_rawDescData)
+ file_google_protobuf_wrappers_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_wrappers_proto_rawDesc), len(file_google_protobuf_wrappers_proto_rawDesc)))
})
return file_google_protobuf_wrappers_proto_rawDescData
}
@@ -606,7 +607,7 @@ func file_google_protobuf_wrappers_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_google_protobuf_wrappers_proto_rawDesc,
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_wrappers_proto_rawDesc), len(file_google_protobuf_wrappers_proto_rawDesc)),
NumEnums: 0,
NumMessages: 9,
NumExtensions: 0,
@@ -617,7 +618,6 @@ func file_google_protobuf_wrappers_proto_init() {
MessageInfos: file_google_protobuf_wrappers_proto_msgTypes,
}.Build()
File_google_protobuf_wrappers_proto = out.File
- file_google_protobuf_wrappers_proto_rawDesc = nil
file_google_protobuf_wrappers_proto_goTypes = nil
file_google_protobuf_wrappers_proto_depIdxs = nil
}
diff --git a/vendor/gopkg.in/square/go-jose.v2/.gitcookies.sh.enc b/vendor/gopkg.in/square/go-jose.v2/.gitcookies.sh.enc
deleted file mode 100644
index 730e569b..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/.gitcookies.sh.enc
+++ /dev/null
@@ -1 +0,0 @@
-'|Ê&{tÄU|gGê(ìCy=+¨œòcû:u:/pœ#~žü["±4¤!nÙAªDK<ŠufÿhÅa¿Â:ºü¸¡´B/£Ø¤¹¤ò_hÎÛSãT*wÌx¼¯¹-ç|àÀÓƒÑÄäóÌ㣗A$$â6£ÁâG)8nÏpûÆË¡3ÌšœoïÏvŽB–3¿]xÝ“Ó2l§G•|qRÞ¯
ö2
5R–Ó×Ç$´ñ½Yè¡ÞÝ™l‘Ë«yAI"ÛŒ˜®íû¹¼kÄ|Kåþ[9ÆâÒå=°úÿŸñ|@S•3ó#æx?¾V„,¾‚SÆÝõœwPíogÒ6&V6 ©D.dBŠ7
\ No newline at end of file
diff --git a/vendor/gopkg.in/square/go-jose.v2/.gitignore b/vendor/gopkg.in/square/go-jose.v2/.gitignore
deleted file mode 100644
index 95a85158..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-*~
-.*.swp
-*.out
-*.test
-*.pem
-*.cov
-jose-util/jose-util
-jose-util.t.err
\ No newline at end of file
diff --git a/vendor/gopkg.in/square/go-jose.v2/.travis.yml b/vendor/gopkg.in/square/go-jose.v2/.travis.yml
deleted file mode 100644
index 391b99a4..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/.travis.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-language: go
-
-sudo: false
-
-matrix:
- fast_finish: true
- allow_failures:
- - go: tip
-
-go:
-- '1.14.x'
-- '1.15.x'
-- tip
-
-go_import_path: gopkg.in/square/go-jose.v2
-
-before_script:
-- export PATH=$HOME/.local/bin:$PATH
-
-before_install:
-# Install encrypted gitcookies to get around bandwidth-limits
-# that is causing Travis-CI builds to fail. For more info, see
-# https://github.com/golang/go/issues/12933
-- openssl aes-256-cbc -K $encrypted_1528c3c2cafd_key -iv $encrypted_1528c3c2cafd_iv -in .gitcookies.sh.enc -out .gitcookies.sh -d || true
-- bash .gitcookies.sh || true
-- go get github.com/wadey/gocovmerge
-- go get github.com/mattn/goveralls
-- go get github.com/stretchr/testify/assert
-- go get github.com/stretchr/testify/require
-- go get github.com/google/go-cmp/cmp
-- go get golang.org/x/tools/cmd/cover || true
-- go get code.google.com/p/go.tools/cmd/cover || true
-- pip install cram --user
-
-script:
-- go test . -v -covermode=count -coverprofile=profile.cov
-- go test ./cipher -v -covermode=count -coverprofile=cipher/profile.cov
-- go test ./jwt -v -covermode=count -coverprofile=jwt/profile.cov
-- go test ./json -v # no coverage for forked encoding/json package
-- cd jose-util && go build && PATH=$PWD:$PATH cram -v jose-util.t # cram tests jose-util
-- cd ..
-
-after_success:
-- gocovmerge *.cov */*.cov > merged.coverprofile
-- $HOME/gopath/bin/goveralls -coverprofile merged.coverprofile -service=travis-ci
diff --git a/vendor/gopkg.in/square/go-jose.v2/BUG-BOUNTY.md b/vendor/gopkg.in/square/go-jose.v2/BUG-BOUNTY.md
deleted file mode 100644
index 3305db0f..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/BUG-BOUNTY.md
+++ /dev/null
@@ -1,10 +0,0 @@
-Serious about security
-======================
-
-Square recognizes the important contributions the security research community
-can make. We therefore encourage reporting security issues with the code
-contained in this repository.
-
-If you believe you have discovered a security vulnerability, please follow the
-guidelines at .
-
diff --git a/vendor/gopkg.in/square/go-jose.v2/CONTRIBUTING.md b/vendor/gopkg.in/square/go-jose.v2/CONTRIBUTING.md
deleted file mode 100644
index 61b18365..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/CONTRIBUTING.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Contributing
-
-If you would like to contribute code to go-jose you can do so through GitHub by
-forking the repository and sending a pull request.
-
-When submitting code, please make every effort to follow existing conventions
-and style in order to keep the code as readable as possible. Please also make
-sure all tests pass by running `go test`, and format your code with `go fmt`.
-We also recommend using `golint` and `errcheck`.
-
-Before your code can be accepted into the project you must also sign the
-[Individual Contributor License Agreement][1].
-
- [1]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1
diff --git a/vendor/gopkg.in/square/go-jose.v2/README.md b/vendor/gopkg.in/square/go-jose.v2/README.md
deleted file mode 100644
index 1791bfa8..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/README.md
+++ /dev/null
@@ -1,118 +0,0 @@
-# Go JOSE
-
-[](https://godoc.org/gopkg.in/square/go-jose.v1)
-[](https://godoc.org/gopkg.in/square/go-jose.v2)
-[](https://raw.githubusercontent.com/square/go-jose/master/LICENSE)
-[](https://travis-ci.org/square/go-jose)
-[](https://coveralls.io/r/square/go-jose)
-
-Package jose aims to provide an implementation of the Javascript Object Signing
-and Encryption set of standards. This includes support for JSON Web Encryption,
-JSON Web Signature, and JSON Web Token standards.
-
-**Disclaimer**: This library contains encryption software that is subject to
-the U.S. Export Administration Regulations. You may not export, re-export,
-transfer or download this code or any part of it in violation of any United
-States law, directive or regulation. In particular this software may not be
-exported or re-exported in any form or on any media to Iran, North Sudan,
-Syria, Cuba, or North Korea, or to denied persons or entities mentioned on any
-US maintained blocked list.
-
-## Overview
-
-The implementation follows the
-[JSON Web Encryption](http://dx.doi.org/10.17487/RFC7516) (RFC 7516),
-[JSON Web Signature](http://dx.doi.org/10.17487/RFC7515) (RFC 7515), and
-[JSON Web Token](http://dx.doi.org/10.17487/RFC7519) (RFC 7519).
-Tables of supported algorithms are shown below. The library supports both
-the compact and full serialization formats, and has optional support for
-multiple recipients. It also comes with a small command-line utility
-([`jose-util`](https://github.com/square/go-jose/tree/v2/jose-util))
-for dealing with JOSE messages in a shell.
-
-**Note**: We use a forked version of the `encoding/json` package from the Go
-standard library which uses case-sensitive matching for member names (instead
-of [case-insensitive matching](https://www.ietf.org/mail-archive/web/json/current/msg03763.html)).
-This is to avoid differences in interpretation of messages between go-jose and
-libraries in other languages.
-
-### Versions
-
-We use [gopkg.in](https://gopkg.in) for versioning.
-
-[Version 2](https://gopkg.in/square/go-jose.v2)
-([branch](https://github.com/square/go-jose/tree/v2),
-[doc](https://godoc.org/gopkg.in/square/go-jose.v2)) is the current version:
-
- import "gopkg.in/square/go-jose.v2"
-
-The old `v1` branch ([go-jose.v1](https://gopkg.in/square/go-jose.v1)) will
-still receive backported bug fixes and security fixes, but otherwise
-development is frozen. All new feature development takes place on the `v2`
-branch. Version 2 also contains additional sub-packages such as the
-[jwt](https://godoc.org/gopkg.in/square/go-jose.v2/jwt) implementation
-contributed by [@shaxbee](https://github.com/shaxbee).
-
-### Supported algorithms
-
-See below for a table of supported algorithms. Algorithm identifiers match
-the names in the [JSON Web Algorithms](http://dx.doi.org/10.17487/RFC7518)
-standard where possible. The Godoc reference has a list of constants.
-
- Key encryption | Algorithm identifier(s)
- :------------------------- | :------------------------------
- RSA-PKCS#1v1.5 | RSA1_5
- RSA-OAEP | RSA-OAEP, RSA-OAEP-256
- AES key wrap | A128KW, A192KW, A256KW
- AES-GCM key wrap | A128GCMKW, A192GCMKW, A256GCMKW
- ECDH-ES + AES key wrap | ECDH-ES+A128KW, ECDH-ES+A192KW, ECDH-ES+A256KW
- ECDH-ES (direct) | ECDH-ES1
- Direct encryption | dir1
-
-1. Not supported in multi-recipient mode
-
- Signing / MAC | Algorithm identifier(s)
- :------------------------- | :------------------------------
- RSASSA-PKCS#1v1.5 | RS256, RS384, RS512
- RSASSA-PSS | PS256, PS384, PS512
- HMAC | HS256, HS384, HS512
- ECDSA | ES256, ES384, ES512
- Ed25519 | EdDSA2
-
-2. Only available in version 2 of the package
-
- Content encryption | Algorithm identifier(s)
- :------------------------- | :------------------------------
- AES-CBC+HMAC | A128CBC-HS256, A192CBC-HS384, A256CBC-HS512
- AES-GCM | A128GCM, A192GCM, A256GCM
-
- Compression | Algorithm identifiers(s)
- :------------------------- | -------------------------------
- DEFLATE (RFC 1951) | DEF
-
-### Supported key types
-
-See below for a table of supported key types. These are understood by the
-library, and can be passed to corresponding functions such as `NewEncrypter` or
-`NewSigner`. Each of these keys can also be wrapped in a JWK if desired, which
-allows attaching a key id.
-
- Algorithm(s) | Corresponding types
- :------------------------- | -------------------------------
- RSA | *[rsa.PublicKey](http://golang.org/pkg/crypto/rsa/#PublicKey), *[rsa.PrivateKey](http://golang.org/pkg/crypto/rsa/#PrivateKey)
- ECDH, ECDSA | *[ecdsa.PublicKey](http://golang.org/pkg/crypto/ecdsa/#PublicKey), *[ecdsa.PrivateKey](http://golang.org/pkg/crypto/ecdsa/#PrivateKey)
- EdDSA1 | [ed25519.PublicKey](https://godoc.org/golang.org/x/crypto/ed25519#PublicKey), [ed25519.PrivateKey](https://godoc.org/golang.org/x/crypto/ed25519#PrivateKey)
- AES, HMAC | []byte
-
-1. Only available in version 2 of the package
-
-## Examples
-
-[](https://godoc.org/gopkg.in/square/go-jose.v1)
-[](https://godoc.org/gopkg.in/square/go-jose.v2)
-
-Examples can be found in the Godoc
-reference for this package. The
-[`jose-util`](https://github.com/square/go-jose/tree/v2/jose-util)
-subdirectory also contains a small command-line utility which might be useful
-as an example.
diff --git a/vendor/gopkg.in/square/go-jose.v2/asymmetric.go b/vendor/gopkg.in/square/go-jose.v2/asymmetric.go
deleted file mode 100644
index b69aa036..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/asymmetric.go
+++ /dev/null
@@ -1,592 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package jose
-
-import (
- "crypto"
- "crypto/aes"
- "crypto/ecdsa"
- "crypto/rand"
- "crypto/rsa"
- "crypto/sha1"
- "crypto/sha256"
- "errors"
- "fmt"
- "math/big"
-
- "golang.org/x/crypto/ed25519"
- josecipher "gopkg.in/square/go-jose.v2/cipher"
- "gopkg.in/square/go-jose.v2/json"
-)
-
-// A generic RSA-based encrypter/verifier
-type rsaEncrypterVerifier struct {
- publicKey *rsa.PublicKey
-}
-
-// A generic RSA-based decrypter/signer
-type rsaDecrypterSigner struct {
- privateKey *rsa.PrivateKey
-}
-
-// A generic EC-based encrypter/verifier
-type ecEncrypterVerifier struct {
- publicKey *ecdsa.PublicKey
-}
-
-type edEncrypterVerifier struct {
- publicKey ed25519.PublicKey
-}
-
-// A key generator for ECDH-ES
-type ecKeyGenerator struct {
- size int
- algID string
- publicKey *ecdsa.PublicKey
-}
-
-// A generic EC-based decrypter/signer
-type ecDecrypterSigner struct {
- privateKey *ecdsa.PrivateKey
-}
-
-type edDecrypterSigner struct {
- privateKey ed25519.PrivateKey
-}
-
-// newRSARecipient creates recipientKeyInfo based on the given key.
-func newRSARecipient(keyAlg KeyAlgorithm, publicKey *rsa.PublicKey) (recipientKeyInfo, error) {
- // Verify that key management algorithm is supported by this encrypter
- switch keyAlg {
- case RSA1_5, RSA_OAEP, RSA_OAEP_256:
- default:
- return recipientKeyInfo{}, ErrUnsupportedAlgorithm
- }
-
- if publicKey == nil {
- return recipientKeyInfo{}, errors.New("invalid public key")
- }
-
- return recipientKeyInfo{
- keyAlg: keyAlg,
- keyEncrypter: &rsaEncrypterVerifier{
- publicKey: publicKey,
- },
- }, nil
-}
-
-// newRSASigner creates a recipientSigInfo based on the given key.
-func newRSASigner(sigAlg SignatureAlgorithm, privateKey *rsa.PrivateKey) (recipientSigInfo, error) {
- // Verify that key management algorithm is supported by this encrypter
- switch sigAlg {
- case RS256, RS384, RS512, PS256, PS384, PS512:
- default:
- return recipientSigInfo{}, ErrUnsupportedAlgorithm
- }
-
- if privateKey == nil {
- return recipientSigInfo{}, errors.New("invalid private key")
- }
-
- return recipientSigInfo{
- sigAlg: sigAlg,
- publicKey: staticPublicKey(&JSONWebKey{
- Key: privateKey.Public(),
- }),
- signer: &rsaDecrypterSigner{
- privateKey: privateKey,
- },
- }, nil
-}
-
-func newEd25519Signer(sigAlg SignatureAlgorithm, privateKey ed25519.PrivateKey) (recipientSigInfo, error) {
- if sigAlg != EdDSA {
- return recipientSigInfo{}, ErrUnsupportedAlgorithm
- }
-
- if privateKey == nil {
- return recipientSigInfo{}, errors.New("invalid private key")
- }
- return recipientSigInfo{
- sigAlg: sigAlg,
- publicKey: staticPublicKey(&JSONWebKey{
- Key: privateKey.Public(),
- }),
- signer: &edDecrypterSigner{
- privateKey: privateKey,
- },
- }, nil
-}
-
-// newECDHRecipient creates recipientKeyInfo based on the given key.
-func newECDHRecipient(keyAlg KeyAlgorithm, publicKey *ecdsa.PublicKey) (recipientKeyInfo, error) {
- // Verify that key management algorithm is supported by this encrypter
- switch keyAlg {
- case ECDH_ES, ECDH_ES_A128KW, ECDH_ES_A192KW, ECDH_ES_A256KW:
- default:
- return recipientKeyInfo{}, ErrUnsupportedAlgorithm
- }
-
- if publicKey == nil || !publicKey.Curve.IsOnCurve(publicKey.X, publicKey.Y) {
- return recipientKeyInfo{}, errors.New("invalid public key")
- }
-
- return recipientKeyInfo{
- keyAlg: keyAlg,
- keyEncrypter: &ecEncrypterVerifier{
- publicKey: publicKey,
- },
- }, nil
-}
-
-// newECDSASigner creates a recipientSigInfo based on the given key.
-func newECDSASigner(sigAlg SignatureAlgorithm, privateKey *ecdsa.PrivateKey) (recipientSigInfo, error) {
- // Verify that key management algorithm is supported by this encrypter
- switch sigAlg {
- case ES256, ES384, ES512:
- default:
- return recipientSigInfo{}, ErrUnsupportedAlgorithm
- }
-
- if privateKey == nil {
- return recipientSigInfo{}, errors.New("invalid private key")
- }
-
- return recipientSigInfo{
- sigAlg: sigAlg,
- publicKey: staticPublicKey(&JSONWebKey{
- Key: privateKey.Public(),
- }),
- signer: &ecDecrypterSigner{
- privateKey: privateKey,
- },
- }, nil
-}
-
-// Encrypt the given payload and update the object.
-func (ctx rsaEncrypterVerifier) encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) {
- encryptedKey, err := ctx.encrypt(cek, alg)
- if err != nil {
- return recipientInfo{}, err
- }
-
- return recipientInfo{
- encryptedKey: encryptedKey,
- header: &rawHeader{},
- }, nil
-}
-
-// Encrypt the given payload. Based on the key encryption algorithm,
-// this will either use RSA-PKCS1v1.5 or RSA-OAEP (with SHA-1 or SHA-256).
-func (ctx rsaEncrypterVerifier) encrypt(cek []byte, alg KeyAlgorithm) ([]byte, error) {
- switch alg {
- case RSA1_5:
- return rsa.EncryptPKCS1v15(RandReader, ctx.publicKey, cek)
- case RSA_OAEP:
- return rsa.EncryptOAEP(sha1.New(), RandReader, ctx.publicKey, cek, []byte{})
- case RSA_OAEP_256:
- return rsa.EncryptOAEP(sha256.New(), RandReader, ctx.publicKey, cek, []byte{})
- }
-
- return nil, ErrUnsupportedAlgorithm
-}
-
-// Decrypt the given payload and return the content encryption key.
-func (ctx rsaDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {
- return ctx.decrypt(recipient.encryptedKey, headers.getAlgorithm(), generator)
-}
-
-// Decrypt the given payload. Based on the key encryption algorithm,
-// this will either use RSA-PKCS1v1.5 or RSA-OAEP (with SHA-1 or SHA-256).
-func (ctx rsaDecrypterSigner) decrypt(jek []byte, alg KeyAlgorithm, generator keyGenerator) ([]byte, error) {
- // Note: The random reader on decrypt operations is only used for blinding,
- // so stubbing is meanlingless (hence the direct use of rand.Reader).
- switch alg {
- case RSA1_5:
- defer func() {
- // DecryptPKCS1v15SessionKey sometimes panics on an invalid payload
- // because of an index out of bounds error, which we want to ignore.
- // This has been fixed in Go 1.3.1 (released 2014/08/13), the recover()
- // only exists for preventing crashes with unpatched versions.
- // See: https://groups.google.com/forum/#!topic/golang-dev/7ihX6Y6kx9k
- // See: https://code.google.com/p/go/source/detail?r=58ee390ff31602edb66af41ed10901ec95904d33
- _ = recover()
- }()
-
- // Perform some input validation.
- keyBytes := ctx.privateKey.PublicKey.N.BitLen() / 8
- if keyBytes != len(jek) {
- // Input size is incorrect, the encrypted payload should always match
- // the size of the public modulus (e.g. using a 2048 bit key will
- // produce 256 bytes of output). Reject this since it's invalid input.
- return nil, ErrCryptoFailure
- }
-
- cek, _, err := generator.genKey()
- if err != nil {
- return nil, ErrCryptoFailure
- }
-
- // When decrypting an RSA-PKCS1v1.5 payload, we must take precautions to
- // prevent chosen-ciphertext attacks as described in RFC 3218, "Preventing
- // the Million Message Attack on Cryptographic Message Syntax". We are
- // therefore deliberately ignoring errors here.
- _ = rsa.DecryptPKCS1v15SessionKey(rand.Reader, ctx.privateKey, jek, cek)
-
- return cek, nil
- case RSA_OAEP:
- // Use rand.Reader for RSA blinding
- return rsa.DecryptOAEP(sha1.New(), rand.Reader, ctx.privateKey, jek, []byte{})
- case RSA_OAEP_256:
- // Use rand.Reader for RSA blinding
- return rsa.DecryptOAEP(sha256.New(), rand.Reader, ctx.privateKey, jek, []byte{})
- }
-
- return nil, ErrUnsupportedAlgorithm
-}
-
-// Sign the given payload
-func (ctx rsaDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {
- var hash crypto.Hash
-
- switch alg {
- case RS256, PS256:
- hash = crypto.SHA256
- case RS384, PS384:
- hash = crypto.SHA384
- case RS512, PS512:
- hash = crypto.SHA512
- default:
- return Signature{}, ErrUnsupportedAlgorithm
- }
-
- hasher := hash.New()
-
- // According to documentation, Write() on hash never fails
- _, _ = hasher.Write(payload)
- hashed := hasher.Sum(nil)
-
- var out []byte
- var err error
-
- switch alg {
- case RS256, RS384, RS512:
- out, err = rsa.SignPKCS1v15(RandReader, ctx.privateKey, hash, hashed)
- case PS256, PS384, PS512:
- out, err = rsa.SignPSS(RandReader, ctx.privateKey, hash, hashed, &rsa.PSSOptions{
- SaltLength: rsa.PSSSaltLengthEqualsHash,
- })
- }
-
- if err != nil {
- return Signature{}, err
- }
-
- return Signature{
- Signature: out,
- protected: &rawHeader{},
- }, nil
-}
-
-// Verify the given payload
-func (ctx rsaEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error {
- var hash crypto.Hash
-
- switch alg {
- case RS256, PS256:
- hash = crypto.SHA256
- case RS384, PS384:
- hash = crypto.SHA384
- case RS512, PS512:
- hash = crypto.SHA512
- default:
- return ErrUnsupportedAlgorithm
- }
-
- hasher := hash.New()
-
- // According to documentation, Write() on hash never fails
- _, _ = hasher.Write(payload)
- hashed := hasher.Sum(nil)
-
- switch alg {
- case RS256, RS384, RS512:
- return rsa.VerifyPKCS1v15(ctx.publicKey, hash, hashed, signature)
- case PS256, PS384, PS512:
- return rsa.VerifyPSS(ctx.publicKey, hash, hashed, signature, nil)
- }
-
- return ErrUnsupportedAlgorithm
-}
-
-// Encrypt the given payload and update the object.
-func (ctx ecEncrypterVerifier) encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) {
- switch alg {
- case ECDH_ES:
- // ECDH-ES mode doesn't wrap a key, the shared secret is used directly as the key.
- return recipientInfo{
- header: &rawHeader{},
- }, nil
- case ECDH_ES_A128KW, ECDH_ES_A192KW, ECDH_ES_A256KW:
- default:
- return recipientInfo{}, ErrUnsupportedAlgorithm
- }
-
- generator := ecKeyGenerator{
- algID: string(alg),
- publicKey: ctx.publicKey,
- }
-
- switch alg {
- case ECDH_ES_A128KW:
- generator.size = 16
- case ECDH_ES_A192KW:
- generator.size = 24
- case ECDH_ES_A256KW:
- generator.size = 32
- }
-
- kek, header, err := generator.genKey()
- if err != nil {
- return recipientInfo{}, err
- }
-
- block, err := aes.NewCipher(kek)
- if err != nil {
- return recipientInfo{}, err
- }
-
- jek, err := josecipher.KeyWrap(block, cek)
- if err != nil {
- return recipientInfo{}, err
- }
-
- return recipientInfo{
- encryptedKey: jek,
- header: &header,
- }, nil
-}
-
-// Get key size for EC key generator
-func (ctx ecKeyGenerator) keySize() int {
- return ctx.size
-}
-
-// Get a content encryption key for ECDH-ES
-func (ctx ecKeyGenerator) genKey() ([]byte, rawHeader, error) {
- priv, err := ecdsa.GenerateKey(ctx.publicKey.Curve, RandReader)
- if err != nil {
- return nil, rawHeader{}, err
- }
-
- out := josecipher.DeriveECDHES(ctx.algID, []byte{}, []byte{}, priv, ctx.publicKey, ctx.size)
-
- b, err := json.Marshal(&JSONWebKey{
- Key: &priv.PublicKey,
- })
- if err != nil {
- return nil, nil, err
- }
-
- headers := rawHeader{
- headerEPK: makeRawMessage(b),
- }
-
- return out, headers, nil
-}
-
-// Decrypt the given payload and return the content encryption key.
-func (ctx ecDecrypterSigner) decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) {
- epk, err := headers.getEPK()
- if err != nil {
- return nil, errors.New("square/go-jose: invalid epk header")
- }
- if epk == nil {
- return nil, errors.New("square/go-jose: missing epk header")
- }
-
- publicKey, ok := epk.Key.(*ecdsa.PublicKey)
- if publicKey == nil || !ok {
- return nil, errors.New("square/go-jose: invalid epk header")
- }
-
- if !ctx.privateKey.Curve.IsOnCurve(publicKey.X, publicKey.Y) {
- return nil, errors.New("square/go-jose: invalid public key in epk header")
- }
-
- apuData, err := headers.getAPU()
- if err != nil {
- return nil, errors.New("square/go-jose: invalid apu header")
- }
- apvData, err := headers.getAPV()
- if err != nil {
- return nil, errors.New("square/go-jose: invalid apv header")
- }
-
- deriveKey := func(algID string, size int) []byte {
- return josecipher.DeriveECDHES(algID, apuData.bytes(), apvData.bytes(), ctx.privateKey, publicKey, size)
- }
-
- var keySize int
-
- algorithm := headers.getAlgorithm()
- switch algorithm {
- case ECDH_ES:
- // ECDH-ES uses direct key agreement, no key unwrapping necessary.
- return deriveKey(string(headers.getEncryption()), generator.keySize()), nil
- case ECDH_ES_A128KW:
- keySize = 16
- case ECDH_ES_A192KW:
- keySize = 24
- case ECDH_ES_A256KW:
- keySize = 32
- default:
- return nil, ErrUnsupportedAlgorithm
- }
-
- key := deriveKey(string(algorithm), keySize)
- block, err := aes.NewCipher(key)
- if err != nil {
- return nil, err
- }
-
- return josecipher.KeyUnwrap(block, recipient.encryptedKey)
-}
-
-func (ctx edDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {
- if alg != EdDSA {
- return Signature{}, ErrUnsupportedAlgorithm
- }
-
- sig, err := ctx.privateKey.Sign(RandReader, payload, crypto.Hash(0))
- if err != nil {
- return Signature{}, err
- }
-
- return Signature{
- Signature: sig,
- protected: &rawHeader{},
- }, nil
-}
-
-func (ctx edEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error {
- if alg != EdDSA {
- return ErrUnsupportedAlgorithm
- }
- ok := ed25519.Verify(ctx.publicKey, payload, signature)
- if !ok {
- return errors.New("square/go-jose: ed25519 signature failed to verify")
- }
- return nil
-}
-
-// Sign the given payload
-func (ctx ecDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm) (Signature, error) {
- var expectedBitSize int
- var hash crypto.Hash
-
- switch alg {
- case ES256:
- expectedBitSize = 256
- hash = crypto.SHA256
- case ES384:
- expectedBitSize = 384
- hash = crypto.SHA384
- case ES512:
- expectedBitSize = 521
- hash = crypto.SHA512
- }
-
- curveBits := ctx.privateKey.Curve.Params().BitSize
- if expectedBitSize != curveBits {
- return Signature{}, fmt.Errorf("square/go-jose: expected %d bit key, got %d bits instead", expectedBitSize, curveBits)
- }
-
- hasher := hash.New()
-
- // According to documentation, Write() on hash never fails
- _, _ = hasher.Write(payload)
- hashed := hasher.Sum(nil)
-
- r, s, err := ecdsa.Sign(RandReader, ctx.privateKey, hashed)
- if err != nil {
- return Signature{}, err
- }
-
- keyBytes := curveBits / 8
- if curveBits%8 > 0 {
- keyBytes++
- }
-
- // We serialize the outputs (r and s) into big-endian byte arrays and pad
- // them with zeros on the left to make sure the sizes work out. Both arrays
- // must be keyBytes long, and the output must be 2*keyBytes long.
- rBytes := r.Bytes()
- rBytesPadded := make([]byte, keyBytes)
- copy(rBytesPadded[keyBytes-len(rBytes):], rBytes)
-
- sBytes := s.Bytes()
- sBytesPadded := make([]byte, keyBytes)
- copy(sBytesPadded[keyBytes-len(sBytes):], sBytes)
-
- out := append(rBytesPadded, sBytesPadded...)
-
- return Signature{
- Signature: out,
- protected: &rawHeader{},
- }, nil
-}
-
-// Verify the given payload
-func (ctx ecEncrypterVerifier) verifyPayload(payload []byte, signature []byte, alg SignatureAlgorithm) error {
- var keySize int
- var hash crypto.Hash
-
- switch alg {
- case ES256:
- keySize = 32
- hash = crypto.SHA256
- case ES384:
- keySize = 48
- hash = crypto.SHA384
- case ES512:
- keySize = 66
- hash = crypto.SHA512
- default:
- return ErrUnsupportedAlgorithm
- }
-
- if len(signature) != 2*keySize {
- return fmt.Errorf("square/go-jose: invalid signature size, have %d bytes, wanted %d", len(signature), 2*keySize)
- }
-
- hasher := hash.New()
-
- // According to documentation, Write() on hash never fails
- _, _ = hasher.Write(payload)
- hashed := hasher.Sum(nil)
-
- r := big.NewInt(0).SetBytes(signature[:keySize])
- s := big.NewInt(0).SetBytes(signature[keySize:])
-
- match := ecdsa.Verify(ctx.publicKey, hashed, r, s)
- if !match {
- return errors.New("square/go-jose: ecdsa signature failed to verify")
- }
-
- return nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/cipher/cbc_hmac.go b/vendor/gopkg.in/square/go-jose.v2/cipher/cbc_hmac.go
deleted file mode 100644
index f6465c04..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/cipher/cbc_hmac.go
+++ /dev/null
@@ -1,196 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package josecipher
-
-import (
- "bytes"
- "crypto/cipher"
- "crypto/hmac"
- "crypto/sha256"
- "crypto/sha512"
- "crypto/subtle"
- "encoding/binary"
- "errors"
- "hash"
-)
-
-const (
- nonceBytes = 16
-)
-
-// NewCBCHMAC instantiates a new AEAD based on CBC+HMAC.
-func NewCBCHMAC(key []byte, newBlockCipher func([]byte) (cipher.Block, error)) (cipher.AEAD, error) {
- keySize := len(key) / 2
- integrityKey := key[:keySize]
- encryptionKey := key[keySize:]
-
- blockCipher, err := newBlockCipher(encryptionKey)
- if err != nil {
- return nil, err
- }
-
- var hash func() hash.Hash
- switch keySize {
- case 16:
- hash = sha256.New
- case 24:
- hash = sha512.New384
- case 32:
- hash = sha512.New
- }
-
- return &cbcAEAD{
- hash: hash,
- blockCipher: blockCipher,
- authtagBytes: keySize,
- integrityKey: integrityKey,
- }, nil
-}
-
-// An AEAD based on CBC+HMAC
-type cbcAEAD struct {
- hash func() hash.Hash
- authtagBytes int
- integrityKey []byte
- blockCipher cipher.Block
-}
-
-func (ctx *cbcAEAD) NonceSize() int {
- return nonceBytes
-}
-
-func (ctx *cbcAEAD) Overhead() int {
- // Maximum overhead is block size (for padding) plus auth tag length, where
- // the length of the auth tag is equivalent to the key size.
- return ctx.blockCipher.BlockSize() + ctx.authtagBytes
-}
-
-// Seal encrypts and authenticates the plaintext.
-func (ctx *cbcAEAD) Seal(dst, nonce, plaintext, data []byte) []byte {
- // Output buffer -- must take care not to mangle plaintext input.
- ciphertext := make([]byte, uint64(len(plaintext))+uint64(ctx.Overhead()))[:len(plaintext)]
- copy(ciphertext, plaintext)
- ciphertext = padBuffer(ciphertext, ctx.blockCipher.BlockSize())
-
- cbc := cipher.NewCBCEncrypter(ctx.blockCipher, nonce)
-
- cbc.CryptBlocks(ciphertext, ciphertext)
- authtag := ctx.computeAuthTag(data, nonce, ciphertext)
-
- ret, out := resize(dst, uint64(len(dst))+uint64(len(ciphertext))+uint64(len(authtag)))
- copy(out, ciphertext)
- copy(out[len(ciphertext):], authtag)
-
- return ret
-}
-
-// Open decrypts and authenticates the ciphertext.
-func (ctx *cbcAEAD) Open(dst, nonce, ciphertext, data []byte) ([]byte, error) {
- if len(ciphertext) < ctx.authtagBytes {
- return nil, errors.New("square/go-jose: invalid ciphertext (too short)")
- }
-
- offset := len(ciphertext) - ctx.authtagBytes
- expectedTag := ctx.computeAuthTag(data, nonce, ciphertext[:offset])
- match := subtle.ConstantTimeCompare(expectedTag, ciphertext[offset:])
- if match != 1 {
- return nil, errors.New("square/go-jose: invalid ciphertext (auth tag mismatch)")
- }
-
- cbc := cipher.NewCBCDecrypter(ctx.blockCipher, nonce)
-
- // Make copy of ciphertext buffer, don't want to modify in place
- buffer := append([]byte{}, []byte(ciphertext[:offset])...)
-
- if len(buffer)%ctx.blockCipher.BlockSize() > 0 {
- return nil, errors.New("square/go-jose: invalid ciphertext (invalid length)")
- }
-
- cbc.CryptBlocks(buffer, buffer)
-
- // Remove padding
- plaintext, err := unpadBuffer(buffer, ctx.blockCipher.BlockSize())
- if err != nil {
- return nil, err
- }
-
- ret, out := resize(dst, uint64(len(dst))+uint64(len(plaintext)))
- copy(out, plaintext)
-
- return ret, nil
-}
-
-// Compute an authentication tag
-func (ctx *cbcAEAD) computeAuthTag(aad, nonce, ciphertext []byte) []byte {
- buffer := make([]byte, uint64(len(aad))+uint64(len(nonce))+uint64(len(ciphertext))+8)
- n := 0
- n += copy(buffer, aad)
- n += copy(buffer[n:], nonce)
- n += copy(buffer[n:], ciphertext)
- binary.BigEndian.PutUint64(buffer[n:], uint64(len(aad))*8)
-
- // According to documentation, Write() on hash.Hash never fails.
- hmac := hmac.New(ctx.hash, ctx.integrityKey)
- _, _ = hmac.Write(buffer)
-
- return hmac.Sum(nil)[:ctx.authtagBytes]
-}
-
-// resize ensures that the given slice has a capacity of at least n bytes.
-// If the capacity of the slice is less than n, a new slice is allocated
-// and the existing data will be copied.
-func resize(in []byte, n uint64) (head, tail []byte) {
- if uint64(cap(in)) >= n {
- head = in[:n]
- } else {
- head = make([]byte, n)
- copy(head, in)
- }
-
- tail = head[len(in):]
- return
-}
-
-// Apply padding
-func padBuffer(buffer []byte, blockSize int) []byte {
- missing := blockSize - (len(buffer) % blockSize)
- ret, out := resize(buffer, uint64(len(buffer))+uint64(missing))
- padding := bytes.Repeat([]byte{byte(missing)}, missing)
- copy(out, padding)
- return ret
-}
-
-// Remove padding
-func unpadBuffer(buffer []byte, blockSize int) ([]byte, error) {
- if len(buffer)%blockSize != 0 {
- return nil, errors.New("square/go-jose: invalid padding")
- }
-
- last := buffer[len(buffer)-1]
- count := int(last)
-
- if count == 0 || count > blockSize || count > len(buffer) {
- return nil, errors.New("square/go-jose: invalid padding")
- }
-
- padding := bytes.Repeat([]byte{last}, count)
- if !bytes.HasSuffix(buffer, padding) {
- return nil, errors.New("square/go-jose: invalid padding")
- }
-
- return buffer[:len(buffer)-count], nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/cipher/concat_kdf.go b/vendor/gopkg.in/square/go-jose.v2/cipher/concat_kdf.go
deleted file mode 100644
index f62c3bdb..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/cipher/concat_kdf.go
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package josecipher
-
-import (
- "crypto"
- "encoding/binary"
- "hash"
- "io"
-)
-
-type concatKDF struct {
- z, info []byte
- i uint32
- cache []byte
- hasher hash.Hash
-}
-
-// NewConcatKDF builds a KDF reader based on the given inputs.
-func NewConcatKDF(hash crypto.Hash, z, algID, ptyUInfo, ptyVInfo, supPubInfo, supPrivInfo []byte) io.Reader {
- buffer := make([]byte, uint64(len(algID))+uint64(len(ptyUInfo))+uint64(len(ptyVInfo))+uint64(len(supPubInfo))+uint64(len(supPrivInfo)))
- n := 0
- n += copy(buffer, algID)
- n += copy(buffer[n:], ptyUInfo)
- n += copy(buffer[n:], ptyVInfo)
- n += copy(buffer[n:], supPubInfo)
- copy(buffer[n:], supPrivInfo)
-
- hasher := hash.New()
-
- return &concatKDF{
- z: z,
- info: buffer,
- hasher: hasher,
- cache: []byte{},
- i: 1,
- }
-}
-
-func (ctx *concatKDF) Read(out []byte) (int, error) {
- copied := copy(out, ctx.cache)
- ctx.cache = ctx.cache[copied:]
-
- for copied < len(out) {
- ctx.hasher.Reset()
-
- // Write on a hash.Hash never fails
- _ = binary.Write(ctx.hasher, binary.BigEndian, ctx.i)
- _, _ = ctx.hasher.Write(ctx.z)
- _, _ = ctx.hasher.Write(ctx.info)
-
- hash := ctx.hasher.Sum(nil)
- chunkCopied := copy(out[copied:], hash)
- copied += chunkCopied
- ctx.cache = hash[chunkCopied:]
-
- ctx.i++
- }
-
- return copied, nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/cipher/ecdh_es.go b/vendor/gopkg.in/square/go-jose.v2/cipher/ecdh_es.go
deleted file mode 100644
index 093c6467..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/cipher/ecdh_es.go
+++ /dev/null
@@ -1,86 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package josecipher
-
-import (
- "bytes"
- "crypto"
- "crypto/ecdsa"
- "crypto/elliptic"
- "encoding/binary"
-)
-
-// DeriveECDHES derives a shared encryption key using ECDH/ConcatKDF as described in JWE/JWA.
-// It is an error to call this function with a private/public key that are not on the same
-// curve. Callers must ensure that the keys are valid before calling this function. Output
-// size may be at most 1<<16 bytes (64 KiB).
-func DeriveECDHES(alg string, apuData, apvData []byte, priv *ecdsa.PrivateKey, pub *ecdsa.PublicKey, size int) []byte {
- if size > 1<<16 {
- panic("ECDH-ES output size too large, must be less than or equal to 1<<16")
- }
-
- // algId, partyUInfo, partyVInfo inputs must be prefixed with the length
- algID := lengthPrefixed([]byte(alg))
- ptyUInfo := lengthPrefixed(apuData)
- ptyVInfo := lengthPrefixed(apvData)
-
- // suppPubInfo is the encoded length of the output size in bits
- supPubInfo := make([]byte, 4)
- binary.BigEndian.PutUint32(supPubInfo, uint32(size)*8)
-
- if !priv.PublicKey.Curve.IsOnCurve(pub.X, pub.Y) {
- panic("public key not on same curve as private key")
- }
-
- z, _ := priv.Curve.ScalarMult(pub.X, pub.Y, priv.D.Bytes())
- zBytes := z.Bytes()
-
- // Note that calling z.Bytes() on a big.Int may strip leading zero bytes from
- // the returned byte array. This can lead to a problem where zBytes will be
- // shorter than expected which breaks the key derivation. Therefore we must pad
- // to the full length of the expected coordinate here before calling the KDF.
- octSize := dSize(priv.Curve)
- if len(zBytes) != octSize {
- zBytes = append(bytes.Repeat([]byte{0}, octSize-len(zBytes)), zBytes...)
- }
-
- reader := NewConcatKDF(crypto.SHA256, zBytes, algID, ptyUInfo, ptyVInfo, supPubInfo, []byte{})
- key := make([]byte, size)
-
- // Read on the KDF will never fail
- _, _ = reader.Read(key)
-
- return key
-}
-
-// dSize returns the size in octets for a coordinate on a elliptic curve.
-func dSize(curve elliptic.Curve) int {
- order := curve.Params().P
- bitLen := order.BitLen()
- size := bitLen / 8
- if bitLen%8 != 0 {
- size++
- }
- return size
-}
-
-func lengthPrefixed(data []byte) []byte {
- out := make([]byte, len(data)+4)
- binary.BigEndian.PutUint32(out, uint32(len(data)))
- copy(out[4:], data)
- return out
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/cipher/key_wrap.go b/vendor/gopkg.in/square/go-jose.v2/cipher/key_wrap.go
deleted file mode 100644
index 1d36d501..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/cipher/key_wrap.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package josecipher
-
-import (
- "crypto/cipher"
- "crypto/subtle"
- "encoding/binary"
- "errors"
-)
-
-var defaultIV = []byte{0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6, 0xA6}
-
-// KeyWrap implements NIST key wrapping; it wraps a content encryption key (cek) with the given block cipher.
-func KeyWrap(block cipher.Block, cek []byte) ([]byte, error) {
- if len(cek)%8 != 0 {
- return nil, errors.New("square/go-jose: key wrap input must be 8 byte blocks")
- }
-
- n := len(cek) / 8
- r := make([][]byte, n)
-
- for i := range r {
- r[i] = make([]byte, 8)
- copy(r[i], cek[i*8:])
- }
-
- buffer := make([]byte, 16)
- tBytes := make([]byte, 8)
- copy(buffer, defaultIV)
-
- for t := 0; t < 6*n; t++ {
- copy(buffer[8:], r[t%n])
-
- block.Encrypt(buffer, buffer)
-
- binary.BigEndian.PutUint64(tBytes, uint64(t+1))
-
- for i := 0; i < 8; i++ {
- buffer[i] = buffer[i] ^ tBytes[i]
- }
- copy(r[t%n], buffer[8:])
- }
-
- out := make([]byte, (n+1)*8)
- copy(out, buffer[:8])
- for i := range r {
- copy(out[(i+1)*8:], r[i])
- }
-
- return out, nil
-}
-
-// KeyUnwrap implements NIST key unwrapping; it unwraps a content encryption key (cek) with the given block cipher.
-func KeyUnwrap(block cipher.Block, ciphertext []byte) ([]byte, error) {
- if len(ciphertext)%8 != 0 {
- return nil, errors.New("square/go-jose: key wrap input must be 8 byte blocks")
- }
-
- n := (len(ciphertext) / 8) - 1
- r := make([][]byte, n)
-
- for i := range r {
- r[i] = make([]byte, 8)
- copy(r[i], ciphertext[(i+1)*8:])
- }
-
- buffer := make([]byte, 16)
- tBytes := make([]byte, 8)
- copy(buffer[:8], ciphertext[:8])
-
- for t := 6*n - 1; t >= 0; t-- {
- binary.BigEndian.PutUint64(tBytes, uint64(t+1))
-
- for i := 0; i < 8; i++ {
- buffer[i] = buffer[i] ^ tBytes[i]
- }
- copy(buffer[8:], r[t%n])
-
- block.Decrypt(buffer, buffer)
-
- copy(r[t%n], buffer[8:])
- }
-
- if subtle.ConstantTimeCompare(buffer[:8], defaultIV) == 0 {
- return nil, errors.New("square/go-jose: failed to unwrap key")
- }
-
- out := make([]byte, n*8)
- for i := range r {
- copy(out[i*8:], r[i])
- }
-
- return out, nil
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/crypter.go b/vendor/gopkg.in/square/go-jose.v2/crypter.go
deleted file mode 100644
index be7433e2..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/crypter.go
+++ /dev/null
@@ -1,542 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package jose
-
-import (
- "crypto/ecdsa"
- "crypto/rsa"
- "errors"
- "fmt"
- "reflect"
-
- "gopkg.in/square/go-jose.v2/json"
-)
-
-// Encrypter represents an encrypter which produces an encrypted JWE object.
-type Encrypter interface {
- Encrypt(plaintext []byte) (*JSONWebEncryption, error)
- EncryptWithAuthData(plaintext []byte, aad []byte) (*JSONWebEncryption, error)
- Options() EncrypterOptions
-}
-
-// A generic content cipher
-type contentCipher interface {
- keySize() int
- encrypt(cek []byte, aad, plaintext []byte) (*aeadParts, error)
- decrypt(cek []byte, aad []byte, parts *aeadParts) ([]byte, error)
-}
-
-// A key generator (for generating/getting a CEK)
-type keyGenerator interface {
- keySize() int
- genKey() ([]byte, rawHeader, error)
-}
-
-// A generic key encrypter
-type keyEncrypter interface {
- encryptKey(cek []byte, alg KeyAlgorithm) (recipientInfo, error) // Encrypt a key
-}
-
-// A generic key decrypter
-type keyDecrypter interface {
- decryptKey(headers rawHeader, recipient *recipientInfo, generator keyGenerator) ([]byte, error) // Decrypt a key
-}
-
-// A generic encrypter based on the given key encrypter and content cipher.
-type genericEncrypter struct {
- contentAlg ContentEncryption
- compressionAlg CompressionAlgorithm
- cipher contentCipher
- recipients []recipientKeyInfo
- keyGenerator keyGenerator
- extraHeaders map[HeaderKey]interface{}
-}
-
-type recipientKeyInfo struct {
- keyID string
- keyAlg KeyAlgorithm
- keyEncrypter keyEncrypter
-}
-
-// EncrypterOptions represents options that can be set on new encrypters.
-type EncrypterOptions struct {
- Compression CompressionAlgorithm
-
- // Optional map of additional keys to be inserted into the protected header
- // of a JWS object. Some specifications which make use of JWS like to insert
- // additional values here. All values must be JSON-serializable.
- ExtraHeaders map[HeaderKey]interface{}
-}
-
-// WithHeader adds an arbitrary value to the ExtraHeaders map, initializing it
-// if necessary. It returns itself and so can be used in a fluent style.
-func (eo *EncrypterOptions) WithHeader(k HeaderKey, v interface{}) *EncrypterOptions {
- if eo.ExtraHeaders == nil {
- eo.ExtraHeaders = map[HeaderKey]interface{}{}
- }
- eo.ExtraHeaders[k] = v
- return eo
-}
-
-// WithContentType adds a content type ("cty") header and returns the updated
-// EncrypterOptions.
-func (eo *EncrypterOptions) WithContentType(contentType ContentType) *EncrypterOptions {
- return eo.WithHeader(HeaderContentType, contentType)
-}
-
-// WithType adds a type ("typ") header and returns the updated EncrypterOptions.
-func (eo *EncrypterOptions) WithType(typ ContentType) *EncrypterOptions {
- return eo.WithHeader(HeaderType, typ)
-}
-
-// Recipient represents an algorithm/key to encrypt messages to.
-//
-// PBES2Count and PBES2Salt correspond with the "p2c" and "p2s" headers used
-// on the password-based encryption algorithms PBES2-HS256+A128KW,
-// PBES2-HS384+A192KW, and PBES2-HS512+A256KW. If they are not provided a safe
-// default of 100000 will be used for the count and a 128-bit random salt will
-// be generated.
-type Recipient struct {
- Algorithm KeyAlgorithm
- Key interface{}
- KeyID string
- PBES2Count int
- PBES2Salt []byte
-}
-
-// NewEncrypter creates an appropriate encrypter based on the key type
-func NewEncrypter(enc ContentEncryption, rcpt Recipient, opts *EncrypterOptions) (Encrypter, error) {
- encrypter := &genericEncrypter{
- contentAlg: enc,
- recipients: []recipientKeyInfo{},
- cipher: getContentCipher(enc),
- }
- if opts != nil {
- encrypter.compressionAlg = opts.Compression
- encrypter.extraHeaders = opts.ExtraHeaders
- }
-
- if encrypter.cipher == nil {
- return nil, ErrUnsupportedAlgorithm
- }
-
- var keyID string
- var rawKey interface{}
- switch encryptionKey := rcpt.Key.(type) {
- case JSONWebKey:
- keyID, rawKey = encryptionKey.KeyID, encryptionKey.Key
- case *JSONWebKey:
- keyID, rawKey = encryptionKey.KeyID, encryptionKey.Key
- case OpaqueKeyEncrypter:
- keyID, rawKey = encryptionKey.KeyID(), encryptionKey
- default:
- rawKey = encryptionKey
- }
-
- switch rcpt.Algorithm {
- case DIRECT:
- // Direct encryption mode must be treated differently
- if reflect.TypeOf(rawKey) != reflect.TypeOf([]byte{}) {
- return nil, ErrUnsupportedKeyType
- }
- if encrypter.cipher.keySize() != len(rawKey.([]byte)) {
- return nil, ErrInvalidKeySize
- }
- encrypter.keyGenerator = staticKeyGenerator{
- key: rawKey.([]byte),
- }
- recipientInfo, _ := newSymmetricRecipient(rcpt.Algorithm, rawKey.([]byte))
- recipientInfo.keyID = keyID
- if rcpt.KeyID != "" {
- recipientInfo.keyID = rcpt.KeyID
- }
- encrypter.recipients = []recipientKeyInfo{recipientInfo}
- return encrypter, nil
- case ECDH_ES:
- // ECDH-ES (w/o key wrapping) is similar to DIRECT mode
- typeOf := reflect.TypeOf(rawKey)
- if typeOf != reflect.TypeOf(&ecdsa.PublicKey{}) {
- return nil, ErrUnsupportedKeyType
- }
- encrypter.keyGenerator = ecKeyGenerator{
- size: encrypter.cipher.keySize(),
- algID: string(enc),
- publicKey: rawKey.(*ecdsa.PublicKey),
- }
- recipientInfo, _ := newECDHRecipient(rcpt.Algorithm, rawKey.(*ecdsa.PublicKey))
- recipientInfo.keyID = keyID
- if rcpt.KeyID != "" {
- recipientInfo.keyID = rcpt.KeyID
- }
- encrypter.recipients = []recipientKeyInfo{recipientInfo}
- return encrypter, nil
- default:
- // Can just add a standard recipient
- encrypter.keyGenerator = randomKeyGenerator{
- size: encrypter.cipher.keySize(),
- }
- err := encrypter.addRecipient(rcpt)
- return encrypter, err
- }
-}
-
-// NewMultiEncrypter creates a multi-encrypter based on the given parameters
-func NewMultiEncrypter(enc ContentEncryption, rcpts []Recipient, opts *EncrypterOptions) (Encrypter, error) {
- cipher := getContentCipher(enc)
-
- if cipher == nil {
- return nil, ErrUnsupportedAlgorithm
- }
- if rcpts == nil || len(rcpts) == 0 {
- return nil, fmt.Errorf("square/go-jose: recipients is nil or empty")
- }
-
- encrypter := &genericEncrypter{
- contentAlg: enc,
- recipients: []recipientKeyInfo{},
- cipher: cipher,
- keyGenerator: randomKeyGenerator{
- size: cipher.keySize(),
- },
- }
-
- if opts != nil {
- encrypter.compressionAlg = opts.Compression
- encrypter.extraHeaders = opts.ExtraHeaders
- }
-
- for _, recipient := range rcpts {
- err := encrypter.addRecipient(recipient)
- if err != nil {
- return nil, err
- }
- }
-
- return encrypter, nil
-}
-
-func (ctx *genericEncrypter) addRecipient(recipient Recipient) (err error) {
- var recipientInfo recipientKeyInfo
-
- switch recipient.Algorithm {
- case DIRECT, ECDH_ES:
- return fmt.Errorf("square/go-jose: key algorithm '%s' not supported in multi-recipient mode", recipient.Algorithm)
- }
-
- recipientInfo, err = makeJWERecipient(recipient.Algorithm, recipient.Key)
- if recipient.KeyID != "" {
- recipientInfo.keyID = recipient.KeyID
- }
-
- switch recipient.Algorithm {
- case PBES2_HS256_A128KW, PBES2_HS384_A192KW, PBES2_HS512_A256KW:
- if sr, ok := recipientInfo.keyEncrypter.(*symmetricKeyCipher); ok {
- sr.p2c = recipient.PBES2Count
- sr.p2s = recipient.PBES2Salt
- }
- }
-
- if err == nil {
- ctx.recipients = append(ctx.recipients, recipientInfo)
- }
- return err
-}
-
-func makeJWERecipient(alg KeyAlgorithm, encryptionKey interface{}) (recipientKeyInfo, error) {
- switch encryptionKey := encryptionKey.(type) {
- case *rsa.PublicKey:
- return newRSARecipient(alg, encryptionKey)
- case *ecdsa.PublicKey:
- return newECDHRecipient(alg, encryptionKey)
- case []byte:
- return newSymmetricRecipient(alg, encryptionKey)
- case string:
- return newSymmetricRecipient(alg, []byte(encryptionKey))
- case *JSONWebKey:
- recipient, err := makeJWERecipient(alg, encryptionKey.Key)
- recipient.keyID = encryptionKey.KeyID
- return recipient, err
- }
- if encrypter, ok := encryptionKey.(OpaqueKeyEncrypter); ok {
- return newOpaqueKeyEncrypter(alg, encrypter)
- }
- return recipientKeyInfo{}, ErrUnsupportedKeyType
-}
-
-// newDecrypter creates an appropriate decrypter based on the key type
-func newDecrypter(decryptionKey interface{}) (keyDecrypter, error) {
- switch decryptionKey := decryptionKey.(type) {
- case *rsa.PrivateKey:
- return &rsaDecrypterSigner{
- privateKey: decryptionKey,
- }, nil
- case *ecdsa.PrivateKey:
- return &ecDecrypterSigner{
- privateKey: decryptionKey,
- }, nil
- case []byte:
- return &symmetricKeyCipher{
- key: decryptionKey,
- }, nil
- case string:
- return &symmetricKeyCipher{
- key: []byte(decryptionKey),
- }, nil
- case JSONWebKey:
- return newDecrypter(decryptionKey.Key)
- case *JSONWebKey:
- return newDecrypter(decryptionKey.Key)
- }
- if okd, ok := decryptionKey.(OpaqueKeyDecrypter); ok {
- return &opaqueKeyDecrypter{decrypter: okd}, nil
- }
- return nil, ErrUnsupportedKeyType
-}
-
-// Implementation of encrypt method producing a JWE object.
-func (ctx *genericEncrypter) Encrypt(plaintext []byte) (*JSONWebEncryption, error) {
- return ctx.EncryptWithAuthData(plaintext, nil)
-}
-
-// Implementation of encrypt method producing a JWE object.
-func (ctx *genericEncrypter) EncryptWithAuthData(plaintext, aad []byte) (*JSONWebEncryption, error) {
- obj := &JSONWebEncryption{}
- obj.aad = aad
-
- obj.protected = &rawHeader{}
- err := obj.protected.set(headerEncryption, ctx.contentAlg)
- if err != nil {
- return nil, err
- }
-
- obj.recipients = make([]recipientInfo, len(ctx.recipients))
-
- if len(ctx.recipients) == 0 {
- return nil, fmt.Errorf("square/go-jose: no recipients to encrypt to")
- }
-
- cek, headers, err := ctx.keyGenerator.genKey()
- if err != nil {
- return nil, err
- }
-
- obj.protected.merge(&headers)
-
- for i, info := range ctx.recipients {
- recipient, err := info.keyEncrypter.encryptKey(cek, info.keyAlg)
- if err != nil {
- return nil, err
- }
-
- err = recipient.header.set(headerAlgorithm, info.keyAlg)
- if err != nil {
- return nil, err
- }
-
- if info.keyID != "" {
- err = recipient.header.set(headerKeyID, info.keyID)
- if err != nil {
- return nil, err
- }
- }
- obj.recipients[i] = recipient
- }
-
- if len(ctx.recipients) == 1 {
- // Move per-recipient headers into main protected header if there's
- // only a single recipient.
- obj.protected.merge(obj.recipients[0].header)
- obj.recipients[0].header = nil
- }
-
- if ctx.compressionAlg != NONE {
- plaintext, err = compress(ctx.compressionAlg, plaintext)
- if err != nil {
- return nil, err
- }
-
- err = obj.protected.set(headerCompression, ctx.compressionAlg)
- if err != nil {
- return nil, err
- }
- }
-
- for k, v := range ctx.extraHeaders {
- b, err := json.Marshal(v)
- if err != nil {
- return nil, err
- }
- (*obj.protected)[k] = makeRawMessage(b)
- }
-
- authData := obj.computeAuthData()
- parts, err := ctx.cipher.encrypt(cek, authData, plaintext)
- if err != nil {
- return nil, err
- }
-
- obj.iv = parts.iv
- obj.ciphertext = parts.ciphertext
- obj.tag = parts.tag
-
- return obj, nil
-}
-
-func (ctx *genericEncrypter) Options() EncrypterOptions {
- return EncrypterOptions{
- Compression: ctx.compressionAlg,
- ExtraHeaders: ctx.extraHeaders,
- }
-}
-
-// Decrypt and validate the object and return the plaintext. Note that this
-// function does not support multi-recipient, if you desire multi-recipient
-// decryption use DecryptMulti instead.
-func (obj JSONWebEncryption) Decrypt(decryptionKey interface{}) ([]byte, error) {
- headers := obj.mergedHeaders(nil)
-
- if len(obj.recipients) > 1 {
- return nil, errors.New("square/go-jose: too many recipients in payload; expecting only one")
- }
-
- critical, err := headers.getCritical()
- if err != nil {
- return nil, fmt.Errorf("square/go-jose: invalid crit header")
- }
-
- if len(critical) > 0 {
- return nil, fmt.Errorf("square/go-jose: unsupported crit header")
- }
-
- decrypter, err := newDecrypter(decryptionKey)
- if err != nil {
- return nil, err
- }
-
- cipher := getContentCipher(headers.getEncryption())
- if cipher == nil {
- return nil, fmt.Errorf("square/go-jose: unsupported enc value '%s'", string(headers.getEncryption()))
- }
-
- generator := randomKeyGenerator{
- size: cipher.keySize(),
- }
-
- parts := &aeadParts{
- iv: obj.iv,
- ciphertext: obj.ciphertext,
- tag: obj.tag,
- }
-
- authData := obj.computeAuthData()
-
- var plaintext []byte
- recipient := obj.recipients[0]
- recipientHeaders := obj.mergedHeaders(&recipient)
-
- cek, err := decrypter.decryptKey(recipientHeaders, &recipient, generator)
- if err == nil {
- // Found a valid CEK -- let's try to decrypt.
- plaintext, err = cipher.decrypt(cek, authData, parts)
- }
-
- if plaintext == nil {
- return nil, ErrCryptoFailure
- }
-
- // The "zip" header parameter may only be present in the protected header.
- if comp := obj.protected.getCompression(); comp != "" {
- plaintext, err = decompress(comp, plaintext)
- }
-
- return plaintext, err
-}
-
-// DecryptMulti decrypts and validates the object and returns the plaintexts,
-// with support for multiple recipients. It returns the index of the recipient
-// for which the decryption was successful, the merged headers for that recipient,
-// and the plaintext.
-func (obj JSONWebEncryption) DecryptMulti(decryptionKey interface{}) (int, Header, []byte, error) {
- globalHeaders := obj.mergedHeaders(nil)
-
- critical, err := globalHeaders.getCritical()
- if err != nil {
- return -1, Header{}, nil, fmt.Errorf("square/go-jose: invalid crit header")
- }
-
- if len(critical) > 0 {
- return -1, Header{}, nil, fmt.Errorf("square/go-jose: unsupported crit header")
- }
-
- decrypter, err := newDecrypter(decryptionKey)
- if err != nil {
- return -1, Header{}, nil, err
- }
-
- encryption := globalHeaders.getEncryption()
- cipher := getContentCipher(encryption)
- if cipher == nil {
- return -1, Header{}, nil, fmt.Errorf("square/go-jose: unsupported enc value '%s'", string(encryption))
- }
-
- generator := randomKeyGenerator{
- size: cipher.keySize(),
- }
-
- parts := &aeadParts{
- iv: obj.iv,
- ciphertext: obj.ciphertext,
- tag: obj.tag,
- }
-
- authData := obj.computeAuthData()
-
- index := -1
- var plaintext []byte
- var headers rawHeader
-
- for i, recipient := range obj.recipients {
- recipientHeaders := obj.mergedHeaders(&recipient)
-
- cek, err := decrypter.decryptKey(recipientHeaders, &recipient, generator)
- if err == nil {
- // Found a valid CEK -- let's try to decrypt.
- plaintext, err = cipher.decrypt(cek, authData, parts)
- if err == nil {
- index = i
- headers = recipientHeaders
- break
- }
- }
- }
-
- if plaintext == nil || err != nil {
- return -1, Header{}, nil, ErrCryptoFailure
- }
-
- // The "zip" header parameter may only be present in the protected header.
- if comp := obj.protected.getCompression(); comp != "" {
- plaintext, err = decompress(comp, plaintext)
- }
-
- sanitized, err := headers.sanitized()
- if err != nil {
- return -1, Header{}, nil, fmt.Errorf("square/go-jose: failed to sanitize header: %v", err)
- }
-
- return index, sanitized, plaintext, err
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/doc.go b/vendor/gopkg.in/square/go-jose.v2/doc.go
deleted file mode 100644
index dd1387f3..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/doc.go
+++ /dev/null
@@ -1,27 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
-
-Package jose aims to provide an implementation of the Javascript Object Signing
-and Encryption set of standards. It implements encryption and signing based on
-the JSON Web Encryption and JSON Web Signature standards, with optional JSON
-Web Token support available in a sub-package. The library supports both the
-compact and full serialization formats, and has optional support for multiple
-recipients.
-
-*/
-package jose
diff --git a/vendor/gopkg.in/square/go-jose.v2/encoding.go b/vendor/gopkg.in/square/go-jose.v2/encoding.go
deleted file mode 100644
index 70f7385c..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/encoding.go
+++ /dev/null
@@ -1,185 +0,0 @@
-/*-
- * Copyright 2014 Square Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package jose
-
-import (
- "bytes"
- "compress/flate"
- "encoding/base64"
- "encoding/binary"
- "io"
- "math/big"
- "strings"
- "unicode"
-
- "gopkg.in/square/go-jose.v2/json"
-)
-
-// Helper function to serialize known-good objects.
-// Precondition: value is not a nil pointer.
-func mustSerializeJSON(value interface{}) []byte {
- out, err := json.Marshal(value)
- if err != nil {
- panic(err)
- }
- // We never want to serialize the top-level value "null," since it's not a
- // valid JOSE message. But if a caller passes in a nil pointer to this method,
- // MarshalJSON will happily serialize it as the top-level value "null". If
- // that value is then embedded in another operation, for instance by being
- // base64-encoded and fed as input to a signing algorithm
- // (https://github.com/square/go-jose/issues/22), the result will be
- // incorrect. Because this method is intended for known-good objects, and a nil
- // pointer is not a known-good object, we are free to panic in this case.
- // Note: It's not possible to directly check whether the data pointed at by an
- // interface is a nil pointer, so we do this hacky workaround.
- // https://groups.google.com/forum/#!topic/golang-nuts/wnH302gBa4I
- if string(out) == "null" {
- panic("Tried to serialize a nil pointer.")
- }
- return out
-}
-
-// Strip all newlines and whitespace
-func stripWhitespace(data string) string {
- buf := strings.Builder{}
- buf.Grow(len(data))
- for _, r := range data {
- if !unicode.IsSpace(r) {
- buf.WriteRune(r)
- }
- }
- return buf.String()
-}
-
-// Perform compression based on algorithm
-func compress(algorithm CompressionAlgorithm, input []byte) ([]byte, error) {
- switch algorithm {
- case DEFLATE:
- return deflate(input)
- default:
- return nil, ErrUnsupportedAlgorithm
- }
-}
-
-// Perform decompression based on algorithm
-func decompress(algorithm CompressionAlgorithm, input []byte) ([]byte, error) {
- switch algorithm {
- case DEFLATE:
- return inflate(input)
- default:
- return nil, ErrUnsupportedAlgorithm
- }
-}
-
-// Compress with DEFLATE
-func deflate(input []byte) ([]byte, error) {
- output := new(bytes.Buffer)
-
- // Writing to byte buffer, err is always nil
- writer, _ := flate.NewWriter(output, 1)
- _, _ = io.Copy(writer, bytes.NewBuffer(input))
-
- err := writer.Close()
- return output.Bytes(), err
-}
-
-// Decompress with DEFLATE
-func inflate(input []byte) ([]byte, error) {
- output := new(bytes.Buffer)
- reader := flate.NewReader(bytes.NewBuffer(input))
-
- _, err := io.Copy(output, reader)
- if err != nil {
- return nil, err
- }
-
- err = reader.Close()
- return output.Bytes(), err
-}
-
-// byteBuffer represents a slice of bytes that can be serialized to url-safe base64.
-type byteBuffer struct {
- data []byte
-}
-
-func newBuffer(data []byte) *byteBuffer {
- if data == nil {
- return nil
- }
- return &byteBuffer{
- data: data,
- }
-}
-
-func newFixedSizeBuffer(data []byte, length int) *byteBuffer {
- if len(data) > length {
- panic("square/go-jose: invalid call to newFixedSizeBuffer (len(data) > length)")
- }
- pad := make([]byte, length-len(data))
- return newBuffer(append(pad, data...))
-}
-
-func newBufferFromInt(num uint64) *byteBuffer {
- data := make([]byte, 8)
- binary.BigEndian.PutUint64(data, num)
- return newBuffer(bytes.TrimLeft(data, "\x00"))
-}
-
-func (b *byteBuffer) MarshalJSON() ([]byte, error) {
- return json.Marshal(b.base64())
-}
-
-func (b *byteBuffer) UnmarshalJSON(data []byte) error {
- var encoded string
- err := json.Unmarshal(data, &encoded)
- if err != nil {
- return err
- }
-
- if encoded == "" {
- return nil
- }
-
- decoded, err := base64.RawURLEncoding.DecodeString(encoded)
- if err != nil {
- return err
- }
-
- *b = *newBuffer(decoded)
-
- return nil
-}
-
-func (b *byteBuffer) base64() string {
- return base64.RawURLEncoding.EncodeToString(b.data)
-}
-
-func (b *byteBuffer) bytes() []byte {
- // Handling nil here allows us to transparently handle nil slices when serializing.
- if b == nil {
- return nil
- }
- return b.data
-}
-
-func (b byteBuffer) bigInt() *big.Int {
- return new(big.Int).SetBytes(b.data)
-}
-
-func (b byteBuffer) toInt() int {
- return int(b.bigInt().Int64())
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/LICENSE b/vendor/gopkg.in/square/go-jose.v2/json/LICENSE
deleted file mode 100644
index 74487567..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/README.md b/vendor/gopkg.in/square/go-jose.v2/json/README.md
deleted file mode 100644
index 86de5e55..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Safe JSON
-
-This repository contains a fork of the `encoding/json` package from Go 1.6.
-
-The following changes were made:
-
-* Object deserialization uses case-sensitive member name matching instead of
- [case-insensitive matching](https://www.ietf.org/mail-archive/web/json/current/msg03763.html).
- This is to avoid differences in the interpretation of JOSE messages between
- go-jose and libraries written in other languages.
-* When deserializing a JSON object, we check for duplicate keys and reject the
- input whenever we detect a duplicate. Rather than trying to work with malformed
- data, we prefer to reject it right away.
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/decode.go b/vendor/gopkg.in/square/go-jose.v2/json/decode.go
deleted file mode 100644
index 4dbc4146..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/decode.go
+++ /dev/null
@@ -1,1217 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Represents JSON data structure using native Go types: booleans, floats,
-// strings, arrays, and maps.
-
-package json
-
-import (
- "bytes"
- "encoding"
- "encoding/base64"
- "errors"
- "fmt"
- "math"
- "reflect"
- "runtime"
- "strconv"
- "unicode"
- "unicode/utf16"
- "unicode/utf8"
-)
-
-// Unmarshal parses the JSON-encoded data and stores the result
-// in the value pointed to by v.
-//
-// Unmarshal uses the inverse of the encodings that
-// Marshal uses, allocating maps, slices, and pointers as necessary,
-// with the following additional rules:
-//
-// To unmarshal JSON into a pointer, Unmarshal first handles the case of
-// the JSON being the JSON literal null. In that case, Unmarshal sets
-// the pointer to nil. Otherwise, Unmarshal unmarshals the JSON into
-// the value pointed at by the pointer. If the pointer is nil, Unmarshal
-// allocates a new value for it to point to.
-//
-// To unmarshal JSON into a struct, Unmarshal matches incoming object
-// keys to the keys used by Marshal (either the struct field name or its tag),
-// preferring an exact match but also accepting a case-insensitive match.
-// Unmarshal will only set exported fields of the struct.
-//
-// To unmarshal JSON into an interface value,
-// Unmarshal stores one of these in the interface value:
-//
-// bool, for JSON booleans
-// float64, for JSON numbers
-// string, for JSON strings
-// []interface{}, for JSON arrays
-// map[string]interface{}, for JSON objects
-// nil for JSON null
-//
-// To unmarshal a JSON array into a slice, Unmarshal resets the slice length
-// to zero and then appends each element to the slice.
-// As a special case, to unmarshal an empty JSON array into a slice,
-// Unmarshal replaces the slice with a new empty slice.
-//
-// To unmarshal a JSON array into a Go array, Unmarshal decodes
-// JSON array elements into corresponding Go array elements.
-// If the Go array is smaller than the JSON array,
-// the additional JSON array elements are discarded.
-// If the JSON array is smaller than the Go array,
-// the additional Go array elements are set to zero values.
-//
-// To unmarshal a JSON object into a string-keyed map, Unmarshal first
-// establishes a map to use, If the map is nil, Unmarshal allocates a new map.
-// Otherwise Unmarshal reuses the existing map, keeping existing entries.
-// Unmarshal then stores key-value pairs from the JSON object into the map.
-//
-// If a JSON value is not appropriate for a given target type,
-// or if a JSON number overflows the target type, Unmarshal
-// skips that field and completes the unmarshaling as best it can.
-// If no more serious errors are encountered, Unmarshal returns
-// an UnmarshalTypeError describing the earliest such error.
-//
-// The JSON null value unmarshals into an interface, map, pointer, or slice
-// by setting that Go value to nil. Because null is often used in JSON to mean
-// ``not present,'' unmarshaling a JSON null into any other Go type has no effect
-// on the value and produces no error.
-//
-// When unmarshaling quoted strings, invalid UTF-8 or
-// invalid UTF-16 surrogate pairs are not treated as an error.
-// Instead, they are replaced by the Unicode replacement
-// character U+FFFD.
-//
-func Unmarshal(data []byte, v interface{}) error {
- // Check for well-formedness.
- // Avoids filling out half a data structure
- // before discovering a JSON syntax error.
- var d decodeState
- err := checkValid(data, &d.scan)
- if err != nil {
- return err
- }
-
- d.init(data)
- return d.unmarshal(v)
-}
-
-// Unmarshaler is the interface implemented by objects
-// that can unmarshal a JSON description of themselves.
-// The input can be assumed to be a valid encoding of
-// a JSON value. UnmarshalJSON must copy the JSON data
-// if it wishes to retain the data after returning.
-type Unmarshaler interface {
- UnmarshalJSON([]byte) error
-}
-
-// An UnmarshalTypeError describes a JSON value that was
-// not appropriate for a value of a specific Go type.
-type UnmarshalTypeError struct {
- Value string // description of JSON value - "bool", "array", "number -5"
- Type reflect.Type // type of Go value it could not be assigned to
- Offset int64 // error occurred after reading Offset bytes
-}
-
-func (e *UnmarshalTypeError) Error() string {
- return "json: cannot unmarshal " + e.Value + " into Go value of type " + e.Type.String()
-}
-
-// An UnmarshalFieldError describes a JSON object key that
-// led to an unexported (and therefore unwritable) struct field.
-// (No longer used; kept for compatibility.)
-type UnmarshalFieldError struct {
- Key string
- Type reflect.Type
- Field reflect.StructField
-}
-
-func (e *UnmarshalFieldError) Error() string {
- return "json: cannot unmarshal object key " + strconv.Quote(e.Key) + " into unexported field " + e.Field.Name + " of type " + e.Type.String()
-}
-
-// An InvalidUnmarshalError describes an invalid argument passed to Unmarshal.
-// (The argument to Unmarshal must be a non-nil pointer.)
-type InvalidUnmarshalError struct {
- Type reflect.Type
-}
-
-func (e *InvalidUnmarshalError) Error() string {
- if e.Type == nil {
- return "json: Unmarshal(nil)"
- }
-
- if e.Type.Kind() != reflect.Ptr {
- return "json: Unmarshal(non-pointer " + e.Type.String() + ")"
- }
- return "json: Unmarshal(nil " + e.Type.String() + ")"
-}
-
-func (d *decodeState) unmarshal(v interface{}) (err error) {
- defer func() {
- if r := recover(); r != nil {
- if _, ok := r.(runtime.Error); ok {
- panic(r)
- }
- err = r.(error)
- }
- }()
-
- rv := reflect.ValueOf(v)
- if rv.Kind() != reflect.Ptr || rv.IsNil() {
- return &InvalidUnmarshalError{reflect.TypeOf(v)}
- }
-
- d.scan.reset()
- // We decode rv not rv.Elem because the Unmarshaler interface
- // test must be applied at the top level of the value.
- d.value(rv)
- return d.savedError
-}
-
-// A Number represents a JSON number literal.
-type Number string
-
-// String returns the literal text of the number.
-func (n Number) String() string { return string(n) }
-
-// Float64 returns the number as a float64.
-func (n Number) Float64() (float64, error) {
- return strconv.ParseFloat(string(n), 64)
-}
-
-// Int64 returns the number as an int64.
-func (n Number) Int64() (int64, error) {
- return strconv.ParseInt(string(n), 10, 64)
-}
-
-// isValidNumber reports whether s is a valid JSON number literal.
-func isValidNumber(s string) bool {
- // This function implements the JSON numbers grammar.
- // See https://tools.ietf.org/html/rfc7159#section-6
- // and http://json.org/number.gif
-
- if s == "" {
- return false
- }
-
- // Optional -
- if s[0] == '-' {
- s = s[1:]
- if s == "" {
- return false
- }
- }
-
- // Digits
- switch {
- default:
- return false
-
- case s[0] == '0':
- s = s[1:]
-
- case '1' <= s[0] && s[0] <= '9':
- s = s[1:]
- for len(s) > 0 && '0' <= s[0] && s[0] <= '9' {
- s = s[1:]
- }
- }
-
- // . followed by 1 or more digits.
- if len(s) >= 2 && s[0] == '.' && '0' <= s[1] && s[1] <= '9' {
- s = s[2:]
- for len(s) > 0 && '0' <= s[0] && s[0] <= '9' {
- s = s[1:]
- }
- }
-
- // e or E followed by an optional - or + and
- // 1 or more digits.
- if len(s) >= 2 && (s[0] == 'e' || s[0] == 'E') {
- s = s[1:]
- if s[0] == '+' || s[0] == '-' {
- s = s[1:]
- if s == "" {
- return false
- }
- }
- for len(s) > 0 && '0' <= s[0] && s[0] <= '9' {
- s = s[1:]
- }
- }
-
- // Make sure we are at the end.
- return s == ""
-}
-
-type NumberUnmarshalType int
-
-const (
- // unmarshal a JSON number into an interface{} as a float64
- UnmarshalFloat NumberUnmarshalType = iota
- // unmarshal a JSON number into an interface{} as a `json.Number`
- UnmarshalJSONNumber
- // unmarshal a JSON number into an interface{} as a int64
- // if value is an integer otherwise float64
- UnmarshalIntOrFloat
-)
-
-// decodeState represents the state while decoding a JSON value.
-type decodeState struct {
- data []byte
- off int // read offset in data
- scan scanner
- nextscan scanner // for calls to nextValue
- savedError error
- numberType NumberUnmarshalType
-}
-
-// errPhase is used for errors that should not happen unless
-// there is a bug in the JSON decoder or something is editing
-// the data slice while the decoder executes.
-var errPhase = errors.New("JSON decoder out of sync - data changing underfoot?")
-
-func (d *decodeState) init(data []byte) *decodeState {
- d.data = data
- d.off = 0
- d.savedError = nil
- return d
-}
-
-// error aborts the decoding by panicking with err.
-func (d *decodeState) error(err error) {
- panic(err)
-}
-
-// saveError saves the first err it is called with,
-// for reporting at the end of the unmarshal.
-func (d *decodeState) saveError(err error) {
- if d.savedError == nil {
- d.savedError = err
- }
-}
-
-// next cuts off and returns the next full JSON value in d.data[d.off:].
-// The next value is known to be an object or array, not a literal.
-func (d *decodeState) next() []byte {
- c := d.data[d.off]
- item, rest, err := nextValue(d.data[d.off:], &d.nextscan)
- if err != nil {
- d.error(err)
- }
- d.off = len(d.data) - len(rest)
-
- // Our scanner has seen the opening brace/bracket
- // and thinks we're still in the middle of the object.
- // invent a closing brace/bracket to get it out.
- if c == '{' {
- d.scan.step(&d.scan, '}')
- } else {
- d.scan.step(&d.scan, ']')
- }
-
- return item
-}
-
-// scanWhile processes bytes in d.data[d.off:] until it
-// receives a scan code not equal to op.
-// It updates d.off and returns the new scan code.
-func (d *decodeState) scanWhile(op int) int {
- var newOp int
- for {
- if d.off >= len(d.data) {
- newOp = d.scan.eof()
- d.off = len(d.data) + 1 // mark processed EOF with len+1
- } else {
- c := d.data[d.off]
- d.off++
- newOp = d.scan.step(&d.scan, c)
- }
- if newOp != op {
- break
- }
- }
- return newOp
-}
-
-// value decodes a JSON value from d.data[d.off:] into the value.
-// it updates d.off to point past the decoded value.
-func (d *decodeState) value(v reflect.Value) {
- if !v.IsValid() {
- _, rest, err := nextValue(d.data[d.off:], &d.nextscan)
- if err != nil {
- d.error(err)
- }
- d.off = len(d.data) - len(rest)
-
- // d.scan thinks we're still at the beginning of the item.
- // Feed in an empty string - the shortest, simplest value -
- // so that it knows we got to the end of the value.
- if d.scan.redo {
- // rewind.
- d.scan.redo = false
- d.scan.step = stateBeginValue
- }
- d.scan.step(&d.scan, '"')
- d.scan.step(&d.scan, '"')
-
- n := len(d.scan.parseState)
- if n > 0 && d.scan.parseState[n-1] == parseObjectKey {
- // d.scan thinks we just read an object key; finish the object
- d.scan.step(&d.scan, ':')
- d.scan.step(&d.scan, '"')
- d.scan.step(&d.scan, '"')
- d.scan.step(&d.scan, '}')
- }
-
- return
- }
-
- switch op := d.scanWhile(scanSkipSpace); op {
- default:
- d.error(errPhase)
-
- case scanBeginArray:
- d.array(v)
-
- case scanBeginObject:
- d.object(v)
-
- case scanBeginLiteral:
- d.literal(v)
- }
-}
-
-type unquotedValue struct{}
-
-// valueQuoted is like value but decodes a
-// quoted string literal or literal null into an interface value.
-// If it finds anything other than a quoted string literal or null,
-// valueQuoted returns unquotedValue{}.
-func (d *decodeState) valueQuoted() interface{} {
- switch op := d.scanWhile(scanSkipSpace); op {
- default:
- d.error(errPhase)
-
- case scanBeginArray:
- d.array(reflect.Value{})
-
- case scanBeginObject:
- d.object(reflect.Value{})
-
- case scanBeginLiteral:
- switch v := d.literalInterface().(type) {
- case nil, string:
- return v
- }
- }
- return unquotedValue{}
-}
-
-// indirect walks down v allocating pointers as needed,
-// until it gets to a non-pointer.
-// if it encounters an Unmarshaler, indirect stops and returns that.
-// if decodingNull is true, indirect stops at the last pointer so it can be set to nil.
-func (d *decodeState) indirect(v reflect.Value, decodingNull bool) (Unmarshaler, encoding.TextUnmarshaler, reflect.Value) {
- // If v is a named type and is addressable,
- // start with its address, so that if the type has pointer methods,
- // we find them.
- if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() {
- v = v.Addr()
- }
- for {
- // Load value from interface, but only if the result will be
- // usefully addressable.
- if v.Kind() == reflect.Interface && !v.IsNil() {
- e := v.Elem()
- if e.Kind() == reflect.Ptr && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Ptr) {
- v = e
- continue
- }
- }
-
- if v.Kind() != reflect.Ptr {
- break
- }
-
- if v.Elem().Kind() != reflect.Ptr && decodingNull && v.CanSet() {
- break
- }
- if v.IsNil() {
- v.Set(reflect.New(v.Type().Elem()))
- }
- if v.Type().NumMethod() > 0 {
- if u, ok := v.Interface().(Unmarshaler); ok {
- return u, nil, reflect.Value{}
- }
- if u, ok := v.Interface().(encoding.TextUnmarshaler); ok {
- return nil, u, reflect.Value{}
- }
- }
- v = v.Elem()
- }
- return nil, nil, v
-}
-
-// array consumes an array from d.data[d.off-1:], decoding into the value v.
-// the first byte of the array ('[') has been read already.
-func (d *decodeState) array(v reflect.Value) {
- // Check for unmarshaler.
- u, ut, pv := d.indirect(v, false)
- if u != nil {
- d.off--
- err := u.UnmarshalJSON(d.next())
- if err != nil {
- d.error(err)
- }
- return
- }
- if ut != nil {
- d.saveError(&UnmarshalTypeError{"array", v.Type(), int64(d.off)})
- d.off--
- d.next()
- return
- }
-
- v = pv
-
- // Check type of target.
- switch v.Kind() {
- case reflect.Interface:
- if v.NumMethod() == 0 {
- // Decoding into nil interface? Switch to non-reflect code.
- v.Set(reflect.ValueOf(d.arrayInterface()))
- return
- }
- // Otherwise it's invalid.
- fallthrough
- default:
- d.saveError(&UnmarshalTypeError{"array", v.Type(), int64(d.off)})
- d.off--
- d.next()
- return
- case reflect.Array:
- case reflect.Slice:
- break
- }
-
- i := 0
- for {
- // Look ahead for ] - can only happen on first iteration.
- op := d.scanWhile(scanSkipSpace)
- if op == scanEndArray {
- break
- }
-
- // Back up so d.value can have the byte we just read.
- d.off--
- d.scan.undo(op)
-
- // Get element of array, growing if necessary.
- if v.Kind() == reflect.Slice {
- // Grow slice if necessary
- if i >= v.Cap() {
- newcap := v.Cap() + v.Cap()/2
- if newcap < 4 {
- newcap = 4
- }
- newv := reflect.MakeSlice(v.Type(), v.Len(), newcap)
- reflect.Copy(newv, v)
- v.Set(newv)
- }
- if i >= v.Len() {
- v.SetLen(i + 1)
- }
- }
-
- if i < v.Len() {
- // Decode into element.
- d.value(v.Index(i))
- } else {
- // Ran out of fixed array: skip.
- d.value(reflect.Value{})
- }
- i++
-
- // Next token must be , or ].
- op = d.scanWhile(scanSkipSpace)
- if op == scanEndArray {
- break
- }
- if op != scanArrayValue {
- d.error(errPhase)
- }
- }
-
- if i < v.Len() {
- if v.Kind() == reflect.Array {
- // Array. Zero the rest.
- z := reflect.Zero(v.Type().Elem())
- for ; i < v.Len(); i++ {
- v.Index(i).Set(z)
- }
- } else {
- v.SetLen(i)
- }
- }
- if i == 0 && v.Kind() == reflect.Slice {
- v.Set(reflect.MakeSlice(v.Type(), 0, 0))
- }
-}
-
-var nullLiteral = []byte("null")
-
-// object consumes an object from d.data[d.off-1:], decoding into the value v.
-// the first byte ('{') of the object has been read already.
-func (d *decodeState) object(v reflect.Value) {
- // Check for unmarshaler.
- u, ut, pv := d.indirect(v, false)
- if u != nil {
- d.off--
- err := u.UnmarshalJSON(d.next())
- if err != nil {
- d.error(err)
- }
- return
- }
- if ut != nil {
- d.saveError(&UnmarshalTypeError{"object", v.Type(), int64(d.off)})
- d.off--
- d.next() // skip over { } in input
- return
- }
- v = pv
-
- // Decoding into nil interface? Switch to non-reflect code.
- if v.Kind() == reflect.Interface && v.NumMethod() == 0 {
- v.Set(reflect.ValueOf(d.objectInterface()))
- return
- }
-
- // Check type of target: struct or map[string]T
- switch v.Kind() {
- case reflect.Map:
- // map must have string kind
- t := v.Type()
- if t.Key().Kind() != reflect.String {
- d.saveError(&UnmarshalTypeError{"object", v.Type(), int64(d.off)})
- d.off--
- d.next() // skip over { } in input
- return
- }
- if v.IsNil() {
- v.Set(reflect.MakeMap(t))
- }
- case reflect.Struct:
-
- default:
- d.saveError(&UnmarshalTypeError{"object", v.Type(), int64(d.off)})
- d.off--
- d.next() // skip over { } in input
- return
- }
-
- var mapElem reflect.Value
- keys := map[string]bool{}
-
- for {
- // Read opening " of string key or closing }.
- op := d.scanWhile(scanSkipSpace)
- if op == scanEndObject {
- // closing } - can only happen on first iteration.
- break
- }
- if op != scanBeginLiteral {
- d.error(errPhase)
- }
-
- // Read key.
- start := d.off - 1
- op = d.scanWhile(scanContinue)
- item := d.data[start : d.off-1]
- key, ok := unquote(item)
- if !ok {
- d.error(errPhase)
- }
-
- // Check for duplicate keys.
- _, ok = keys[key]
- if !ok {
- keys[key] = true
- } else {
- d.error(fmt.Errorf("json: duplicate key '%s' in object", key))
- }
-
- // Figure out field corresponding to key.
- var subv reflect.Value
- destring := false // whether the value is wrapped in a string to be decoded first
-
- if v.Kind() == reflect.Map {
- elemType := v.Type().Elem()
- if !mapElem.IsValid() {
- mapElem = reflect.New(elemType).Elem()
- } else {
- mapElem.Set(reflect.Zero(elemType))
- }
- subv = mapElem
- } else {
- var f *field
- fields := cachedTypeFields(v.Type())
- for i := range fields {
- ff := &fields[i]
- if bytes.Equal(ff.nameBytes, []byte(key)) {
- f = ff
- break
- }
- }
- if f != nil {
- subv = v
- destring = f.quoted
- for _, i := range f.index {
- if subv.Kind() == reflect.Ptr {
- if subv.IsNil() {
- subv.Set(reflect.New(subv.Type().Elem()))
- }
- subv = subv.Elem()
- }
- subv = subv.Field(i)
- }
- }
- }
-
- // Read : before value.
- if op == scanSkipSpace {
- op = d.scanWhile(scanSkipSpace)
- }
- if op != scanObjectKey {
- d.error(errPhase)
- }
-
- // Read value.
- if destring {
- switch qv := d.valueQuoted().(type) {
- case nil:
- d.literalStore(nullLiteral, subv, false)
- case string:
- d.literalStore([]byte(qv), subv, true)
- default:
- d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal unquoted value into %v", subv.Type()))
- }
- } else {
- d.value(subv)
- }
-
- // Write value back to map;
- // if using struct, subv points into struct already.
- if v.Kind() == reflect.Map {
- kv := reflect.ValueOf(key).Convert(v.Type().Key())
- v.SetMapIndex(kv, subv)
- }
-
- // Next token must be , or }.
- op = d.scanWhile(scanSkipSpace)
- if op == scanEndObject {
- break
- }
- if op != scanObjectValue {
- d.error(errPhase)
- }
- }
-}
-
-// literal consumes a literal from d.data[d.off-1:], decoding into the value v.
-// The first byte of the literal has been read already
-// (that's how the caller knows it's a literal).
-func (d *decodeState) literal(v reflect.Value) {
- // All bytes inside literal return scanContinue op code.
- start := d.off - 1
- op := d.scanWhile(scanContinue)
-
- // Scan read one byte too far; back up.
- d.off--
- d.scan.undo(op)
-
- d.literalStore(d.data[start:d.off], v, false)
-}
-
-// convertNumber converts the number literal s to a float64, int64 or a Number
-// depending on d.numberDecodeType.
-func (d *decodeState) convertNumber(s string) (interface{}, error) {
- switch d.numberType {
-
- case UnmarshalJSONNumber:
- return Number(s), nil
- case UnmarshalIntOrFloat:
- v, err := strconv.ParseInt(s, 10, 64)
- if err == nil {
- return v, nil
- }
-
- // tries to parse integer number in scientific notation
- f, err := strconv.ParseFloat(s, 64)
- if err != nil {
- return nil, &UnmarshalTypeError{"number " + s, reflect.TypeOf(0.0), int64(d.off)}
- }
-
- // if it has no decimal value use int64
- if fi, fd := math.Modf(f); fd == 0.0 {
- return int64(fi), nil
- }
- return f, nil
- default:
- f, err := strconv.ParseFloat(s, 64)
- if err != nil {
- return nil, &UnmarshalTypeError{"number " + s, reflect.TypeOf(0.0), int64(d.off)}
- }
- return f, nil
- }
-
-}
-
-var numberType = reflect.TypeOf(Number(""))
-
-// literalStore decodes a literal stored in item into v.
-//
-// fromQuoted indicates whether this literal came from unwrapping a
-// string from the ",string" struct tag option. this is used only to
-// produce more helpful error messages.
-func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool) {
- // Check for unmarshaler.
- if len(item) == 0 {
- //Empty string given
- d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- return
- }
- wantptr := item[0] == 'n' // null
- u, ut, pv := d.indirect(v, wantptr)
- if u != nil {
- err := u.UnmarshalJSON(item)
- if err != nil {
- d.error(err)
- }
- return
- }
- if ut != nil {
- if item[0] != '"' {
- if fromQuoted {
- d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)})
- }
- return
- }
- s, ok := unquoteBytes(item)
- if !ok {
- if fromQuoted {
- d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.error(errPhase)
- }
- }
- err := ut.UnmarshalText(s)
- if err != nil {
- d.error(err)
- }
- return
- }
-
- v = pv
-
- switch c := item[0]; c {
- case 'n': // null
- switch v.Kind() {
- case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice:
- v.Set(reflect.Zero(v.Type()))
- // otherwise, ignore null for primitives/string
- }
- case 't', 'f': // true, false
- value := c == 't'
- switch v.Kind() {
- default:
- if fromQuoted {
- d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.saveError(&UnmarshalTypeError{"bool", v.Type(), int64(d.off)})
- }
- case reflect.Bool:
- v.SetBool(value)
- case reflect.Interface:
- if v.NumMethod() == 0 {
- v.Set(reflect.ValueOf(value))
- } else {
- d.saveError(&UnmarshalTypeError{"bool", v.Type(), int64(d.off)})
- }
- }
-
- case '"': // string
- s, ok := unquoteBytes(item)
- if !ok {
- if fromQuoted {
- d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.error(errPhase)
- }
- }
- switch v.Kind() {
- default:
- d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)})
- case reflect.Slice:
- if v.Type().Elem().Kind() != reflect.Uint8 {
- d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)})
- break
- }
- b := make([]byte, base64.StdEncoding.DecodedLen(len(s)))
- n, err := base64.StdEncoding.Decode(b, s)
- if err != nil {
- d.saveError(err)
- break
- }
- v.SetBytes(b[:n])
- case reflect.String:
- v.SetString(string(s))
- case reflect.Interface:
- if v.NumMethod() == 0 {
- v.Set(reflect.ValueOf(string(s)))
- } else {
- d.saveError(&UnmarshalTypeError{"string", v.Type(), int64(d.off)})
- }
- }
-
- default: // number
- if c != '-' && (c < '0' || c > '9') {
- if fromQuoted {
- d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.error(errPhase)
- }
- }
- s := string(item)
- switch v.Kind() {
- default:
- if v.Kind() == reflect.String && v.Type() == numberType {
- v.SetString(s)
- if !isValidNumber(s) {
- d.error(fmt.Errorf("json: invalid number literal, trying to unmarshal %q into Number", item))
- }
- break
- }
- if fromQuoted {
- d.error(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type()))
- } else {
- d.error(&UnmarshalTypeError{"number", v.Type(), int64(d.off)})
- }
- case reflect.Interface:
- n, err := d.convertNumber(s)
- if err != nil {
- d.saveError(err)
- break
- }
- if v.NumMethod() != 0 {
- d.saveError(&UnmarshalTypeError{"number", v.Type(), int64(d.off)})
- break
- }
- v.Set(reflect.ValueOf(n))
-
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- n, err := strconv.ParseInt(s, 10, 64)
- if err != nil || v.OverflowInt(n) {
- d.saveError(&UnmarshalTypeError{"number " + s, v.Type(), int64(d.off)})
- break
- }
- v.SetInt(n)
-
- case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
- n, err := strconv.ParseUint(s, 10, 64)
- if err != nil || v.OverflowUint(n) {
- d.saveError(&UnmarshalTypeError{"number " + s, v.Type(), int64(d.off)})
- break
- }
- v.SetUint(n)
-
- case reflect.Float32, reflect.Float64:
- n, err := strconv.ParseFloat(s, v.Type().Bits())
- if err != nil || v.OverflowFloat(n) {
- d.saveError(&UnmarshalTypeError{"number " + s, v.Type(), int64(d.off)})
- break
- }
- v.SetFloat(n)
- }
- }
-}
-
-// The xxxInterface routines build up a value to be stored
-// in an empty interface. They are not strictly necessary,
-// but they avoid the weight of reflection in this common case.
-
-// valueInterface is like value but returns interface{}
-func (d *decodeState) valueInterface() interface{} {
- switch d.scanWhile(scanSkipSpace) {
- default:
- d.error(errPhase)
- panic("unreachable")
- case scanBeginArray:
- return d.arrayInterface()
- case scanBeginObject:
- return d.objectInterface()
- case scanBeginLiteral:
- return d.literalInterface()
- }
-}
-
-// arrayInterface is like array but returns []interface{}.
-func (d *decodeState) arrayInterface() []interface{} {
- var v = make([]interface{}, 0)
- for {
- // Look ahead for ] - can only happen on first iteration.
- op := d.scanWhile(scanSkipSpace)
- if op == scanEndArray {
- break
- }
-
- // Back up so d.value can have the byte we just read.
- d.off--
- d.scan.undo(op)
-
- v = append(v, d.valueInterface())
-
- // Next token must be , or ].
- op = d.scanWhile(scanSkipSpace)
- if op == scanEndArray {
- break
- }
- if op != scanArrayValue {
- d.error(errPhase)
- }
- }
- return v
-}
-
-// objectInterface is like object but returns map[string]interface{}.
-func (d *decodeState) objectInterface() map[string]interface{} {
- m := make(map[string]interface{})
- keys := map[string]bool{}
-
- for {
- // Read opening " of string key or closing }.
- op := d.scanWhile(scanSkipSpace)
- if op == scanEndObject {
- // closing } - can only happen on first iteration.
- break
- }
- if op != scanBeginLiteral {
- d.error(errPhase)
- }
-
- // Read string key.
- start := d.off - 1
- op = d.scanWhile(scanContinue)
- item := d.data[start : d.off-1]
- key, ok := unquote(item)
- if !ok {
- d.error(errPhase)
- }
-
- // Check for duplicate keys.
- _, ok = keys[key]
- if !ok {
- keys[key] = true
- } else {
- d.error(fmt.Errorf("json: duplicate key '%s' in object", key))
- }
-
- // Read : before value.
- if op == scanSkipSpace {
- op = d.scanWhile(scanSkipSpace)
- }
- if op != scanObjectKey {
- d.error(errPhase)
- }
-
- // Read value.
- m[key] = d.valueInterface()
-
- // Next token must be , or }.
- op = d.scanWhile(scanSkipSpace)
- if op == scanEndObject {
- break
- }
- if op != scanObjectValue {
- d.error(errPhase)
- }
- }
- return m
-}
-
-// literalInterface is like literal but returns an interface value.
-func (d *decodeState) literalInterface() interface{} {
- // All bytes inside literal return scanContinue op code.
- start := d.off - 1
- op := d.scanWhile(scanContinue)
-
- // Scan read one byte too far; back up.
- d.off--
- d.scan.undo(op)
- item := d.data[start:d.off]
-
- switch c := item[0]; c {
- case 'n': // null
- return nil
-
- case 't', 'f': // true, false
- return c == 't'
-
- case '"': // string
- s, ok := unquote(item)
- if !ok {
- d.error(errPhase)
- }
- return s
-
- default: // number
- if c != '-' && (c < '0' || c > '9') {
- d.error(errPhase)
- }
- n, err := d.convertNumber(string(item))
- if err != nil {
- d.saveError(err)
- }
- return n
- }
-}
-
-// getu4 decodes \uXXXX from the beginning of s, returning the hex value,
-// or it returns -1.
-func getu4(s []byte) rune {
- if len(s) < 6 || s[0] != '\\' || s[1] != 'u' {
- return -1
- }
- r, err := strconv.ParseUint(string(s[2:6]), 16, 64)
- if err != nil {
- return -1
- }
- return rune(r)
-}
-
-// unquote converts a quoted JSON string literal s into an actual string t.
-// The rules are different than for Go, so cannot use strconv.Unquote.
-func unquote(s []byte) (t string, ok bool) {
- s, ok = unquoteBytes(s)
- t = string(s)
- return
-}
-
-func unquoteBytes(s []byte) (t []byte, ok bool) {
- if len(s) < 2 || s[0] != '"' || s[len(s)-1] != '"' {
- return
- }
- s = s[1 : len(s)-1]
-
- // Check for unusual characters. If there are none,
- // then no unquoting is needed, so return a slice of the
- // original bytes.
- r := 0
- for r < len(s) {
- c := s[r]
- if c == '\\' || c == '"' || c < ' ' {
- break
- }
- if c < utf8.RuneSelf {
- r++
- continue
- }
- rr, size := utf8.DecodeRune(s[r:])
- if rr == utf8.RuneError && size == 1 {
- break
- }
- r += size
- }
- if r == len(s) {
- return s, true
- }
-
- b := make([]byte, len(s)+2*utf8.UTFMax)
- w := copy(b, s[0:r])
- for r < len(s) {
- // Out of room? Can only happen if s is full of
- // malformed UTF-8 and we're replacing each
- // byte with RuneError.
- if w >= len(b)-2*utf8.UTFMax {
- nb := make([]byte, (len(b)+utf8.UTFMax)*2)
- copy(nb, b[0:w])
- b = nb
- }
- switch c := s[r]; {
- case c == '\\':
- r++
- if r >= len(s) {
- return
- }
- switch s[r] {
- default:
- return
- case '"', '\\', '/', '\'':
- b[w] = s[r]
- r++
- w++
- case 'b':
- b[w] = '\b'
- r++
- w++
- case 'f':
- b[w] = '\f'
- r++
- w++
- case 'n':
- b[w] = '\n'
- r++
- w++
- case 'r':
- b[w] = '\r'
- r++
- w++
- case 't':
- b[w] = '\t'
- r++
- w++
- case 'u':
- r--
- rr := getu4(s[r:])
- if rr < 0 {
- return
- }
- r += 6
- if utf16.IsSurrogate(rr) {
- rr1 := getu4(s[r:])
- if dec := utf16.DecodeRune(rr, rr1); dec != unicode.ReplacementChar {
- // A valid pair; consume.
- r += 6
- w += utf8.EncodeRune(b[w:], dec)
- break
- }
- // Invalid surrogate; fall back to replacement rune.
- rr = unicode.ReplacementChar
- }
- w += utf8.EncodeRune(b[w:], rr)
- }
-
- // Quote, control characters are invalid.
- case c == '"', c < ' ':
- return
-
- // ASCII
- case c < utf8.RuneSelf:
- b[w] = c
- r++
- w++
-
- // Coerce to well-formed UTF-8.
- default:
- rr, size := utf8.DecodeRune(s[r:])
- r += size
- w += utf8.EncodeRune(b[w:], rr)
- }
- }
- return b[0:w], true
-}
diff --git a/vendor/gopkg.in/square/go-jose.v2/json/encode.go b/vendor/gopkg.in/square/go-jose.v2/json/encode.go
deleted file mode 100644
index 1dae8bb7..00000000
--- a/vendor/gopkg.in/square/go-jose.v2/json/encode.go
+++ /dev/null
@@ -1,1197 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package json implements encoding and decoding of JSON objects as defined in
-// RFC 4627. The mapping between JSON objects and Go values is described
-// in the documentation for the Marshal and Unmarshal functions.
-//
-// See "JSON and Go" for an introduction to this package:
-// https://golang.org/doc/articles/json_and_go.html
-package json
-
-import (
- "bytes"
- "encoding"
- "encoding/base64"
- "fmt"
- "math"
- "reflect"
- "runtime"
- "sort"
- "strconv"
- "strings"
- "sync"
- "unicode"
- "unicode/utf8"
-)
-
-// Marshal returns the JSON encoding of v.
-//
-// Marshal traverses the value v recursively.
-// If an encountered value implements the Marshaler interface
-// and is not a nil pointer, Marshal calls its MarshalJSON method
-// to produce JSON. If no MarshalJSON method is present but the
-// value implements encoding.TextMarshaler instead, Marshal calls
-// its MarshalText method.
-// The nil pointer exception is not strictly necessary
-// but mimics a similar, necessary exception in the behavior of
-// UnmarshalJSON.
-//
-// Otherwise, Marshal uses the following type-dependent default encodings:
-//
-// Boolean values encode as JSON booleans.
-//
-// Floating point, integer, and Number values encode as JSON numbers.
-//
-// String values encode as JSON strings coerced to valid UTF-8,
-// replacing invalid bytes with the Unicode replacement rune.
-// The angle brackets "<" and ">" are escaped to "\u003c" and "\u003e"
-// to keep some browsers from misinterpreting JSON output as HTML.
-// Ampersand "&" is also escaped to "\u0026" for the same reason.
-//
-// Array and slice values encode as JSON arrays, except that
-// []byte encodes as a base64-encoded string, and a nil slice
-// encodes as the null JSON object.
-//
-// Struct values encode as JSON objects. Each exported struct field
-// becomes a member of the object unless
-// - the field's tag is "-", or
-// - the field is empty and its tag specifies the "omitempty" option.
-// The empty values are false, 0, any
-// nil pointer or interface value, and any array, slice, map, or string of
-// length zero. The object's default key string is the struct field name
-// but can be specified in the struct field's tag value. The "json" key in
-// the struct field's tag value is the key name, followed by an optional comma
-// and options. Examples:
-//
-// // Field is ignored by this package.
-// Field int `json:"-"`
-//
-// // Field appears in JSON as key "myName".
-// Field int `json:"myName"`
-//
-// // Field appears in JSON as key "myName" and
-// // the field is omitted from the object if its value is empty,
-// // as defined above.
-// Field int `json:"myName,omitempty"`
-//
-// // Field appears in JSON as key "Field" (the default), but
-// // the field is skipped if empty.
-// // Note the leading comma.
-// Field int `json:",omitempty"`
-//
-// The "string" option signals that a field is stored as JSON inside a
-// JSON-encoded string. It applies only to fields of string, floating point,
-// integer, or boolean types. This extra level of encoding is sometimes used
-// when communicating with JavaScript programs:
-//
-// Int64String int64 `json:",string"`
-//
-// The key name will be used if it's a non-empty string consisting of
-// only Unicode letters, digits, dollar signs, percent signs, hyphens,
-// underscores and slashes.
-//
-// Anonymous struct fields are usually marshaled as if their inner exported fields
-// were fields in the outer struct, subject to the usual Go visibility rules amended
-// as described in the next paragraph.
-// An anonymous struct field with a name given in its JSON tag is treated as
-// having that name, rather than being anonymous.
-// An anonymous struct field of interface type is treated the same as having
-// that type as its name, rather than being anonymous.
-//
-// The Go visibility rules for struct fields are amended for JSON when
-// deciding which field to marshal or unmarshal. If there are
-// multiple fields at the same level, and that level is the least
-// nested (and would therefore be the nesting level selected by the
-// usual Go rules), the following extra rules apply:
-//
-// 1) Of those fields, if any are JSON-tagged, only tagged fields are considered,
-// even if there are multiple untagged fields that would otherwise conflict.
-// 2) If there is exactly one field (tagged or not according to the first rule), that is selected.
-// 3) Otherwise there are multiple fields, and all are ignored; no error occurs.
-//
-// Handling of anonymous struct fields is new in Go 1.1.
-// Prior to Go 1.1, anonymous struct fields were ignored. To force ignoring of
-// an anonymous struct field in both current and earlier versions, give the field
-// a JSON tag of "-".
-//
-// Map values encode as JSON objects.
-// The map's key type must be string; the map keys are used as JSON object
-// keys, subject to the UTF-8 coercion described for string values above.
-//
-// Pointer values encode as the value pointed to.
-// A nil pointer encodes as the null JSON object.
-//
-// Interface values encode as the value contained in the interface.
-// A nil interface value encodes as the null JSON object.
-//
-// Channel, complex, and function values cannot be encoded in JSON.
-// Attempting to encode such a value causes Marshal to return
-// an UnsupportedTypeError.
-//
-// JSON cannot represent cyclic data structures and Marshal does not
-// handle them. Passing cyclic structures to Marshal will result in
-// an infinite recursion.
-//
-func Marshal(v interface{}) ([]byte, error) {
- e := &encodeState{}
- err := e.marshal(v)
- if err != nil {
- return nil, err
- }
- return e.Bytes(), nil
-}
-
-// MarshalIndent is like Marshal but applies Indent to format the output.
-func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) {
- b, err := Marshal(v)
- if err != nil {
- return nil, err
- }
- var buf bytes.Buffer
- err = Indent(&buf, b, prefix, indent)
- if err != nil {
- return nil, err
- }
- return buf.Bytes(), nil
-}
-
-// HTMLEscape appends to dst the JSON-encoded src with <, >, &, U+2028 and U+2029
-// characters inside string literals changed to \u003c, \u003e, \u0026, \u2028, \u2029
-// so that the JSON will be safe to embed inside HTML